From e77f3a0ee27b551e79fde9ec54e2a6eeadec0c4c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Sep 2024 17:01:29 +0000 Subject: [PATCH] mathLatex damonc-top/blognew@fbaf2d116bcb568b04995c8c1759c45b3d8ae28a --- .nojekyll | 0 CNAME | 1 + docs/404.html | 1 + docs/CNAME | 1 + .../index.html | 605 ++++++ .../2018-01-28-Unity_Tessellation/index.html | 615 ++++++ docs/_drafts/ES2015-note/index.html | 228 +++ docs/_drafts/WebSocket/index.html | 1 + docs/_drafts/about/index.html | 1 + docs/_drafts/algorithm1-array/index.html | 782 ++++++++ docs/_drafts/algorithm2-string/index.html | 197 ++ docs/_drafts/collections/index.html | 1 + docs/_drafts/demo.html | 1 + docs/_drafts/threeJS-light-shadow/index.html | 47 + docs/_redirects | 0 docs/_static/css/extra.css | 122 ++ docs/_static/css/han.css | 1745 +++++++++++++++++ docs/_static/js/math-csr.js | 9 + docs/_static/js/myext.js | 30 + docs/assets/images/favicon.png | Bin 0 -> 1870 bytes .../assets/javascripts/bundle.561f57c7.min.js | 29 + .../javascripts/bundle.561f57c7.min.js.map | 8 + .../javascripts/extra/bundle.f719a234.min.js | 18 + .../extra/bundle.f719a234.min.js.map | 8 + .../workers/search.8e7a41fd.min.js | 3 + .../workers/search.8e7a41fd.min.js.map | 8 + .../assets/stylesheets/extra.746751fe.min.css | 1 + .../stylesheets/extra.746751fe.min.css.map | 1 + docs/assets/stylesheets/main.d9cc33f8.min.css | 1 + .../stylesheets/main.d9cc33f8.min.css.map | 1 + .../stylesheets/palette.2505c338.min.css | 1 + .../stylesheets/palette.2505c338.min.css.map | 1 + .../vendor/mathjax/es5/a11y/assistive-mml.js | 1 + .../vendor/mathjax/es5/a11y/complexity.js | 1 + .../vendor/mathjax/es5/a11y/explorer.js | 1 + .../mathjax/es5/a11y/semantic-enrich.js | 1 + docs/assets/vendor/mathjax/es5/a11y/sre.js | 1 + .../vendor/mathjax/es5/adaptors/liteDOM.js | 1 + docs/assets/vendor/mathjax/es5/core.js | 1 + .../vendor/mathjax/es5/input/asciimath.js | 1 + docs/assets/vendor/mathjax/es5/input/mml.js | 1 + .../vendor/mathjax/es5/input/mml/entities.js | 1 + .../mathjax/es5/input/mml/extensions/mml3.js | 1 + .../es5/input/mml/extensions/mml3.sef.json | 1 + .../vendor/mathjax/es5/input/tex-base.js | 1 + .../vendor/mathjax/es5/input/tex-full.js | 34 + docs/assets/vendor/mathjax/es5/input/tex.js | 1 + .../es5/input/tex/extensions/action.js | 1 + .../es5/input/tex/extensions/all-packages.js | 34 + .../mathjax/es5/input/tex/extensions/ams.js | 1 + .../mathjax/es5/input/tex/extensions/amscd.js | 1 + .../es5/input/tex/extensions/autoload.js | 1 + .../mathjax/es5/input/tex/extensions/bbox.js | 1 + .../es5/input/tex/extensions/boldsymbol.js | 1 + .../es5/input/tex/extensions/braket.js | 1 + .../es5/input/tex/extensions/bussproofs.js | 1 + .../es5/input/tex/extensions/cancel.js | 1 + .../mathjax/es5/input/tex/extensions/cases.js | 1 + .../es5/input/tex/extensions/centernot.js | 1 + .../mathjax/es5/input/tex/extensions/color.js | 1 + .../es5/input/tex/extensions/colortbl.js | 1 + .../es5/input/tex/extensions/colorv2.js | 1 + .../es5/input/tex/extensions/configmacros.js | 1 + .../es5/input/tex/extensions/empheq.js | 1 + .../es5/input/tex/extensions/enclose.js | 1 + .../es5/input/tex/extensions/extpfeil.js | 1 + .../es5/input/tex/extensions/gensymb.js | 1 + .../mathjax/es5/input/tex/extensions/html.js | 1 + .../es5/input/tex/extensions/mathtools.js | 1 + .../es5/input/tex/extensions/mhchem.js | 34 + .../es5/input/tex/extensions/newcommand.js | 1 + .../es5/input/tex/extensions/noerrors.js | 1 + .../es5/input/tex/extensions/noundefined.js | 1 + .../es5/input/tex/extensions/physics.js | 1 + .../es5/input/tex/extensions/require.js | 1 + .../es5/input/tex/extensions/setoptions.js | 1 + .../es5/input/tex/extensions/tagformat.js | 1 + .../es5/input/tex/extensions/textcomp.js | 1 + .../es5/input/tex/extensions/textmacros.js | 1 + .../es5/input/tex/extensions/unicode.js | 1 + .../es5/input/tex/extensions/upgreek.js | 1 + .../mathjax/es5/input/tex/extensions/verb.js | 1 + docs/assets/vendor/mathjax/es5/latest.js | 1 + docs/assets/vendor/mathjax/es5/loader.js | 1 + docs/assets/vendor/mathjax/es5/mml-chtml.js | 1 + docs/assets/vendor/mathjax/es5/mml-svg.js | 1 + docs/assets/vendor/mathjax/es5/node-main.js | 1 + .../assets/vendor/mathjax/es5/output/chtml.js | 1 + .../mathjax/es5/output/chtml/fonts/tex.js | 1 + .../fonts/woff-v2/MathJax_AMS-Regular.woff | Bin 0 -> 40808 bytes .../woff-v2/MathJax_Calligraphic-Bold.woff | Bin 0 -> 9908 bytes .../woff-v2/MathJax_Calligraphic-Regular.woff | Bin 0 -> 9600 bytes .../fonts/woff-v2/MathJax_Fraktur-Bold.woff | Bin 0 -> 22340 bytes .../woff-v2/MathJax_Fraktur-Regular.woff | Bin 0 -> 21480 bytes .../fonts/woff-v2/MathJax_Main-Bold.woff | Bin 0 -> 34464 bytes .../fonts/woff-v2/MathJax_Main-Italic.woff | Bin 0 -> 20832 bytes .../fonts/woff-v2/MathJax_Main-Regular.woff | Bin 0 -> 34160 bytes .../woff-v2/MathJax_Math-BoldItalic.woff | Bin 0 -> 19776 bytes .../fonts/woff-v2/MathJax_Math-Italic.woff | Bin 0 -> 19360 bytes .../fonts/woff-v2/MathJax_Math-Regular.woff | Bin 0 -> 19288 bytes .../fonts/woff-v2/MathJax_SansSerif-Bold.woff | Bin 0 -> 15944 bytes .../woff-v2/MathJax_SansSerif-Italic.woff | Bin 0 -> 14628 bytes .../woff-v2/MathJax_SansSerif-Regular.woff | Bin 0 -> 12660 bytes .../fonts/woff-v2/MathJax_Script-Regular.woff | Bin 0 -> 11852 bytes .../fonts/woff-v2/MathJax_Size1-Regular.woff | Bin 0 -> 5792 bytes .../fonts/woff-v2/MathJax_Size2-Regular.woff | Bin 0 -> 5464 bytes .../fonts/woff-v2/MathJax_Size3-Regular.woff | Bin 0 -> 3244 bytes .../fonts/woff-v2/MathJax_Size4-Regular.woff | Bin 0 -> 5148 bytes .../woff-v2/MathJax_Typewriter-Regular.woff | Bin 0 -> 17604 bytes .../fonts/woff-v2/MathJax_Vector-Bold.woff | Bin 0 -> 1116 bytes .../fonts/woff-v2/MathJax_Vector-Regular.woff | Bin 0 -> 1136 bytes .../chtml/fonts/woff-v2/MathJax_Zero.woff | Bin 0 -> 1368 bytes docs/assets/vendor/mathjax/es5/output/svg.js | 1 + .../mathjax/es5/output/svg/fonts/tex.js | 1 + .../vendor/mathjax/es5/sre/mathmaps/base.json | 29 + .../vendor/mathjax/es5/sre/mathmaps/ca.json | 140 ++ .../vendor/mathjax/es5/sre/mathmaps/da.json | 140 ++ .../vendor/mathjax/es5/sre/mathmaps/de.json | 146 ++ .../vendor/mathjax/es5/sre/mathmaps/en.json | 158 ++ .../vendor/mathjax/es5/sre/mathmaps/es.json | 140 ++ .../vendor/mathjax/es5/sre/mathmaps/fr.json | 146 ++ .../vendor/mathjax/es5/sre/mathmaps/hi.json | 146 ++ .../vendor/mathjax/es5/sre/mathmaps/it.json | 146 ++ .../vendor/mathjax/es5/sre/mathmaps/nb.json | 146 ++ .../mathjax/es5/sre/mathmaps/nemeth.json | 125 ++ .../vendor/mathjax/es5/sre/mathmaps/nn.json | 146 ++ .../vendor/mathjax/es5/sre/mathmaps/sv.json | 146 ++ docs/assets/vendor/mathjax/es5/startup.js | 1 + .../mathjax/es5/tex-chtml-full-speech.js | 34 + .../vendor/mathjax/es5/tex-chtml-full.js | 34 + docs/assets/vendor/mathjax/es5/tex-chtml.js | 1 + .../vendor/mathjax/es5/tex-mml-chtml.js | 1 + docs/assets/vendor/mathjax/es5/tex-mml-svg.js | 1 + .../assets/vendor/mathjax/es5/tex-svg-full.js | 34 + docs/assets/vendor/mathjax/es5/tex-svg.js | 1 + docs/assets/vendor/mathjax/es5/ui/lazy.js | 1 + docs/assets/vendor/mathjax/es5/ui/menu.js | 1 + docs/assets/vendor/mathjax/es5/ui/safe.js | 1 + docs/edit-landing/index.html | 11 + docs/favicon.ico | Bin 0 -> 38078 bytes docs/favicon_192x192.png | Bin 0 -> 1590 bytes docs/favicon_512x512.png | Bin 0 -> 3816 bytes docs/images/OI_wiki_new_year_ver.png | Bin 0 -> 433639 bytes docs/images/homepage.png | Bin 0 -> 9681 bytes docs/images/hulu-black.png | Bin 0 -> 450 bytes docs/images/intergamix.png | Bin 0 -> 7670 bytes docs/images/netlify.png | Bin 0 -> 14014 bytes docs/images/wordArt.webp | Bin 0 -> 42724 bytes docs/index.html | 2 + docs/manifest.webmanifest | 20 + docs/posts/home/learn/index.html | 1 + docs/posts/unity3d/il2cpp/index.html | 1 + .../index.html | 588 ++++++ .../index.html | 753 +++++++ .../2018-01-03-Unity_First_light/index.html | 697 +++++++ .../2018-01-03-Unity_Multi_Light/index.html | 843 ++++++++ .../index.html | 357 ++++ .../2018-01-05-Unity_Shadows/index.html | 610 ++++++ .../2018-01-06-Unity_Reflection/index.html | 414 ++++ .../index.html | 463 +++++ .../index.html | 143 ++ .../index.html | 291 +++ .../index.html | 147 ++ .../index.html | 203 ++ .../2018-01-15-UNity_Shader_Fog/index.html | 423 ++++ .../index.html | 662 +++++++ .../index.html | 540 +++++ .../2018-01-21-Unity_Mix_Lighting/index.html | 579 ++++++ .../index.html | 535 +++++ .../2018-01-24-Unity_GPU_Instance/index.html | 319 +++ .../index.html | 612 ++++++ .../catlikecoding/images/2d view.png | Bin 0 -> 4521 bytes .../catlikecoding/images/3d view.png | Bin 0 -> 7043 bytes .../catlikecoding/images/3d view2.png | Bin 0 -> 5481 bytes .../catlikecoding/images/camera tras.png | Bin 0 -> 3091 bytes .../catlikecoding/images/cubearray.png | Bin 0 -> 16461 bytes .../catlikecoding/images/dffcult.png | Bin 0 -> 3905 bytes .../images/move scale rotation.gif | Bin 0 -> 447005 bytes .../translater/catlikecoding/images/move.gif | Bin 0 -> 898151 bytes .../translater/catlikecoding/images/plane.png | Bin 0 -> 1923 bytes .../catlikecoding/images/plane2.png | Bin 0 -> 2672 bytes .../catlikecoding/images/rotation1.png | Bin 0 -> 3298 bytes .../catlikecoding/images/rotation2.png | Bin 0 -> 7413 bytes .../translater/catlikecoding/images/scale.gif | Bin 0 -> 705315 bytes .../catlikecoding/images/trangle math.png | Bin 0 -> 6537 bytes .../catlikecoding/images/tutorial-image.png | Bin 0 -> 216775 bytes .../translater/catlikecoding/index.html | 1 + .../unity_matrix_transform/index.html | 589 ++++++ docs/robots.txt | 1 + docs/service-worker.js | 3 + docs/sitemap.xml | 173 ++ docs/sitemap.xml.gz | Bin 0 -> 644 bytes 192 files changed, 16470 insertions(+) create mode 100644 .nojekyll create mode 100644 CNAME create mode 100644 docs/404.html create mode 100644 docs/CNAME create mode 100644 docs/_drafts/2018-01-26-Flat_Wireframe_Shading/index.html create mode 100644 docs/_drafts/2018-01-28-Unity_Tessellation/index.html create mode 100644 docs/_drafts/ES2015-note/index.html create mode 100644 docs/_drafts/WebSocket/index.html create mode 100644 docs/_drafts/about/index.html create mode 100644 docs/_drafts/algorithm1-array/index.html create mode 100644 docs/_drafts/algorithm2-string/index.html create mode 100644 docs/_drafts/collections/index.html create mode 100644 docs/_drafts/demo.html create mode 100644 docs/_drafts/threeJS-light-shadow/index.html create mode 100644 docs/_redirects create mode 100644 docs/_static/css/extra.css create mode 100644 docs/_static/css/han.css create mode 100644 docs/_static/js/math-csr.js create mode 100644 docs/_static/js/myext.js create mode 100644 docs/assets/images/favicon.png create mode 100644 docs/assets/javascripts/bundle.561f57c7.min.js create mode 100644 docs/assets/javascripts/bundle.561f57c7.min.js.map create mode 100644 docs/assets/javascripts/extra/bundle.f719a234.min.js create mode 100644 docs/assets/javascripts/extra/bundle.f719a234.min.js.map create mode 100644 docs/assets/javascripts/workers/search.8e7a41fd.min.js create mode 100644 docs/assets/javascripts/workers/search.8e7a41fd.min.js.map create mode 100644 docs/assets/stylesheets/extra.746751fe.min.css create mode 100644 docs/assets/stylesheets/extra.746751fe.min.css.map create mode 100644 docs/assets/stylesheets/main.d9cc33f8.min.css create mode 100644 docs/assets/stylesheets/main.d9cc33f8.min.css.map create mode 100644 docs/assets/stylesheets/palette.2505c338.min.css create mode 100644 docs/assets/stylesheets/palette.2505c338.min.css.map create mode 100644 docs/assets/vendor/mathjax/es5/a11y/assistive-mml.js create mode 100644 docs/assets/vendor/mathjax/es5/a11y/complexity.js create mode 100644 docs/assets/vendor/mathjax/es5/a11y/explorer.js create mode 100644 docs/assets/vendor/mathjax/es5/a11y/semantic-enrich.js create mode 100644 docs/assets/vendor/mathjax/es5/a11y/sre.js create mode 100644 docs/assets/vendor/mathjax/es5/adaptors/liteDOM.js create mode 100644 docs/assets/vendor/mathjax/es5/core.js create mode 100644 docs/assets/vendor/mathjax/es5/input/asciimath.js create mode 100644 docs/assets/vendor/mathjax/es5/input/mml.js create mode 100644 docs/assets/vendor/mathjax/es5/input/mml/entities.js create mode 100644 docs/assets/vendor/mathjax/es5/input/mml/extensions/mml3.js create mode 100644 docs/assets/vendor/mathjax/es5/input/mml/extensions/mml3.sef.json create mode 100644 docs/assets/vendor/mathjax/es5/input/tex-base.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex-full.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/action.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/all-packages.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/ams.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/amscd.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/autoload.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/bbox.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/boldsymbol.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/braket.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/bussproofs.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/cancel.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/cases.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/centernot.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/color.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/colortbl.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/colorv2.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/configmacros.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/empheq.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/enclose.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/extpfeil.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/gensymb.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/html.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/mathtools.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/mhchem.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/newcommand.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/noerrors.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/noundefined.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/physics.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/require.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/setoptions.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/tagformat.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/textcomp.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/textmacros.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/unicode.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/upgreek.js create mode 100644 docs/assets/vendor/mathjax/es5/input/tex/extensions/verb.js create mode 100644 docs/assets/vendor/mathjax/es5/latest.js create mode 100644 docs/assets/vendor/mathjax/es5/loader.js create mode 100644 docs/assets/vendor/mathjax/es5/mml-chtml.js create mode 100644 docs/assets/vendor/mathjax/es5/mml-svg.js create mode 100644 docs/assets/vendor/mathjax/es5/node-main.js create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml.js create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/tex.js create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff create mode 100644 docs/assets/vendor/mathjax/es5/output/svg.js create mode 100644 docs/assets/vendor/mathjax/es5/output/svg/fonts/tex.js create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/base.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/ca.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/da.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/de.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/en.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/es.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/fr.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/hi.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/it.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/nb.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/nemeth.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/nn.json create mode 100644 docs/assets/vendor/mathjax/es5/sre/mathmaps/sv.json create mode 100644 docs/assets/vendor/mathjax/es5/startup.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-chtml-full-speech.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-chtml-full.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-chtml.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-mml-chtml.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-mml-svg.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-svg-full.js create mode 100644 docs/assets/vendor/mathjax/es5/tex-svg.js create mode 100644 docs/assets/vendor/mathjax/es5/ui/lazy.js create mode 100644 docs/assets/vendor/mathjax/es5/ui/menu.js create mode 100644 docs/assets/vendor/mathjax/es5/ui/safe.js create mode 100644 docs/edit-landing/index.html create mode 100644 docs/favicon.ico create mode 100644 docs/favicon_192x192.png create mode 100644 docs/favicon_512x512.png create mode 100644 docs/images/OI_wiki_new_year_ver.png create mode 100644 docs/images/homepage.png create mode 100644 docs/images/hulu-black.png create mode 100644 docs/images/intergamix.png create mode 100644 docs/images/netlify.png create mode 100644 docs/images/wordArt.webp create mode 100644 docs/index.html create mode 100644 docs/manifest.webmanifest create mode 100644 docs/posts/home/learn/index.html create mode 100644 docs/posts/unity3d/il2cpp/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-02-Unity_Combine_Texture/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-02-Unity_Shader_Fundamentals/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-03-Unity_First_light/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-03-Unity_Multi_Light/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-04-Unity_Advance_Texture/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-05-Unity_Shadows/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-06-Unity_Reflection/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-07-Unity_ShaderGUI_Extension_1/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-07-Unity_ShaderGUI_Extension_2/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-08-Unity_Shader_Transparent_1/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-09-Unity_Shader_Transparent_2/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-10-Unity_Deferred_Shading/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-15-UNity_Shader_Fog/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-17-Unity_Deferred_Lights/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-19-Unity_Static_Lightting/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-21-Unity_Mix_Lighting/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-23-Unity_RealTime_GI_LOD/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-24-Unity_GPU_Instance/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/2018-01-25-Unity_Parallax_Normals_Heightmap/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/2d view.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/3d view.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/3d view2.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/camera tras.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/cubearray.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/dffcult.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/move scale rotation.gif create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/move.gif create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/plane.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/plane2.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/rotation1.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/rotation2.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/scale.gif create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/trangle math.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/images/tutorial-image.png create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/index.html create mode 100644 docs/posts/unity3d/shader/translater/catlikecoding/unity_matrix_transform/index.html create mode 100644 docs/robots.txt create mode 100644 docs/service-worker.js create mode 100644 docs/sitemap.xml create mode 100644 docs/sitemap.xml.gz diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..45ecf99f --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +www.damonc.top diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 00000000..84af9c86 --- /dev/null +++ b/docs/404.html @@ -0,0 +1 @@ +404 Not Found - 银河揽月

404 Not Found


\ No newline at end of file diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..45ecf99f --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +www.damonc.top diff --git a/docs/_drafts/2018-01-26-Flat_Wireframe_Shading/index.html b/docs/_drafts/2018-01-26-Flat_Wireframe_Shading/index.html new file mode 100644 index 00000000..fdea09c8 --- /dev/null +++ b/docs/_drafts/2018-01-26-Flat_Wireframe_Shading/index.html @@ -0,0 +1,605 @@ +平面和线框着色(翻译二十一) - 银河揽月
跳转至

平面和线框着色(翻译二十一)

本篇摘要: 使用屏幕空间导数寻找三角形法线
使用生成的重心坐标创建线框
线框宽度可配置 .

made with Unity 2017.1.0.

image最终效果

1 平面着色渲染

网格由三角形组成,定义三角形是平的。使用表面法向量来增加表面弯曲的视觉效果,这使得创建光滑的表面网格成为可能。然而,有时实际上想要显示平坦的三角形,调试网格数据等等。

1
+2
+3
平面着色:为了使三角形看起来像平坦的表面,必须使用三角形自带的表面法线,而三角形表面法线又是通过三角形的三个顶点的法向量的平均得到,表面法线使得网格具有多面外观,称为平面着色。这也间接使得三角形之间不可能共享顶点,因为那样它们会共享面法线,而共享面法线会使得多个三角处于同一平面不能达到完美的弯曲视觉效果。 因此,最终会得到非常多的网格数据。 假如可以共享顶点那就太好了,后面会探讨共享面法线。
+
+线框:显示网格的线框也可能有用,这使得网格的连接视觉效果更加直观明显。理想情况下,我们可以使用自定义材质一次对任何网格进行平面着色和线框渲染。
+
1
Shader "Custom/Flat Wireframe" { … }
+

1.1 三角形法线-偏导函数方法

1
由于三角形属于二维平面,因此在其平面上的每个点的面法线都相同。 因此,渲染三角形内的每个片段都使用相同的法线向量。 **三角形面法线向量怎么计算?** 在顶点程序vertex中,我们只能访问存储在网格的顶点数据,除了美术设计初始定义此处存储的向量就是法线向量用来表示三角形的法线,否则全部没用。 在片段程序fragment中,我们只能访问插值后的顶点法线。
+

计算三角形面法线向量:为了确定表面法线,我们需要知道三角形在世界空间中的方向。这可以通过三角形的三个顶点的位置来确定。 假定它是nondegenerate Triangle非退化三角(不共线三点),则其法线向量等于三角形任意两边的叉积结果的归一化值。 如果它是degenerate Triangle退化三角(),则无论如何都不会渲染。 因此,以逆时针方向给出三角形的顶点 a,b和c,其法线向量为n =(c-a)x(b-a)。 通过归一化,可以得到最终的单位法向矢量ˆn = n / | n |

image

三角形法线推导.

1
+2
实际上,我们不需要使用三角形的顶点。只要位于三角形平面内的任意三个点就可以。具体来说,我们只需要位于三角形平面内的两个向量,只要这两个向量不平行且大于零即可。  
+有一种可以使用上述讨论的算法:渲染片段时使用的世界位置坐标。 例如,当前正在渲染的片段在屏幕空间中的世界坐标,就可以得到该片段在右侧的坐标以及片段在上方的坐标。
+

image
使用片段的世界位置

如果我们可以访问相邻片段的世界位置,那么上述算法就可以。虽然无法直接访问相邻片段的数据,但是我们可以访问此数据的screen-space derivatives(屏幕空间导数详细说明) 。 这是通过特殊指令完成的,该指令告诉我们屏幕空间X或Y维度中任何数据片段之间的变化率。

1
简单解释屏幕空间导数:例如,我们当前片段的世界位置为P0,屏幕空间X维度的下一个片段的位置是Px。 因此,这两个片段之间的X维度上的世界位置变化率是∂p / ∂x = Px – P0。 这是屏幕空间X维度中世界位置的偏导数。 我们可以通过内置的ddx函数在片段程序fragment中获取此数据,参数是提供顶点的世界坐标。
+
1
+2
+3
+4
void InitializeFragmentNormal(inout Interpolators i) {
+    float3 dpdx = ddx(i.worldPos);
+    …
+}
+

我们可以对屏幕空间的Y维度执行相同的操作,通过调用带有世界位置的ddy函数来查∂p / ∂y = Py – P0

1
+2
float3 dpdx = ddx(i.worldPos);
+float3 dpdy = ddy(i.worldPos);
+
1
因为这些值表示了片段世界坐标之间的差值,所以它们定义了三角形的两条边。我们实际上不知道那个三角形的确切形状,但它肯定在原来三角形的平面上,这才是最重要的。所以最终的法向量就是这些向量的标准化叉积。用这个向量覆盖原来的法向量。
+
1
+2
+3
float3 dpdx = ddx(i.worldPos);
+float3 dpdy = ddy(i.worldPos);
+i.normal = normalize(cross(dpdy, dpdx));
+

1
+2
**ddx和ddy 是咋回事?**
+    首先,有助于了解GPU着色总是一次评估2x2像素块上的片段/像素。 (即使最终仅需要绘制其中一些像素,而其他像素
+
1
+2
+3
位于多边形之外或被遮挡-不需要的片段也会被mask掉,而不是写入到缓冲区)。
+[![image](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200619163953376-1093846275.png "image")](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200619163952914-2128945443.png)
+    着色器中变量(或表达式)v的屏幕空间导数是从2x2像素四边形的一侧到另一侧的v值(在代码中的该点)的差。 即ddx
+
1
+2
是右像素中v的值减去左像素中v的值,垂直方向上的ddy同样。
+    这回答了“当我们在屏幕上水平(ddx)或垂直(ddy)移动时,v增加或减少的速度有多快?” -即用微积分的术语,它近
+
1
+2
似于变量的偏导数(近似值,因为它在每个片段上使用离散样本,而不是用数学方法评估函数的无穷小行为)
+    对于标量,我们也可以把它看成一个梯度向量,∇v = float2(ddx(v), ddy(v)),他们指向屏幕空间中v增长最快的
+
1
方向。这种类型的信息通常在内部用于选择纹理查找的适当的mipmap级别。对于大多数简单的效果,你不需要使用这些导数,
+
1
因为基本的2D纹理采样方法会为你处理它。
+
1
创建一个新的材质,使用我们的平面线框着色器。任何使用这种材质的网格都应该使用平面着色来渲染。它们看起来是多面的,虽然当你也使用法线贴图时可能很难看到。在本教程的截图中,我使用了标准的胶囊网格,使用灰色材质
+

image 平滑和平面着色对比

从远处看,胶囊看起来像是由四边形组成的,但这些四边形都是由两个三角形组成的。

image

1
_由三角形组成的四边形_
+

1.2 三角形法线-几何着色阶段处理

1
+2
+3
还有另一种方法可以确定三角形的法线。我们可以**使用实际的三角形顶点来计算法向量**,而不是使用导数指令。这需要用在每个三角形上,而不是每个顶点或片段上。这就是使用几何着色器的地方。
+
+几何着色器阶段位于顶点和片段程序阶段之间。它得到顶点程序的输出,按片元分组。在得到插值后和用于渲染片段之前,几何程序阶段可以修改这些数据。
+

image处理每个三角形的顶点

1
+2
+3
**额外计算几何着色阶段的意义在于可以给每个元素都提供顶点**,所以在我们的例子中每个三角形都有3个顶点。在这里的三角形网格是否共享顶点并不重要,因为几何程序会输出新的顶点数据。这允许我们获得三角形的法向量,并使用它作为所有三个顶点的法向量。
+
+添加几何着色器的代码文件\[flatWireframe.cginc\], 并定义一个MyGeometryProgram函数.
+
1
+2
+3
+4
+5
+6
+7
+8
#if !defined(FLAT\_WIREFRAME\_INCLUDED)
+#define FLAT\_WIREFRAME\_INCLUDED
+
+#include "My Lighting.cginc"
+
+void MyGeometryProgram () {}
+
+#endif
+
1
**注意:当shader model 4.0或更高时,几何体着色器才支持**。如果model目标被定义得很低时,Unity会自动增加到这个目标级别,但是低端手机能不能支持该model就得人为调整。同时,要真正使用几何着色器,我们必须添加#pragma geometry指令,就像顶点和片段函数一样。最后,引用flatWireframe.cginc。将这些变化应用到平面着色器的basePass、additivePass和deferredPass中。
+
1
+2
+3
+4
+5
+6
+7
+8
+9
#pragma target 4.0
+…
+#pragma vertex MyVertexProgram
+#pragma fragment MyFragmentProgram
+#pragma geometry MyGeometryProgram
+…
+
+//#include "My Lighting.cginc"
+#include "MyFlatWireframe.cginc"
+
1
**定义输出**。回到编辑器将会得到着色器编译错误,因为我们还没有正确定义我们的几何函数。我们必须声明它会输出多少顶点。这个数字可以变化,所以我们必须提供一个最大值。因为我们使用的是三角形,所以每次调用总是输出三个顶点。这是通过向函数中添加maxvertexcount属性来指定的,参数为3。
+
1
+2
\[maxvertexcount(3)\]
+void GeometryProgram () {}
+
1
**定义输入**。顶点程序的输出数据类型是插值后的顶点。所以在这种情况下
+
1
+2
\[maxvertexcount(3)\]
+void MyGeometryProgram (InterpolatorsVertex i) {}
+
1
**声明语义**。但是类型名称在技术上是不正确的,那是我们在命名它时没有考虑到几何着色器。在我们的例子中是三角形。这必须在输入类型之前指定语义。**另外**,由于三角形每个都有三个顶点,它们可构成一个数组,也要明确地定义它。
+
1
+2
\[maxvertexcount(3)\]
+void MyGeometryProgram (triangle InterpolatorsVertex i\[3\]) {}
+
1
因为几何着色器可以输出的顶点数量是不同的,所以没有一个单一的返回类型。相反,几何着色器写入到了片元流。在我们的示例中,它是一个TriangleStream,必须将其指定为inout参数。
+
1
+2
+3
+4
+5
\[maxvertexcount(3)\]
+void MyGeometryProgram (
+    triangle InterpolatorsVertex i\[3\],
+    inout TriangleStream stream
+) {}
+

TriangleStream类似于c#中的泛型类型。它需要知道顶点类型,也就是定义的struct InterpolatorsVertex。

1
+2
+3
+4
+5
\[maxvertexcount(3)\]
+void MyGeometryProgram (
+    triangle InterpolatorsVertex i\[3\],
+    inout TriangleStream<InterpolatorsVertex> stream
+) {}
+
1
现在函数定义完全正确了,接下来必须将顶点数据放入流中。这是通过对每个顶点调用流的Append函数来完成的,按照接收它们的顺序放入。
+
1
+2
+3
+4
+5
+6
+7
+8
+9
\[maxvertexcount(3)\]
+void MyGeometryProgram (
+    triangle InterpolatorsVertex i\[3\],
+    inout TriangleStream<InterpolatorsVertex> stream
+) {
+    stream.Append(i\[0\]);
+    stream.Append(i\[1\]);
+    stream.Append(i\[2\]);
+}
+

一个自定义的几何程序阶段配置完成

1
+2
**geometry program书写很怪啊!**
+Unity的着色器语法混合了CG和HLSL代码。大多数情况下它看起来像CG,但在这种情况下它像HLSL。
+

1.3 取出三角形的顶点法线

基于1.2方法,开始计算每个三角的顶点法线。

要找到三角形的法向量,首先要提取它的三个顶点的世界位置。

1
+2
+3
+4
+5
+6
+7
float3 p0 = i\[0\].worldPos.xyz;
+float3 p1 = i\[1\].worldPos.xyz;
+float3 p2 = i\[2\].worldPos.xyz;
+
+stream.Append(i\[0\]);
+stream.Append(i\[1\]);
+stream.Append(i\[2\]);
+

每个三角形做一次标准化的叉乘

1
+2
+3
+4
+5
float3 p0 = i\[0\].worldPos.xyz;
+float3 p1 = i\[1\].worldPos.xyz;
+float3 p2 = i\[2\].worldPos.xyz;
+
+float3 triangleNormal = normalize(cross(p1 - p0, p2 - p0));
+

将顶点法线替换为三角形法线.

1
+2
+3
+4
float3 triangleNormal = normalize(cross(p1 - p0, p2 - p0));
+i\[0\].normal = triangleNormal;
+i\[1\].normal = triangleNormal;
+i\[2\].normal = triangleNormal;
+

image

Flat shading, again.

上图得到了和以前一样的结果,使用了几何着色阶段舞台而不依赖于屏幕空间的派生指令。

1
+2
哪种方法最好?
+如果你所需要的只是平面着色,那么屏幕空间的渐变是实现这种效果最便宜的方法。然后你还可以从网格数据中去除法线——Unity可以自动做到这一点——也可以移除法线插值数据。一般来说,如果你可以不使用自定义几何舞台,那么就这样做。我们将继续使用几何方法,因为我们也需要它来进行线框渲染。
+

2 线框渲染

1
在处理完平面着色之后,我们继续渲染网格的线框。我们不会创建新的几何程序,也不会使用额外的pass来绘制线框。**我们将通过在三角形内部沿其边缘添加线条效果来创建线框视觉效果**。尽管定义形状轮廓的线看起来只有内部线的一半粗,但足以创建一个令人信服的线框。
+

After taking care of the flat shading, we move on to rendering the mesh's wireframe. We're not going to create new geometry, nor will we use an extra pass to draw lines. We'll create the wireframe visuals by adding a line effect on the inside of triangles, along their edges. This can create a convincing wireframe, although the lines defining a shape's silhouette will appear half as thick as the lines on the inside. This usually isn't very noticeable, so we'll accept this inconsistency.

image 线框效果预览

2.1 重心坐标

1
要向三角形边缘添加线框效果,我们需要知道片段到最近边缘的距离。这意味着关于三角形的信息需要在片段程序中可用。这可以通过向内插数据中添加三角形的质心坐标来实现。
+
1
[![image](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200619192241946-964812308.png "image")](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200619192241679-788522024.png)
+

重心坐标计算

1
因为网格数据不提供重心坐标,所以顶点程序不知道。为了让几何程序输出它们,我们必须定义一个新的结构。它应该包含与内插顶点相同的数据
+
1
+2
+3
struct InterpolatorsGeometry {
+    InterpolatorsVertex data;
+};
+

调整流数据类型,使其使用新的结构。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
void MyGeometryProgram (
+    triangle InterpolatorsVertex i\[3\],
+    inout TriangleStream<InterpolatorsGeometry\> stream
+) {
+    …
+
+    InterpolatorsGeometry g0, g1, g2;
+    g0.data = i\[0\];
+    g1.data = i\[1\];
+    g2.data = i\[2\];
+
+    stream.Append(g0);
+    stream.Append(g1);
+    stream.Append(g2);
+}
+

添加额外的数据到插值几何,增加TEXCOORD9类型重心坐标变量.

1
+2
+3
+4
struct InterpolatorsGeometry {
+    InterpolatorsVertex data;
+    float3 barycentricCoordinates : TEXCOORD9;
+};
+

给每个顶点分配一个质心坐标。

1
+2
+3
+4
+5
+6
+7
g0.barycentricCoordinates = float3(1, 0, 0);
+g1.barycentricCoordinates = float3(0, 1, 0);
+g2.barycentricCoordinates = float3(0, 0, 1);
+
+stream.Append(g0);
+stream.Append(g1);
+stream.Append(g2);
+

注意,质心坐标的总和总是1。只需要传递其中两个,通过从中减去两个坐标来得到第三个坐标。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
struct InterpolatorsGeometry {
+    InterpolatorsVertex data;
+    float2 barycentricCoordinates : TEXCOORD9;
+};
+
+    \[maxvertexcount(3)\]
+void MyGeometryProgram (
+    triangle InterpolatorsVertex i\[3\],
+    inout TriangleStream<InterpolatorsGeometry> stream
+) {
+    …
+
+    g0.barycentricCoordinates = float2(1, 0);
+    g1.barycentricCoordinates = float2(0, 1);
+    g2.barycentricCoordinates = float2(0, 0);
+
+    …
+}
+

2.2 定义额外的插值器

1
将重心坐标传递给片段程序,但不能简单地使用这些数据,需在_My Lighting.cginc_文件定义宏:_CUSTOM\_GEOMETRY\_INTERPOLATORS_,来确定是否可使用。
+
1
+2
+3
+4
+5
+6
struct Interpolators {
+    …
+    #if defined (CUSTOM\_GEOMETRY\_INTERPOLATORS)
+        CUSTOM\_GEOMETRY\_INTERPOLATORS
+    #endif
+};
+
1
现在我们可以在MyFlatWireframe中定义这个宏。我们必须在引入_My Lighting_之前做这个。我们也可以在插值几何中使用它,所以我们只需要写一次代码
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
#define CUSTOM\_GEOMETRY\_INTERPOLATORS \\
+    float2 barycentricCoordinates : TEXCOORD9;
+
+#include "My Lighting.cginc"
+
+struct InterpolatorsGeometry {
+    InterpolatorsVertex data;
+//  float2 barycentricCoordinates : TEXCOORD9;
+    CUSTOM\_GEOMETRY\_INTERPOLATORS
+};
+

2.3 拆分文件

我们如何使用重心坐标来可视化线框?也要照明参数不应参与计算。

创建新文件myLightingInput.cginc

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
#if !defined(MY\_LIGHTING\_INPUT\_INCLUDED)
+#define MY\_LIGHTING\_INPUT\_INCLUDED
+
+#include "UnityPBSLighting.cginc"
+#include "AutoLight.cginc"
+
+#if defined(FOG\_LINEAR) || defined(FOG\_EXP) || defined(FOG\_EXP2)
+    #if !defined(FOG\_DISTANCE)
+        #define FOG\_DEPTH 1
+    #endif
+    #define FOG\_ON 1
+#endif
+
+…
+
+float3 GetEmission (Interpolators i) {
+    #if defined(FORWARD\_BASE\_PASS) || defined(DEFERRED\_PASS)
+        #if defined(\_EMISSION\_MAP)
+            return tex2D(\_EmissionMap, i.uv.xy) \* \_Emission;
+        #else
+            return \_Emission;
+        #endif
+    #else
+        return 0;
+    #endif
+}
+
+#endif
+

在myLighting.cginc删除重复代码

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
#if !defined(MY\_LIGHTING\_INCLUDED)
+#define MY\_LIGHTING\_INCLUDED
+
+//#include "UnityPBSLighting.cginc"
+// …
+//
+//float3 GetEmission (Interpolators i) {
+//    …
+//}
+
+#include "My Lighting Input.cginc"
+
+void ComputeVertexLightColor (inout InterpolatorsVertex i) {
+    #if defined(VERTEXLIGHT\_ON)
+        i.vertexLightColor = Shade4PointLights(
+            unity\_4LightPosX0, unity\_4LightPosY0, unity\_4LightPosZ0,
+            unity\_LightColor\[0\].rgb, unity\_LightColor\[1\].rgb,
+            unity\_LightColor\[2\].rgb, unity\_LightColor\[3\].rgb,
+            unity\_4LightAtten0, i.worldPos.xyz, i.normal
+        );
+    #endif
+}
+

现在就可以在线框shader_MyFlatWireframe_.分开计算了

1
+2
+3
#include "My Lighting Input.cginc"
+
+#include "My Lighting.cginc"
+

2.4 重写线框的Albedo

定义线框专属宏ALBEDO_FUNCTION.

1
+2
+3
+4
+5
#include "My Lighting Input.cginc"
+
+#if !defined(ALBEDO\_FUNCTION)
+    #define ALBEDO\_FUNCTION GetAlbedo
+#endif
+

用宏指令ALBEDO_FUNCTION.替换掉GetAlbedo 函数.

1
+2
+3
+4
float3 albedo = DiffuseAndSpecularFromMetallic
+(
+    ALBEDO\_FUNCTION(i), GetMetallic(i), specularTint, oneMinusReflectivity
+);
+

在线框shader增加线框函数GetAlbedoWithWireframe , 它首先要计算一次原始的albedo,然后再计算线框!

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
#include "My Lighting Input.cginc"
+
+float3 GetAlbedoWithWireframe (Interpolators i) {
+    float3 albedo = GetAlbedo(i);
+    return albedo;
+}
+
+#define ALBEDO\_FUNCTION GetAlbedoWithWireframe
+
+#include "My Lighting.cginc"
+

直接使用重心坐标作为反照率.

1
+2
+3
+4
+5
+6
+7
+8
float3 GetAlbedoWithWireframe (Interpolators i) {
+    float3 albedo = GetAlbedo(i);
+    float3 barys;
+    barys.xy = i.barycentricCoordinates;
+    barys.z = 1 - barys.x - barys.y;
+    albedo = barys;
+    return albedo;
+}
+

[image

重心坐标as albedo

](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200621111342527-351514486.png)

2.5 Creating Wires

为了创建线框效果,需要知道片段离最近的三角形边缘有多近。我们可以通过取重心坐标的最小值来得到它,在重心区域内得到了到边缘的最小距离,我们直接用它来表示反照率。

1
+2
+3
+4
+5
+6
+7
    float3 albedo = GetAlbedo(i);
+    float3 barys;
+    barys.xy = i.barycentricCoordinates;
+    barys.z = 1 - barys.x - barys.y;
+//  albedo = barys;
+    float minBary = min(barys.x, min(barys.y, barys.z));
+    return albedo \* minBary;
+

image最小距离.

统一以最近距离会导致粗细不一致,需要使用[smoothstep](http://developer.download.nvidia.com/cg/smoothstep.html) 过渡

1
+2
+3
    float minBary = min(barys.x, min(barys.y, barys.z));
+    minBary = smoothstep(0, 0.1, minBary);
+    return albedo \* minBary;
+

image

调整后的过渡

2.6 固定宽度

上述线框效果只适用于边长大致相同的三角形,同时有远近视角缘故,线有粗有细。两个方向的屏幕空间导数值可能有负有正,取它们的绝对值

1
+2
+3
float minBary = min(barys.x, min(barys.y, barys.z));
+float delta = abs(ddx(minBary)) + abs(ddy(minBary));
+minBary = smoothstep(0, delta, minBary);
+

[fwidth](http://developer.download.nvidia.com/cg/fwidth.html) 函数也可以表示上述两段代码!

1
+2
+3
//float minBary = min(barys.x, min(barys.y, barys.z));
+//float delta = abs(ddx(minBary)) + abs(ddy(minBary));
+float delta = fwidth(minBary);
+

[image

固定宽度线框

](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200621111344690-111711099.png)

如果觉得产生的线显得有点细,可以通过将过渡从边缘偏移一点来解决粗度,例如用与混合范围相同的值。

1
    minBary = smoothstep(delta, 2 \* delta, minBary);
+

image

增厚的线框(有锯齿).

产生更粗更清晰的线条,但也会在三角形附近的线条中显示锯齿。这些锯齿影的出现是由于这些区域最近的边缘过渡太突然,不连续的导致的。为了解决这个问题,我们必须先计算重心坐标的导数,再混合,然后在那之后获取最小值.

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
/\*先取出一次最近距离,先计算偏导取绝对值算出过渡\*/
+barys.z = 1 - barys.x - barys.y;
+//float3 deltas = fwidth(barys);
+float minBary = min(barys.x, min(barys.y, barys.z));
+float delta = abs(ddx(minBary)) + abs(ddy(minBary));
+/\*用过渡增加重心距离\*/
+barys = smoothstep(deltas, 2 \* deltas, barys);
+/\*再取一次最小距离\*/
+float minBary = min(barys.x, min(barys.y, barys.z));
+//float delta = fwidth(minBary);
+//minBary = smoothstep(delta, 2 \* delta, minBary);
+return albedo \* minBary;
+

image

高级线框.

2.7 可配置线框

线框效果有了,但有可能需要使用其他线宽、混合颜色,也许想对每种材料使用不同的设置。 因此,向着色器添加三个属性。

首先是线框颜色,其次是线框平滑度,控制过渡范围。 从0到10的范围应该足够,默认值为1,代表宽度测量的倍数。 第三是线框厚度,其设置与平滑相同。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
\_WireframeColor ("Wireframe Color", Color) = (0, 0, 0)
+\_WireframeSmoothing ("Wireframe Smoothing", Range(0, 10)) = 1
+\_WireframeThickness ("Wireframe Thickness", Range(0, 10)) = 1
+...
+float3 \_WireframeColor;
+float \_WireframeSmoothing;
+float \_WireframeThickness;
+
+float3 GetAlbedoWithWireframe (Interpolators i) {
+    float3 albedo = GetAlbedo(i);
+    float3 barys;
+    barys.xy = i.barycentricCoordinates;
+    barys.z = 1 - barys.x - barys.y;
+    float3 deltas = fwidth(barys);
+    float3 smoothing = deltas \* \_WireframeSmoothing;
+    float3 thickness = deltas \* \_WireframeThickness;
+    barys = smoothstep(thickness, thickness + smoothing, barys);
+    float minBary = min(barys.x, min(barys.y, barys.z));
+//    return albedo \* minBary;
+    return lerp(\_WireframeColor, albedo, minBary);
+}
+
1
创建新的属性自定义着色器GUI。
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
    void DoWireframe () {
+        GUILayout.Label("Wireframe", EditorStyles.boldLabel);
+        EditorGUI.indentLevel += 2;
+        editor.ShaderProperty(
+            FindProperty("\_WireframeColor"),
+            MakeLabel("Color")
+        );
+        editor.ShaderProperty(
+            FindProperty("\_WireframeSmoothing"),
+            MakeLabel("Smoothing", "In screen space.")
+        );
+        editor.ShaderProperty(
+            FindProperty("\_WireframeThickness"),
+            MakeLabel("Thickness", "In screen space.")
+        );
+        EditorGUI.indentLevel -= 2;
+    }
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
public override void OnGUI (
+    MaterialEditor editor, MaterialProperty\[\] properties
+) {
+    this.target = editor.target as Material;
+    this.editor = editor;
+    this.properties = properties;
+    DoRenderingMode();
+    if (target.HasProperty("\_WireframeColor")) {
+        DoWireframe();
+    }
+    DoMain();
+    DoSecondary();
+    DoAdvanced();
+}
+

image

可配置线框属性.

本文转自 https://www.cnblogs.com/YASUHATI/p/13155566.html,如有侵权,请联系删除。


\ No newline at end of file diff --git a/docs/_drafts/2018-01-28-Unity_Tessellation/index.html b/docs/_drafts/2018-01-28-Unity_Tessellation/index.html new file mode 100644 index 00000000..21e36de3 --- /dev/null +++ b/docs/_drafts/2018-01-28-Unity_Tessellation/index.html @@ -0,0 +1,615 @@ +Unity 曲面细分(翻译二十二) - 银河揽月
跳转至

Unity 曲面细分(翻译二十二)

hull and domain渲染阶段
三角细分
控制细化

Unity2017.1.0

image最终效果.

1 Hulls and Domains渲染阶段

曲面细分是将表面切成更小更精细的技术。在我们的例子中,我们将三角形细分,最后得到覆盖相同空间的更多更小的三角形。
GPU能够拆分渲染提供给它的三角形。 这样做有多种原因,当三角形的一部分最终被剪切时。 我们无法控制,但是还有一个细分阶段可以配置。 此阶段位于顶点vertex和片段fragment着色器阶段之间, 添加一个Hulls and Domains程序。

image流水程序

1.1 创建Tessellation Shader

创建Tessellation.shaderMyTessellation.cginc

1
Shader "Custom/Tessellation" { … }
+
1
+2
+3
+4
#if !defined(TESSELLATION\_INCLUDED)
+#define TESSELLATION\_INCLUDED
+
+#endif
+

当使用Tessellation,最小的着色器目标等级是4.6。如果我们不手动设置,Unity将会发出警告并自动使用该级别。我们要把镶嵌阶段添加到base_pass和additive_pass,deferred_pass,阴影通道没必要。

1
+2
+3
+4
#pragma target 4.6
+…
+#include "MyFlatWireframe.cginc"
+#include "MyTessellation.cginc"
+

创建一个quad、材质.

image

它由两个等腰直角三角形组成。短边长度为1,长对角线长度为√2.

1.2 Hull Shaders程序-整数模式

类似geometry着色阶段,Hull程序可以处理三角形,四边形,或等值线,必须告诉它应该在什么表面上工作,并提供必要的数据。这是赫尔项目的工作。void函数开始

1
void MyHullProgram () {}
+

hull program在一个面片上运行,它作为参数传递给hull,添加一个InputPatch参数

1
void MyHullProgram (InputPatch patch) {}
+

面片上可能有许多网格顶点,必须指定顶点的数据格式。现在我们将使用VertexData结构体

1
void MyHullProgram (InputPatch<VertexData\> patch) {}
+

当我们处理三角形时,每个面片将包含三个顶点。这个也必须指定为InputPatch的第二个模板参数

1
void MyHullProgram (InputPatch<VertexData, 3\> patch) {}
+

hull程序的工作是传递所需的顶点数据到Tessellation阶段。虽然给它提供了一整个面片,但该函数每次只能处理面片中一个顶点,附加一个参数指定hull应该与哪个(顶点)一起工作。该参数是一个无符号整数,具有SV_OutputControlPointID语义

1
+2
+3
+4
void MyHullProgram (
+    InputPatch<VertexData, 3> patch,
+    uint id : SV\_OutputControlPointID
+) {}
+

先只需将面片作为数组,根据索引id然后返回所需的顶点数据

1
+2
+3
+4
+5
+6
VertexData MyHullProgram (
+    InputPatch<VertexData, 3> patch,
+    uint id : SV\_OutputControlPointID
+) {
+    return patch\[id\];
+}
+

这看起来像一个函数程序

1
+2
+3
+4
#pragma vertex MyVertexProgram
+#pragma fragment MyFragmentProgram
+#pragma hull MyHullProgram
+#pragma geometry MyGeometryProgram
+

这将产生一些编译错误,提示没有正确配置hull着色器。与几何函数一样,它需要属性来配置。首先,我们必须明确地告诉它它适用于三角形。这是通过使用tri作为参数的UNITY_domain属性完成的

1
+2
\[UNITY\_domain("tri")\]
+VertexData MyHullProgram …
+

还必须明确地指定每个三角形一个patch输出三个控制点,

1
+2
+3
\[UNITY\_domain("tri")\]
+\[UNITY\_outputcontrolpoints(3)\]
+VertexData MyHullProgram …
+

当GPU创建新的三角形时,它需要知道我们想要将它们定义为顺时针还是逆时针。像所有其他三角形一样,它们应该是顺时针的。这是通过UNITY_outputtopology属性来控制的。它的参数应该是triangle_cw

1
+2
+3
+4
\[UNITY\_domain("tri")\]
+\[UNITY\_outputcontrolpoints(3)\]
+\[UNITY\_outputtopology("triangle\_cw")\]
+VertexData MyHullProgram …
+

GPU还需要通过UNITY_partitioning属性被告知如何分割-整数模式

1
+2
+3
+4
+5
\[UNITY\_domain("tri")\]
+\[UNITY\_outputcontrolpoints(3)\]
+\[UNITY\_outputtopology("triangle\_cw")\]
+\[UNITY\_partitioning("integer")\]
+VertexData MyHullProgram …
+

除了划分方法,GPU还需要知道patch应该被分割成多少部分。这不是一个常数值,它可以在每个patch中变化。我们必须提供一个函数来计算它,叫做patch常数函数。

1
+2
+3
+4
+5
+6
\[UNITY\_domain("tri")\]
+\[UNITY\_outputcontrolpoints(3)\]
+\[UNITY\_outputtopology("triangle\_cw")\]
+\[UNITY\_partitioning("integer")\]
+\[UNITY\_patchconstantfunc("MyPatchConstantFunction")\]
+VertexData MyHullProgram …
+

1.3 Patch常数函数

每个patch仅被调用一次patch常数函数,而不是每个顶点都调用一次。实际上,此功能是与MyHullProgram并行运行。

image

为了确定如何细分三角形,GPU使用了四个细分因子。三角形patch的三个边都有一个因子,必须作为具有SV_TessFactor语义的float数组传递。 三角形的内部也有一个因子,使用SV_InsideTessFactor语义。

1
struct TessellationFactors 
+
1
+2
+3
+4
{
+    float edge\[3\] : SV\_TessFactor;
+    float inside : SV\_InsideTessFactor;
+};
+

patch常量函数以patch作为输入参数并输出因子。所有因子设置为1,这将导致tessellation阶段不细分patch。

1
+2
+3
+4
+5
+6
+7
+8
TessellationFactors MyPatchConstantFunction (InputPatch<VertexData, 3> patch) {
+    TessellationFactors f;
+    f.edge\[0\] = 1;
+    f.edge\[1\] = 1;
+    f.edge\[2\] = 1;
+    f.inside = 1;
+    return f;
+}
+

1.4 Domain Shaders程序

一个完整的曲面细分阶段需要Hull确定面片,也要Domain生成顶点。

1
void MyDomainProgram () {}
+

二者都作用在同一个阶段,再次使用UNITY_domain属性

1
+2
\[UNITY\_domain("tri")\]
+void MyDomainProgram () {}
+

Domain参数需要细分因子以及patch面片.

1
+2
+3
+4
+5
\[UNITY\_domain("tri")\]
+void MyDomainProgram (
+    TessellationFactors factors,
+    OutputPatch<VertexData, 3> patch
+) {}
+

曲面细分阶段确定细分时,它不会产生任何新的顶点。 相反,它会为这些顶点提供重心坐标。 使用这些坐标来导出最终顶点取决于Domain着色器。 为其提供重心坐标它们具有SV_DomainLocation语义。

1
+2
+3
+4
+5
+6
\[UNITY\_domain("tri")\]
+void MyDomainProgram (
+    TessellationFactors factors,
+    OutputPatch<VertexData, 3> patch,
+    float3 barycentricCoordinates : SV\_DomainLocation
+) {}
+

在函数内部,我们必须生成最终的顶点数据。

1
+2
+3
+4
+5
+6
+7
+8
\[UNITY\_domain("tri")\]
+void MyDomainProgram (
+    TessellationFactors factors,
+    OutputPatch<VertexData, 3> patch,
+    float3 barycentricCoordinates : SV\_DomainLocation
+) {
+    VertexData data;
+}
+

为了找到这个顶点的位置,使用重心坐标。X、Y和Z坐标决定了第一个、第二个和第三个控制点的权重。

1
+2
+3
+4
+5
VertexData data;
+data.vertex =
+    patch\[0\].vertex \* barycentricCoordinates.x +
+    patch\[1\].vertex \* barycentricCoordinates.y +
+    patch\[2\].vertex \* barycentricCoordinates.z;
+

但是这就必须用同样的方法插值所有数据。让我们为它定义一个方便的宏,它可以用于所有的向量大小

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
//    data.vertex =
+//        patch\[0\].vertex \* barycentricCoordinates.x +
+//        patch\[1\].vertex \* barycentricCoordinates.y +
+//        patch\[2\].vertex \* barycentricCoordinates.z;    
+#define MY\_DOMAIN\_PROGRAM\_INTERPOLATE(fieldName) data.fieldName = \\
+    patch\[0\].fieldName \* barycentricCoordinates.x + \\
+    patch\[1\].fieldName \* barycentricCoordinates.y + \\
+    patch\[2\].fieldName \* barycentricCoordinates.z;
+
+MY\_DOMAIN\_PROGRAM\_INTERPOLATE(vertex)
+

除了顶点位置,还有法线,切线,和所有UV坐标.

1
+2
+3
+4
+5
+6
    MY\_DOMAIN\_PROGRAM\_INTERPOLATE(vertex)
+    MY\_DOMAIN\_PROGRAM\_INTERPOLATE(normal)
+    MY\_DOMAIN\_PROGRAM\_INTERPOLATE(tangent)
+    MY\_DOMAIN\_PROGRAM\_INTERPOLATE(uv)
+    MY\_DOMAIN\_PROGRAM\_INTERPOLATE(uv1)
+    MY\_DOMAIN\_PROGRAM\_INTERPOLATE(uv2)
+

我们唯一没有插入的是实例id。因为Unity不同时支持GPU实例化和镶嵌,所以复制这个ID是没有意义的。为了防止编译错误,从三次着色器传递中删除多编译指令。这也将从着色器的GUI中移除实例化选项。

1
+2
//#pragma multi\_compile\_instancing
+//#pragma instancing\_options lodfade force\_same\_maxcount\_for\_gl
+

现在我们有了一个新的顶点,它将在这一阶段之后被发送到几何程序或插值器。但是这些程序期望插值顶点数据,而不是顶点数据。为了解决这个问题,让Domain着色器接管了原始顶点程序的职责。这是通过在其中调用MyVertexProgram来完成的——就像其他任何函数一样——并返回结果。

1
+2
+3
+4
+5
+6
+7
+8
+9
\[UNITY\_domain("tri")\]
+InterpolatorsVertex MyDomainProgram (
+    TessellationFactors factors,
+    OutputPatch<VertexData, 3> patch,
+    float3 barycentricCoordinates : SV\_DomainLocation
+) {
+    …
+    return MyVertexProgram(data);
+}
+

Now we can add the domain shader to our three shader passes, but we'll still get errors.

1
+2
#pragma hull MyHullProgram
+#pragma domain MyDomainProgram
+

1.5 控制顶点

MyVertexProgram只需要调用一次,只是我们改变了它调用的位置。但是我们仍然需要指定一个顶点程序在顶点着色器阶段被调用,它位于Hull着色器之前。在这一点上,我们不需要做任何事情,所以我们可以使用一个函数,它可以直接通过顶点数据,而不需要修改。

1
+2
+3
VertexData MyTessellationVertexProgram (VertexData v) {
+    return v;
+}
+

使用这个函数给三个着色器的顶点程序传递数据。

1
#pragma vertex MyTessellationVertexProgram
+

这将产生另一个编译器错误,提示重用了位置语义。我们必须为我们的顶点程序使用另一个输出结构,使用INTERNALTESSPOS语义来表示顶点位置。结构体的其余部分与VertexData相同,只是它从来没有实例ID。将其命名为TessellationControlPoint。

1
+2
+3
+4
+5
+6
+7
+8
struct TessellationControlPoint {
+    float4 vertex : INTERNALTESSPOS;
+    float3 normal : NORMAL;
+    float4 tangent : TANGENT;
+    float2 uv : TEXCOORD0;
+    float2 uv1 : TEXCOORD1;
+    float2 uv2 : TEXCOORD2;
+};
+

改变MyTessellationVertexProgram它会把顶点数据放入一个控制点结构中并返回那个值

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
TessellationControlPoint MyTessellationVertexProgram (VertexData v) {
+    TessellationControlPoint p;
+    p.vertex = v.vertex;
+    p.normal = v.normal;
+    p.tangent = v.tangent;
+    p.uv = v.uv;
+    p.uv1 = v.uv1;
+    p.uv2 = v.uv2;
+    return p;
+}
+

接下来,MyHullProgram也必须进行更改,以便使用TessellationControlPoint而不是VertexData。只有它的参数类型需要更改.

1
+2
+3
+4
+5
+6
TessellationControlPoint MyHullProgram (
+    InputPatch<TessellationControlPoint, 3> patch,
+    uint id : SV\_OutputControlPointID
+) {
+    return patch\[id\];
+}
+

patch常数函数也是如此。

1
+2
+3
+4
+5
TessellationFactors MyPatchConstantFunction (
+    InputPatch<TessellationControlPoint, 3> patch
+) {
+    …
+}
+

Domain程序的参数类型也必须改变。

1
+2
+3
+4
+5
+6
+7
InterpolatorsVertex MyDomainProgram (
+    TessellationFactors factors,
+    OutputPatch<TessellationControlPoint, 3> patch,
+    float3 barycentricCoordinates : SV\_DomainLocation
+) {
+    …
+}
+

在这一点上,我们终于有了一个正确的Tessellation着色器。

2 细分三角形

整个Tessellation设置的要点是,我们可以细分patch。这允许我们用一组较小的三角形替换单个三角形。我们现在就来做。

2.1 Tessellation Factors

三角形的细分是由它的Tessellation因子控制的。我们在mypatchconstant函数中确定这些因素。目前,我们将它们都设置为1,这不会产生视觉变化。Hull、Domain通过原始的顶点数据并没有产生任何新的东西,将所有因子设置为2,效果立显。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
TessellationFactors MyPatchConstantFunction (
+    InputPatch<TessellationControlPoint, 3> patch
+) {
+    TessellationFactors f;
+    f.edge\[0\] = 2;
+    f.edge\[1\] = 2;
+    f.edge\[2\] = 2;
+    f.inside = 2;
+    return f;
+}
+

image image

Tessellation因子为2 vs 3.

镶嵌因子是偶数时,中心有一个顶点。当它们是奇数时,中心三角形会有代替。如果我们使用较大的Tessellation因子,我们会得到多个三角形。每向中心移动一步,三角形被细分的数量就会减少2,直到最后得到1或0个子边。
image

2.1 不同的边和因子组合

三角形如何细分是由因子控制。边缘因子可用于覆盖它们各自的边缘被细分的数量。这只会影响到原始的patch边缘,而不会影响到生成的内部三角形。为了清楚地看到这一点,将内因子设置为7,同时保持边因子为1。

1
+2
+3
+4
f.edge\[0\] = 1;
+f.edge\[1\] = 1;
+f.edge\[2\] = 1;
+f.inside = 7;
+

image

内7,边缘1.

边缘因子也有可能大于内部因子。例如,将边缘因子设置为7,而将内部因子设置为1。

1
+2
+3
+4
f.edge\[0\] = 7;
+f.edge\[1\] = 7;
+f.edge\[2\] = 7;
+f.inside = 1;
+

image

内1 边缘7.

在本例中,内部因子被强制执行为2,因为否则不会生成新的三角形。

2.3 配置因子属性

硬编码不好,增加可配置属性.

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
float \_TessellationUniform;
+…
+TessellationFactors MyPatchConstantFunction (
+    InputPatch<TessellationControlPoint, 3> patch
+) {
+    TessellationFactors f;
+    f.edge\[0\] = \_TessellationUniform;
+    f.edge\[1\] = \_TessellationUniform;
+    f.edge\[2\] = \_TessellationUniform;
+    f.inside = \_TessellationUniform;
+    return f;
+}
+

增加1–64范围限制.

1
\_TessellationUniform ("Tessellation Uniform", Range(1, 64)) = 1
+

GUI扩展.

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
void DoTessellation () {
+    GUILayout.Label("Tessellation", EditorStyles.boldLabel);
+    EditorGUI.indentLevel += 2;
+    editor.ShaderProperty
+    (
+        FindProperty("\_TessellationUniform"),
+        MakeLabel("Uniform")
+    );
+    EditorGUI.indentLevel -= 2;
+}
+

在渲染模式和线框部分之间调用OnGUI中的这个方法。仅当所需属性存在时才执行此操作.

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
public override void OnGUI (
+    MaterialEditor editor, MaterialProperty\[\] properties
+) {
+    …
+    DoRenderingMode();
+    if (target.HasProperty("\_TessellationUniform")) {
+        DoTessellation();
+    }
+    if (target.HasProperty("\_WireframeColor")) {
+        DoWireframe();
+    }
+    …
+}
+

image

可配置.

tesselation_integer

2.4 增加分数模式

尽管我们使用了一个浮点数来设置因子,但我们总是会以每条边的等效细分结束。这是因为我们使用的是整数模式。虽然这是一个很好的模式,看看镶嵌如何工作,它阻止我们平滑过渡之间的细分级别。幸运的是,还有分式划分模式。我们把模式改为fractional_odd。

1
+2
+3
+4
+5
+6
\[UNITY\_domain("tri")\]
+\[UNITY\_outputcontrolpoints(3)\]
+\[UNITY\_outputtopology("triangle\_cw")\]
+\[UNITY\_partitioning("fractional\_odd")\]
+\[UNITY\_patchconstantfunc("MyPatchConstantFunction")\]
+TessellationControlPoint MyHullProgram …
+

tesselation_odd1

分数奇数分配

当使用整个奇数因子时,fractional_odd分区模式产生的结果与整数模式相同。但在奇因子之间转换时,额外的边细分会被分离和增长,或者收缩和合并。这意味着边不再总是被分割成等长的段。这种方法的优点是细分层之间的过渡现在是平滑的。

tesselation_odd2

分数偶数分配

3 Tessellation Heuristics

什么因子是最完美的?这是个问题,但这个问题没有一个单一的客观答案。

3.1 边缘优先

细分因子必须提供,可以确定每个顶点的因子,然后对每条边进行平均。这些因子被储存在一个纹理中。在任何情况下,给定一条边的两个顶点,用一个单独的函数来确定系数是很方便的。

1
+2
+3
+4
+5
float TessellationEdgeFactor (
+    TessellationControlPoint cp0, TessellationControlPoint cp1
+) {
+    return \_TessellationUniform;
+}
+

使用这个函数来处理mypatchconstant函数内的边缘因子。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
TessellationFactors MyPatchConstantFunction (
+    InputPatch<TessellationControlPoint, 3> patch
+) {
+    TessellationFactors f;
+    f.edge\[0\] = TessellationEdgeFactor(patch\[1\], patch\[2\]);
+    f.edge\[1\] = TessellationEdgeFactor(patch\[2\], patch\[0\]);
+    f.edge\[2\] = TessellationEdgeFactor(patch\[0\], patch\[1\]);
+    f.inside = \_TessellationUniform;
+    return f;
+}
+

对于内因子,我们只需要用边因子的平均值.

1
f.inside = (f.edge\[0\] + f.edge\[1\] + f.edge\[2\]) \* (1 / 3.0);
+

3.2 基于边缘长度

由于边因子控制细分多少原始三角形的边,以这些边的长度为基础的因子,这是有意义的。例如,我们可以指定所需的三角形边长。如果我们得到的三角形边比这个长,我们应该把它们再除以所需的长度。为此添加一个变量。

1
+2
float \_TessellationUniform;
+float \_TessellationEdgeLength;
+

还可以添加属性。我们使用范围从0.1到1,默认值为0.5。这是世界空间单位。

1
+2
\_TessellationUniform ("Tessellation Uniform", Range(1, 64)) = 1
+\_TessellationEdgeLength ("Tessellation Edge Length", Range(0.1, 1)) = 0.5
+

我们需要一个着色器功能,使它有可能在基于全部或基于边缘之间切换。使用_TESSELLATION_EDGE关键字,在我们的三次传递中添加必需的指令.

1
#pragma shader\_feature \_TESSELLATION\_EDGE
+

接下来,在MyLightingShaderGUI中添加一个enum类型来表示镶嵌模式。

1
+2
+3
    enum TessellationMode {
+        Uniform, Edge
+    }
+

GUI扩展

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
void DoTessellation () {
+        GUILayout.Label("Tessellation", EditorStyles.boldLabel);
+        EditorGUI.indentLevel += 2;
+
+        TessellationMode mode = TessellationMode.Uniform;
+        if (IsKeywordEnabled("\_TESSELLATION\_EDGE")) {
+            mode = TessellationMode.Edge;
+        }
+        EditorGUI.BeginChangeCheck();
+        mode = (TessellationMode)EditorGUILayout.EnumPopup(
+            MakeLabel("Mode"), mode
+        );
+        if (EditorGUI.EndChangeCheck()) {
+            RecordAction("Tessellation Mode");
+            SetKeyword("\_TESSELLATION\_EDGE", mode == TessellationMode.Edge);
+        }
+
+        if (mode == TessellationMode.Uniform) {
+            editor.ShaderProperty(
+                FindProperty("\_TessellationUniform"),
+                MakeLabel("Uniform")
+            );
+        }
+        else {
+            editor.ShaderProperty(
+                FindProperty("\_TessellationEdgeLength"),
+                MakeLabel("Edge Length")
+            );
+        }
+        EditorGUI.indentLevel -= 2;
+    }
+

[image

边缘模式

](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200621154703159-864599278.png)

现在我们必须调整TessellationEdgeFactor。当定义_TESSELLATION_UNIFORM时,确定两个点的世界位置,然后计算它们之间的距离。这是世界空间中的边长。边因子等于这个长度除以期望的长度.

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
float TessellationEdgeFactor (
+    TessellationControlPoint cp0, TessellationControlPoint cp1
+) {
+    #if defined(\_TESSELLATION\_EDGE)
+        float3 p0 = mul(unity\_ObjectToWorld, float4(cp0.vertex.xyz, 1)).xyz;
+        float3 p1 = mul(unity\_ObjectToWorld, float4(cp1.vertex.xyz, 1)).xyz;
+        float edgeLength = distance(p0, p1);
+        return edgeLength / \_TessellationEdgeLength;
+    #else
+        return \_TessellationUniform;
+    #endif
+}
+

[image

不同的四边形尺度,相同的期望边长.

](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200621154703744-1773161254.png)

因为我们现在用边的长度来确定边的镶嵌因子,我们可以得到每条边的不同因子。你可以看到这种情况发生在四边形上,因为对角线比其他边长。当对四边形使用非均匀尺度,在一维中拉伸它时,这一点也变得很明显。

image拉伸quad.

要做到这一点,很重要的一点是,共享一条边的patch最终都要为那条边使用相同的镶嵌因子。否则,生成的顶点将不能沿着那条边匹配,这会在网格中产生可见的缺口。在我们的例子中,我们对所有的边使用相同的逻辑。唯一的区别是控制点参数的顺序。由于浮点数的限制,这在技术上可能会产生不同的因素,但差异将是非常小的,不会被注意到.

3.3 基于屏幕空间边缘长度

虽然我们现在可以控制世界空间中的三角形边长,但这与它们在屏幕空间中的显示方式并不一致。tessellation的要点是增加更多的三角形时。所以我们不想再细分那些看起来很小的三角形。所以让我们用屏幕空间的边长来代替。

首先,改变边长属性的范围。我们将使用像素代替世界单位,所以5-100这样的范围更有意义。

1
\_TessellationEdgeLength ("Tessellation Edge Length", Range(5, 100)) = 50
+

将世界空间计算替换为屏幕空间计算。要做到这一点,这些点必须转换到剪辑空间而不是世界空间。然后它们的距离在2D中确定,使用它们的X和Y坐标,除以它们的W坐标,将它们投影到屏幕上。

1
+2
+3
+4
+5
+6
+7
+8
//float3 p0 = mul(unity\_ObjectToWorld, float4(cp0.vertex.xyz, 1)).xyz;
+//float3 p1 = mul(unity\_ObjectToWorld, float4(cp1.vertex.xyz, 1)).xyz;
+//float edgeLength = distance(p0, p1);
+
+float4 p0 = UnityObjectToClipPos(cp0.vertex);
+float4 p1 = UnityObjectToClipPos(cp1.vertex);
+float edgeLength = distance(p0.xy / p0.w, p1.xy / p1.w);
+return edgeLength / \_TessellationEdgeLength;
+

现在我们在裁剪空间中得到了结果,它是一个大小为2的统一立方体,适合显示。为了转换为像素,我们必须按像素的显示大小进行缩放。实际上,由于显示器很少是方形的,为了得到最精确的结果,在确定距离之前,我们应该分别缩放X和Y坐标。但是让我们通过简单的缩放屏幕高度来看看它是什么样子.

1
return edgeLength \* \_ScreenParams.y / \_TessellationEdgeLength;
+

image

相同的世界尺寸,不同的屏幕显示尺寸.

们的三角形边缘现在被细分根据他们是多大渲染。位置、旋转和缩放都会影响到这一点。结果,Tessellation的数量改变时,事情在运动。.

3.4 基于视野距离

纯粹依赖于边的视觉长度的一个缺点是,在世界空间中很长的边在屏幕空间中可能会非常小。这可能导致这些边根本没有被细分,而其他边被细分很多,当曲面细分被用来增加近距离的细节或生成复杂的轮廓。

另一种方法是使用世界空间的边缘长度,但是根据视图距离调整因素。越远的东西,它应该在视觉上显得越小,因此它需要的镶嵌就越少。用边长除以边长到摄像机的距离。我们可以用边的中点来确定这个距离。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
//float4 p0 = UnityObjectToClipPos(cp0.vertex);
+//float4 p1 = UnityObjectToClipPos(cp1.vertex);
+//float edgeLength = distance(p0.xy / p0.w, p1.xy / p1.w);
+//return edgeLength \* \_ScreenParams.y / \_TessellationEdgeLength;
+
+float3 p0 = mul(unity\_ObjectToWorld, float4(cp0.vertex.xyz, 1)).xyz;
+float3 p1 = mul(unity\_ObjectToWorld, float4(cp1.vertex.xyz, 1)).xyz;
+float edgeLength = distance(p0, p1);
+
+float3 edgeCenter = (p0 + p1) \* 0.5;
+float viewDistance = distance(edgeCenter, \_WorldSpaceCameraPos);
+return edgeLength / (\_TessellationEdgeLength \* viewDistance);
+

我们仍然可以保持Tessellation依赖于显示大小,通过简单地分解屏幕高度,并保持我们的5-100滑块范围。注意,这些值不再直接对应于显示像素。当你改变相机的视场时,这一点是非常明显的,这根本不会影响Tessellation。所以这种简单的方法并不适用于使用可变视场的游戏,例如放大和缩小。

1
return edgeLength \* \_ScreenParams.y / (\_TessellationEdgeLength \* viewDistance);
+

image

基于边缘长度和视图距离.

3.5 基于内部因子

虽然Tessellation可能看起来在这一点上工作得很好。当使用一个统一的四边形时,它不是很明显,但是当使用一个变形的立方体时,它就变得很明显。 image内部因素不正确的立方体.

在立方体的情况下,组成一个面的两个三角形各有一个非常不同的内部因子。四边形和立方体面之间的唯一区别是定义三角形顶点的顺序。Unity的默认立方体不使用对称的三角形布局,而quad使用对称的三角形布局。这表明,边缘的顺序明显影响内部因子。我们只是取边缘因子的平均值,所以它们的顺序不重要。一定是别的什么地方出了问题。

在计算内部因子时再次显式调用TessellationEdgeFactors函数。从逻辑上讲,这不应该有什么区别,因为我们只是执行了两次完全相同的计算。着色器编译器肯定会优化它.

1
+2
+3
+4
+5
//f.inside = (f.edge\[0\] + f.edge\[1\] + f.edge\[2\]) \* (1 / 3.0);
+f.inside =
+    (TessellationEdgeFactor(patch\[1\], patch\[2\]) +
+    TessellationEdgeFactor(patch\[2\], patch\[0\]) +
+    TessellationEdgeFactor(patch\[0\], patch\[1\])) \* (1 / 3.0);
+

[image

内部因子正确的立方体.

](https://img2020.cnblogs.com/blog/1692664/202006/1692664-20200621154707351-1475993896.png)

显然,这确实有效果,因为两面三角形现在最终都使用几乎相同的内部因子。这里发生了什么?

patch常量函数与Hull着色器的其余部分并行调用。但实际上它可以变得更复杂。着色器编译器也能够并行化边缘因子的计算。MyPatchConstantFunction内部的代码被分解和部分复制,并被一个并行计算三个边缘因子的分支进程替换。一旦这三个过程都完成了,他们的结果被结合起来并用来计算内部因素。

它不影响我们的着色器的结果,只会影响它的性能。不幸的是,在OpenGL Core生成的代码中有一个bug。在计算内部因子时,不使用三个边因子,而只使用第三个边因子。它只是访问了索引2三次,而不是索引0,1和2。所以我们总是得到一个内因子等于第三条边因子。

对于patch常数函数,着色器编译器将并行化设置为优先级。它会尽快拆分,然后无法再优化TessellationEdgeFactor的重复调用。我们以三个程序结束,每个程序计算两个点的世界位置、距离、最终因子。然后还有一个计算内部因子的程序,现在它还计算三个点的世界位置,以及所涉及的所有距离和因素。由于我们现在正在对内部因子进行所有工作,因此对边缘因子也单独完成部分工作是没有意义的。

事实证明,如果我们首先计算这些点的世界位置,然后分别对边缘和内部因子计算TessellationEdgeFactor,则着色器编译器将决定不为每个边缘因子分开单独的程序。我们最终得到了一个可以全部计算的流程。在这种情况下,着色器编译器确实优化了TessellationEdgeFactor的重复调用。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
float TessellationEdgeFactor (float3 p0, float3 p1) {
+    #if defined(\_TESSELLATION\_EDGE)
+//        float3 p0 = mul(unity\_ObjectToWorld, cp0.vertex).xyz;
+//        float3 p1 = mul(unity\_ObjectToWorld, cp1.vertex).xyz;
+        …
+    #else
+        return \_TessellationUniform;
+    #endif
+}
+
+TessellationFactors MyPatchConstantFunction (
+    InputPatch<TessellationControlPoint, 3> patch
+) {
+    float3 p0 = mul(unity\_ObjectToWorld, patch\[0\].vertex).xyz;
+    float3 p1 = mul(unity\_ObjectToWorld, patch\[1\].vertex).xyz;
+    float3 p2 = mul(unity\_ObjectToWorld, patch\[2\].vertex).xyz;
+    TessellationFactors f;
+    f.edge\[0\] = TessellationEdgeFactor(p1, p2);
+    f.edge\[1\] = TessellationEdgeFactor(p2, p0);
+    f.edge\[2\] = TessellationEdgeFactor(p0, p1);
+    f.inside =
+        (TessellationEdgeFactor(p1, p2) +
+        TessellationEdgeFactor(p2, p0) +
+        TessellationEdgeFactor(p0, p1)) \* (1 / 3.0);
+    return f;
+}
+

本文转自 https://www.cnblogs.com/YASUHATI/p/13172655.html,如有侵权,请联系删除。


\ No newline at end of file diff --git a/docs/_drafts/ES2015-note/index.html b/docs/_drafts/ES2015-note/index.html new file mode 100644 index 00000000..907f39b2 --- /dev/null +++ b/docs/_drafts/ES2015-note/index.html @@ -0,0 +1,228 @@ +ES2015学习笔记1-let和const、变量解构赋值、字符串、正则、数值 - 银河揽月
跳转至

ES2015学习笔记1-let和const、变量解构赋值、字符串、正则、数值

新的框架都支持 ES2015 了,虽然浏览器不支持部分语法,但是有 Babel 这个神器,ES2015 的普及大势所趋。更优雅地写代码,对技术的追求是一件很有意思的事情!

bloggbild_david_JS.jpg

本文主要以 ECMAScript 6 入门 -阮一峰 作为参考资料。

letconst

let

基本用法

用于声明变量,用法类似于var,但声明的变量只在let所在的代码块内有效。

1
+2
+3
+4
+5
+6
{
+    let a = 10;
+    var b = 1;
+}
+console.log(a) // ReferenceError: a is not defined.
+console.log(b) // 1
+

for循环计数器,就很适合let命令。

1
+2
+3
+4
for (let i = 0; i < array.length; i++) {
+    //...
+}
+console.log(i) //ReferenceError: i is not defined.
+

不存在变量提升

let不像var那样会发生“变量提升”现象。所以,变量一定要在声明后使用,否则报错。

1
+2
+3
+4
+5
console.log(a) //undefined
+console.log(b) //VM248:2 Uncaught ReferenceError: b is not defined(…)
+
+var a = 1
+let b = 2
+

声明b之前,变量b是不存在的,这时如果用到它,就会抛出一个错误。

暂时性死区

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
if (true) {
+    // TDZ开始
+    tmp = 'abc'; // ReferenceError
+    console.log(tmp); // ReferenceError
+
+    let tmp; // TDZ结束
+    console.log(tmp); // undefined
+
+    tmp = 123;
+    console.log(tmp); // 123
+}
+

ES6 明确规定,如果区块中存在letconst命令,这个区块对这些命令声明的变量,从一开始就形成了封闭作用域。凡是在声明之前就使用这些变量,就会报错。

总之,在代码块内,使用let命令声明变量之前,该变量都是不可用的。这在语法上,称为“暂时性死区”(temporal dead zone,简称TDZ)。

不允许重复声明

let不允许在相同作用域内,重复声明同一个变量。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
// 报错
+function a() {
+    let a = 10;
+    var a = 1;
+}
+
+// 报错
+function b() {
+    let a = 10;
+    let a = 1;
+}
+

块级作用域

没有块级作用域时会出现的两个问题:

  1. 内层变量可能会覆盖外层变量。
  2. 用来计数的循环变量泄露为全局变量。

let实际上为 JavaScript 新增了块级作用域。

  • 外层作用域无法读取内层作用域的变量。
  • 内层作用域可以定义外层作用域的同名变量。
  • 块级作用域的出现,实际上使得获得广泛应用的立即执行匿名函数(IIFE)不再必要了。
  • 函数本身的作用域,在其所在的块级作用域之内。

const

const声明一个只读的常量。一旦声明,常量的值就不能改变。

1
+2
+3
+4
+5
const PI = 3.1415;
+PI = 3; // 常规模式时,重新赋值无效,但不报错
+//但是我在Chrome下运行报错了,错误如下
+//Uncaught TypeError: Assignment to constant variable.
+console.log(PI); // 3.1415
+

const声明的变量不得改变值,这意味着,const一旦声明变量,就必须立即初始化,不能留到以后赋值。

const的作用域与let命令相同:只在声明所在的块级作用域内有效。

const命令声明的常量也是不提升,同样存在暂时性死区,只能在声明的位置后面使用。

对于复合类型的变量,变量名不指向数据,而是指向数据所在的地址。const命令只是保证变量名指向的地址不变,并不保证该地址的数据不变,所以将一个对象声明为常量必须非常小心。

1
+2
+3
+4
+5
+6
const foo = {};
+foo.prop = 123;
+
+console.log(foo.prop) // 123
+
+foo = {}; // TypeError: "foo" is read-only
+

上面代码中,常量foo储存的是一个地址,这个地址指向一个对象。不可变的只是这个地址,即不能把foo指向另一个地址,但对象本身是可变的,所以依然可以为其添加新属性。

如果真的想将对象冻结,应该使用Object.freeze方法。

ES5 只有两种声明变量的方法:var命令和function命令。ES6 除了添加letconst命令,后面章节还会提到,另外两种声明变量的方法:import命令和class命令。所以,ES6 一共有6种声明变量的方法。

全局对象属性

var命令和function命令声明的全局变量,依旧是全局对象的属性;另一方面规定,let命令、const命令、class命令声明的全局变量,不属于全局对象的属性。也就是说,从 ES6 开始,全局变量将逐步与全局对象的属性脱钩。

1
+2
+3
+4
+5
+6
+7
var a = 1;
+// 如果在Node的REPL环境,可以写成global.a
+// 或者采用通用方法,写成this.a
+window.a // 1
+
+let b = 1;
+window.b // undefined
+

变量的解构赋值

数组的解构赋值

基本用法

ES6允许按照一定模式,从数组和对象中提取值,对变量进行赋值,这被称为解构(Destructuring)。

1
+2
+3
+4
+5
+6
var a = 1
+var b = 2
+var c = 3
+
+//ES6 中允许写成下面这样
+var [a,b,c] = [1,2,3]
+

如果解构不成功,变量的值就等于undefined

1
+2
+3
let [a, b] = [1]
+console.log(a); //1
+console.log(b); //undefined
+

另一种情况是不完全解构,即等号左边的模式,只匹配一部分的等号右边的数组。这种情况下,解构依然可以成功。如下:

1
+2
+3
+4
+5
+6
+7
let [a, b] = [1]
+console.log(a); //1
+console.log(b); //undefined
+
+let [c, [d]] = [4, [5, 6], 7]
+console.log(c); //4
+console.log(d); //5
+

如果等号的右边不是数组(或者严格地说,不是可遍历的结构,参见《Iterator》一章),那么将会报错。

解构赋值不仅适用于var命令,也适用于let和const命令。

默认值

解构赋值允许指定默认值。

1
+2
+3
+4
+5
let [foo = true] = [];
+console.log(foo); //true
+
+let [x, y = 'b'] = ['a']; // x='a', y='b'
+let [x2, y2 = 'b'] = ['a', undefined]; // x2='a', y2='b'
+

注意,ES6 内部使用严格相等运算符(===),判断一个位置是否有值。所以,如果一个数组成员不严格等于undefined,默认值是不会生效的。

如果默认值是一个表达式,那么这个表达式是惰性求值的,即只有在用到的时候,才会求值。

1
+2
+3
+4
+5
+6
function f() {
+    console.log('aaa');
+}
+
+let [x = f()] = [1];
+// x = 1
+

上述代码的f()根本不会执行。因为x能取到值。

默认值可以引用解构赋值的其他变量,但该变量必须已经声明。

对象的解构赋值

解构不仅可以用于数组,还可以用于对象。

1
+2
+3
let { foo, bar } = { foo: "aaa", bar: "bbb" }
+foo // "aaa"
+bar // "bbb"
+

对象的解构与数组有一个重要的不同。数组的元素是按次序排列的,变量的取值由它的位置决定;而对象的属性没有次序,变量必须与属性同名,才能取到正确的值。

1
+2
+3
+4
+5
+6
let { bar, foo } = { foo: "aaa", bar: "bbb" };
+foo // "aaa"
+bar // "bbb"
+
+let { baz } = { foo: "aaa", bar: "bbb" };
+baz // undefined
+

如果变量名与属性名不一致,必须写成下面这样。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
var { foo: baz } = { foo: "aaa", bar: "bbb" };
+baz // "aaa"
+
+//转化为如下代码:
+var _foo$bar2 = { foo: "aaa", bar: "bbb" };
+var baz = _foo$bar2.foo;
+
+
+let obj = { first: 'hello', last: 'world' };
+let { first: f, last: l } = obj;
+f // 'hello'
+l // 'world'
+

也就是说,对象的解构赋值的内部机制,是先找到同名属性,然后再赋给对应的变量。真正被赋值的是后者,而不是前者。

1
+2
+3
var { foo: baz } = { foo: "aaa", bar: "bbb" };
+baz // "aaa"
+foo // error: foo is not defined
+

对于 let 和 const 来说,变量不能重新声明,所以一旦赋值的变量以前声明过,就会报错。

和数组一样,解构也可以用于嵌套结构的对象。

对象的解构也可以指定默认值。默认值生效的条件是,对象的属性值严格等于undefined

1
+2
+3
+4
+5
var {x = 3} = {x: undefined};
+x // 3
+
+var {x = 3} = {x: null};
+x // null
+

如果解构失败,变量的值等于undefined

1
+2
var {foo} = {bar: 'baz'};
+foo // undefined
+

字符串的解构赋值

字符串也可以解构赋值。字符串被转换为一个类似数组的对象。

1
+2
+3
+4
+5
+6
const [a, b, c, d, e] = 'hello';
+a // "h"
+b // "e"
+c // "l"
+d // "l"
+e // "o"
+

数值和布尔值的解构赋值

解构赋值时,如果等号右边是数值和布尔值,则会先转为对象。

函数参数的解构赋值

函数的参数也可以使用解构赋值。

1
+2
+3
+4
+5
function add([x, y]){
+  return x + y;
+}
+
+add([1, 2]); // 3
+

圆括号问题

用途

字符串

正则

数值


\ No newline at end of file diff --git a/docs/_drafts/WebSocket/index.html b/docs/_drafts/WebSocket/index.html new file mode 100644 index 00000000..03a10a53 --- /dev/null +++ b/docs/_drafts/WebSocket/index.html @@ -0,0 +1 @@ +WebSocket - 银河揽月
跳转至

WebSocket

WebSocket 适用场景

WebSocket 原理

WebSocket 浏览器兼容性


\ No newline at end of file diff --git a/docs/_drafts/about/index.html b/docs/_drafts/about/index.html new file mode 100644 index 00000000..dde09e96 --- /dev/null +++ b/docs/_drafts/about/index.html @@ -0,0 +1 @@ +About - 银河揽月
跳转至

About

生活

游戏

未来

联系我


\ No newline at end of file diff --git a/docs/_drafts/algorithm1-array/index.html b/docs/_drafts/algorithm1-array/index.html new file mode 100644 index 00000000..413676a0 --- /dev/null +++ b/docs/_drafts/algorithm1-array/index.html @@ -0,0 +1,782 @@ +算法之数组篇 - 银河揽月
跳转至

数组是存放在连续内存空间上的相同类型数据的集合。需要两点注意的是

  • 数组下标都是从 0 开始的
  • 数组内存空间的地址是连续的

正是因为数组的在内存空间的地址是连续的,所以我们在删除或者增添元素的时候,就难免要移动其他元素的地址。数组的元素是不能删的,只能覆盖。

二分查找

leetCode 704 二分查找

给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target ,写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1。

示例 1:

1
+2
+3
输入: nums = [-1,0,3,5,9,12], target = 9
+输出: 4
+解释: 9 出现在 nums 中并且下标为 4
+

示例 2:

1
+2
+3
输入: nums = [-1,0,3,5,9,12], target = 2
+输出: -1
+解释: 2 不存在 nums 中因此返回 -1
+

提示:

  1. 你可以假设 nums 中的所有元素是不重复的。
  2. n 将在 [1, 10000]之间。
  3. nums 的每个元素都将在 [-9999, 9999]之间。

思路

最简单的方案,一行代码搞定

1
+2
+3
var search = function (nums, target) {
+  return nums.indexOf(target)
+}
+
1
+2
+3
+4
Accepted
+47/47 cases passed (64 ms)
+Your runtime beats 63.35 % of javascript submissions
+Your memory usage beats 54.75 % of javascript submissions (43.9 MB)
+

但我们还是学习一下二分查找的思路。

注意这道题目的前提是数组是有序数组,这也是使用二分查找的基础条件。

  1. 定义一个区间 [left, right],其中 right 为数组的最后一项下标
  2. 判断如果 left <= right 时,获取一次 left 到 right 的中间值 middle,这里要注意 middle 要使用 Math.floor 取整数。
  3. 判断如果下标为 middle 的数值 < target,则 target 在 middle 的右边,将 left 赋值为 middle + 1
  4. 判断如果下标为 middle 的数值 > target,则 target 在 middle 的左边,将 right 赋值为 middle - 1
  5. 否则如果 middle === target,直接返回 middle
  6. 循环 2-5 步骤
  7. 否则返回 -1

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
/**
+ * @param {number[]} nums
+ * @param {number} target
+ * @return {number}
+ */
+var search = function (nums, target) {
+  let left = 0
+  let right = nums.length - 1
+
+  while (left <= right) {
+    const middle = Math.floor((left + right) / 2)
+    if (nums[middle] > target) {
+      right = middle - 1
+    } else if (nums[middle] < target) {
+      left = middle + 1
+    } else {
+      return middle
+    }
+  }
+  return -1
+}
+
1
+2
+3
+4
Accepted
+47/47 cases passed (56 ms)
+Your runtime beats 92.97 % of javascript submissions
+Your memory usage beats 89.92 % of javascript submissions (43.8 MB)
+

举一反三

leetCode 35 搜索插入位置

给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。

请必须使用时间复杂度为 O(log n) 的算法。

示例 1:

输入: nums = [1,3,5,6], target = 5 输出: 2 示例 2:

输入: nums = [1,3,5,6], target = 2 输出: 1 示例 3:

输入: nums = [1,3,5,6], target = 7 输出: 4

提示:

  • 1 <= nums.length <= 10e4
  • -10e4 <= nums[i] <= 10e4
  • nums 为 无重复元素 的 升序 排列数组
  • -10e4 <= target <= 10e4

思路

注意这道题目的前提是数组是有序数组,可以考虑使用二分法。

二分法使用完成后,要注意这 4 种情况

  • 目标值在数组所有元素之前
  • 目标值等于数组中某一个元素
  • 目标值插入数组中的位置
  • 目标值在数组所有元素之后的情况

其中 目标值等于数组中某一个元素 和上一题完全相同

我们只需要考虑另外 3 种情况

  • 目标值在数组所有元素之前,循环跑完后,left 为 0,right 为 -1
  • 目标值插入数组中的位置,循环跑完后,left 为 mid + 1,right 为 mid
  • 目标值在数组所有元素之后的情况,循环跑完后,left 为 nums.length,right 为 nums.length - 1

所以 return right + 1

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
/**
+ * @param {number[]} nums
+ * @param {number} target
+ * @return {number}
+ */
+var searchInsert = function (nums, target) {
+  // 定义开闭区间 [left, right]
+  let left = 0
+  let right = nums.length - 1
+  let mid = 0
+
+  while (left <= right) {
+    // 定义二分中间值
+    mid = Math.floor(left + (right - left) / 2)
+    if (target < nums[mid]) {
+      right = mid - 1
+    } else if (target > nums[mid]) {
+      left = mid + 1
+    } else {
+      return mid
+    }
+  }
+  return right + 1
+}
+
1
+2
+3
+4
Accepted
+64/64 cases passed (60 ms)
+Your runtime beats 67.55 % of javascript submissions
+Your memory usage beats 36.2 % of javascript submissions (41.2 MB)
+

leetCode 34 在排序数组中查找元素的第一个和最后一个位置

给你一个按照非递减顺序排列的整数数组 nums,和一个目标值 target。请你找出给定目标值在数组中的开始位置和结束位置。

如果数组中不存在目标值 target,返回 [-1, -1]。

你必须设计并实现时间复杂度为 O(log n) 的算法解决此问题。

示例 1:

输入:nums = [5,7,7,8,8,10], target = 8 输出:[3,4] 示例 2:

输入:nums = [5,7,7,8,8,10], target = 6 输出:[-1,-1] 示例 3:

输入:nums = [], target = 0 输出:[-1,-1]

提示:

  • 0 <= nums.length <= 10e5
  • -10e9 <= nums[i] <= 10e9
  • nums 是一个非递减数组
  • -10e9 <= target <= 10e9

思路

  1. 首先使用二分法得到 target 的位置
  2. 寻找 target 左右两边是否有相等的值

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
/**
+ * @param {number[]} nums
+ * @param {number} target
+ * @return {number[]}
+ */
+var searchRange = function (nums, target) {
+  // 二分法
+  let left = 0
+  let right = nums.length - 1
+
+  while (left <= right) {
+    const middle = Math.floor(left + (right - left) / 2)
+    if (target > nums[middle]) {
+      left = middle + 1
+    } else if (target < nums[middle]) {
+      right = middle - 1
+    } else {
+      // 最后再寻找左右边界
+      let leftMove = 1
+      while (nums[middle] === nums[middle - leftMove]) {
+        leftMove++
+      }
+      let rightMove = 1
+      while (nums[middle] === nums[middle + rightMove]) {
+        rightMove++
+      }
+      return [middle - leftMove + 1, middle + rightMove - 1]
+    }
+  }
+  return [-1, -1]
+}
+
1
+2
+3
+4
Accepted
+88/88 cases passed (48 ms)
+Your runtime beats 98.98 % of javascript submissions
+Your memory usage beats 79.4 % of javascript submissions (41.5 MB)
+

leetCode 69 x 的平方根

给你一个非负整数 x ,计算并返回 x 的 算术平方根 。

由于返回类型是整数,结果只保留 整数部分 ,小数部分将被 舍去 。

注意:不允许使用任何内置指数函数和算符,例如 pow(x, 0.5) 或者 x ** 0.5 。

示例 1:

输入:x = 4 输出:2 示例 2:

输入:x = 8 输出:2 解释:8 的算术平方根是 2.82842..., 由于返回类型是整数,小数部分将被舍去。

提示:

0 <= x <= 2^31 - 1

思路

我们知道大于1的数字的平方根大于这个数的一半,所以我们在定义二分法区间的时候将 right 定义为 x / 2,当然这里定义为 x 也是可以的,仅仅多一次循环而已

每次循环取 left 到 right 的中间值 mid,计算出 mid 的平方

如果 mid 的平方 大于 x,则 mid 过大,可以将边界 right 赋值为 mid - 1

如果 mid 的平方 小于 x,则 mid 过小,可以将边界 left 赋值为 mid + 1

最后返回 left - 1 的值,因为如果没有完全平方的话,最后一次循环会将 left + 1 再退出 while,所以这里 - 1

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
/**
+ * @param {number} x
+ * @return {number}
+ */
+var mySqrt = function (x) {
+  if (x === 1) {
+    return 1
+  }
+  let left = 0
+  // 大于1的数字的平方根大于这个数的一半
+  // 所以我们在定义二分法区间的时候将 right 定义为 x / 2
+  // 当然这里定义为 x 也是可以的,仅仅多一次循环而已
+  let right = x / 2
+  while (left <= right) {
+    const mid = Math.floor(left + (right - left) / 2)
+    const r = mid * mid
+    if (r > x) { // 过大
+      right = mid - 1
+    } else if (r < x) { // 过小
+      left = mid + 1
+    } else {
+      return mid
+    }
+  }
+  return left - 1
+}
+
1
+2
+3
+4
Accepted
+1017/1017 cases passed (64 ms)
+Your runtime beats 89.63 % of javascript submissions
+Your memory usage beats 29.38 % of javascript submissions (42.6 MB)
+

leetCode 367 有效的完全平方数

给定一个 正整数 num ,编写一个函数,如果 num 是一个完全平方数,则返回 true ,否则返回 false 。

进阶:不要 使用任何内置的库函数,如 sqrt 。

示例 1:

输入:num = 16 输出:true 示例 2:

输入:num = 14 输出:false

提示:

1 <= num <= 2^31 - 1

思路

做过上一题,这一题就简单多了,直接二分法。

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
/**
+ * @param {number} num
+ * @return {boolean}
+ */
+var isPerfectSquare = function (num) {
+  if (num === 1) {
+    return true
+  }
+
+  let left = 0
+  let right = num / 2
+  while (left <= right) {
+    const mid = Math.floor(left + (right - left) / 2)
+    const r = mid * mid
+    if (r > num) {
+      right = mid - 1
+    } else if (r < num) {
+      left = mid + 1
+    } else {
+      return true
+    }
+  }
+  return false
+}
+
1
+2
+3
+4
Accepted
+70/70 cases passed (56 ms)
+Your runtime beats 84.94 % of javascript submissions
+Your memory usage beats 69.41 % of javascript submissions (40.8 MB)
+

移除元素(双指针法)

leetCode 27 移除元素

给你一个数组 nums 和一个值 val,你需要 原地 移除所有数值等于 val 的元素,并返回移除后数组的新长度。

不要使用额外的数组空间,你必须仅使用 O(1) 额外空间并 原地 修改输入数组。

元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。

说明:

为什么返回数值是整数,但输出的答案是数组呢?

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

你可以想象内部操作如下:

1
+2
+3
+4
+5
+6
+7
+8
// nums 是以“引用”方式传递的。也就是说,不对实参作任何拷贝
+int len = removeElement(nums, val);
+
+// 在函数里修改输入数组对于调用者是可见的。
+// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。
+for (int i = 0; i < len; i++) {
+    print(nums[i]);
+}
+

示例 1:

1
+2
+3
输入:nums = [3,2,2,3], val = 3
+输出:2, nums = [2,2]
+解释:函数应该返回新的长度 2, 并且 nums 中的前两个元素均为 2。你不需要考虑数组中超出新长度后面的元素。例如,函数返回的新长度为 2 ,而 nums = [2,2,3,3] 或 nums = [2,2,0,0],也会被视作正确答案。
+

示例 2:

1
+2
+3
输入:nums = [0,1,2,2,3,0,4,2], val = 2
+输出:5, nums = [0,1,4,0,3]
+解释:函数应该返回新的长度 5, 并且 nums 中的前五个元素为 0, 1, 3, 0, 4。注意这五个元素可为任意顺序。你不需要考虑数组中超出新长度后面的元素。
+

提示:

0 <= nums.length <= 100 0 <= nums[i] <= 50 0 <= val <= 100

思路

数组的元素在内存地址中是连续的,不能单独删除数组中的某个元素,只能覆盖。

双指针法(快慢指针法)在数组和链表的操作中是非常常见的,很多考察数组、链表、字符串等操作的面试题,都使用双指针法。

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
// @lc code=start
+/**
+ * @param {number[]} nums
+ * @param {number} val
+ * @return {number}
+ */
+var removeElement = function(nums, val) {
+  let slow = 0 // 慢指针
+  for (let fast = 0; fast < nums.length; fast++) { // 快指针遍历
+    if (nums[fast] !== val) { // 非移除元素
+      nums[slow] = nums[fast] // 赋值给慢指针的索引值
+      slow++ // 慢指针右移
+    }
+  }
+  return slow // 返回慢指针,移除元素后的数组长度
+};
+
1
+2
+3
+4
Accepted
+113/113 cases passed (60 ms)
+Your runtime beats 71.31 % of javascript submissions
+Your memory usage beats 86.34 % of javascript submissions (41 MB)
+

leetCode 283 移动零

给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。

请注意 ,必须在不复制数组的情况下原地对数组进行操作。

示例 1:

输入: nums = [0,1,0,3,12] 输出: [1,3,12,0,0] 示例 2:

输入: nums = [0] 输出: [0]

提示:

1 <= nums.length <= 10^4 -2^31 <= nums[i] <= 2^31 - 1

思路

方法一,使用快慢指针,快指针遇到非0元素时,将元素的值赋给慢指针,慢指针 + 1,最后再对末尾的0进行操作

方法二,使用快慢指针,快指针遇到非0元素时,直接进行交换,慢指针 + 1,这样就将0直接交换到了最后,一次循环搞定

解法

方法一

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
/**
+ * @param {number[]} nums
+ * @return {void} Do not return anything, modify nums in-place instead.
+ */
+var moveZeroes = function (nums) {
+  let slow = 0
+  for (let fast = 0; fast < nums.length; fast++) {
+    if (nums[fast] !== 0) {
+      nums[slow] = nums[fast]
+      slow++
+    }
+  }
+  for (let i = slow; i < nums.length; i++) {
+    nums[i] = 0
+  }
+}
+
1
+2
+3
+4
Accepted
+74/74 cases passed (72 ms)
+Your runtime beats 98.08 % of javascript submissions
+Your memory usage beats 59.63 % of javascript submissions (45.8 MB)
+

方法二

也可以优化为,直接交换元素,这里用了 es2015 里的解构语法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
/**
+ * @param {number[]} nums
+ * @return {void} Do not return anything, modify nums in-place instead.
+ */
+var moveZeroes = function (nums) {
+  let slow = 0
+  for (let fast = 0; fast < nums.length; fast++) {
+    if (nums[fast] !== 0) {
+      [nums[fast], nums[slow]] = [nums[slow], nums[fast]]
+      slow++
+    }
+  }
+}
+
1
+2
+3
+4
Accepted
+74/74 cases passed (64 ms)
+Your runtime beats 99.88 % of javascript submissions
+Your memory usage beats 38.6 % of javascript submissions (45.9 MB)
+

leetCode 844 比较含退格的字符串

给定 s 和 t 两个字符串,当它们分别被输入到空白的文本编辑器后,如果两者相等,返回 true 。# 代表退格字符。

注意:如果对空文本输入退格字符,文本继续为空。

示例 1:

输入:s = "ab#c", t = "ad#c" 输出:true 解释:s 和 t 都会变成 "ac"。 示例 2:

输入:s = "ab##", t = "c#d#" 输出:true 解释:s 和 t 都会变成 ""。 示例 3:

输入:s = "a#c", t = "b" 输出:false 解释:s 会变成 "c",但 t 仍然是 "b"。

提示:

1 <= s.length, t.length <= 200 s 和 t 只含有小写字母以及字符 '#'

思路

使用双指针,快指针遍历,慢指针生成最后的数组。

快指针遇到退格符号后,慢指针回退一次

需要注意不能直接操作字符串,需要将字符串先 split 为数组后操作

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
/**
+ * @param {string} s
+ * @param {string} t
+ * @return {boolean}
+ */
+var backspaceCompare = function (s, t) {
+  if (processStr(s) === processStr(t)) {
+    return true
+  }
+  return false
+}
+
+function processStr(str) {
+  const strArr = str.split('')
+  let slow = 0
+  for (let fast = 0; fast < strArr.length; fast++) {
+    if (strArr[fast] !== '#') {
+      strArr[slow] = strArr[fast]
+      slow++
+    } else {
+      if (slow !== 0) {
+        slow--
+      }
+    }
+  }
+  return strArr.slice(0, slow).join('')
+}
+
1
+2
+3
+4
Accepted
+114/114 cases passed (60 ms)
+Your runtime beats 80.48 % of javascript submissions
+Your memory usage beats 86.45 % of javascript submissions (41.2 MB)
+

leetCode 977 有序数组的平方

给你一个按 非递减顺序 排序的整数数组 nums,返回 每个数字的平方 组成的新数组,要求也按 非递减顺序 排序。

示例 1:

输入:nums = [-4,-1,0,3,10] 输出:[0,1,9,16,100] 解释:平方后,数组变为 [16,1,0,9,100] 排序后,数组变为 [0,1,9,16,100] 示例 2:

输入:nums = [-7,-3,2,3,11] 输出:[4,9,9,49,121]

提示:

1 <= nums.length <= 10^4 -10^4 <= nums[i] <= 10^4 nums 已按 非递减顺序 排序

思路

取原数组两端,作为2个指针

使用 while 判断 left <= right 时

对比 left 和 right 大小,取大数的平方,存入一个新数组

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
/**
+ * @param {number[]} nums
+ * @return {number[]}
+ */
+var sortedSquares = function(nums) {
+  // 高级 api
+  // return nums.map((item) => item * item).sort((a, b) => a - b)
+
+  // 双指针
+  let left = 0
+  let right = nums.length - 1
+  const result = []
+  while (left <= right) {
+    if (Math.abs(nums[left]) < Math.abs(nums[right])) {
+      result.unshift(nums[right] * nums[right])
+      right--
+    } else {
+      result.unshift(nums[left] * nums[left])
+      left++
+    }
+  }
+  return result
+};
+
1
+2
+3
+4
Accepted
+137/137 cases passed (152 ms)
+Your runtime beats 15.69 % of javascript submissions
+Your memory usage beats 35.91 % of javascript submissions (47.5 MB)
+

滑动区间(双指针)

leetCode 209 长度最小的子数组

给定一个含有 n 个正整数的数组和一个正整数 target 。

找出该数组中满足其和 ≥ target 的长度最小的 连续子数组 [numsl, numsl+1, ..., numsr-1, numsr] ,并返回其长度。如果不存在符合条件的子数组,返回 0 。

示例 1:

输入:target = 7, nums = [2,3,1,2,4,3] 输出:2 解释:子数组 [4,3] 是该条件下的长度最小的子数组。 示例 2:

输入:target = 4, nums = [1,4,4] 输出:1 示例 3:

输入:target = 11, nums = [1,1,1,1,1,1,1,1] 输出:0

提示:

1 <= target <= 10^9 1 <= nums.length <= 10^5 1 <= nums[i] <= 10^5

思路

使用双指针,滑动窗口的思路

  1. 快指针正常遍历
  2. 累加快指针的值
  3. 判断累加值是否大于等于 target,获取子串的长度
  4. 累加值减去慢指针的值
  5. 慢指针 + 1
  6. 循环 3-5
  7. 循环 1-6

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
/**
+ * @param {number} target
+ * @param {number[]} nums
+ * @return {number}
+ */
+var minSubArrayLen = function (target, nums) {
+  // 双指针滑动区间
+  let slow = 0 // 滑动窗口的起始位置
+  let sum = 0 // 滑动窗口数值之和
+  let subLength = 0 // 滑动窗口的长度
+  let result = nums.length + 1 // 最终结果
+  for (let fast = 0; fast < nums.length; fast++) {
+    // fast 为滑动窗口的终点位置
+    sum += nums[fast]
+    while (sum >= target) {
+      // 如果满足条件,寻找最小的子序列
+      subLength = fast - slow + 1
+      result = Math.min(result, subLength)
+      sum -= nums[slow]
+      slow += 1
+    }
+  }
+  return result === nums.length + 1 ? 0 : result
+}
+
1
+2
+3
+4
Accepted
+20/20 cases passed (68 ms)
+Your runtime beats 64.23 % of javascript submissions
+Your memory usage beats 77.99 % of javascript submissions (45.1 MB)
+

leetCode 904 水果成篮

你正在探访一家农场,农场从左到右种植了一排果树。这些树用一个整数数组 fruits 表示,其中 fruits[i] 是第 i 棵树上的水果 种类 。

你想要尽可能多地收集水果。然而,农场的主人设定了一些严格的规矩,你必须按照要求采摘水果:

你只有 两个 篮子,并且每个篮子只能装 单一类型 的水果。每个篮子能够装的水果总量没有限制。 你可以选择任意一棵树开始采摘,你必须从 每棵 树(包括开始采摘的树)上 恰好摘一个水果 。采摘的水果应当符合篮子中的水果类型。每采摘一次,你将会向右移动到下一棵树,并继续采摘。 一旦你走到某棵树前,但水果不符合篮子的水果类型,那么就必须停止采摘。 给你一个整数数组 fruits ,返回你可以收集的水果的 最大 数目。

示例 1:

输入:fruits = [1,2,1] 输出:3 解释:可以采摘全部 3 棵树。 示例 2:

输入:fruits = [0,1,2,2] 输出:3 解释:可以采摘 [1,2,2] 这三棵树。 如果从第一棵树开始采摘,则只能采摘 [0,1] 这两棵树。 示例 3:

输入:fruits = [1,2,3,2,2] 输出:4 解释:可以采摘 [2,3,2,2] 这四棵树。 如果从第一棵树开始采摘,则只能采摘 [1,2] 这两棵树。 示例 4:

输入:fruits = [3,3,3,1,2,1,1,2,3,3,4] 输出:5 解释:可以采摘 [1,2,1,1,2] 这五棵树。

提示:

1 <= fruits.length <= 10^5 0 <= fruits[i] < fruits.length

思路

我们可以使用滑动窗口解决本题,leftright 分别表示满足要求的窗口的左右边界,同时我们使用哈希表存储这个窗口内的数以及出现的次数。

我们每次将 right 移动一个位置,并将 fruits[right] 加入哈希表。如果此时哈希表不满足要求(即哈希表中出现超过两个键值对),那么我们需要不断移动 left,并将 fruits[left] 从哈希表中移除,直到哈希表满足要求为止。

需要注意的是,将 fruits[left] 从哈希表中移除的时候,如果 fruits[left] 在哈希表中的出现次数减少为 0,需要将对应的键值对从哈希表中移除。

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
/**
+ * @param {number[]} fruits
+ * @return {number}
+ */
+var totalFruit = function(fruits) {
+  // 我们可以使用滑动窗口解决本题,left 和 right 分别表示满足要求的窗口的左右边界,同时我们使用哈希表存储这个窗口内的数以及出现的次数。
+
+  // 我们每次将 right 移动一个位置,并将 fruits[right] 加入哈希表。如果此时哈希表不满足要求(即哈希表中出现超过两个键值对),那么我们需要不断移动 left,并将 fruits[left] 从哈希表中移除,直到哈希表满足要求为止。
+
+  // 需要注意的是,将 fruits[left] 从哈希表中移除的时候,如果 fruits[left] 在哈希表中的出现次数减少为 0,需要将对应的键值对从哈希表中移除。
+
+  let res = 0
+  let left = 0
+
+  const cateObj = {}
+
+  for (let right = 0; right < fruits.length; right++) {
+    cateObj[fruits[right]] = (cateObj[fruits[right]] || 0) + 1
+    while (Object.keys(cateObj).length > 2) {
+      cateObj[fruits[left]] -= 1
+      if (cateObj[fruits[left]] === 0) {
+        delete cateObj[fruits[left]]
+      }
+      left++
+    }
+    res = Math.max(res, right - left + 1)
+  }
+  return res
+};
+
1
+2
+3
+4
Accepted
+91/91 cases passed (396 ms)
+Your runtime beats 8.35 % of javascript submissions
+Your memory usage beats 5.85 % of javascript submissions (56.7 MB)
+

螺旋矩阵

leetCode

给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix 。

示例 1:

输入:n = 3 输出:[[1,2,3],[8,9,4],[7,6,5]] 示例 2:

输入:n = 1 输出:[[1]]

提示:

1 <= n <= 20

思路

最外层用 while 进行圈数循环,然后沿着各个边进行循环,填写相应的值

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
/**
+ * @param {number} n
+ * @return {number[][]}
+ */
+var generateMatrix = function (n) {
+  let loop = 0
+  let startX = 0
+  let startY = 0
+  let offset = 1
+  let count = 1
+  let i = 0
+  let j = 0
+
+  // 初始化二位数组
+  const res = []
+  for (let i = 0; i < n; i++) {
+    const temp = []
+    for (let j = 0; j < n; j++) {
+      temp.push(0)
+    }
+    res.push(temp)
+  }
+
+  // 旋转的圈数
+  while (loop < n / 2) {
+    // 四条边进行循环
+    for (j = startY; j < n - offset; j += 1) {
+      res[startX][j] = count
+      count += 1
+    }
+    for (i = startX; i < n - offset; i += 1) {
+      res[i][j] = count
+      count += 1
+    }
+    for (; j > startY; j -= 1) {
+      res[i][j] = count
+      count += 1
+    }
+    for (; i > startX; i -= 1) {
+      res[i][j] = count
+      count += 1
+    }
+    startX += 1
+    startY += 1
+    offset += 1
+    loop += 1
+  }
+
+  // 奇数有个中心值
+  if (n % 2 === 1) {
+    res[i][j] = count
+  }
+  return res
+}
+
1
+2
+3
+4
Accepted
+20/20 cases passed (52 ms)
+Your runtime beats 95.38 % of javascript submissions
+Your memory usage beats 89.85 % of javascript submissions (41 MB)
+

\ No newline at end of file diff --git a/docs/_drafts/algorithm2-string/index.html b/docs/_drafts/algorithm2-string/index.html new file mode 100644 index 00000000..a737c7b5 --- /dev/null +++ b/docs/_drafts/algorithm2-string/index.html @@ -0,0 +1,197 @@ +算法之 2 字符串篇 - 银河揽月
跳转至

字符串相关的算法题目

leetCode 344 反转字符串

编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 s 的形式给出。

不要给另外的数组分配额外的空间,你必须原地修改输入数组、使用 O(1) 的额外空间解决这一问题。

示例 1:

输入:s = ["h","e","l","l","o"] 输出:["o","l","l","e","h"] 示例 2:

输入:s = ["H","a","n","n","a","h"] 输出:["h","a","n","n","a","H"]

提示:

1 <= s.length <= 10^5 s[i] 都是 ASCII 码表中的可打印字符

思路

遍历一半的长度,并前后互换位置

解法

1
+2
+3
+4
+5
+6
+7
+8
+9
/**
+ * @param {character[]} s
+ * @return {void} Do not return anything, modify s in-place instead.
+ */
+var reverseString = function(s) {
+  for (let i = 0; i < s.length / 2; i++) {
+    [s[i], s[s.length - 1 - i]] = [s[s.length - 1 - i], s[i]]
+  }
+};
+
1
+2
+3
+4
Accepted
+477/477 cases passed (88 ms)
+Your runtime beats 62.86 % of javascript submissions
+Your memory usage beats 99.2 % of javascript submissions (47.5 MB)
+

leetCode 541 反转字符串 II

思路

将字符串拆分为数组,分组,各项反转,再重新组合。

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
/**
+ * @param {string} s
+ * @param {number} k
+ * @return {string}
+ */
+var reverseStr = function (s, k) {
+  const arr = s.split('')
+  let count = 0
+
+  // 数组分组
+  const arrRes = []
+  for (let i = 0; i < arr.length; i += k) {
+    const temp = []
+    for (let j = i; j < k + i; j++) {
+      if (s[j]) {
+        if (count % 2 === 0) {
+          temp.unshift(s[j]) // 反向存入
+        } else {
+          temp.push(s[j])
+        }
+      }
+    }
+    count++
+    arrRes.push(...temp)
+  }
+
+  // 还原字符串
+  return arrRes.join('')
+}
+
1
+2
+3
+4
Accepted
+60/60 cases passed (72 ms)
+Your runtime beats 29.7 % of javascript submissions
+Your memory usage beats 5.05 % of javascript submissions (47.7 MB)
+

剑指Offer 05 替换空格

请实现一个函数,把字符串 s 中的每个空格替换成"%20"。

示例 1:

输入:s = "We are happy." 输出:"We%20are%20happy."   限制:

0 <= s 的长度 <= 10000

解法

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
/**
+ * @param {string} s
+ * @return {string}
+ */
+var replaceSpace = function(s) {
+    const arr = s.split('')
+    for(let i = 0; i < arr.length; i++) {
+        if(arr[i] === ' ') {
+            arr[i] = '%20'
+        }
+    }
+    return arr.join('')
+};
+
1
+2
+3
+4
+5
+6
执行用时:
+64 ms, 在所有 JavaScript 提交中击败了33.48%的用户
+内存消耗:
+40.7 MB, 在所有 JavaScript 提交中击败了91.35%的用户
+通过测试用例:
+27 / 27
+

leetCode 151 反转字符串中的单词

给你一个字符串 s ,请你反转字符串中 单词 的顺序。

单词 是由非空格字符组成的字符串。s 中使用至少一个空格将字符串中的 单词 分隔开。

返回 单词 顺序颠倒且 单词 之间用单个空格连接的结果字符串。

注意:输入字符串 s中可能会存在前导空格、尾随空格或者单词间的多个空格。返回的结果字符串中,单词间应当仅用单个空格分隔,且不包含任何额外的空格。

示例 1:

输入:s = "the sky is blue" 输出:"blue is sky the" 示例 2:

输入:s = " hello world " 输出:"world hello" 解释:反转后的字符串中不能存在前导空格和尾随空格。 示例 3:

输入:s = "a good example" 输出:"example good a" 解释:如果两个单词间有多余的空格,反转后的字符串需要将单词间的空格减少到仅有一个。

提示:

1 <= s.length <= 104 s 包含英文大小写字母、数字和空格 ' ' s 中 至少存在一个 单词

解法

1
+2
+3
+4
+5
+6
+7
+8
/**
+ * @param {string} s
+ * @return {string}
+ */
+var reverseWords = function(s) {
+  const arr = s.trim().split(/[' ']+/)
+  return arr.reverse().join(' ')
+};
+
1
+2
+3
+4
Accepted
+58/58 cases passed (60 ms)
+Your runtime beats 84.18 % of javascript submissions
+Your memory usage beats 92.99 % of javascript submissions (42.8 MB)
+

剑指Offer58-II.左旋转字符串

字符串的左旋转操作是把字符串前面的若干个字符转移到字符串的尾部。请定义一个函数实现字符串左旋转操作的功能。比如,输入字符串"abcdefg"和数字2,该函数将返回左旋转两位得到的结果"cdefgab"。

示例 1:

输入: s = "abcdefg", k = 2 输出: "cdefgab" 示例 2:

输入: s = "lrloseumgh", k = 6 输出: "umghlrlose"  

限制:

1 <= k < s.length <= 10000

来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/zuo-xuan-zhuan-zi-fu-chuan-lcof 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

解法

1
+2
+3
+4
+5
+6
+7
+8
+9
/**
+ * @param {string} s
+ * @param {number} n
+ * @return {string}
+ */
+var reverseLeftWords = function(s, n) {
+    const left = s.substring(0, n)
+    return s.substring(n, s.length) + left
+};
+
1
+2
+3
+4
+5
+6
执行用时:
+64 ms, 在所有 JavaScript 提交中击败了60.49%的用户
+内存消耗:
+42.6 MB, 在所有 JavaScript 提交中击败了86.36%的用户
+通过测试用例:
+34 / 34
+

leetCode 459 重复的子字符串

给定一个非空的字符串 s ,检查是否可以通过由它的一个子串重复多次构成。

示例 1:

输入: s = "abab" 输出: true 解释: 可由子串 "ab" 重复两次构成。 示例 2:

输入: s = "aba" 输出: false 示例 3:

输入: s = "abcabcabcabc" 输出: true 解释: 可由子串 "abc" 重复四次构成。 (或子串 "abcabc" 重复两次构成。)

提示:

1 <= s.length <= 104 s 由小写英文字母组成

思路

我们将两个 ss 连在一起,并移除第一个和最后一个字符。如果 ss 是该字符串的子串,那么 ss 就满足题目要求

需要先进行较为复杂的数学证明

解法

1
+2
+3
+4
+5
+6
+7
+8
/**
+ * @param {string} s
+ * @return {boolean}
+ */
+var repeatedSubstringPattern = function(s) {
+  const double = (s + s).substring(1, s.length * 2 - 1)
+  return double.indexOf(s) !== -1
+};
+
1
+2
+3
+4
Accepted
+129/129 cases passed (64 ms)
+Your runtime beats 86.86 % of javascript submissions
+Your memory usage beats 82.62 % of javascript submissions (43.4 MB)
+

\ No newline at end of file diff --git a/docs/_drafts/collections/index.html b/docs/_drafts/collections/index.html new file mode 100644 index 00000000..41c0c04e --- /dev/null +++ b/docs/_drafts/collections/index.html @@ -0,0 +1 @@ +收集 - 银河揽月

收集


\ No newline at end of file diff --git a/docs/_drafts/demo.html b/docs/_drafts/demo.html new file mode 100644 index 00000000..7a8af8a1 --- /dev/null +++ b/docs/_drafts/demo.html @@ -0,0 +1 @@ +--- layout: demo title: 工具 permalink: /demo/ icon: play type: page ---
{% include comments.html %} \ No newline at end of file diff --git a/docs/_drafts/threeJS-light-shadow/index.html b/docs/_drafts/threeJS-light-shadow/index.html new file mode 100644 index 00000000..1fde5e58 --- /dev/null +++ b/docs/_drafts/threeJS-light-shadow/index.html @@ -0,0 +1,47 @@ +three.js 中的光与影 - 银河揽月
跳转至

three.js 中的光与影

在了解了 three.js 中渲染器、场景、相机、几何体等基本知识后,我们来研究一下 three.js 中的光与影。

本文是根据百度前端学院的任务安排进行探索和研究的。算是 WebGL No. 2 - 光与影 的学习笔记吧。

  • 任务描述
  • 学习《Three.js 入门指南》第 8 章光与影;
    • 理解不同类型灯光的区别和适用场景;
    • 学会为场景添加合适的灯光;
    • 思考灯光的位置对哪些类型的灯光是无所谓的,以及为什么;
    • 思考为什么有些灯光无法形成阴影;
  • 在第 1 题场景的基础上,增加光照效果;
    • 如果你没做第 1 题,也可以随便在场景中创建一些物体;
    • 为物体设置合适的材质(预习第 4 章),使得物体的亮度根据光照有所区别
  • 创建一个地板平面,并将小车投影到地板上
    • 尝试并思考,一个物体(比如甜甜圈)如何将阴影投射到自身(Self-Shadow,自阴影);
    • 实现软阴影的效果(即阴影的边缘有明暗的渐变)。

构造函数:

1
Light(color, intensity)
+
  • 颜色 color - (optional) hexadecimal color of the light. Default is 0xffffff (white).
  • 强度 intensity - (optional) numeric value of the light's strength/intensity. Default is 1.

光的基类,被其他光类所继承。

环境光

AmbientLight ['æmbɪənt] 平均照亮场景中的所有物体。

无方向,不产生影子。

1
+2
var light = new THREE.AmbientLight(0x404040); // soft white light
+scene.add(light);
+

点光源

PointLight 从一个孤立的点向各个方向发射。没有遮盖的灯泡就是一个典型的例子。

可以产生影子。

1
+2
+3
var light = new THREE.PointLight(0xff0000, 1, 100);
+light.position.set(50, 50, 50);
+scene.add(light);
+

平行光

DirectionalLight 有特定方向的光。光线平行,无限远。用于模拟日光。太阳足够远,可以认为是无限远的,并且发射的光线是平行的。

可以产生影子。平行光的影子 DirectionalLightShadow

1
+2
+3
// White directional light at half intensity shining from the top.
+var directionalLight = new THREE.DirectionalLight(0xffffff, 0.5);
+scene.add(directionalLight);
+
  • 属性

  • .position

    This is set equal to Object3D.DefaultUp (0, 1, 0), so that the light shines from the top down.

    光线从平面 (0, 1, 0) 的法向射出。

聚光灯

SpotLight 光从孤立点射出,沿着一个椎体向远处延伸。

可以产生影子。

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
// white spotlight shining from the side, casting a shadow
+
+var spotLight = new THREE.SpotLight(0xffffff);
+spotLight.position.set(100, 1000, 100);
+
+spotLight.castShadow = true;
+
+spotLight.shadow.mapSize.width = 1024;
+spotLight.shadow.mapSize.height = 1024;
+
+spotLight.shadow.camera.near = 500;
+spotLight.shadow.camera.far = 4000;
+spotLight.shadow.camera.fov = 30;
+
+scene.add(spotLight);
+

半球光

HemisphereLight 光源位于场景上方,光线颜色从天空过度到地面。

不能产生影子。

1
+2
var light = new THREE.HemisphereLight(0xffffbb, 0x080820, 1);
+scene.add(light);
+

矩形光

RectAreaLight 从一个矩形面均匀发射的光。常被用于明亮的窗户,

影子


\ No newline at end of file diff --git a/docs/_redirects b/docs/_redirects new file mode 100644 index 00000000..e69de29b diff --git a/docs/_static/css/extra.css b/docs/_static/css/extra.css new file mode 100644 index 00000000..3c4992a0 --- /dev/null +++ b/docs/_static/css/extra.css @@ -0,0 +1,122 @@ +/* Logo title */ +.md-header__topic:first-child { + font-weight: initial !important; +} + +/* Code font size in
*/ +details .linenos, details code { + font-size: inherit !important; +} + +/* Code block / tab in details */ +details > summary + .highlight:last-child, details > summary + .tabbed-set:last-child { margin: 0 -0.6rem !important; } +details > summary + .highlight:last-child > .highlighttable { margin: 0 !important; } + +/* Table full width */ +.md-typeset__table { display: block !important; } +.md-typeset table:not(.highlighttable) { display: table !important; } + +.md-typeset table:not([class]) th { + min-width: 0rem; +} + +.headerlink { transform: translateY(-2.5px); } + +.md-nav__link[for=__toc] .md-icon { margin-left: auto !important; } + +blockquote.page-time { + margin: 20px 0 !important; + border-left-color: #64b5f6 !important; /* Just change the color value and that's it*/ +} +blockquote.page-copyright { + margin: 20px 0 !important; + border-left-color: #ff1700 !important; /* Just change the color value and that's it*/ +} +blockquote.page-copyright i.md-icon { + display: inline-block; + margin-right: 5px; + transform: translateY(3.5px); + width: 18px; +} + +#myBtn { + display: none; + position: fixed; + bottom: 100px; + right: 16px; + z-index: 99; + border: none; + outline: none; + color: #8590a6; + cursor: pointer; + padding: .7rem; + border-radius: .4rem; +} + +#myBtn:hover { + background-color: #d3d3d3; +} + +#color-button > button { + cursor: pointer; + transition: opacity .25s; + display: inline-block; + width: 6.5rem; + margin-bottom: 0.2rem; + padding: 1.2rem 0.4rem 0.2rem; + font-size: 0.64rem; + text-align: left; +} + +#color-button > button[data-md-color-primary] { + background-color: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); +} +#color-button > button[data-md-color-primary=white] { + box-shadow: inset 0 0 0.05rem rgb(0 0 0 / 54%); +} + +#color-button > button[data-md-color-accent] { + background-color: var(--md-accent-fg-color); + color: var(--md-code-bg-color); +} + +mjx-container > img { + width: 0; + height: 0; +} + +[data-md-color-scheme="slate"] { + --md-primary-fg-color: #2e303e; + --md-accent-fg-color: #00bda4; + --md-typeset-a-color: #526cfe; +} + +[data-md-color-scheme="slate"] .md-typeset img { + background: white; + filter: brightness(0.9); +} + +[data-md-color-scheme="slate"] .md-typeset img[src$=".svg"] { + border: 4px solid white; +} + +/* img居中 */ +img { + border-style: none; + margin: auto; +} + +/* 进度条 */ +@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)} + .progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease} + .progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px} + .progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite} + .progress-bar-success{background-color:#47cf9b} + .progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} + .progress-bar-info{background-color:#5bc0de} + .progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} + .progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} + .progress-bar-danger{background-color:#d9534f} + .progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)} + diff --git a/docs/_static/css/han.css b/docs/_static/css/han.css new file mode 100644 index 00000000..4651c546 --- /dev/null +++ b/docs/_static/css/han.css @@ -0,0 +1,1745 @@ +@charset "UTF-8"; + +/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ +/*! Han.css: the CSS typography framework optimised for Hanzi */ + +/* normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +menu, +nav, +section, +summary { + /* 1 */ + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; +} +audio:not([controls]) { + display: none; + height: 0; +} +progress { + vertical-align: baseline; +} +template, +[hidden] { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline-width: 0; +} +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} +b, +strong { + font-weight: inherit; +} +b, +strong { + font-weight: bolder; +} +dfn { + font-style: italic; +} +h1 { + font-size: 2em; + margin: .67em 0; +} +mark { + background-color: #ff0; + color: #000; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -.25em; +} +sup { + top: -.5em; +} +img { + border-style: none; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} +button, +input, +select, +textarea { + font: inherit; +} +optgroup { + font-weight: bold; +} +button, +input, +select { + /* 2 */ + overflow: visible; +} +button, +input, +select, +textarea { + /* 1 */ + margin: 0; +} +button, +select { + /* 1 */ + text-transform: none; +} +button, +[type="button"], +[type="reset"], +[type="submit"] { + cursor: pointer; +} +[disabled] { + cursor: default; +} +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +button:-moz-focusring, +input:-moz-focusring { + outline: 1px dotted ButtonText; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: .35em .625em .75em; +} +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} +textarea { + overflow: auto; +} +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} +[type="search"] { + -webkit-appearance: textfield; +} +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +html { + line-height: 1.3; + -webkit-font-smoothing: subpixel-antialiased; +} +ol, +ul { + padding-left: 2em; +} +figure, +blockquote { + margin-left: 2em; + margin-right: 2em; +} +address { + font-style: inherit; +} +pre { + overflow: auto; + white-space: pre; + word-wrap: normal; +} +a { + text-decoration: inherit; +} +em:lang(zh), +em:lang(ja) { + -moz-text-emphasis: filled circle; + -webkit-text-emphasis: filled circle; + text-emphasis: filled circle; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; + font-style: inherit; + border-bottom: 2px dotted; + padding-bottom: .05em; + border-bottom-width: -webkit-calc(0px); + padding-bottom: -webkit-calc(0px); +} +em:lang(ja) { + -moz-text-emphasis: filled sesame; + -webkit-text-emphasis: filled sesame; + text-emphasis: filled sesame; + -moz-text-emphasis-position: over; + -webkit-text-emphasis-position: over; + text-emphasis-position: over; +} +dfn:lang(zh), +dfn:lang(ja) { + font-weight: inherit; + font-style: inherit; +} +dfn:lang(zh), +dfn:lang(ja) { + font-weight: bolder; +} +cite:lang(zh), +cite:lang(ja) { + font-style: inherit; +} +q { + quotes: "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019"; +} +q:lang(zh) { + quotes: "\300c" "\300d" "\300e" "\300f" "\300c" "\300d" "\300e" "\300f" "\300c" "\300d" "\300e" "\300f"; +} +q:lang(zh-CN), +q:lang(en) { + quotes: "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019"; +} +q:lang(en-GB) { + quotes: "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d"; +} +q:before { + content: open-quote; +} +q:after { + content: close-quote; +} +q:lang(ja):before, +q:lang(ja):after { + content: none; +} +i:lang(zh), +var:lang(zh), +i:lang(ja), +var:lang(ja) { + font-family: cursive, serif; + font-style: inherit; +} +u + u, +ins + u, +u + ins, +ins + ins, +s + s, +del + s, +s + del, +del + del, +.han-js-rendered u.adjacent, +.han-js-rendered ins.adjacent, +.han-js-rendered s + s.adjacent, +.han-js-rendered del + s.adjacent, +.han-js-rendered s + del.adjacent, +.han-js-rendered del + del.adjacent { + margin-left: .125em; +} +u, +ins { + padding-bottom: .05em; + border-bottom: 1px solid; + text-decoration: none; +} +ruby rtc rt { + display: inline; + font-size: inherit; +} +ruby.zhuyin, +ruby.mps { + display: ruby; + -webkit-ruby-position: inter-character; + ruby-position: inter-character; +} +ruby.zhuyin > rt, +ruby.mps > rt { + -moz-transform: scale(.8); + -ms-transform: scale(.8); + -webkit-transform: scale(.8); + transform: scale(.8); + -moz-transform-origin: left center; + -ms-transform-origin: left center; + -webkit-transform-origin: left center; + transform-origin: left center; + font-size: .5em; +} +ruby.zhuyin > rt:empty, +ruby.mps > rt:empty { + display: none; +} +.han-js-rendered u + u, +.han-js-rendered ins + u, +.han-js-rendered u + ins, +.han-js-rendered ins + ins, +.han-js-rendered s + s, +.han-js-rendered del + s, +.han-js-rendered s + del, +.han-js-rendered del + del { + margin-left: auto; +} +.textemphasis $han-text-emphasis-pf h-jinze, +.textemphasis em:lang(zh) h-jinze, +.textemphasis em:lang(ja) h-jinze { + display: inline; +} +.han-js-rendered em:lang(zh), +.han-js-rendered em:lang(ja) { + padding-bottom: auto; + border-bottom-width: 0; +} +.no-textemphasis em:lang(zh), +.no-textemphasis em:lang(ja) { + line-height: 2; +} +.no-textemphasis em:lang(zh) h-char, +.no-textemphasis em:lang(ja) h-char { + position: relative; + font-style: inherit; +} +.no-textemphasis em:lang(zh) h-char:after, +.no-textemphasis em:lang(ja) h-char:after { + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + font-style: normal; + font-weight: normal; + line-height: normal; + text-decoration: none; + text-indent: 0; + -moz-transform: scale(.5); + -ms-transform: scale(.5); + -webkit-transform: scale(.5); + transform: scale(.5); + position: absolute; + left: 50%; + top: 0; + margin-left: -250%; + overflow: hidden; + display: inline-block; + height: 1em; + width: 500%; + line-height: 1; + text-align: center; + text-indent: 0; + font-family: Georgia, "Times New Roman", Arial, !important; +} +em:lang(zh) h-char.punct, +em:lang(ja) h-char.punct, +em:lang(zh) h-char.biaodian, +em:lang(ja) h-char.biaodian { + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; +} +.no-textemphasis em:lang(zh) h-char.punct:after, +.no-textemphasis em:lang(ja) h-char.punct:after, +.no-textemphasis em:lang(zh) h-char.biaodian:after, +.no-textemphasis em:lang(ja) h-char.biaodian:after { + content: none !important; +} +.no-textemphasis em:lang(zh) h-char:after { + margin-top: 1em; + content: "\25cf"; +} +.no-textemphasis em:lang(ja) h-char:after { + margin-top: -.7em; + content: "\fe45"; +} +ruby.zhuyin h-zhuyin, +ruby.mps h-zhuyin, +h-ruby.zhuyin h-zhuyin { + position: relative; + letter-spacing: 0; +} +ruby.zhuyin h-diao, +ruby.mps h-diao, +h-ruby.zhuyin h-diao { + position: absolute; + right: -.9em; + bottom: .5em; + display: block; + font-size: 1.5em; +} +ruby.zhuyin h-diao h-char, +ruby.mps h-diao h-char, +h-ruby.zhuyin h-diao h-char { + -webkit-writing-mode: horizontal-tb; + writing-mode: horizontal-tb; +} +ruby.zhuyin [diao="˙"] h-diao, +ruby.mps [diao="˙"] h-diao, +h-ruby.zhuyin [diao="˙"] h-diao { + top: -.3em; + right: auto; + bottom: auto; + left: 0; + font-size: 1em; +} +ruby.zhuyin [diao^="ㆴ"] h-diao, +ruby.mps [diao^="ㆴ"] h-diao, +h-ruby.zhuyin [diao^="ㆴ"] h-diao, +ruby.zhuyin [diao^="ㆵ"] h-diao, +ruby.mps [diao^="ㆵ"] h-diao, +h-ruby.zhuyin [diao^="ㆵ"] h-diao, +ruby.zhuyin [diao^="ㆶ"] h-diao, +ruby.mps [diao^="ㆶ"] h-diao, +h-ruby.zhuyin [diao^="ㆶ"] h-diao, +ruby.zhuyin [diao^="ㆷ"] h-diao, +ruby.mps [diao^="ㆷ"] h-diao, +h-ruby.zhuyin [diao^="ㆷ"] h-diao, +ruby.zhuyin [diao="󳆴"] h-diao, +ruby.mps [diao="󳆴"] h-diao, +h-ruby.zhuyin [diao="󳆴"] h-diao, +ruby.zhuyin [diao="󳆵"] h-diao, +ruby.mps [diao="󳆵"] h-diao, +h-ruby.zhuyin [diao="󳆵"] h-diao, +ruby.zhuyin [diao="󳆶"] h-diao, +ruby.mps [diao="󳆶"] h-diao, +h-ruby.zhuyin [diao="󳆶"] h-diao, +ruby.zhuyin [diao="󳆷"] h-diao, +ruby.mps [diao="󳆷"] h-diao, +h-ruby.zhuyin [diao="󳆷"] h-diao { + right: -1em; + bottom: -.125em; + font-size: 1em; +} +h-ru[annotation] { + position: relative; + display: inline-table; + border-collapse: collapse; + border-spacing: 0; + line-height: 1.1; + text-align: center; + vertical-align: 1em; +} +h-ru[annotation] > h-ru[annotation] { + vertical-align: -.1em; +} +h-ru[annotation] > h-ru, +h-ru[annotation] > rb, +h-ru[annotation] > rt { + line-height: 1; + text-align: center; +} +h-ru[annotation] > rt { + display: table-header-group; + height: 1em; + font-size: .5em; + white-space: nowrap; + word-break: normal; +} +h-ru[annotation] > rt:before, +h-ru[annotation] > rt:after { + content: "\2006"; +} +h-ru[order="0"] > rt, +h-ruby[rightangle][doubleline] h-ru[order="0"] > rt { + display: table-header-group; +} +h-ru[order="1"] > rt, +h-ruby[rightangle] h-ru[order="0"] > rt, +h-ruby[rightangle][doubleline] h-ru[order="1"] > rt { + display: table-footer-group; +} +h-ru[order="0"] > h-ru[order="1"] { + vertical-align: .15em; +} +h-ruby[rightangle][doubleline] h-ru[order="0"] rt { + line-height: 1.5; +} +h-ruby[rightangle][doubleline] h-ru[annotation] { + vertical-align: .5em; +} +[zhuyin] h-zhuyin { + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + font-style: normal; + font-weight: normal; + line-height: normal; + text-decoration: none; + text-indent: 0; + position: relative; + display: inline-block; + height: 1em; + width: .4em; + vertical-align: text-top; +} +[zhuyin] h-zhuyin > * { + -moz-transform: scale(.4); + -ms-transform: scale(.4); + -webkit-transform: scale(.4); + transform: scale(.4); + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -webkit-transform-origin: left top; + transform-origin: left top; + display: inline-block; +} +[zhuyin] h-yin { + position: absolute; + left: 0; + height: 1em; + vertical-align: top; + line-height: 1; +} +[zhuyin] h-diao { + position: absolute; + bottom: 0; + right: -.9em; + line-height: 1; +} +[zhuyin] h-yin:empty, +[zhuyin] h-diao:empty { + display: none; +} +[zhuyin] [length="0"] { + margin-right: 0; +} +[zhuyin] [length="0"] h-zhuyin { + display: none; +} +[zhuyin] [length="1"] h-yin { + top: .3em; +} +[zhuyin] [length="1"] h-diao { + bottom: 0; +} +[zhuyin] [length="2"] h-yin { + top: .05em; +} +[zhuyin] [length="2"] h-diao { + bottom: -.3em; +} +[zhuyin] [length="3"] h-yin { + top: -.05em; + line-height: .85; +} +[zhuyin] [length="3"] h-diao { + bottom: -.35em; +} +[zhuyin] [diao="˙"] h-diao { + top: 0; + right: auto; + bottom: auto; + left: .06em; +} +[zhuyin] [diao="˙"] [length="1"] h-diao { + top: .15em; +} +[zhuyin] [diao="˙"] [length="2"] h-diao { + top: -.05em; +} +[zhuyin] [diao="˙"] [length="3"] h-diao { + top: -.2em; +} +[zhuyin] [diao="˪"] h-diao, +[zhuyin] [diao="˫"] h-diao { + -moz-transform: scale(.6); + -ms-transform: scale(.6); + -webkit-transform: scale(.6); + transform: scale(.6); + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -webkit-transform-origin: left top; + transform-origin: left top; +} +[zhuyin] [diao^="ㆴ"] h-diao, +[zhuyin] [diao^="ㆵ"] h-diao, +[zhuyin] [diao^="ㆶ"] h-diao, +[zhuyin] [diao^="ㆷ"] h-diao, +[zhuyin] [diao="󳆴"] h-diao, +[zhuyin] [diao="󳆵"] h-diao, +[zhuyin] [diao="󳆶"] h-diao, +[zhuyin] [diao="󳆷"] h-diao { + bottom: -.6em; + margin-right: .3em; +} +[zhuyin] { + margin-right: .2em; + display: inline-block; + line-height: 1.8; +} +[rightangle] h-ru[annotation] { + vertical-align: 0; + line-height: 1; +} +[rightangle] rt:after { + content: ""; + display: inline-block; + width: 1.2em; +} +h-ru h-ru[zhuyin] { + margin-top: -.4em; + margin-bottom: -.2em; + line-height: 1.8; +} +h-jinze, +h-word { + display: inline-block; + text-indent: 0; +} +@font-face { + font-family: "Han Heiti"; + src: local("Hiragino Sans GB"), local("Lantinghei TC Extralight"), local("Lantinghei SC Extralight"), local(FZLTXHB--B51-0), local(FZLTZHK--GBK1-0), local(".PingFang SC Light"), local(".PingFang TC Light"), local(".PingFang-SC-Light"), local(".PingFang-TC-Light"), local(".PingFang SC"), local(".PingFang TC"), local("Heiti SC Light"), local(STHeitiSC-Light), local("Heiti SC"), local("Heiti TC Light"), local(STHeitiTC-Light), local("Heiti TC"), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR"), local("Noto Sans CJK JP"), local("Noto Sans CJK SC"), local("Noto Sans CJK TC"), local("Source Han Sans K"), local("Source Han Sans KR"), local("Source Han Sans JP"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Droid Sans Fallback"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Heiti"; + src: local(YuGothic), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"); +} +@font-face { + font-family: "Han Heiti CNS"; + src: local(".PingFang TC Light"), local(".PingFang-TC-Light"), local(".PingFang TC"), local("Heiti TC Light"), local(STHeitiTC-Light), local("Heiti TC"), local("Lantinghei TC Extralight"), local(FZLTXHB--B51-0), local("Lantinghei TC"), local("Microsoft Jhenghei"), local("Microsoft Yahei"), local("Noto Sans CJK TC"), local("Source Han Sans TC"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Source Han Sans HK"), local("Droid Sans Fallback"); +} +@font-face { + font-family: "Han Heiti GB"; + src: local("Hiragino Sans GB"), local(".PingFang SC Light"), local(".PingFang-SC-Light"), local(".PingFang SC"), local("Lantinghei SC Extralight"), local(FZLTXHK--GBK1-0), local("Lantinghei SC"), local("Heiti SC Light"), local(STHeitiSC-Light), local("Heiti SC"), local("Microsoft Yahei"), local("Noto Sans CJK SC"), local("Source Han Sans SC"), local("Source Han Sans CN"), local("Droid Sans Fallback"); +} +@font-face { + font-family: "Han Heiti"; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Lantinghei SC Demibold"), local(FZLTZHB--B51-0), local(FZLTZHK--GBK1-0), local(".PingFang-SC-Semibold"), local(".PingFang-TC-Semibold"), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local(MicrosoftYaHei-Bold), local(MicrosoftJhengHeiBold), local("Microsoft YaHei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR Bold"), local("Noto Sans CJK JP Bold"), local("Noto Sans CJK SC Bold"), local("Noto Sans CJK TC Bold"), local(NotoSansCJKkr-Bold), local(NotoSansCJKjp-Bold), local(NotoSansCJKsc-Bold), local(NotoSansCJKtc-Bold), local("Source Han Sans K Bold"), local(SourceHanSansK-Bold), local("Source Han Sans K"), local("Source Han Sans KR Bold"), local("Source Han Sans JP Bold"), local("Source Han Sans CN Bold"), local("Source Han Sans HK Bold"), local("Source Han Sans TW Bold"), local("Source Han Sans TWHK Bold"), local("SourceHanSansKR-Bold"), local("SourceHanSansJP-Bold"), local("SourceHanSansCN-Bold"), local("SourceHanSansHK-Bold"), local("SourceHanSansTW-Bold"), local("SourceHanSansTWHK-Bold"), local("Source Han Sans KR"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Heiti"; + font-weight: 600; + src: local("YuGothic Bold"), local("Hiragino Kaku Gothic ProN W6"), local("Hiragino Kaku Gothic Pro W6"), local(YuGo-Bold), local(HiraKakuProN-W6), local(HiraKakuPro-W6); +} +@font-face { + font-family: "Han Heiti CNS"; + font-weight: 600; + src: local(".PingFang TC Semibold"), local(".PingFang-TC-Semibold"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Lantinghei TC Demibold"), local(FZLTXHB--B51-0), local("Microsoft Jhenghei Bold"), local(MicrosoftJhengHeiBold), local("Microsoft Jhenghei"), local("Microsoft YaHei Bold"), local(MicrosoftYaHei-Bold), local("Noto Sans CJK TC Bold"), local(NotoSansCJKtc-Bold), local("Noto Sans CJK TC"), local("Source Han Sans TC Bold"), local("SourceHanSansTC-Bold"), local("Source Han Sans TC"), local("Source Han Sans TW Bold"), local("SourceHanSans-TW"), local("Source Han Sans TW"), local("Source Han Sans TWHK Bold"), local("SourceHanSans-TWHK"), local("Source Han Sans TWHK"), local("Source Han Sans HK"), local("SourceHanSans-HK"), local("Source Han Sans HK"); +} +@font-face { + font-family: "Han Heiti GB"; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local(".PingFang SC Semibold"), local(".PingFang-SC-Semibold"), local("Lantinghei SC Demibold"), local(FZLTZHK--GBK1-0), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Microsoft YaHei Bold"), local(MicrosoftYaHei-Bold), local("Microsoft YaHei"), local("Noto Sans CJK SC Bold"), local(NotoSansCJKsc-Bold), local("Noto Sans CJK SC"), local("Source Han Sans SC Bold"), local("SourceHanSansSC-Bold"), local("Source Han Sans CN Bold"), local("SourceHanSansCN-Bold"), local("Source Han Sans SC"), local("Source Han Sans CN"); +} +@font-face { + font-family: "Han Heiti"; + src: local("Hiragino Sans GB"), local("Lantinghei TC Extralight"), local("Lantinghei SC Extralight"), local(FZLTXHB--B51-0), local(FZLTZHK--GBK1-0), local(".PingFang SC Light"), local(".PingFang TC Light"), local(".PingFang-SC-Light"), local(".PingFang-TC-Light"), local(".PingFang SC"), local(".PingFang TC"), local("Heiti SC Light"), local("STHeitiSC-Light"), local("Heiti SC"), local("Heiti TC Light"), local("STHeitiTC-Light"), local("Heiti TC"), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR"), local("Noto Sans CJK JP"), local("Noto Sans CJK SC"), local("Noto Sans CJK TC"), local("Source Han Sans K"), local("Source Han Sans KR"), local("Source Han Sans JP"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Droid Sans Fallback"); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Heiti"; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Lantinghei SC Demibold"), local(FZLTZHB--B51-0), local(FZLTZHK--GBK1-0), local(".PingFang-SC-Semibold"), local(".PingFang-TC-Semibold"), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local(MicrosoftYaHei-Bold), local(MicrosoftJhengHeiBold), local("Microsoft YaHei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR Bold"), local("Noto Sans CJK JP Bold"), local("Noto Sans CJK SC Bold"), local("Noto Sans CJK TC Bold"), local(NotoSansCJKkr-Bold), local(NotoSansCJKjp-Bold), local(NotoSansCJKsc-Bold), local(NotoSansCJKtc-Bold), local("Source Han Sans K Bold"), local(SourceHanSansK-Bold), local("Source Han Sans K"), local("Source Han Sans KR Bold"), local("Source Han Sans JP Bold"), local("Source Han Sans CN Bold"), local("Source Han Sans HK Bold"), local("Source Han Sans TW Bold"), local("Source Han Sans TWHK Bold"), local("SourceHanSansKR-Bold"), local("SourceHanSansJP-Bold"), local("SourceHanSansCN-Bold"), local("SourceHanSansHK-Bold"), local("SourceHanSansTW-Bold"), local("SourceHanSansTWHK-Bold"), local("Source Han Sans KR"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Songti"; + src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local(STSong), local("Lisong Pro"), local(SimSun), local(PMingLiU); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Songti"; + src: local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); +} +@font-face { + font-family: "Han Songti CNS"; + src: local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local("Lisong Pro"), local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local(STSong), local(PMingLiU), local(SimSun); +} +@font-face { + font-family: "Han Songti GB"; + src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local(STSong), local(SimSun), local(PMingLiU); +} +@font-face { + font-family: "Han Songti"; + font-weight: 600; + src: local("STSongti SC Bold"), local("STSongti TC Bold"), local(STSongti-SC-Bold), local(STSongti-TC-Bold), local("STSongti SC"), local("STSongti TC"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Songti"; + font-weight: 600; + src: local("YuMincho Demibold"), local("Hiragino Mincho ProN W6"), local("Hiragino Mincho Pro W6"), local(YuMin-Demibold), local(HiraMinProN-W6), local(HiraMinPro-W6), local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"); +} +@font-face { + font-family: "Han Songti CNS"; + font-weight: 600; + src: local("STSongti TC Bold"), local("STSongti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold), local("STSongti TC"), local("STSongti SC"); +} +@font-face { + font-family: "Han Songti GB"; + font-weight: 600; + src: local("STSongti SC Bold"), local(STSongti-SC-Bold), local("STSongti SC"); +} +@font-face { + font-family: "Han Songti"; + src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local(STSongti), local("Lisong Pro"), local("MS Mincho"), local(SimSun), local(PMingLiU); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Songti"; + font-weight: 600; + src: local("Songti TC Bold"), local("Songti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold), local("Songti TC"), local("Songti SC"); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Songti CNS"; + src: local("Songti TC Regular"), local("Lisong Pro"), local("Songti TC"), local("Songti SC Regular"), local(STSong), local("Songti SC"), local("MS Mincho"), local(PMingLiU), local(SimSun); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Songti CNS"; + font-weight: 600; + src: local("Songti TC Bold"), local("Songti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold), local("Songti TC"), local("Songti SC"); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Songti GB"; + src: local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+270C; +} +@font-face { + font-family: "Han Songti GB"; + font-weight: 600; + src: local("Songti SC Bold"), local(STSongti-SC-Bold), local("Songti SC"); + unicode-range: U+270C; +} +@font-face { + font-family: cursive; + src: local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"), local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Kaiti"; + src: local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"), local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Kaiti CNS"; + src: local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Kaiti GB"; + src: local("Kaiti SC Regular"), local(STKaiTi-SC-Regular), local("Kaiti SC"), local(STKaiti), local(Kai), local(Kaiti), local(DFKai-SB); +} +@font-face { + font-family: cursive; + font-weight: 600; + src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti SC Bold"), local(STKaiti-SC-Bold), local("Kaiti TC"), local("Kaiti SC"); +} +@font-face { + font-family: "Han Kaiti"; + font-weight: 600; + src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti SC Bold"), local(STKaiti-SC-Bold), local("Kaiti TC"), local("Kaiti SC"); +} +@font-face { + font-family: "Han Kaiti CNS"; + font-weight: 600; + src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti TC"); +} +@font-face { + font-family: "Han Kaiti GB"; + font-weight: 600; + src: local("Kaiti SC Bold"), local(STKaiti-SC-Bold); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Fangsong"; + src: local(STFangsong), local(FangSong); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Fangsong CNS"; + src: local(STFangsong), local(FangSong); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Fangsong GB"; + src: local(STFangsong), local(FangSong); +} +@font-face { + font-family: "Biaodian Serif"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Yakumono Sans"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Arial Unicode MS"), local("MS Gothic"); + unicode-range: U+2014; +} +@font-face { + font-family: "Yakumono Serif"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"), local("Microsoft Yahei"); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Sans"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Serif"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local("MS Mincho"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Yakumono Sans"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"); + unicode-range: U+2026; +} +@font-face { + font-family: "Yakumono Serif"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + font-weight: bold; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + font-weight: bold; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Sans"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Serif"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("MS Gothic"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU); + unicode-range: U+3002, U+FF0C, U+3001; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU), local("MS Gothic"); + unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local(STSongti-TC-Regular), local("Lisong Pro"), local("Heiti TC"), local(PMingLiU); + unicode-range: U+3002, U+FF0C, U+3001; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); + unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local("MS Gothic"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Songti SC"), local(STSongti), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local("MS Mincho"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); + unicode-range: U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Basic"; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Basic"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Sans"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + font-weight: bold; + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Latin Italic Serif"; + src: local("Georgia Italic"), local("Times New Roman Italic"), local(Georgia-Italic), local(TimesNewRomanPS-ItalicMT), local(Times-Italic); +} +@font-face { + font-family: "Latin Italic Serif"; + font-weight: 700; + src: local("Georgia Bold Italic"), local("Times New Roman Bold Italic"), local(Georgia-BoldItalic), local(TimesNewRomanPS-BoldItalicMT), local(Times-Italic); +} +@font-face { + font-family: "Latin Italic Sans"; + src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); +} +@font-face { + font-family: "Latin Italic Sans"; + font-weight: 700; + src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral TF Sans"; + src: local(Skia), local("Neutraface 2 Text"), local(Candara), local(Corbel); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral TF Serif"; + src: local(Georgia), local("Hoefler Text"), local("Big Caslon"); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral TF Italic Serif"; + src: local("Georgia Italic"), local("Hoefler Text Italic"), local(Georgia-Italic), local(HoeflerText-Italic); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Sans"; + src: local("Helvetica Neue"), local(Helvetica), local(Arial); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Sans"; + src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Sans"; + font-weight: bold; + src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Serif"; + src: local(Palatino), local("Palatino Linotype"), local("Times New Roman"); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Serif"; + src: local("Palatino Italic"), local("Palatino Italic Linotype"), local("Times New Roman Italic"), local(Palatino-Italic), local(Palatino-Italic-Linotype), local(TimesNewRomanPS-ItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Serif"; + font-weight: bold; + src: local("Palatino Bold Italic"), local("Palatino Bold Italic Linotype"), local("Times New Roman Bold Italic"), local(Palatino-BoldItalic), local(Palatino-BoldItalic-Linotype), local(TimesNewRomanPS-BoldItalicMT); +} +@font-face { + font-family: "Numeral TF Sans"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral TF Serif"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral TF Italic Serif"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral LF Sans"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral LF Italic Sans"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral LF Italic Sans"; + font-weight: bold; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral LF Serif"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral LF Italic Serif"; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + font-family: "Numeral LF Italic Serif"; + font-weight: bold; + src: local(lying-to-firefox); + unicode-range: U+270C; +} +@font-face { + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; + font-family: "Zhuyin Kaiti"; +} +@font-face { + unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; + font-family: "Zhuyin Heiti"; + src: local("Hiragino Sans GB"), local("Heiti TC"), local("Microsoft Jhenghei"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); +} +@font-face { + font-family: "Zhuyin Heiti"; + src: local("Heiti TC"), local("Microsoft Jhenghei"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+3127; +} +@font-face { + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + font-family: "Zhuyin Heiti"; + unicode-range: U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+31B4, U+31B5, U+31B6, U+31B7, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; +} +@font-face { + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han.otf?v3.3.0") format("opentype"); + font-family: "Romanization Sans"; + unicode-range: U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; +} +html:lang(zh-Latn), +html:lang(ja-Latn), +html:not(:lang(zh)):not(:lang(ja)), +html *:lang(zh-Latn), +html *:lang(ja-Latn), +html *:not(:lang(zh)):not(:lang(ja)), +article strong:lang(zh-Latn), +article strong:lang(ja-Latn), +article strong:not(:lang(zh)):not(:lang(ja)), +article strong *:lang(zh-Latn), +article strong *:lang(ja-Latn), +article strong *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +html:lang(zh), +html:lang(zh-Hant), +[lang^="zh"], +[lang*="Hant"], +[lang="zh-TW"], +[lang="zh-HK"], +article strong:lang(zh), +article strong:lang(zh-Hant) { + font-family: "Biaodian Pro Sans CNS", "Helvetica Neue", Helvetica, Arial, "Zhuyin Heiti", "Han Heiti", sans-serif; +} +html:lang(zh).no-unicoderange, +html:lang(zh-Hant).no-unicoderange, +.no-unicoderange [lang^="zh"], +.no-unicoderange [lang*="Hant"], +.no-unicoderange [lang="zh-TW"], +.no-unicoderange [lang="zh-HK"], +.no-unicoderange article strong:lang(zh), +.no-unicoderange article strong:lang(zh-Hant) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +html:lang(zh-Hans), +html:lang(zh-CN), +[lang*="Hans"], +[lang="zh-CN"], +article strong:lang(zh-Hans), +article strong:lang(zh-CN) { + font-family: "Biaodian Pro Sans GB", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; +} +html:lang(zh-Hans).no-unicoderange, +html:lang(zh-CN).no-unicoderange, +.no-unicoderange [lang*="Hans"], +.no-unicoderange [lang="zh-CN"], +.no-unicoderange article strong:lang(zh-Hans), +.no-unicoderange article strong:lang(zh-CN) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; +} +html:lang(ja), +[lang^="ja"], +article strong:lang(ja) { + font-family: "Yakumono Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; +} +html:lang(ja).no-unicoderange, +.no-unicoderange [lang^="ja"], +.no-unicoderange article strong:lang(ja) { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +i:lang(zh-Latn), +var:lang(zh-Latn), +i:lang(ja-Latn), +var:lang(ja-Latn), +i:not(:lang(zh)):not(:lang(ja)), +var:not(:lang(zh)):not(:lang(ja)), +i *:lang(zh-Latn), +var *:lang(zh-Latn), +i *:lang(ja-Latn), +var *:lang(ja-Latn), +i *:not(:lang(zh)):not(:lang(ja)), +var *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; +} +i:lang(zh), +var:lang(zh), +i:lang(zh-Hant), +var:lang(zh-Hant) { + font-family: "Biaodian Pro Serif CNS", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Kaiti", cursive, serif; +} +.no-unicoderange i:lang(zh), +.no-unicoderange var:lang(zh), +.no-unicoderange i:lang(zh-Hant), +.no-unicoderange var:lang(zh-Hant) { + font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; +} +i:lang(zh-Hans), +var:lang(zh-Hans), +i:lang(zh-CN), +var:lang(zh-CN) { + font-family: "Biaodian Pro Serif GB", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; +} +.no-unicoderange i:lang(zh-Hans), +.no-unicoderange var:lang(zh-Hans), +.no-unicoderange i:lang(zh-CN), +.no-unicoderange var:lang(zh-CN) { + font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; +} +i:lang(ja), +var:lang(ja) { + font-family: "Yakumono Serif", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", cursive, serif; +} +.no-unicoderange i:lang(ja), +.no-unicoderange var:lang(ja) { + font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", cursive, serif; +} +html, +.no-unicoderange h-char.bd-liga, +.no-unicoderange h-char[unicode="b7"], +ruby h-zhuyin, +h-ruby h-zhuyin, +ruby h-zhuyin h-diao, +h-ruby h-zhuyin h-diao, +ruby.romanization rt, +h-ruby.romanization rt, +ruby [annotation] rt, +h-ruby [annotation] rt { + -moz-font-feature-settings: "liga"; + -ms-font-feature-settings: "liga"; + -webkit-font-feature-settings: "liga"; + font-feature-settings: "liga"; +} +html, +[lang^="zh"], +[lang*="Hant"], +[lang="zh-TW"], +[lang="zh-HK"], +[lang*="Hans"], +[lang="zh-CN"], +article strong, +code, +kbd, +samp, +pre, +article blockquote i, +article blockquote var { + -moz-font-feature-settings: "liga=1, locl=0"; + -ms-font-feature-settings: "liga", "locl" 0; + -webkit-font-feature-settings: "liga", "locl" 0; + font-feature-settings: "liga", "locl" 0; +} +.no-unicoderange h-char.bd-cop:lang(zh-Hant), +.no-unicoderange h-char.bd-cop:lang(zh-TW), +.no-unicoderange h-char.bd-cop:lang(zh-HK) { + font-family: -apple-system, "Han Heiti CNS"; +} +.no-unicoderange h-char.bd-liga, +.no-unicoderange h-char[unicode="b7"] { + font-family: "Biaodian Basic", "Han Heiti"; +} +.no-unicoderange h-char[unicode="2018"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="2019"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="201c"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="201d"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="2018"]:lang(zh-CN), +.no-unicoderange h-char[unicode="2019"]:lang(zh-CN), +.no-unicoderange h-char[unicode="201c"]:lang(zh-CN), +.no-unicoderange h-char[unicode="201d"]:lang(zh-CN) { + font-family: "Han Heiti GB"; +} +i, +var { + font-style: inherit; +} +.no-unicoderange ruby h-zhuyin, +.no-unicoderange h-ruby h-zhuyin, +.no-unicoderange ruby h-zhuyin h-diao, +.no-unicoderange h-ruby h-zhuyin h-diao { + font-family: "Zhuyin Kaiti", cursive, serif; +} +ruby h-diao, +h-ruby h-diao { + font-family: "Zhuyin Kaiti", cursive, serif; +} +ruby.romanization rt, +h-ruby.romanization rt, +ruby [annotation] rt, +h-ruby [annotation] rt { + font-family: "Romanization Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +.no-kaiti i, +.no-kaiti var { + padding-bottom: .05em; + border-bottom: 3px double #d3d3d3; +} +article h1 + blockquote, +article h2 + blockquote, +article h3 + blockquote, +article h4 + blockquote, +article h5 + blockquote, +article h6 + blockquote, +article h1 + p, +article h2 + p, +article h3 + p, +article h4 + p, +article h5 + p, +article h6 + p, +article h1 + ol, +article h2 + ol, +article h3 + ol, +article h4 + ol, +article h5 + ol, +article h6 + ol, +article h1 + ul, +article h2 + ul, +article h3 + ul, +article h4 + ul, +article h5 + ul, +article h6 + ul, +article h1 + h6, +article h2 + h6, +article h3 + h6, +article h4 + h6, +article h5 + h6, +article h6 + h6, +article h1 + section > h6:first-child, +article h2 + section > h6:first-child, +article h3 + section > h6:first-child, +article h4 + section > h6:first-child, +article h5 + section > h6:first-child, +article h6 + section > h6:first-child, +article h1 + section > p:first-child, +article h2 + section > p:first-child, +article h3 + section > p:first-child, +article h4 + section > p:first-child, +article h5 + section > p:first-child, +article h6 + section > p:first-child, +article h1 + section > ol:first-child, +article h2 + section > ol:first-child, +article h3 + section > ol:first-child, +article h4 + section > ol:first-child, +article h5 + section > ol:first-child, +article h6 + section > ol:first-child, +article h1 + section > ul:first-child, +article h2 + section > ul:first-child, +article h3 + section > ul:first-child, +article h4 + section > ul:first-child, +article h5 + section > ul:first-child, +article h6 + section > ul:first-child, +article h1 + section > blockquote:first-child, +article h2 + section > blockquote:first-child, +article h3 + section > blockquote:first-child, +article h4 + section > blockquote:first-child, +article h5 + section > blockquote:first-child, +article h6 + section > blockquote:first-child, +article h1 + h5, +article h2 + h5, +article h3 + h5, +article h4 + h5, +article h5 + h5, +article h1 + section > h5:first-child, +article h2 + section > h5:first-child, +article h3 + section > h5:first-child, +article h4 + section > h5:first-child, +article h5 + section > h5:first-child, +article h1 + h4, +article h2 + h4, +article h3 + h4, +article h4 + h4, +article h1 + section > h4:first-child, +article h2 + section > h4:first-child, +article h3 + section > h4:first-child, +article h4 + section > h4:first-child, +article h1 + h3, +article h2 + h3, +article h3 + h3, +article h1 + section > h3:first-child, +article h2 + section > h3:first-child, +article h3 + section > h3:first-child, +article h1 + h2, +article h2 + h2, +article h1 + section > h2:first-child, +article h2 + section > h2:first-child { + margin-top: -1em; +} +article { + line-height: 1.7; +} +article { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} +p.poem-like, +.poem-like p { + margin-left: 2em; +} +@media only screen and (max-width: 480px) { + p.poem-like, + .poem-like p { + margin-left: 1em; + } +} +article blockquote { + margin-right: 0; +} +@media only screen and (max-width: 480px) { + article blockquote { + margin-left: 1em; + } +} +figure blockquote { + margin: 0; +} +blockquote blockquote { + margin-left: 1em; + margin-right: 1em; +} +article blockquote blockquote { + margin-right: 0; +} +@media only screen and (max-width: 480px) { + blockquote, + figure { + margin-left: 1em; + margin-right: 1em; + } +} +h-hws, +h-hws[hidden] { + display: inline; + visibility: hidden; + font: .89em Arial; +} +code h-hws, +code h-hws[hidden], +kbd h-hws, +kbd h-hws[hidden], +samp h-hws, +samp h-hws[hidden], +pre h-hws, +pre h-hws[hidden], +h-hws.quote-inner, +h-hws[hidden].quote-inner, +h-hws.quote-outer:lang(zh-Hans), +h-hws[hidden].quote-outer:lang(zh-Hans), +h-hws.quote-outer:lang(zh-CN), +h-hws[hidden].quote-outer:lang(zh-CN) { + display: none; +} +@font-face { + src: url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han-space.woff?v3.3.0") format("woff"), url("https://cdnjs.loli.net/ajax/libs/Han/3.3.0/font/han-space.woff?v3.3.0") format("opentype"); + font-family: "Han Space"; + unicode-range: U+20; +} +h-char.bd-hangable:lang(zh) h-cs, +h-char.bd-hangable:lang(zh-Hant) h-cs, +h-char.bd-hangable:lang(zh-TW) h-cs, +h-char.bd-hangable:lang(zh-HK) h-cs, +h-cs, +h-char.bd-hangable:lang(zh) h-cs[hidden], +h-char.bd-hangable:lang(zh-Hant) h-cs[hidden], +h-char.bd-hangable:lang(zh-TW) h-cs[hidden], +h-char.bd-hangable:lang(zh-HK) h-cs[hidden], +h-cs[hidden] { + display: inline; + visibility: inherit; + font-family: inherit; + font-size: inherit; +} +h-cs.hangable-outer, +h-cs.hangable-outer[hidden] { + display: inline; + font: 1em "Han Space"; +} +h-cs.hangable-outer:lang(zh-Hant), +h-cs.hangable-outer[hidden]:lang(zh-Hant), +h-cs.hangable-outer:lang(zh-TW), +h-cs.hangable-outer[hidden]:lang(zh-TW), +h-cs.hangable-outer:lang(zh-HK), +h-cs.hangable-outer[hidden]:lang(zh-HK) { + display: none; +} +h-char.bd-hangable:lang(zh-Hans), +h-char.bd-hangable:lang(zh-CN), +h-char.bd-hangable:lang(ja) { + position: relative; +} +h-char.bd-hangable:lang(zh-Hans):after, +h-char.bd-hangable:lang(zh-CN):after, +h-char.bd-hangable:lang(ja):after { + display: none !important; +} +h-char.bd-hangable:lang(zh-Hans):before, +h-char.bd-hangable:lang(zh-CN):before, +h-char.bd-hangable:lang(ja):before { + display: inline !important; + content: " "; + font: 1em "Han Space", Menlo, Consolas, Courier; +} +h-char.bd-hangable:lang(zh-Hans) > h-inner, +h-char.bd-hangable:lang(zh-CN) > h-inner, +h-char.bd-hangable:lang(ja) > h-inner { + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + font-style: normal; + font-weight: normal; + line-height: normal; + text-decoration: none; + text-indent: 0; + position: absolute; + left: 0; + top: 0; + display: inline-block; + line-height: 1.1; +} +ruby h-char.bd-hangable:lang(zh-Hans) > h-inner, +ruby h-char.bd-hangable:lang(zh-CN) > h-inner, +ruby h-char.bd-hangable:lang(ja) > h-inner, +h-ru h-char.bd-hangable:lang(zh-Hans) > h-inner, +h-ru h-char.bd-hangable:lang(zh-CN) > h-inner, +h-ru h-char.bd-hangable:lang(ja) > h-inner { + position: relative; +} +h-char.bd-jiya.bd-open:before, +h-char.bd-jiya.bd-end:after, +h-cs, +h-cs[hidden] { + display: none; + visibility: hidden; + content: " "; + font: .825em Courier; + letter-spacing: 0; + white-space: normal; +} +h-cs.jinze-outer, +h-cs.jinze-outer[hidden] { + display: inline; +} +h-char.bd-jiya.bd-open > h-inner { + margin-left: -.5em; +} +h-char.bd-jiya.bd-close > h-inner, +h-char.bd-jiya.bd-cop > h-inner, +h-char.bd-jiya[unicode="ff0e"] > h-inner { + letter-spacing: -.5em; +} +h-char.bd-jiya.bd-open:before, +h-char.bd-jiya.bd-close:after, +h-char.bd-jiya.bd-cop:after, +h-char.bd-jiya[unicode="ff0e"]:after { + display: inline; +} +h-char.bd-jiya.bd-cop:lang(zh-Hant):after, +h-char.bd-jiya.bd-cop:lang(zh-TW):after, +h-char.bd-jiya.bd-cop:lang(zh-HK):after { + display: none; +} +h-char.bd-jiya.bd-cop:lang(zh-Hant) > h-inner, +h-char.bd-jiya.bd-cop:lang(zh-TW) > h-inner, +h-char.bd-jiya.bd-cop:lang(zh-HK) > h-inner { + letter-spacing: inherit; +} +h-char.bd-consecutive.bd-end:not(.end-portion):after, +h-char.bd-consecutive.bd-open[prev="bd-open"]:before, +h-cs.jiya-outer.bd-end:not(.end-portion) { + display: none; +} +h-cs.jiya-outer.bd-end[next="bd-open"] { + display: inline; +} +h-char.bd-consecutive.bd-open[prev*="bd-cop"]:lang(zh-Hant):before, +h-char.bd-consecutive.bd-open[prev*="bd-cop"]:lang(zh-TW):before, +h-char.bd-consecutive.bd-open[prev*="bd-cop"]:lang(zh-HK):before { + display: none; +} +h-cs.jiya-outer[prev*="bd-cop"]:lang(zh-Hant), +h-cs.jiya-outer.bd-end:lang(zh-Hant), +h-cs.jiya-outer[prev*="bd-cop"]:lang(zh-TW), +h-cs.jiya-outer.bd-end:lang(zh-TW), +h-cs.jiya-outer[prev*="bd-cop"]:lang(zh-HK), +h-cs.jiya-outer.bd-end:lang(zh-HK) { + display: none; +} +h-char.bd-consecutive[unicode="b7"]:not(.end-portion), +h-char.bd-consecutive[unicode="30fb"]:not(.end-portion) { + letter-spacing: -.5em; +} +h-char.bd-consecutive.bd-liga:not(.end-portion) { + margin-right: -.25em; +} +h-char[display-as] { + position: relative; + display: inline-block; +} +h-char[display-as] h-inner { + color: transparent; +} +h-char[display-as]:after { + position: absolute; + left: 0; + display: inline-block; + content: attr(display-as); +} +h-char[display-as].comb-liga:after { + font-family: "Romanization Sans", "Zhuyin Kaiti"; +} diff --git a/docs/_static/js/math-csr.js b/docs/_static/js/math-csr.js new file mode 100644 index 00000000..8a2d28fe --- /dev/null +++ b/docs/_static/js/math-csr.js @@ -0,0 +1,9 @@ +MathJax = { + chtml: { + matchFontHeight: false + } +}; + +document$.subscribe(function () { + MathJax.typesetPromise(); +}); diff --git a/docs/_static/js/myext.js b/docs/_static/js/myext.js new file mode 100644 index 00000000..585c435c --- /dev/null +++ b/docs/_static/js/myext.js @@ -0,0 +1,30 @@ +document.addEventListener("DOMContentLoaded", function() { + 'use strict'; + + /* 进度条 */ + var current_progress = document.getElementsByClassName("current-progress"); + var dynamic = document.getElementsByClassName("dynamic"); + + for(let r=dynamic.length-1;r>-1;r--) { + dynamic[r].style.width=current_progress[r].innerHTML + "%"; + dynamic[r].setAttribute("aria-valuenow",current_progress[r].innerHTML); + dynamic[r].innerHTML=current_progress[r].innerHTML+ "% Complete"; + } + + /* 图片文字title标注 */ + let allImag = document.querySelectorAll("img") + if(allImag.length > 0){ + for(const img of allImag) { + if(img.title.length > 0){ + img.style.display = "block"; + var center = img.parentElement.appendChild(document.createElement('center')); + var fonte = center.appendChild(document.createElement('font')); + fonte.setAttribute('size', '2.5'); + var i = fonte.appendChild(document.createElement('i')); + var a = i.appendChild(document.createElement('a')); + a.appendChild(document.createTextNode(img.title)); + } + } + } + +}); \ No newline at end of file diff --git a/docs/assets/images/favicon.png b/docs/assets/images/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..1cf13b9f9d978896599290a74f77d5dbe7d1655c GIT binary patch literal 1870 zcmV-U2eJ5xP)Gc)JR9QMau)O=X#!i9;T z37kk-upj^(fsR36MHs_+1RCI)NNu9}lD0S{B^g8PN?Ww(5|~L#Ng*g{WsqleV}|#l zz8@ri&cTzw_h33bHI+12+kK6WN$h#n5cD8OQt`5kw6p~9H3()bUQ8OS4Q4HTQ=1Ol z_JAocz`fLbT2^{`8n~UAo=#AUOf=SOq4pYkt;XbC&f#7lb$*7=$na!mWCQ`dBQsO0 zLFBSPj*N?#u5&pf2t4XjEGH|=pPQ8xh7tpx;US5Cx_Ju;!O`ya-yF`)b%TEt5>eP1ZX~}sjjA%FJF?h7cX8=b!DZl<6%Cv z*G0uvvU+vmnpLZ2paivG-(cd*y3$hCIcsZcYOGh{$&)A6*XX&kXZd3G8m)G$Zz-LV z^GF3VAW^Mdv!)4OM8EgqRiz~*Cji;uzl2uC9^=8I84vNp;ltJ|q-*uQwGp2ma6cY7 z;`%`!9UXO@fr&Ebapfs34OmS9^u6$)bJxrucutf>`dKPKT%%*d3XlFVKunp9 zasduxjrjs>f8V=D|J=XNZp;_Zy^WgQ$9WDjgY=z@stwiEBm9u5*|34&1Na8BMjjgf3+SHcr`5~>oz1Y?SW^=K z^bTyO6>Gar#P_W2gEMwq)ot3; zREHn~U&Dp0l6YT0&k-wLwYjb?5zGK`W6S2v+K>AM(95m2C20L|3m~rN8dprPr@t)5lsk9Hu*W z?pS990s;Ez=+Rj{x7p``4>+c0G5^pYnB1^!TL=(?HLHZ+HicG{~4F1d^5Awl_2!1jICM-!9eoLhbbT^;yHcefyTAaqRcY zmuctDopPT!%k+}x%lZRKnzykr2}}XfG_ne?nRQO~?%hkzo;@RN{P6o`&mMUWBYMTe z6i8ChtjX&gXl`nvrU>jah)2iNM%JdjqoaeaU%yVn!^70x-flljp6Q5tK}5}&X8&&G zX3fpb3E(!rH=zVI_9Gjl45w@{(ITqngWFe7@9{mX;tO25Z_8 zQHEpI+FkTU#4xu>RkN>b3Tnc3UpWzPXWm#o55GKF09j^Mh~)K7{QqbO_~(@CVq! zS<8954|P8mXN2MRs86xZ&Q4EfM@JB94b=(YGuk)s&^jiSF=t3*oNK3`rD{H`yQ?d; ztE=laAUoZx5?RC8*WKOj`%LXEkgDd>&^Q4M^z`%u0rg-It=hLCVsq!Z%^6eB-OvOT zFZ28TN&cRmgU}Elrnk43)!>Z1FCPL2K$7}gwzIc48NX}#!A1BpJP?#v5wkNprhV** z?Cpalt1oH&{r!o3eSKc&ap)iz2BTn_VV`4>9M^b3;(YY}4>#ML6{~(4mH+?%07*qo IM6N<$f(jP3KmY&$ literal 0 HcmV?d00001 diff --git a/docs/assets/javascripts/bundle.561f57c7.min.js b/docs/assets/javascripts/bundle.561f57c7.min.js new file mode 100644 index 00000000..0ebfd8a6 --- /dev/null +++ b/docs/assets/javascripts/bundle.561f57c7.min.js @@ -0,0 +1,29 @@ +"use strict";(()=>{var oa=Object.create;var wr=Object.defineProperty;var ia=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames,kt=Object.getOwnPropertySymbols,sa=Object.getPrototypeOf,Er=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable;var cn=(e,t,r)=>t in e?wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H=(e,t)=>{for(var r in t||(t={}))Er.call(t,r)&&cn(e,r,t[r]);if(kt)for(var r of kt(t))fn.call(t,r)&&cn(e,r,t[r]);return e};var un=(e,t)=>{var r={};for(var n in e)Er.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kt)for(var n of kt(e))t.indexOf(n)<0&&fn.call(e,n)&&(r[n]=e[n]);return r};var yt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ca=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of aa(t))!Er.call(e,o)&&o!==r&&wr(e,o,{get:()=>t[o],enumerable:!(n=ia(t,o))||n.enumerable});return e};var Ye=(e,t,r)=>(r=e!=null?oa(sa(e)):{},ca(t||!e||!e.__esModule?wr(r,"default",{value:e,enumerable:!0}):r,e));var ln=yt((Sr,pn)=>{(function(e,t){typeof Sr=="object"&&typeof pn!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(Sr,function(){"use strict";function e(r){var n=!0,o=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(_){return!!(_&&_!==document&&_.nodeName!=="HTML"&&_.nodeName!=="BODY"&&"classList"in _&&"contains"in _.classList)}function c(_){var De=_.type,je=_.tagName;return!!(je==="INPUT"&&s[De]&&!_.readOnly||je==="TEXTAREA"&&!_.readOnly||_.isContentEditable)}function f(_){_.classList.contains("focus-visible")||(_.classList.add("focus-visible"),_.setAttribute("data-focus-visible-added",""))}function u(_){!_.hasAttribute("data-focus-visible-added")||(_.classList.remove("focus-visible"),_.removeAttribute("data-focus-visible-added"))}function p(_){_.metaKey||_.altKey||_.ctrlKey||(a(r.activeElement)&&f(r.activeElement),n=!0)}function l(_){n=!1}function d(_){!a(_.target)||(n||c(_.target))&&f(_.target)}function h(_){!a(_.target)||(_.target.classList.contains("focus-visible")||_.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(i),i=window.setTimeout(function(){o=!1},100),u(_.target))}function b(_){document.visibilityState==="hidden"&&(o&&(n=!0),U())}function U(){document.addEventListener("mousemove",W),document.addEventListener("mousedown",W),document.addEventListener("mouseup",W),document.addEventListener("pointermove",W),document.addEventListener("pointerdown",W),document.addEventListener("pointerup",W),document.addEventListener("touchmove",W),document.addEventListener("touchstart",W),document.addEventListener("touchend",W)}function G(){document.removeEventListener("mousemove",W),document.removeEventListener("mousedown",W),document.removeEventListener("mouseup",W),document.removeEventListener("pointermove",W),document.removeEventListener("pointerdown",W),document.removeEventListener("pointerup",W),document.removeEventListener("touchmove",W),document.removeEventListener("touchstart",W),document.removeEventListener("touchend",W)}function W(_){_.target.nodeName&&_.target.nodeName.toLowerCase()==="html"||(n=!1,G())}document.addEventListener("keydown",p,!0),document.addEventListener("mousedown",l,!0),document.addEventListener("pointerdown",l,!0),document.addEventListener("touchstart",l,!0),document.addEventListener("visibilitychange",b,!0),U(),r.addEventListener("focus",d,!0),r.addEventListener("blur",h,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var mn=yt(Or=>{(function(e){var t=function(){try{return!!Symbol.iterator}catch(f){return!1}},r=t(),n=function(f){var u={next:function(){var p=f.shift();return{done:p===void 0,value:p}}};return r&&(u[Symbol.iterator]=function(){return u}),u},o=function(f){return encodeURIComponent(f).replace(/%20/g,"+")},i=function(f){return decodeURIComponent(String(f).replace(/\+/g," "))},s=function(){var f=function(p){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var l=typeof p;if(l!=="undefined")if(l==="string")p!==""&&this._fromString(p);else if(p instanceof f){var d=this;p.forEach(function(G,W){d.append(W,G)})}else if(p!==null&&l==="object")if(Object.prototype.toString.call(p)==="[object Array]")for(var h=0;hd[0]?1:0}),f._entries&&(f._entries={});for(var p=0;p1?i(d[1]):"")}})})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Or);(function(e){var t=function(){try{var o=new e.URL("b","http://a");return o.pathname="c d",o.href==="http://a/c%20d"&&o.searchParams}catch(i){return!1}},r=function(){var o=e.URL,i=function(c,f){typeof c!="string"&&(c=String(c)),f&&typeof f!="string"&&(f=String(f));var u=document,p;if(f&&(e.location===void 0||f!==e.location.href)){f=f.toLowerCase(),u=document.implementation.createHTMLDocument(""),p=u.createElement("base"),p.href=f,u.head.appendChild(p);try{if(p.href.indexOf(f)!==0)throw new Error(p.href)}catch(_){throw new Error("URL unable to set base "+f+" due to "+_)}}var l=u.createElement("a");l.href=c,p&&(u.body.appendChild(l),l.href=l.href);var d=u.createElement("input");if(d.type="url",d.value=c,l.protocol===":"||!/:/.test(l.href)||!d.checkValidity()&&!f)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:l});var h=new e.URLSearchParams(this.search),b=!0,U=!0,G=this;["append","delete","set"].forEach(function(_){var De=h[_];h[_]=function(){De.apply(h,arguments),b&&(U=!1,G.search=h.toString(),U=!0)}}),Object.defineProperty(this,"searchParams",{value:h,enumerable:!0});var W=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==W&&(W=this.search,U&&(b=!1,this.searchParams._fromString(this.search),b=!0))}})},s=i.prototype,a=function(c){Object.defineProperty(s,c,{get:function(){return this._anchorElement[c]},set:function(f){this._anchorElement[c]=f},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(c){a(c)}),Object.defineProperty(s,"search",{get:function(){return this._anchorElement.search},set:function(c){this._anchorElement.search=c,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(s,{toString:{get:function(){var c=this;return function(){return c.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(c){this._anchorElement.href=c,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(c){this._anchorElement.pathname=c},enumerable:!0},origin:{get:function(){var c={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],f=this._anchorElement.port!=c&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(f?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(c){},enumerable:!0},username:{get:function(){return""},set:function(c){},enumerable:!0}}),i.createObjectURL=function(c){return o.createObjectURL.apply(o,arguments)},i.revokeObjectURL=function(c){return o.revokeObjectURL.apply(o,arguments)},e.URL=i};if(t()||r(),e.location!==void 0&&!("origin"in e.location)){var n=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:n,enumerable:!0})}catch(o){setInterval(function(){e.location.origin=n()},100)}}})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Or)});var Pn=yt((zs,$t)=>{/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var dn,hn,bn,vn,gn,yn,xn,wn,En,Ht,_r,Sn,On,_n,rt,Tn,Mn,Ln,An,Cn,Rn,kn,Hn,Pt;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof $t=="object"&&typeof $t.exports=="object"?e(r(t,r($t.exports))):e(r(t));function r(n,o){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])};dn=function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(n,o);function i(){this.constructor=n}n.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)},hn=Object.assign||function(n){for(var o,i=1,s=arguments.length;i=0;u--)(f=n[u])&&(c=(a<3?f(c):a>3?f(o,i,c):f(o,i))||c);return a>3&&c&&Object.defineProperty(o,i,c),c},gn=function(n,o){return function(i,s){o(i,s,n)}},yn=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)},xn=function(n,o,i,s){function a(c){return c instanceof i?c:new i(function(f){f(c)})}return new(i||(i=Promise))(function(c,f){function u(d){try{l(s.next(d))}catch(h){f(h)}}function p(d){try{l(s.throw(d))}catch(h){f(h)}}function l(d){d.done?c(d.value):a(d.value).then(u,p)}l((s=s.apply(n,o||[])).next())})},wn=function(n,o){var i={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},s,a,c,f;return f={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function u(l){return function(d){return p([l,d])}}function p(l){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,a&&(c=l[0]&2?a.return:l[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,l[1])).done)return c;switch(a=0,c&&(l=[l[0]&2,c.value]),l[0]){case 0:case 1:c=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,a=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(c=i.trys,!(c=c.length>0&&c[c.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!c||l[1]>c[0]&&l[1]=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},_r=function(n,o){var i=typeof Symbol=="function"&&n[Symbol.iterator];if(!i)return n;var s=i.call(n),a,c=[],f;try{for(;(o===void 0||o-- >0)&&!(a=s.next()).done;)c.push(a.value)}catch(u){f={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(f)throw f.error}}return c},Sn=function(){for(var n=[],o=0;o1||u(b,U)})})}function u(b,U){try{p(s[b](U))}catch(G){h(c[0][3],G)}}function p(b){b.value instanceof rt?Promise.resolve(b.value.v).then(l,d):h(c[0][2],b)}function l(b){u("next",b)}function d(b){u("throw",b)}function h(b,U){b(U),c.shift(),c.length&&u(c[0][0],c[0][1])}},Mn=function(n){var o,i;return o={},s("next"),s("throw",function(a){throw a}),s("return"),o[Symbol.iterator]=function(){return this},o;function s(a,c){o[a]=n[a]?function(f){return(i=!i)?{value:rt(n[a](f)),done:a==="return"}:c?c(f):f}:c}},Ln=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n[Symbol.asyncIterator],i;return o?o.call(n):(n=typeof Ht=="function"?Ht(n):n[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(c){i[c]=n[c]&&function(f){return new Promise(function(u,p){f=n[c](f),a(u,p,f.done,f.value)})}}function a(c,f,u,p){Promise.resolve(p).then(function(l){c({value:l,done:u})},f)}},An=function(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n};var r=Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o};Cn=function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var i in n)i!=="default"&&Object.prototype.hasOwnProperty.call(n,i)&&Pt(o,n,i);return r(o,n),o},Rn=function(n){return n&&n.__esModule?n:{default:n}},kn=function(n,o,i,s){if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?n!==o||!s:!o.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?s:i==="a"?s.call(n):s?s.value:o.get(n)},Hn=function(n,o,i,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?n!==o||!a:!o.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(n,i):a?a.value=i:o.set(n,i),i},e("__extends",dn),e("__assign",hn),e("__rest",bn),e("__decorate",vn),e("__param",gn),e("__metadata",yn),e("__awaiter",xn),e("__generator",wn),e("__exportStar",En),e("__createBinding",Pt),e("__values",Ht),e("__read",_r),e("__spread",Sn),e("__spreadArrays",On),e("__spreadArray",_n),e("__await",rt),e("__asyncGenerator",Tn),e("__asyncDelegator",Mn),e("__asyncValues",Ln),e("__makeTemplateObject",An),e("__importStar",Cn),e("__importDefault",Rn),e("__classPrivateFieldGet",kn),e("__classPrivateFieldSet",Hn)})});var Br=yt((At,Yr)=>{/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */(function(t,r){typeof At=="object"&&typeof Yr=="object"?Yr.exports=r():typeof define=="function"&&define.amd?define([],r):typeof At=="object"?At.ClipboardJS=r():t.ClipboardJS=r()})(At,function(){return function(){var e={686:function(n,o,i){"use strict";i.d(o,{default:function(){return na}});var s=i(279),a=i.n(s),c=i(370),f=i.n(c),u=i(817),p=i.n(u);function l(j){try{return document.execCommand(j)}catch(T){return!1}}var d=function(T){var O=p()(T);return l("cut"),O},h=d;function b(j){var T=document.documentElement.getAttribute("dir")==="rtl",O=document.createElement("textarea");O.style.fontSize="12pt",O.style.border="0",O.style.padding="0",O.style.margin="0",O.style.position="absolute",O.style[T?"right":"left"]="-9999px";var k=window.pageYOffset||document.documentElement.scrollTop;return O.style.top="".concat(k,"px"),O.setAttribute("readonly",""),O.value=j,O}var U=function(T,O){var k=b(T);O.container.appendChild(k);var $=p()(k);return l("copy"),k.remove(),$},G=function(T){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},k="";return typeof T=="string"?k=U(T,O):T instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(T==null?void 0:T.type)?k=U(T.value,O):(k=p()(T),l("copy")),k},W=G;function _(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(O){return typeof O}:_=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},_(j)}var De=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=T.action,k=O===void 0?"copy":O,$=T.container,q=T.target,Te=T.text;if(k!=="copy"&&k!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(q!==void 0)if(q&&_(q)==="object"&&q.nodeType===1){if(k==="copy"&&q.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(k==="cut"&&(q.hasAttribute("readonly")||q.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Te)return W(Te,{container:$});if(q)return k==="cut"?h(q):W(q,{container:$})},je=De;function Pe(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(O){return typeof O}:Pe=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},Pe(j)}function Bi(j,T){if(!(j instanceof T))throw new TypeError("Cannot call a class as a function")}function sn(j,T){for(var O=0;O0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof $.action=="function"?$.action:this.defaultAction,this.target=typeof $.target=="function"?$.target:this.defaultTarget,this.text=typeof $.text=="function"?$.text:this.defaultText,this.container=Pe($.container)==="object"?$.container:document.body}},{key:"listenClick",value:function($){var q=this;this.listener=f()($,"click",function(Te){return q.onClick(Te)})}},{key:"onClick",value:function($){var q=$.delegateTarget||$.currentTarget,Te=this.action(q)||"copy",Rt=je({action:Te,container:this.container,target:this.target(q),text:this.text(q)});this.emit(Rt?"success":"error",{action:Te,text:Rt,trigger:q,clearSelection:function(){q&&q.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function($){return xr("action",$)}},{key:"defaultTarget",value:function($){var q=xr("target",$);if(q)return document.querySelector(q)}},{key:"defaultText",value:function($){return xr("text",$)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function($){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return W($,q)}},{key:"cut",value:function($){return h($)}},{key:"isSupported",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],q=typeof $=="string"?[$]:$,Te=!!document.queryCommandSupported;return q.forEach(function(Rt){Te=Te&&!!document.queryCommandSupported(Rt)}),Te}}]),O}(a()),na=ra},828:function(n){var o=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function s(a,c){for(;a&&a.nodeType!==o;){if(typeof a.matches=="function"&&a.matches(c))return a;a=a.parentNode}}n.exports=s},438:function(n,o,i){var s=i(828);function a(u,p,l,d,h){var b=f.apply(this,arguments);return u.addEventListener(l,b,h),{destroy:function(){u.removeEventListener(l,b,h)}}}function c(u,p,l,d,h){return typeof u.addEventListener=="function"?a.apply(null,arguments):typeof l=="function"?a.bind(null,document).apply(null,arguments):(typeof u=="string"&&(u=document.querySelectorAll(u)),Array.prototype.map.call(u,function(b){return a(b,p,l,d,h)}))}function f(u,p,l,d){return function(h){h.delegateTarget=s(h.target,p),h.delegateTarget&&d.call(u,h)}}n.exports=c},879:function(n,o){o.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},o.nodeList=function(i){var s=Object.prototype.toString.call(i);return i!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in i&&(i.length===0||o.node(i[0]))},o.string=function(i){return typeof i=="string"||i instanceof String},o.fn=function(i){var s=Object.prototype.toString.call(i);return s==="[object Function]"}},370:function(n,o,i){var s=i(879),a=i(438);function c(l,d,h){if(!l&&!d&&!h)throw new Error("Missing required arguments");if(!s.string(d))throw new TypeError("Second argument must be a String");if(!s.fn(h))throw new TypeError("Third argument must be a Function");if(s.node(l))return f(l,d,h);if(s.nodeList(l))return u(l,d,h);if(s.string(l))return p(l,d,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(l,d,h){return l.addEventListener(d,h),{destroy:function(){l.removeEventListener(d,h)}}}function u(l,d,h){return Array.prototype.forEach.call(l,function(b){b.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(l,function(b){b.removeEventListener(d,h)})}}}function p(l,d,h){return a(document.body,l,d,h)}n.exports=c},817:function(n){function o(i){var s;if(i.nodeName==="SELECT")i.focus(),s=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var a=i.hasAttribute("readonly");a||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),a||i.removeAttribute("readonly"),s=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(i),c.removeAllRanges(),c.addRange(f),s=c.toString()}return s}n.exports=o},279:function(n){function o(){}o.prototype={on:function(i,s,a){var c=this.e||(this.e={});return(c[i]||(c[i]=[])).push({fn:s,ctx:a}),this},once:function(i,s,a){var c=this;function f(){c.off(i,f),s.apply(a,arguments)}return f._=s,this.on(i,f,a)},emit:function(i){var s=[].slice.call(arguments,1),a=((this.e||(this.e={}))[i]||[]).slice(),c=0,f=a.length;for(c;c{"use strict";/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var _s=/["'&<>]/;Si.exports=Ts;function Ts(e){var t=""+e,r=_s.exec(t);if(!r)return t;var n,o="",i=0,s=0;for(i=r.index;i0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,s=o.isStopped,a=o.observers;return i||s?Tr:(this.currentObservers=null,a.push(r),new $e(function(){n.currentObservers=null,Fe(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,n){return new Qn(r,n)},t}(F);var Qn=function(e){re(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:Tr},t}(E);var wt={now:function(){return(wt.delegate||Date).now()},delegate:void 0};var Et=function(e){re(t,e);function t(r,n,o){r===void 0&&(r=1/0),n===void 0&&(n=1/0),o===void 0&&(o=wt);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,o=n.isStopped,i=n._buffer,s=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;o||(i.push(r),!s&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),o=this,i=o._infiniteTimeWindow,s=o._buffer,a=s.slice(),c=0;c0?e.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r._scheduled||(r._scheduled=at.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,o){var i;if(o===void 0&&(o=0),o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);var s=r.actions;n!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==n&&(at.cancelAnimationFrame(n),r._scheduled=void 0)},t}(Nt);var Gn=function(e){re(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var o=this.actions,i;r=r||o.shift();do if(i=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,i){for(;(r=o[0])&&r.id===n&&o.shift();)r.unsubscribe();throw i}},t}(zt);var xe=new Gn(Bn);var R=new F(function(e){return e.complete()});function qt(e){return e&&L(e.schedule)}function Hr(e){return e[e.length-1]}function We(e){return L(Hr(e))?e.pop():void 0}function Ee(e){return qt(Hr(e))?e.pop():void 0}function Kt(e,t){return typeof Hr(e)=="number"?e.pop():t}var st=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Qt(e){return L(e==null?void 0:e.then)}function Yt(e){return L(e[it])}function Bt(e){return Symbol.asyncIterator&&L(e==null?void 0:e[Symbol.asyncIterator])}function Gt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function va(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Jt=va();function Xt(e){return L(e==null?void 0:e[Jt])}function Zt(e){return jn(this,arguments,function(){var r,n,o,i;return It(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,jt(r.read())];case 3:return n=s.sent(),o=n.value,i=n.done,i?[4,jt(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,jt(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function er(e){return L(e==null?void 0:e.getReader)}function N(e){if(e instanceof F)return e;if(e!=null){if(Yt(e))return ga(e);if(st(e))return ya(e);if(Qt(e))return xa(e);if(Bt(e))return Jn(e);if(Xt(e))return wa(e);if(er(e))return Ea(e)}throw Gt(e)}function ga(e){return new F(function(t){var r=e[it]();if(L(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ya(e){return new F(function(t){for(var r=0;r=2,!0))}function oe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new E}:t,n=e.resetOnError,o=n===void 0?!0:n,i=e.resetOnComplete,s=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(f){var u,p,l,d=0,h=!1,b=!1,U=function(){p==null||p.unsubscribe(),p=void 0},G=function(){U(),u=l=void 0,h=b=!1},W=function(){var _=u;G(),_==null||_.unsubscribe()};return g(function(_,De){d++,!b&&!h&&U();var je=l=l!=null?l:r();De.add(function(){d--,d===0&&!b&&!h&&(p=Dr(W,c))}),je.subscribe(De),!u&&d>0&&(u=new Ge({next:function(Pe){return je.next(Pe)},error:function(Pe){b=!0,U(),p=Dr(G,o,Pe),je.error(Pe)},complete:function(){h=!0,U(),p=Dr(G,s),je.complete()}}),N(_).subscribe(u))})(f)}}function Dr(e,t){for(var r=[],n=2;ne.next(document)),e}function Q(e,t=document){return Array.from(t.querySelectorAll(e))}function K(e,t=document){let r=pe(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function pe(e,t=document){return t.querySelector(e)||void 0}function Ie(){return document.activeElement instanceof HTMLElement&&document.activeElement||void 0}function nr(e){return A(v(document.body,"focusin"),v(document.body,"focusout")).pipe(Re(1),m(()=>{let t=Ie();return typeof t!="undefined"?e.contains(t):!1}),z(e===Ie()),B())}function ze(e){return{x:e.offsetLeft,y:e.offsetTop}}function yo(e){return A(v(window,"load"),v(window,"resize")).pipe(Ae(0,xe),m(()=>ze(e)),z(ze(e)))}function or(e){return{x:e.scrollLeft,y:e.scrollTop}}function pt(e){return A(v(e,"scroll"),v(window,"resize")).pipe(Ae(0,xe),m(()=>or(e)),z(or(e)))}var wo=function(){if(typeof Map!="undefined")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!qr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),za?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!qr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=Na.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Eo=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),Oo=typeof WeakMap!="undefined"?new WeakMap:new wo,_o=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=qa.getInstance(),n=new ts(t,r,this);Oo.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){_o.prototype[e]=function(){var t;return(t=Oo.get(this))[e].apply(t,arguments)}});var rs=function(){return typeof ir.ResizeObserver!="undefined"?ir.ResizeObserver:_o}(),To=rs;var Mo=new E,ns=P(()=>I(new To(e=>{for(let t of e)Mo.next(t)}))).pipe(S(e=>A(Se,I(e)).pipe(C(()=>e.disconnect()))),X(1));function he(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ve(e){return ns.pipe(w(t=>t.observe(e)),S(t=>Mo.pipe(x(({target:r})=>r===e),C(()=>t.unobserve(e)),m(()=>he(e)))),z(he(e)))}function mt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function cr(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}var Lo=new E,os=P(()=>I(new IntersectionObserver(e=>{for(let t of e)Lo.next(t)},{threshold:0}))).pipe(S(e=>A(Se,I(e)).pipe(C(()=>e.disconnect()))),X(1));function fr(e){return os.pipe(w(t=>t.observe(e)),S(t=>Lo.pipe(x(({target:r})=>r===e),C(()=>t.unobserve(e)),m(({isIntersecting:r})=>r))))}function Ao(e,t=16){return pt(e).pipe(m(({y:r})=>{let n=he(e),o=mt(e);return r>=o.height-n.height-t}),B())}var ur={drawer:K("[data-md-toggle=drawer]"),search:K("[data-md-toggle=search]")};function Co(e){return ur[e].checked}function qe(e,t){ur[e].checked!==t&&ur[e].click()}function dt(e){let t=ur[e];return v(t,"change").pipe(m(()=>t.checked),z(t.checked))}function is(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function Ro(){return v(window,"keydown").pipe(x(e=>!(e.metaKey||e.ctrlKey)),m(e=>({mode:Co("search")?"search":"global",type:e.key,claim(){e.preventDefault(),e.stopPropagation()}})),x(({mode:e,type:t})=>{if(e==="global"){let r=Ie();if(typeof r!="undefined")return!is(r,t)}return!0}),oe())}function Oe(){return new URL(location.href)}function pr(e){location.href=e.href}function ko(){return new E}function Ho(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)Ho(e,r)}function M(e,t,...r){let n=document.createElement(e);if(t)for(let o of Object.keys(t))typeof t[o]!="undefined"&&(typeof t[o]!="boolean"?n.setAttribute(o,t[o]):n.setAttribute(o,""));for(let o of r)Ho(n,o);return n}function Po(e,t){let r=t;if(e.length>r){for(;e[r]!==" "&&--r>0;);return`${e.substring(0,r)}...`}return e}function lr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function $o(){return location.hash.substring(1)}function Io(e){let t=M("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function as(){return v(window,"hashchange").pipe(m($o),z($o()),x(e=>e.length>0),X(1))}function jo(){return as().pipe(m(e=>pe(`[id="${e}"]`)),x(e=>typeof e!="undefined"))}function Kr(e){let t=matchMedia(e);return rr(r=>t.addListener(()=>r(t.matches))).pipe(z(t.matches))}function Fo(){let e=matchMedia("print");return A(v(window,"beforeprint").pipe(m(()=>!0)),v(window,"afterprint").pipe(m(()=>!1))).pipe(z(e.matches))}function Qr(e,t){return e.pipe(S(r=>r?t():R))}function mr(e,t={credentials:"same-origin"}){return ue(fetch(`${e}`,t)).pipe(ce(()=>R),S(r=>r.status!==200?Ot(()=>new Error(r.statusText)):I(r)))}function Ke(e,t){return mr(e,t).pipe(S(r=>r.json()),X(1))}function Uo(e,t){let r=new DOMParser;return mr(e,t).pipe(S(n=>n.text()),m(n=>r.parseFromString(n,"text/xml")),X(1))}function Do(e){let t=M("script",{src:e});return P(()=>(document.head.appendChild(t),A(v(t,"load"),v(t,"error").pipe(S(()=>Ot(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(m(()=>{}),C(()=>document.head.removeChild(t)),ne(1))))}function Wo(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function Vo(){return A(v(window,"scroll",{passive:!0}),v(window,"resize",{passive:!0})).pipe(m(Wo),z(Wo()))}function No(){return{width:innerWidth,height:innerHeight}}function zo(){return v(window,"resize",{passive:!0}).pipe(m(No),z(No()))}function qo(){return Y([Vo(),zo()]).pipe(m(([e,t])=>({offset:e,size:t})),X(1))}function dr(e,{viewport$:t,header$:r}){let n=t.pipe(J("size")),o=Y([n,r]).pipe(m(()=>ze(e)));return Y([r,t,o]).pipe(m(([{height:i},{offset:s,size:a},{x:c,y:f}])=>({offset:{x:s.x-c,y:s.y-f+i},size:a})))}function Ko(e,{tx$:t}){let r=v(e,"message").pipe(m(({data:n})=>n));return t.pipe(Lt(()=>r,{leading:!0,trailing:!0}),w(n=>e.postMessage(n)),S(()=>r),oe())}var ss=K("#__config"),ht=JSON.parse(ss.textContent);ht.base=`${new URL(ht.base,Oe())}`;function le(){return ht}function ee(e){return ht.features.includes(e)}function ae(e,t){return typeof t!="undefined"?ht.translations[e].replace("#",t.toString()):ht.translations[e]}function _e(e,t=document){return K(`[data-md-component=${e}]`,t)}function te(e,t=document){return Q(`[data-md-component=${e}]`,t)}function cs(e){let t=K(".md-typeset > :first-child",e);return v(t,"click",{once:!0}).pipe(m(()=>K(".md-typeset",e)),m(r=>({hash:__md_hash(r.innerHTML)})))}function Qo(e){return!ee("announce.dismiss")||!e.childElementCount?R:P(()=>{let t=new E;return t.pipe(z({hash:__md_get("__announce")})).subscribe(({hash:r})=>{var n;r&&r===((n=__md_get("__announce"))!=null?n:r)&&(e.hidden=!0,__md_set("__announce",r))}),cs(e).pipe(w(r=>t.next(r)),C(()=>t.complete()),m(r=>H({ref:e},r)))})}function fs(e,{target$:t}){return t.pipe(m(r=>({hidden:r!==e})))}function Yo(e,t){let r=new E;return r.subscribe(({hidden:n})=>{e.hidden=n}),fs(e,t).pipe(w(n=>r.next(n)),C(()=>r.complete()),m(n=>H({ref:e},n)))}var ii=Ye(Br());function Gr(e){return M("div",{class:"md-tooltip",id:e},M("div",{class:"md-tooltip__inner md-typeset"}))}function Bo(e,t){if(t=t?`${t}_annotation_${e}`:void 0,t){let r=t?`#${t}`:void 0;return M("aside",{class:"md-annotation",tabIndex:0},Gr(t),M("a",{href:r,class:"md-annotation__index",tabIndex:-1},M("span",{"data-md-annotation-id":e})))}else return M("aside",{class:"md-annotation",tabIndex:0},Gr(t),M("span",{class:"md-annotation__index",tabIndex:-1},M("span",{"data-md-annotation-id":e})))}function Go(e){return M("button",{class:"md-clipboard md-icon",title:ae("clipboard.copy"),"data-clipboard-target":`#${e} > code`})}function Jr(e,t){let r=t&2,n=t&1,o=Object.keys(e.terms).filter(a=>!e.terms[a]).reduce((a,c)=>[...a,M("del",null,c)," "],[]).slice(0,-1),i=new URL(e.location);ee("search.highlight")&&i.searchParams.set("h",Object.entries(e.terms).filter(([,a])=>a).reduce((a,[c])=>`${a} ${c}`.trim(),""));let{tags:s}=le();return M("a",{href:`${i}`,class:"md-search-result__link",tabIndex:-1},M("article",{class:["md-search-result__article",...r?["md-search-result__article--document"]:[]].join(" "),"data-md-score":e.score.toFixed(2)},r>0&&M("div",{class:"md-search-result__icon md-icon"}),M("h1",{class:"md-search-result__title"},e.title),n>0&&e.text.length>0&&M("p",{class:"md-search-result__teaser"},Po(e.text,320)),e.tags&&M("div",{class:"md-typeset"},e.tags.map(a=>{let c=a.replace(/<[^>]+>/g,""),f=s?c in s?`md-tag-icon md-tag-icon--${s[c]}`:"md-tag-icon":"";return M("span",{class:`md-tag ${f}`},a)})),n>0&&o.length>0&&M("p",{class:"md-search-result__terms"},ae("search.result.term.missing"),": ",...o)))}function Jo(e){let t=e[0].score,r=[...e],n=r.findIndex(f=>!f.location.includes("#")),[o]=r.splice(n,1),i=r.findIndex(f=>f.scoreJr(f,1)),...a.length?[M("details",{class:"md-search-result__more"},M("summary",{tabIndex:-1},a.length>0&&a.length===1?ae("search.result.more.one"):ae("search.result.more.other",a.length)),...a.map(f=>Jr(f,1)))]:[]];return M("li",{class:"md-search-result__item"},c)}function Xo(e){return M("ul",{class:"md-source__facts"},Object.entries(e).map(([t,r])=>M("li",{class:`md-source__fact md-source__fact--${t}`},typeof r=="number"?lr(r):r)))}function Xr(e){let t=`tabbed-control tabbed-control--${e}`;return M("div",{class:t,hidden:!0},M("button",{class:"tabbed-button",tabIndex:-1}))}function Zo(e){return M("div",{class:"md-typeset__scrollwrap"},M("div",{class:"md-typeset__table"},e))}function us(e){let t=le(),r=new URL(`../${e.version}/`,t.base);return M("li",{class:"md-version__item"},M("a",{href:`${r}`,class:"md-version__link"},e.title))}function ei(e,t){return M("div",{class:"md-version"},M("button",{class:"md-version__current","aria-label":ae("select.version.title")},t.title),M("ul",{class:"md-version__list"},e.map(us)))}function ps(e,t){let r=P(()=>Y([yo(e),pt(t)])).pipe(m(([{x:n,y:o},i])=>{let{width:s,height:a}=he(e);return{x:n-i.x+s/2,y:o-i.y+a/2}}));return nr(e).pipe(S(n=>r.pipe(m(o=>({active:n,offset:o})),ne(+!n||1/0))))}function ti(e,t,{target$:r}){let[n,o]=Array.from(e.children);return P(()=>{let i=new E,s=i.pipe(de(1));return i.subscribe({next({offset:a}){e.style.setProperty("--md-tooltip-x",`${a.x}px`),e.style.setProperty("--md-tooltip-y",`${a.y}px`)},complete(){e.style.removeProperty("--md-tooltip-x"),e.style.removeProperty("--md-tooltip-y")}}),fr(e).pipe(Z(s)).subscribe(a=>{e.toggleAttribute("data-md-visible",a)}),A(i.pipe(x(({active:a})=>a)),i.pipe(Re(250),x(({active:a})=>!a))).subscribe({next({active:a}){a?e.prepend(n):n.remove()},complete(){e.prepend(n)}}),i.pipe(Ae(16,xe)).subscribe(({active:a})=>{n.classList.toggle("md-tooltip--active",a)}),i.pipe(Nr(125,xe),x(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:a})=>a)).subscribe({next(a){a?e.style.setProperty("--md-tooltip-0",`${-a}px`):e.style.removeProperty("--md-tooltip-0")},complete(){e.style.removeProperty("--md-tooltip-0")}}),v(o,"click").pipe(Z(s),x(a=>!(a.metaKey||a.ctrlKey))).subscribe(a=>a.preventDefault()),v(o,"mousedown").pipe(Z(s),ie(i)).subscribe(([a,{active:c}])=>{var f;if(a.button!==0||a.metaKey||a.ctrlKey)a.preventDefault();else if(c){a.preventDefault();let u=e.parentElement.closest(".md-annotation");u instanceof HTMLElement?u.focus():(f=Ie())==null||f.blur()}}),r.pipe(Z(s),x(a=>a===n),ke(125)).subscribe(()=>e.focus()),ps(e,t).pipe(w(a=>i.next(a)),C(()=>i.complete()),m(a=>H({ref:e},a)))})}function ls(e){let t=[];for(let r of Q(".c, .c1, .cm",e)){let n=[],o=document.createNodeIterator(r,NodeFilter.SHOW_TEXT);for(let i=o.nextNode();i;i=o.nextNode())n.push(i);for(let i of n){let s;for(;s=/(\(\d+\))(!)?/.exec(i.textContent);){let[,a,c]=s;if(typeof c=="undefined"){let f=i.splitText(s.index);i=f.splitText(a.length),t.push(f)}else{i.textContent=a,t.push(i);break}}}}return t}function ri(e,t){t.append(...Array.from(e.childNodes))}function ni(e,t,{target$:r,print$:n}){let o=t.closest("[id]"),i=o==null?void 0:o.id,s=new Map;for(let a of ls(t)){let[,c]=a.textContent.match(/\((\d+)\)/);pe(`li:nth-child(${c})`,e)&&(s.set(c,Bo(c,i)),a.replaceWith(s.get(c)))}return s.size===0?R:P(()=>{let a=new E,c=[];for(let[f,u]of s)c.push([K(".md-typeset",u),K(`li:nth-child(${f})`,e)]);return n.pipe(Z(a.pipe(de(1)))).subscribe(f=>{e.hidden=!f;for(let[u,p]of c)f?ri(u,p):ri(p,u)}),A(...[...s].map(([,f])=>ti(f,t,{target$:r}))).pipe(C(()=>a.complete()),oe())})}var ms=0;function ai(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return ai(t)}}function oi(e){return ve(e).pipe(m(({width:t})=>({scrollable:mt(e).width>t})),J("scrollable"))}function si(e,t){let{matches:r}=matchMedia("(hover)"),n=P(()=>{let o=new E;if(o.subscribe(({scrollable:s})=>{s&&r?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}),ii.default.isSupported()){let s=e.closest("pre");s.id=`__code_${++ms}`,s.insertBefore(Go(s.id),e)}let i=e.closest(".highlight");if(i instanceof HTMLElement){let s=ai(i);if(typeof s!="undefined"&&(i.classList.contains("annotate")||ee("content.code.annotate"))){let a=ni(s,e,t);return oi(e).pipe(w(c=>o.next(c)),C(()=>o.complete()),m(c=>H({ref:e},c)),et(ve(i).pipe(m(({width:c,height:f})=>c&&f),B(),S(c=>c?a:R))))}}return oi(e).pipe(w(s=>o.next(s)),C(()=>o.complete()),m(s=>H({ref:e},s)))});return ee("content.lazy")?fr(e).pipe(x(o=>o),ne(1),S(()=>n)):n}var ci=".node circle,.node ellipse,.node path,.node polygon,.node rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}marker{fill:var(--md-mermaid-edge-color)!important}.edgeLabel .label rect{fill:#0000}.label{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.label foreignObject{line-height:normal;overflow:visible}.label div .edgeLabel{color:var(--md-mermaid-label-fg-color)}.edgeLabel,.edgeLabel rect,.label div .edgeLabel{background-color:var(--md-mermaid-label-bg-color)}.edgeLabel,.edgeLabel rect{fill:var(--md-mermaid-label-bg-color);color:var(--md-mermaid-edge-color)}.edgePath .path,.flowchart-link{stroke:var(--md-mermaid-edge-color)}.edgePath .arrowheadPath{fill:var(--md-mermaid-edge-color);stroke:none}.cluster rect{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}.cluster span{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}defs #flowchart-circleEnd,defs #flowchart-circleStart,defs #flowchart-crossEnd,defs #flowchart-crossStart,defs #flowchart-pointEnd,defs #flowchart-pointStart{stroke:none}g.classGroup line,g.classGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.classGroup text{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.classLabel .box{fill:var(--md-mermaid-label-bg-color);background-color:var(--md-mermaid-label-bg-color);opacity:1}.classLabel .label{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node .divider{stroke:var(--md-mermaid-node-fg-color)}.relation{stroke:var(--md-mermaid-edge-color)}.cardinality{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.cardinality text{fill:inherit!important}defs #classDiagram-compositionEnd,defs #classDiagram-compositionStart,defs #classDiagram-dependencyEnd,defs #classDiagram-dependencyStart,defs #classDiagram-extensionEnd,defs #classDiagram-extensionStart{fill:var(--md-mermaid-edge-color)!important;stroke:var(--md-mermaid-edge-color)!important}defs #classDiagram-aggregationEnd,defs #classDiagram-aggregationStart{fill:var(--md-mermaid-label-bg-color)!important;stroke:var(--md-mermaid-edge-color)!important}g.stateGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.stateGroup .state-title{fill:var(--md-mermaid-label-fg-color)!important;font-family:var(--md-mermaid-font-family)}g.stateGroup .composit{fill:var(--md-mermaid-label-bg-color)}.nodeLabel{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node circle.state-end,.node circle.state-start,.start-state{fill:var(--md-mermaid-edge-color);stroke:none}.end-state-inner,.end-state-outer{fill:var(--md-mermaid-edge-color)}.end-state-inner,.node circle.state-end{stroke:var(--md-mermaid-label-bg-color)}.transition{stroke:var(--md-mermaid-edge-color)}[id^=state-fork] rect,[id^=state-join] rect{fill:var(--md-mermaid-edge-color)!important;stroke:none!important}.statediagram-cluster.statediagram-cluster .inner{fill:var(--md-default-bg-color)}.statediagram-cluster rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.statediagram-state rect.divider{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}defs #statediagram-barbEnd{stroke:var(--md-mermaid-edge-color)}.entityBox{fill:var(--md-mermaid-label-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityLabel{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.relationshipLabelBox{fill:var(--md-mermaid-label-bg-color);fill-opacity:1;background-color:var(--md-mermaid-label-bg-color);opacity:1}.relationshipLabel{fill:var(--md-mermaid-label-fg-color)}.relationshipLine{stroke:var(--md-mermaid-edge-color)}defs #ONE_OR_MORE_END *,defs #ONE_OR_MORE_START *,defs #ONLY_ONE_END *,defs #ONLY_ONE_START *,defs #ZERO_OR_MORE_END *,defs #ZERO_OR_MORE_START *,defs #ZERO_OR_ONE_END *,defs #ZERO_OR_ONE_START *{stroke:var(--md-mermaid-edge-color)!important}.actor,defs #ZERO_OR_MORE_END circle,defs #ZERO_OR_MORE_START circle{fill:var(--md-mermaid-label-bg-color)}.actor{stroke:var(--md-mermaid-node-fg-color)}text.actor>tspan{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}line{stroke:var(--md-default-fg-color--lighter)}.messageLine0,.messageLine1{stroke:var(--md-mermaid-edge-color)}.loopText>tspan,.messageText,.noteText>tspan{fill:var(--md-mermaid-edge-color);stroke:none;font-family:var(--md-mermaid-font-family)!important}.noteText>tspan{fill:#000}#arrowhead path{fill:var(--md-mermaid-edge-color);stroke:none}.loopLine{stroke:var(--md-mermaid-node-fg-color)}.labelBox,.loopLine{fill:var(--md-mermaid-node-bg-color)}.labelBox{stroke:none}.labelText,.labelText>span{fill:var(--md-mermaid-node-fg-color);font-family:var(--md-mermaid-font-family)}";var Zr,hs=0;function bs(){return typeof mermaid=="undefined"||mermaid instanceof Element?Do("https://unpkg.com/mermaid@9.1.7/dist/mermaid.min.js"):I(void 0)}function fi(e){return e.classList.remove("mermaid"),Zr||(Zr=bs().pipe(w(()=>mermaid.initialize({startOnLoad:!1,themeCSS:ci,sequence:{actorFontSize:"16px",messageFontSize:"16px",noteFontSize:"16px"}})),m(()=>{}),X(1))),Zr.subscribe(()=>{e.classList.add("mermaid");let t=`__mermaid_${hs++}`,r=M("div",{class:"mermaid"}),n=e.textContent;mermaid.mermaidAPI.render(t,n,(o,i)=>{let s=r.attachShadow({mode:"closed"});s.innerHTML=o,e.replaceWith(r),i==null||i(s)})}),Zr.pipe(m(()=>({ref:e})))}function vs(e,{target$:t,print$:r}){let n=!0;return A(t.pipe(m(o=>o.closest("details:not([open])")),x(o=>e===o),m(()=>({action:"open",reveal:!0}))),r.pipe(x(o=>o||!n),w(()=>n=e.open),m(o=>({action:o?"open":"close"}))))}function ui(e,t){return P(()=>{let r=new E;return r.subscribe(({action:n,reveal:o})=>{e.toggleAttribute("open",n==="open"),o&&e.scrollIntoView()}),vs(e,t).pipe(w(n=>r.next(n)),C(()=>r.complete()),m(n=>H({ref:e},n)))})}var pi=M("table");function li(e){return e.replaceWith(pi),pi.replaceWith(Zo(e)),I({ref:e})}function gs(e){let t=Q(":scope > input",e),r=t.find(n=>n.checked)||t[0];return A(...t.map(n=>v(n,"change").pipe(m(()=>K(`label[for="${n.id}"]`))))).pipe(z(K(`label[for="${r.id}"]`)),m(n=>({active:n})))}function mi(e,{viewport$:t}){let r=Xr("prev");e.append(r);let n=Xr("next");e.append(n);let o=K(".tabbed-labels",e);return P(()=>{let i=new E,s=i.pipe(de(1));return Y([i,ve(e)]).pipe(Ae(1,xe),Z(s)).subscribe({next([{active:a},c]){let f=ze(a),{width:u}=he(a);e.style.setProperty("--md-indicator-x",`${f.x}px`),e.style.setProperty("--md-indicator-width",`${u}px`);let p=or(o);(f.xp.x+c.width)&&o.scrollTo({left:Math.max(0,f.x-16),behavior:"smooth"})},complete(){e.style.removeProperty("--md-indicator-x"),e.style.removeProperty("--md-indicator-width")}}),Y([pt(o),ve(o)]).pipe(Z(s)).subscribe(([a,c])=>{let f=mt(o);r.hidden=a.x<16,n.hidden=a.x>f.width-c.width-16}),A(v(r,"click").pipe(m(()=>-1)),v(n,"click").pipe(m(()=>1))).pipe(Z(s)).subscribe(a=>{let{width:c}=he(o);o.scrollBy({left:c*a,behavior:"smooth"})}),ee("content.tabs.link")&&i.pipe(He(1),ie(t)).subscribe(([{active:a},{offset:c}])=>{let f=a.innerText.trim();if(a.hasAttribute("data-md-switching"))a.removeAttribute("data-md-switching");else{let u=e.offsetTop-c.y;for(let l of Q("[data-tabs]"))for(let d of Q(":scope > input",l)){let h=K(`label[for="${d.id}"]`);if(h!==a&&h.innerText.trim()===f){h.setAttribute("data-md-switching",""),d.click();break}}window.scrollTo({top:e.offsetTop-u});let p=__md_get("__tabs")||[];__md_set("__tabs",[...new Set([f,...p])])}}),gs(e).pipe(w(a=>i.next(a)),C(()=>i.complete()),m(a=>H({ref:e},a)))}).pipe(Je(fe))}function di(e,{viewport$:t,target$:r,print$:n}){return A(...Q("pre:not(.mermaid) > code",e).map(o=>si(o,{target$:r,print$:n})),...Q("pre.mermaid",e).map(o=>fi(o)),...Q("table:not([class])",e).map(o=>li(o)),...Q("details",e).map(o=>ui(o,{target$:r,print$:n})),...Q("[data-tabs]",e).map(o=>mi(o,{viewport$:t})))}function ys(e,{alert$:t}){return t.pipe(S(r=>A(I(!0),I(!1).pipe(ke(2e3))).pipe(m(n=>({message:r,active:n})))))}function hi(e,t){let r=K(".md-typeset",e);return P(()=>{let n=new E;return n.subscribe(({message:o,active:i})=>{e.classList.toggle("md-dialog--active",i),r.textContent=o}),ys(e,t).pipe(w(o=>n.next(o)),C(()=>n.complete()),m(o=>H({ref:e},o)))})}function xs({viewport$:e}){if(!ee("header.autohide"))return I(!1);let t=e.pipe(m(({offset:{y:o}})=>o),Ce(2,1),m(([o,i])=>[oMath.abs(i-o.y)>100),m(([,[o]])=>o),B()),n=dt("search");return Y([e,n]).pipe(m(([{offset:o},i])=>o.y>400&&!i),B(),S(o=>o?r:I(!1)),z(!1))}function bi(e,t){return P(()=>Y([ve(e),xs(t)])).pipe(m(([{height:r},n])=>({height:r,hidden:n})),B((r,n)=>r.height===n.height&&r.hidden===n.hidden),X(1))}function vi(e,{header$:t,main$:r}){return P(()=>{let n=new E,o=n.pipe(de(1));return n.pipe(J("active"),Ze(t)).subscribe(([{active:i},{hidden:s}])=>{e.classList.toggle("md-header--shadow",i&&!s),e.hidden=s}),r.subscribe(n),t.pipe(Z(o),m(i=>H({ref:e},i)))})}function ws(e,{viewport$:t,header$:r}){return dr(e,{viewport$:t,header$:r}).pipe(m(({offset:{y:n}})=>{let{height:o}=he(e);return{active:n>=o}}),J("active"))}function gi(e,t){return P(()=>{let r=new E;r.subscribe(({active:o})=>{e.classList.toggle("md-header__title--active",o)});let n=pe("article h1");return typeof n=="undefined"?R:ws(n,t).pipe(w(o=>r.next(o)),C(()=>r.complete()),m(o=>H({ref:e},o)))})}function yi(e,{viewport$:t,header$:r}){let n=r.pipe(m(({height:i})=>i),B()),o=n.pipe(S(()=>ve(e).pipe(m(({height:i})=>({top:e.offsetTop,bottom:e.offsetTop+i})),J("bottom"))));return Y([n,o,t]).pipe(m(([i,{top:s,bottom:a},{offset:{y:c},size:{height:f}}])=>(f=Math.max(0,f-Math.max(0,s-c,i)-Math.max(0,f+c-a)),{offset:s-i,height:f,active:s-i<=c})),B((i,s)=>i.offset===s.offset&&i.height===s.height&&i.active===s.active))}function Es(e){let t=__md_get("__palette")||{index:e.findIndex(r=>matchMedia(r.getAttribute("data-md-color-media")).matches)};return I(...e).pipe(se(r=>v(r,"change").pipe(m(()=>r))),z(e[Math.max(0,t.index)]),m(r=>({index:e.indexOf(r),color:{scheme:r.getAttribute("data-md-color-scheme"),primary:r.getAttribute("data-md-color-primary"),accent:r.getAttribute("data-md-color-accent")}})),X(1))}function xi(e){return P(()=>{let t=new E;t.subscribe(n=>{var s,a;document.body.setAttribute("data-md-color-switching","");for(let[c,f]of Object.entries(n.color))document.body.setAttribute(`data-md-color-${c}`,f);for(let c=0;c{document.body.removeAttribute("data-md-color-switching")});let r=Q("input",e);return Es(r).pipe(w(n=>t.next(n)),C(()=>t.complete()),m(n=>H({ref:e},n)))})}var en=Ye(Br());function Ss(e){e.setAttribute("data-md-copying","");let t=e.innerText;return e.removeAttribute("data-md-copying"),t}function wi({alert$:e}){en.default.isSupported()&&new F(t=>{new en.default("[data-clipboard-target], [data-clipboard-text]",{text:r=>r.getAttribute("data-clipboard-text")||Ss(K(r.getAttribute("data-clipboard-target")))}).on("success",r=>t.next(r))}).pipe(w(t=>{t.trigger.focus()}),m(()=>ae("clipboard.copied"))).subscribe(e)}function Os(e){if(e.length<2)return[""];let[t,r]=[...e].sort((o,i)=>o.length-i.length).map(o=>o.replace(/[^/]+$/,"")),n=0;if(t===r)n=t.length;else for(;t.charCodeAt(n)===r.charCodeAt(n);)n++;return e.map(o=>o.replace(t.slice(0,n),""))}function hr(e){let t=__md_get("__sitemap",sessionStorage,e);if(t)return I(t);{let r=le();return Uo(new URL("sitemap.xml",e||r.base)).pipe(m(n=>Os(Q("loc",n).map(o=>o.textContent))),ce(()=>R),Ue([]),w(n=>__md_set("__sitemap",n,sessionStorage,e)))}}function Ei({document$:e,location$:t,viewport$:r}){let n=le();if(location.protocol==="file:")return;"scrollRestoration"in history&&(history.scrollRestoration="manual",v(window,"beforeunload").subscribe(()=>{history.scrollRestoration="auto"}));let o=pe("link[rel=icon]");typeof o!="undefined"&&(o.href=o.href);let i=hr().pipe(m(f=>f.map(u=>`${new URL(u,n.base)}`)),S(f=>v(document.body,"click").pipe(x(u=>!u.metaKey&&!u.ctrlKey),S(u=>{if(u.target instanceof Element){let p=u.target.closest("a");if(p&&!p.target){let l=new URL(p.href);if(l.search="",l.hash="",l.pathname!==location.pathname&&f.includes(l.toString()))return u.preventDefault(),I({url:new URL(p.href)})}}return Se}))),oe()),s=v(window,"popstate").pipe(x(f=>f.state!==null),m(f=>({url:new URL(location.href),offset:f.state})),oe());A(i,s).pipe(B((f,u)=>f.url.href===u.url.href),m(({url:f})=>f)).subscribe(t);let a=t.pipe(J("pathname"),S(f=>mr(f.href).pipe(ce(()=>(pr(f),Se)))),oe());i.pipe(ut(a)).subscribe(({url:f})=>{history.pushState({},"",`${f}`)});let c=new DOMParser;a.pipe(S(f=>f.text()),m(f=>c.parseFromString(f,"text/html"))).subscribe(e),e.pipe(He(1)).subscribe(f=>{for(let u of["title","link[rel=canonical]","meta[name=author]","meta[name=description]","[data-md-component=announce]","[data-md-component=container]","[data-md-component=header-topic]","[data-md-component=outdated]","[data-md-component=logo]","[data-md-component=skip]",...ee("navigation.tabs.sticky")?["[data-md-component=tabs]"]:[]]){let p=pe(u),l=pe(u,f);typeof p!="undefined"&&typeof l!="undefined"&&p.replaceWith(l)}}),e.pipe(He(1),m(()=>_e("container")),S(f=>Q("script",f)),Ir(f=>{let u=M("script");if(f.src){for(let p of f.getAttributeNames())u.setAttribute(p,f.getAttribute(p));return f.replaceWith(u),new F(p=>{u.onload=()=>p.complete()})}else return u.textContent=f.textContent,f.replaceWith(u),R})).subscribe(),A(i,s).pipe(ut(e)).subscribe(({url:f,offset:u})=>{f.hash&&!u?Io(f.hash):window.scrollTo(0,(u==null?void 0:u.y)||0)}),r.pipe(Mt(i),Re(250),J("offset")).subscribe(({offset:f})=>{history.replaceState(f,"")}),A(i,s).pipe(Ce(2,1),x(([f,u])=>f.url.pathname===u.url.pathname),m(([,f])=>f)).subscribe(({offset:f})=>{window.scrollTo(0,(f==null?void 0:f.y)||0)})}var Ms=Ye(tn());var Oi=Ye(tn());function rn(e,t){let r=new RegExp(e.separator,"img"),n=(o,i,s)=>`${i}${s}`;return o=>{o=o.replace(/[\s*+\-:~^]+/g," ").trim();let i=new RegExp(`(^|${e.separator})(${o.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return s=>(t?(0,Oi.default)(s):s).replace(i,n).replace(/<\/mark>(\s+)]*>/img,"$1")}}function bt(e){return e.type===1}function _i(e){return e.type===2}function vt(e){return e.type===3}function Ti(e,t){let r=le(),n=new Worker(e),o=new E,i=Ko(n,{tx$:o}).pipe(m(s=>{if(vt(s))for(let a of s.data.items)for(let c of a)c.location=`${new URL(c.location,r.base)}`;return s}),oe());return ue(t).pipe(m(s=>({type:0,data:window.__oiWikiSearchEndpoint||"https://search.www.damonc.top:8443/"}))).subscribe(o.next.bind(o)),{tx$:o,rx$:i}}function Mi({document$:e}){let t=le(),r=Ke(new URL("../versions.json",t.base)).pipe(ce(()=>R)),n=r.pipe(m(o=>{let[,i]=t.base.match(/([^/]+)\/?$/);return o.find(({version:s,aliases:a})=>s===i||a.includes(i))||o[0]}));r.pipe(m(o=>new Map(o.map(i=>[`${new URL(`../${i.version}/`,t.base)}`,i]))),S(o=>v(document.body,"click").pipe(x(i=>!i.metaKey&&!i.ctrlKey),ie(n),S(([i,s])=>{if(i.target instanceof Element){let a=i.target.closest("a");if(a&&!a.target&&o.has(a.href)){let c=a.href;return!i.target.closest(".md-version")&&o.get(c)===s?R:(i.preventDefault(),I(c))}}return R}),S(i=>{let{version:s}=o.get(i);return hr(new URL(i)).pipe(m(a=>{let f=Oe().href.replace(t.base,"");return a.includes(f.split("#")[0])?new URL(`../${s}/${f}`,t.base):new URL(i)}))})))).subscribe(o=>pr(o)),Y([r,n]).subscribe(([o,i])=>{K(".md-header__topic").appendChild(ei(o,i))}),e.pipe(S(()=>n)).subscribe(o=>{var s;let i=__md_get("__outdated",sessionStorage);if(i===null){let a=((s=t.version)==null?void 0:s.default)||"latest";i=!o.aliases.includes(a),__md_set("__outdated",i,sessionStorage)}if(i)for(let a of te("outdated"))a.hidden=!1})}function As(e,{rx$:t}){let r=a=>a,{searchParams:n}=Oe();n.has("q")&&qe("search",!0);let o=t.pipe(x(bt),ne(1),m(()=>n.get("q")||""));dt("search").pipe(x(a=>!a),ne(1)).subscribe(()=>{let a=new URL(location.href);a.searchParams.delete("q"),history.replaceState({},"",`${a}`)}),o.subscribe(a=>{a&&(e.value=a,e.focus())});let i=nr(e),s=A(v(e,"keyup"),v(e,"focus").pipe(ke(1)),o).pipe(m(()=>r(e.value)),z(""),B());return Y([s,i]).pipe(m(([a,c])=>({value:a,focus:c})),X(1))}function Li(e,{tx$:t,rx$:r}){let n=new E,o=n.pipe(de(1));return n.pipe(J("value"),m(({value:i})=>({type:2,data:i}))).subscribe(t.next.bind(t)),n.pipe(J("focus")).subscribe(({focus:i})=>{i?(qe("search",i),e.placeholder=""):e.placeholder=ae("search.placeholder")}),v(e.form,"reset").pipe(Z(o)).subscribe(()=>e.focus()),As(e,{tx$:t,rx$:r}).pipe(w(i=>n.next(i)),C(()=>n.complete()),m(i=>H({ref:e},i)),oe())}function Ai(e,{rx$:t},{query$:r}){let n=new E,o=Ao(e.parentElement).pipe(x(Boolean)),i=K(":scope > :first-child",e),s=K(":scope > :last-child",e),a=t.pipe(x(bt),ne(1));return n.pipe(ie(r),Mt(a)).subscribe(([{items:f},{value:u}])=>{if(u)switch(f.length){case 0:i.textContent=ae("search.result.none");break;case 1:i.textContent=ae("search.result.one");break;default:i.textContent=ae("search.result.other",lr(f.length))}else i.textContent=ae("search.result.placeholder")}),n.pipe(w(()=>s.innerHTML=""),S(({items:f})=>A(I(...f.slice(0,10)),I(...f.slice(10)).pipe(Ce(4),zr(o),S(([u])=>u))))).subscribe(f=>s.appendChild(Jo(f))),t.pipe(x(vt),m(({data:f})=>f)).pipe(w(f=>n.next(f)),C(()=>n.complete()),m(f=>H({ref:e},f)))}function Cs(e,{query$:t}){return t.pipe(m(({value:r})=>{let n=Oe();return n.hash="",n.searchParams.delete("h"),n.searchParams.set("q",r),{url:n}}))}function Ci(e,t){let r=new E;return r.subscribe(({url:n})=>{e.setAttribute("data-clipboard-text",e.href),e.href=`${n}`}),v(e,"click").subscribe(n=>n.preventDefault()),Cs(e,t).pipe(w(n=>r.next(n)),C(()=>r.complete()),m(n=>H({ref:e},n)))}function Ri(e,{rx$:t},{keyboard$:r}){let n=new E,o=_e("search-query"),i=A(v(o,"keydown"),v(o,"focus")).pipe(Le(fe),m(()=>o.value),B());return n.pipe(Ze(i),m(([{suggestions:a},c])=>{let f=c.split(/([\s-]+)/);if((a==null?void 0:a.length)&&f[f.length-1]){let u=a[a.length-1];u.startsWith(f[f.length-1])&&(f[f.length-1]=u)}else f.length=0;return f})).subscribe(a=>e.innerHTML=a.join("").replace(/\s/g," ")),r.pipe(x(({mode:a})=>a==="search")).subscribe(a=>{switch(a.type){case"ArrowRight":e.innerText.length&&o.selectionStart===o.value.length&&(o.value=e.innerText);break}}),t.pipe(x(vt),m(({data:a})=>a)).pipe(w(a=>n.next(a)),C(()=>n.complete()),m(()=>({ref:e})))}function ki(e,{index$:t,keyboard$:r}){let n=le();try{let o=(__search==null?void 0:__search.worker)||n.search,i=Ti(o,t),s=_e("search-query",e),a=_e("search-result",e),{tx$:c,rx$:f}=i;c.pipe(x(_i),ut(f.pipe(x(bt))),ne(1)).subscribe(c.next.bind(c)),r.pipe(x(({mode:l})=>l==="search")).subscribe(l=>{let d=Ie();switch(l.type){case"Enter":if(d===s){let h=new Map;for(let b of Q(":first-child [href]",a)){let U=b.firstElementChild;h.set(b,parseFloat(U.getAttribute("data-md-score")))}if(h.size){let[[b]]=[...h].sort(([,U],[,G])=>G-U);b.click()}l.claim()}break;case"Escape":case"Tab":qe("search",!1),s.blur();break;case"ArrowUp":case"ArrowDown":if(typeof d=="undefined")s.focus();else{let h=[s,...Q(":not(details) > [href], summary, details[open] [href]",a)],b=Math.max(0,(Math.max(0,h.indexOf(d))+h.length+(l.type==="ArrowUp"?-1:1))%h.length);h[b].focus()}l.claim();break;default:s!==Ie()&&s.focus()}}),r.pipe(x(({mode:l})=>l==="global")).subscribe(l=>{switch(l.type){case"f":case"s":case"/":s.focus(),s.select(),l.claim();break}});let u=Li(s,i),p=Ai(a,i,{query$:u});return A(u,p).pipe(et(...te("search-share",e).map(l=>Ci(l,{query$:u})),...te("search-suggest",e).map(l=>Ri(l,i,{keyboard$:r}))))}catch(o){return e.hidden=!0,Se}}function Hi(e,{index$:t,location$:r}){return Y([t,r.pipe(z(Oe()),x(n=>!!n.searchParams.get("h")))]).pipe(m(([n,o])=>rn(n.config,!0)(o.searchParams.get("h"))),m(n=>{var s;let o=new Map,i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT);for(let a=i.nextNode();a;a=i.nextNode())if((s=a.parentElement)!=null&&s.offsetHeight){let c=a.textContent,f=n(c);f.length>c.length&&o.set(a,f)}for(let[a,c]of o){let{childNodes:f}=M("span",null,c);a.replaceWith(...Array.from(f))}return{ref:e,nodes:o}}))}function Rs(e,{viewport$:t,main$:r}){let n=e.parentElement,o=n.offsetTop-n.parentElement.offsetTop;return Y([r,t]).pipe(m(([{offset:i,height:s},{offset:{y:a}}])=>(s=s+Math.min(o,Math.max(0,a-i))-o,{height:s,locked:a>=i+o})),B((i,s)=>i.height===s.height&&i.locked===s.locked))}function nn(e,n){var o=n,{header$:t}=o,r=un(o,["header$"]);let i=K(".md-sidebar__scrollwrap",e),{y:s}=ze(i);return P(()=>{let a=new E;return a.pipe(Ae(0,xe),ie(t)).subscribe({next([{height:c},{height:f}]){i.style.height=`${c-2*s}px`,e.style.top=`${f}px`},complete(){i.style.height="",e.style.top=""}}),a.pipe(Le(xe),ne(1)).subscribe(()=>{for(let c of Q(".md-nav__link--active[href]",e)){let f=cr(c);if(typeof f!="undefined"){let u=c.offsetTop-f.offsetTop,{height:p}=he(f);f.scrollTo({top:u-p/2})}}}),Rs(e,r).pipe(w(c=>a.next(c)),C(()=>a.complete()),m(c=>H({ref:e},c)))})}function Pi(e,t){if(typeof t!="undefined"){let r=`https://api.github.com/repos/${e}/${t}`;return _t(Ke(`${r}/releases/latest`).pipe(ce(()=>R),m(n=>({version:n.tag_name})),Ue({})),Ke(r).pipe(ce(()=>R),m(n=>({stars:n.stargazers_count,forks:n.forks_count})),Ue({}))).pipe(m(([n,o])=>H(H({},n),o)))}else{let r=`https://api.github.com/users/${e}`;return Ke(r).pipe(m(n=>({repositories:n.public_repos})),Ue({}))}}function $i(e,t){let r=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return Ke(r).pipe(ce(()=>R),m(({star_count:n,forks_count:o})=>({stars:n,forks:o})),Ue({}))}function Ii(e){let t=e.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i);if(t){let[,r,n]=t;return Pi(r,n)}if(t=e.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i),t){let[,r,n]=t;return $i(r,n)}return R}var ks;function Hs(e){return ks||(ks=P(()=>{let t=__md_get("__source",sessionStorage);if(t)return I(t);if(te("consent").length){let n=__md_get("__consent");if(!(n&&n.github))return R}return Ii(e.href).pipe(w(n=>__md_set("__source",n,sessionStorage)))}).pipe(ce(()=>R),x(t=>Object.keys(t).length>0),m(t=>({facts:t})),X(1)))}function ji(e){let t=K(":scope > :last-child",e);return P(()=>{let r=new E;return r.subscribe(({facts:n})=>{t.appendChild(Xo(n)),t.classList.add("md-source__repository--active")}),Hs(e).pipe(w(n=>r.next(n)),C(()=>r.complete()),m(n=>H({ref:e},n)))})}function Ps(e,{viewport$:t,header$:r}){return ve(document.body).pipe(S(()=>dr(e,{header$:r,viewport$:t})),m(({offset:{y:n}})=>({hidden:n>=10})),J("hidden"))}function Fi(e,t){return P(()=>{let r=new E;return r.subscribe({next({hidden:n}){e.hidden=n},complete(){e.hidden=!1}}),(ee("navigation.tabs.sticky")?I({hidden:!1}):Ps(e,t)).pipe(w(n=>r.next(n)),C(()=>r.complete()),m(n=>H({ref:e},n)))})}function $s(e,{viewport$:t,header$:r}){let n=new Map,o=Q("[href^=\\#]",e);for(let a of o){let c=decodeURIComponent(a.hash.substring(1)),f=pe(`[id="${c}"]`);typeof f!="undefined"&&n.set(a,f)}let i=r.pipe(J("height"),m(({height:a})=>{let c=_e("main"),f=K(":scope > :first-child",c);return a+.8*(f.offsetTop-c.offsetTop)}),oe());return ve(document.body).pipe(J("height"),S(a=>P(()=>{let c=[];return I([...n].reduce((f,[u,p])=>{for(;c.length&&n.get(c[c.length-1]).tagName>=p.tagName;)c.pop();let l=p.offsetTop;for(;!l&&p.parentElement;)p=p.parentElement,l=p.offsetTop;return f.set([...c=[...c,u]].reverse(),l)},new Map))}).pipe(m(c=>new Map([...c].sort(([,f],[,u])=>f-u))),Ze(i),S(([c,f])=>t.pipe(Ur(([u,p],{offset:{y:l},size:d})=>{let h=l+d.height>=Math.floor(a.height);for(;p.length;){let[,b]=p[0];if(b-f=l&&!h)p=[u.pop(),...p];else break}return[u,p]},[[],[...c]]),B((u,p)=>u[0]===p[0]&&u[1]===p[1])))))).pipe(m(([a,c])=>({prev:a.map(([f])=>f),next:c.map(([f])=>f)})),z({prev:[],next:[]}),Ce(2,1),m(([a,c])=>a.prev.length{let o=new E,i=o.pipe(de(1));if(o.subscribe(({prev:s,next:a})=>{for(let[c]of a)c.classList.remove("md-nav__link--passed"),c.classList.remove("md-nav__link--active");for(let[c,[f]]of s.entries())f.classList.add("md-nav__link--passed"),f.classList.toggle("md-nav__link--active",c===s.length-1)}),ee("toc.follow")){let s=A(t.pipe(Re(1),m(()=>{})),t.pipe(Re(250),m(()=>"smooth")));o.pipe(x(({prev:a})=>a.length>0),ie(s)).subscribe(([{prev:a},c])=>{let[f]=a[a.length-1];if(f.offsetHeight){let u=cr(f);if(typeof u!="undefined"){let p=f.offsetTop-u.offsetTop,{height:l}=he(u);u.scrollTo({top:p-l/2,behavior:c})}}})}return ee("navigation.tracking")&&t.pipe(Z(i),J("offset"),Re(250),He(1),Z(n.pipe(He(1))),Tt({delay:250}),ie(o)).subscribe(([,{prev:s}])=>{let a=Oe(),c=s[s.length-1];if(c&&c.length){let[f]=c,{hash:u}=new URL(f.href);a.hash!==u&&(a.hash=u,history.replaceState({},"",`${a}`))}else a.hash="",history.replaceState({},"",`${a}`)}),$s(e,{viewport$:t,header$:r}).pipe(w(s=>o.next(s)),C(()=>o.complete()),m(s=>H({ref:e},s)))})}function Is(e,{viewport$:t,main$:r,target$:n}){let o=t.pipe(m(({offset:{y:s}})=>s),Ce(2,1),m(([s,a])=>s>a&&a>0),B()),i=r.pipe(m(({active:s})=>s));return Y([i,o]).pipe(m(([s,a])=>!(s&&a)),B(),Z(n.pipe(He(1))),Fr(!0),Tt({delay:250}),m(s=>({hidden:s})))}function Di(e,{viewport$:t,header$:r,main$:n,target$:o}){let i=new E,s=i.pipe(de(1));return i.subscribe({next({hidden:a}){e.hidden=a,a?(e.setAttribute("tabindex","-1"),e.blur()):e.removeAttribute("tabindex")},complete(){e.style.top="",e.hidden=!0,e.removeAttribute("tabindex")}}),r.pipe(Z(s),J("height")).subscribe(({height:a})=>{e.style.top=`${a+16}px`}),Is(e,{viewport$:t,main$:n,target$:o}).pipe(w(a=>i.next(a)),C(()=>i.complete()),m(a=>H({ref:e},a)))}function Wi({document$:e,tablet$:t}){e.pipe(S(()=>Q(".md-toggle--indeterminate, [data-md-state=indeterminate]")),w(r=>{r.indeterminate=!0,r.checked=!1}),se(r=>v(r,"change").pipe(Wr(()=>r.classList.contains("md-toggle--indeterminate")),m(()=>r))),ie(t)).subscribe(([r,n])=>{r.classList.remove("md-toggle--indeterminate"),n&&(r.checked=!1)})}function js(){return/(iPad|iPhone|iPod)/.test(navigator.userAgent)}function Vi({document$:e}){e.pipe(S(()=>Q("[data-md-scrollfix]")),w(t=>t.removeAttribute("data-md-scrollfix")),x(js),se(t=>v(t,"touchstart").pipe(m(()=>t)))).subscribe(t=>{let r=t.scrollTop;r===0?t.scrollTop=1:r+t.offsetHeight===t.scrollHeight&&(t.scrollTop=r-1)})}function Ni({viewport$:e,tablet$:t}){Y([dt("search"),t]).pipe(m(([r,n])=>r&&!n),S(r=>I(r).pipe(ke(r?400:100))),ie(e)).subscribe(([r,{offset:{y:n}}])=>{if(r)document.body.setAttribute("data-md-scrolllock",""),document.body.style.top=`-${n}px`;else{let o=-1*parseInt(document.body.style.top,10);document.body.removeAttribute("data-md-scrolllock"),document.body.style.top="",o&&window.scrollTo(0,o)}})}Object.entries||(Object.entries=function(e){let t=[];for(let r of Object.keys(e))t.push([r,e[r]]);return t});Object.values||(Object.values=function(e){let t=[];for(let r of Object.keys(e))t.push(e[r]);return t});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(e,t){typeof e=="object"?(this.scrollLeft=e.left,this.scrollTop=e.top):(this.scrollLeft=e,this.scrollTop=t)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...e){let t=this.parentNode;if(t){e.length===0&&t.removeChild(this);for(let r=e.length-1;r>=0;r--){let n=e[r];typeof n=="string"?n=document.createTextNode(n):n.parentNode&&n.parentNode.removeChild(n),r?t.insertBefore(this.previousSibling,n):t.replaceChild(n,this)}}}));document.documentElement.classList.remove("no-js");document.documentElement.classList.add("js");var tt=go(),vr=ko(),gt=jo(),on=Ro(),we=qo(),gr=Kr("(min-width: 960px)"),qi=Kr("(min-width: 1220px)"),Ki=Fo(),Fs=le(),Qi=document.forms.namedItem("search")?Promise.resolve({}):Se,an=new E;wi({alert$:an});ee("navigation.instant")&&Ei({document$:tt,location$:vr,viewport$:we});var zi;((zi=Fs.version)==null?void 0:zi.provider)==="mike"&&Mi({document$:tt});A(vr,gt).pipe(ke(125)).subscribe(()=>{qe("drawer",!1),qe("search",!1)});on.pipe(x(({mode:e})=>e==="global")).subscribe(e=>{switch(e.type){case"p":case",":let t=pe("[href][rel=prev]");typeof t!="undefined"&&t.click();break;case"n":case".":let r=pe("[href][rel=next]");typeof r!="undefined"&&r.click();break}});Wi({document$:tt,tablet$:gr});Vi({document$:tt});Ni({viewport$:we,tablet$:gr});var Qe=bi(_e("header"),{viewport$:we}),br=tt.pipe(m(()=>_e("main")),S(e=>yi(e,{viewport$:we,header$:Qe})),X(1)),Us=A(...te("consent").map(e=>Yo(e,{target$:gt})),...te("dialog").map(e=>hi(e,{alert$:an})),...te("header").map(e=>vi(e,{viewport$:we,header$:Qe,main$:br})),...te("palette").map(e=>xi(e)),...te("search").map(e=>ki(e,{index$:Qi,keyboard$:on})),...te("source").map(e=>ji(e))),Ds=P(()=>A(...te("announce").map(e=>Qo(e)),...te("content").map(e=>di(e,{viewport$:we,target$:gt,print$:Ki})),...te("content").map(e=>ee("search.highlight")?Hi(e,{index$:Qi,location$:vr}):R),...te("header-title").map(e=>gi(e,{viewport$:we,header$:Qe})),...te("sidebar").map(e=>e.getAttribute("data-md-type")==="navigation"?Qr(qi,()=>nn(e,{viewport$:we,header$:Qe,main$:br})):Qr(gr,()=>nn(e,{viewport$:we,header$:Qe,main$:br}))),...te("tabs").map(e=>Fi(e,{viewport$:we,header$:Qe})),...te("toc").map(e=>Ui(e,{viewport$:we,header$:Qe,target$:gt})),...te("top").map(e=>Di(e,{viewport$:we,header$:Qe,main$:br,target$:gt})))),Yi=tt.pipe(S(()=>Ds),et(Us),X(1));Yi.subscribe();window.document$=tt;window.location$=vr;window.target$=gt;window.keyboard$=on;window.viewport$=we;window.tablet$=gr;window.screen$=qi;window.print$=Ki;window.alert$=an;window.component$=Yi;})(); +//# sourceMappingURL=bundle.561f57c7.min.js.map + diff --git a/docs/assets/javascripts/bundle.561f57c7.min.js.map b/docs/assets/javascripts/bundle.561f57c7.min.js.map new file mode 100644 index 00000000..ae65c9ae --- /dev/null +++ b/docs/assets/javascripts/bundle.561f57c7.min.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["node_modules/focus-visible/dist/focus-visible.js", "node_modules/url-polyfill/url-polyfill.js", "node_modules/rxjs/node_modules/tslib/tslib.js", "node_modules/clipboard/dist/clipboard.js", "node_modules/escape-html/index.js", "node_modules/array-flat-polyfill/index.mjs", "src/assets/javascripts/bundle.ts", "node_modules/unfetch/polyfill/index.js", "node_modules/rxjs/node_modules/tslib/modules/index.js", "node_modules/rxjs/src/internal/util/isFunction.ts", "node_modules/rxjs/src/internal/util/createErrorClass.ts", "node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "node_modules/rxjs/src/internal/util/arrRemove.ts", "node_modules/rxjs/src/internal/Subscription.ts", "node_modules/rxjs/src/internal/config.ts", "node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "node_modules/rxjs/src/internal/util/noop.ts", "node_modules/rxjs/src/internal/NotificationFactories.ts", "node_modules/rxjs/src/internal/util/errorContext.ts", "node_modules/rxjs/src/internal/Subscriber.ts", "node_modules/rxjs/src/internal/symbol/observable.ts", "node_modules/rxjs/src/internal/util/identity.ts", "node_modules/rxjs/src/internal/util/pipe.ts", "node_modules/rxjs/src/internal/Observable.ts", "node_modules/rxjs/src/internal/util/lift.ts", "node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts", "node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "node_modules/rxjs/src/internal/Subject.ts", "node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "node_modules/rxjs/src/internal/ReplaySubject.ts", "node_modules/rxjs/src/internal/scheduler/Action.ts", "node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "node_modules/rxjs/src/internal/Scheduler.ts", "node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "node_modules/rxjs/src/internal/scheduler/async.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts", "node_modules/rxjs/src/internal/scheduler/animationFrame.ts", "node_modules/rxjs/src/internal/observable/empty.ts", "node_modules/rxjs/src/internal/util/isScheduler.ts", "node_modules/rxjs/src/internal/util/args.ts", "node_modules/rxjs/src/internal/util/isArrayLike.ts", "node_modules/rxjs/src/internal/util/isPromise.ts", "node_modules/rxjs/src/internal/util/isInteropObservable.ts", "node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "node_modules/rxjs/src/internal/symbol/iterator.ts", "node_modules/rxjs/src/internal/util/isIterable.ts", "node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "node_modules/rxjs/src/internal/observable/innerFrom.ts", "node_modules/rxjs/src/internal/util/executeSchedule.ts", "node_modules/rxjs/src/internal/operators/observeOn.ts", "node_modules/rxjs/src/internal/operators/subscribeOn.ts", "node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "node_modules/rxjs/src/internal/scheduled/scheduled.ts", "node_modules/rxjs/src/internal/observable/from.ts", "node_modules/rxjs/src/internal/observable/of.ts", "node_modules/rxjs/src/internal/observable/throwError.ts", "node_modules/rxjs/src/internal/util/isDate.ts", "node_modules/rxjs/src/internal/operators/map.ts", "node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "node_modules/rxjs/src/internal/util/createObject.ts", "node_modules/rxjs/src/internal/observable/combineLatest.ts", "node_modules/rxjs/src/internal/operators/mergeInternals.ts", "node_modules/rxjs/src/internal/operators/mergeMap.ts", "node_modules/rxjs/src/internal/operators/mergeAll.ts", "node_modules/rxjs/src/internal/operators/concatAll.ts", "node_modules/rxjs/src/internal/observable/concat.ts", "node_modules/rxjs/src/internal/observable/defer.ts", "node_modules/rxjs/src/internal/observable/fromEvent.ts", "node_modules/rxjs/src/internal/observable/fromEventPattern.ts", "node_modules/rxjs/src/internal/observable/timer.ts", "node_modules/rxjs/src/internal/observable/merge.ts", "node_modules/rxjs/src/internal/observable/never.ts", "node_modules/rxjs/src/internal/util/argsOrArgArray.ts", "node_modules/rxjs/src/internal/operators/filter.ts", "node_modules/rxjs/src/internal/observable/zip.ts", "node_modules/rxjs/src/internal/operators/audit.ts", "node_modules/rxjs/src/internal/operators/auditTime.ts", "node_modules/rxjs/src/internal/operators/bufferCount.ts", "node_modules/rxjs/src/internal/operators/catchError.ts", "node_modules/rxjs/src/internal/operators/scanInternals.ts", "node_modules/rxjs/src/internal/operators/combineLatest.ts", "node_modules/rxjs/src/internal/operators/combineLatestWith.ts", "node_modules/rxjs/src/internal/operators/concatMap.ts", "node_modules/rxjs/src/internal/operators/debounceTime.ts", "node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts", "node_modules/rxjs/src/internal/operators/take.ts", "node_modules/rxjs/src/internal/operators/ignoreElements.ts", "node_modules/rxjs/src/internal/operators/mapTo.ts", "node_modules/rxjs/src/internal/operators/delayWhen.ts", "node_modules/rxjs/src/internal/operators/delay.ts", "node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts", "node_modules/rxjs/src/internal/operators/endWith.ts", "node_modules/rxjs/src/internal/operators/finalize.ts", "node_modules/rxjs/src/internal/operators/takeLast.ts", "node_modules/rxjs/src/internal/operators/merge.ts", "node_modules/rxjs/src/internal/operators/mergeWith.ts", "node_modules/rxjs/src/internal/operators/repeat.ts", "node_modules/rxjs/src/internal/operators/sample.ts", "node_modules/rxjs/src/internal/operators/scan.ts", "node_modules/rxjs/src/internal/operators/share.ts", "node_modules/rxjs/src/internal/operators/shareReplay.ts", "node_modules/rxjs/src/internal/operators/skip.ts", "node_modules/rxjs/src/internal/operators/skipUntil.ts", "node_modules/rxjs/src/internal/operators/startWith.ts", "node_modules/rxjs/src/internal/operators/switchMap.ts", "node_modules/rxjs/src/internal/operators/takeUntil.ts", "node_modules/rxjs/src/internal/operators/takeWhile.ts", "node_modules/rxjs/src/internal/operators/tap.ts", "node_modules/rxjs/src/internal/operators/throttle.ts", "node_modules/rxjs/src/internal/operators/throttleTime.ts", "node_modules/rxjs/src/internal/operators/withLatestFrom.ts", "node_modules/rxjs/src/internal/operators/zip.ts", "node_modules/rxjs/src/internal/operators/zipWith.ts", "src/assets/javascripts/browser/document/index.ts", "src/assets/javascripts/browser/element/_/index.ts", "src/assets/javascripts/browser/element/focus/index.ts", "src/assets/javascripts/browser/element/offset/_/index.ts", "src/assets/javascripts/browser/element/offset/content/index.ts", "node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js", "src/assets/javascripts/browser/element/size/_/index.ts", "src/assets/javascripts/browser/element/size/content/index.ts", "src/assets/javascripts/browser/element/visibility/index.ts", "src/assets/javascripts/browser/toggle/index.ts", "src/assets/javascripts/browser/keyboard/index.ts", "src/assets/javascripts/browser/location/_/index.ts", "src/assets/javascripts/utilities/h/index.ts", "src/assets/javascripts/utilities/string/index.ts", "src/assets/javascripts/browser/location/hash/index.ts", "src/assets/javascripts/browser/media/index.ts", "src/assets/javascripts/browser/request/index.ts", "src/assets/javascripts/browser/script/index.ts", "src/assets/javascripts/browser/viewport/offset/index.ts", "src/assets/javascripts/browser/viewport/size/index.ts", "src/assets/javascripts/browser/viewport/_/index.ts", "src/assets/javascripts/browser/viewport/at/index.ts", "src/assets/javascripts/browser/worker/index.ts", "src/assets/javascripts/_/index.ts", "src/assets/javascripts/components/_/index.ts", "src/assets/javascripts/components/announce/index.ts", "src/assets/javascripts/components/consent/index.ts", "src/assets/javascripts/components/content/code/_/index.ts", "src/assets/javascripts/templates/tooltip/index.tsx", "src/assets/javascripts/templates/annotation/index.tsx", "src/assets/javascripts/templates/clipboard/index.tsx", "src/assets/javascripts/templates/search/index.tsx", "src/assets/javascripts/templates/source/index.tsx", "src/assets/javascripts/templates/tabbed/index.tsx", "src/assets/javascripts/templates/table/index.tsx", "src/assets/javascripts/templates/version/index.tsx", "src/assets/javascripts/components/content/annotation/_/index.ts", "src/assets/javascripts/components/content/annotation/list/index.ts", "src/assets/javascripts/components/content/code/mermaid/index.ts", "src/assets/javascripts/components/content/details/index.ts", "src/assets/javascripts/components/content/table/index.ts", "src/assets/javascripts/components/content/tabs/index.ts", "src/assets/javascripts/components/content/_/index.ts", "src/assets/javascripts/components/dialog/index.ts", "src/assets/javascripts/components/header/_/index.ts", "src/assets/javascripts/components/header/title/index.ts", "src/assets/javascripts/components/main/index.ts", "src/assets/javascripts/components/palette/index.ts", "src/assets/javascripts/integrations/clipboard/index.ts", "src/assets/javascripts/integrations/sitemap/index.ts", "src/assets/javascripts/integrations/instant/index.ts", "src/assets/javascripts/integrations/search/document/index.ts", "src/assets/javascripts/integrations/search/highlighter/index.ts", "src/assets/javascripts/integrations/search/worker/message/index.ts", "src/assets/javascripts/integrations/search/worker/_/index.ts", "src/assets/javascripts/integrations/version/index.ts", "src/assets/javascripts/components/search/query/index.ts", "src/assets/javascripts/components/search/result/index.ts", "src/assets/javascripts/components/search/share/index.ts", "src/assets/javascripts/components/search/suggest/index.ts", "src/assets/javascripts/components/search/_/index.ts", "src/assets/javascripts/components/search/highlight/index.ts", "src/assets/javascripts/components/sidebar/index.ts", "src/assets/javascripts/components/source/facts/github/index.ts", "src/assets/javascripts/components/source/facts/gitlab/index.ts", "src/assets/javascripts/components/source/facts/_/index.ts", "src/assets/javascripts/components/source/_/index.ts", "src/assets/javascripts/components/tabs/index.ts", "src/assets/javascripts/components/toc/index.ts", "src/assets/javascripts/components/top/index.ts", "src/assets/javascripts/patches/indeterminate/index.ts", "src/assets/javascripts/patches/scrollfix/index.ts", "src/assets/javascripts/patches/scrolllock/index.ts", "src/assets/javascripts/polyfills/index.ts"], + "sourceRoot": "../../../..", + "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (factory());\n}(this, (function () { 'use strict';\n\n /**\n * Applies the :focus-visible polyfill at the given scope.\n * A scope in this case is either the top-level Document or a Shadow Root.\n *\n * @param {(Document|ShadowRoot)} scope\n * @see https://github.com/WICG/focus-visible\n */\n function applyFocusVisiblePolyfill(scope) {\n var hadKeyboardEvent = true;\n var hadFocusVisibleRecently = false;\n var hadFocusVisibleRecentlyTimeout = null;\n\n var inputTypesAllowlist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n };\n\n /**\n * Helper function for legacy browsers and iframes which sometimes focus\n * elements like document, body, and non-interactive SVG.\n * @param {Element} el\n */\n function isValidFocusTarget(el) {\n if (\n el &&\n el !== document &&\n el.nodeName !== 'HTML' &&\n el.nodeName !== 'BODY' &&\n 'classList' in el &&\n 'contains' in el.classList\n ) {\n return true;\n }\n return false;\n }\n\n /**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} el\n * @return {boolean}\n */\n function focusTriggersKeyboardModality(el) {\n var type = el.type;\n var tagName = el.tagName;\n\n if (tagName === 'INPUT' && inputTypesAllowlist[type] && !el.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !el.readOnly) {\n return true;\n }\n\n if (el.isContentEditable) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Add the `focus-visible` class to the given element if it was not added by\n * the author.\n * @param {Element} el\n */\n function addFocusVisibleClass(el) {\n if (el.classList.contains('focus-visible')) {\n return;\n }\n el.classList.add('focus-visible');\n el.setAttribute('data-focus-visible-added', '');\n }\n\n /**\n * Remove the `focus-visible` class from the given element if it was not\n * originally added by the author.\n * @param {Element} el\n */\n function removeFocusVisibleClass(el) {\n if (!el.hasAttribute('data-focus-visible-added')) {\n return;\n }\n el.classList.remove('focus-visible');\n el.removeAttribute('data-focus-visible-added');\n }\n\n /**\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n * @param {KeyboardEvent} e\n */\n function onKeyDown(e) {\n if (e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n\n if (isValidFocusTarget(scope.activeElement)) {\n addFocusVisibleClass(scope.activeElement);\n }\n\n hadKeyboardEvent = true;\n }\n\n /**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n * @param {Event} e\n */\n function onPointerDown(e) {\n hadKeyboardEvent = false;\n }\n\n /**\n * On `focus`, add the `focus-visible` class to the target if:\n * - the target received focus as a result of keyboard navigation, or\n * - the event target is an element that will likely require interaction\n * via the keyboard (e.g. a text box)\n * @param {Event} e\n */\n function onFocus(e) {\n // Prevent IE from focusing the document or HTML element.\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {\n addFocusVisibleClass(e.target);\n }\n }\n\n /**\n * On `blur`, remove the `focus-visible` class from the target.\n * @param {Event} e\n */\n function onBlur(e) {\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (\n e.target.classList.contains('focus-visible') ||\n e.target.hasAttribute('data-focus-visible-added')\n ) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {\n hadFocusVisibleRecently = false;\n }, 100);\n removeFocusVisibleClass(e.target);\n }\n }\n\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had .focus-visible.\n * @param {Event} e\n */\n function onVisibilityChange(e) {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n addInitialPointerMoveListeners();\n }\n }\n\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n * @param {Event} e\n */\n function onInitialPointerMove(e) {\n // Work around a Safari quirk that fires a mousemove on whenever the\n // window blurs, even if you're tabbing out of the page. \u00AF\\_(\u30C4)_/\u00AF\n if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {\n return;\n }\n\n hadKeyboardEvent = false;\n removeInitialPointerMoveListeners();\n }\n\n // For some kinds of state, we are interested in changes at the global scope\n // only. For example, global pointer input, global key presses and global\n // visibility change should affect the state at every scope:\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n\n addInitialPointerMoveListeners();\n\n // For focus and blur, we specifically care about state changes in the local\n // scope. This is because focus / blur events that originate from within a\n // shadow root are not re-dispatched from the host element if it was already\n // the active element in its own scope:\n scope.addEventListener('focus', onFocus, true);\n scope.addEventListener('blur', onBlur, true);\n\n // We detect that a node is a ShadowRoot by ensuring that it is a\n // DocumentFragment and also has a host property. This check covers native\n // implementation and polyfill implementation transparently. If we only cared\n // about the native implementation, we could just check if the scope was\n // an instance of a ShadowRoot.\n if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) {\n // Since a ShadowRoot is a special kind of DocumentFragment, it does not\n // have a root element to add a class to. So, we add this attribute to the\n // host element instead:\n scope.host.setAttribute('data-js-focus-visible', '');\n } else if (scope.nodeType === Node.DOCUMENT_NODE) {\n document.documentElement.classList.add('js-focus-visible');\n document.documentElement.setAttribute('data-js-focus-visible', '');\n }\n }\n\n // It is important to wrap all references to global window and document in\n // these checks to support server-side rendering use cases\n // @see https://github.com/WICG/focus-visible/issues/199\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n // Make the polyfill helper globally available. This can be used as a signal\n // to interested libraries that wish to coordinate with the polyfill for e.g.,\n // applying the polyfill to a shadow root:\n window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill;\n\n // Notify interested libraries of the polyfill's presence, in case the\n // polyfill was loaded lazily:\n var event;\n\n try {\n event = new CustomEvent('focus-visible-polyfill-ready');\n } catch (error) {\n // IE11 does not support using CustomEvent as a constructor directly:\n event = document.createEvent('CustomEvent');\n event.initCustomEvent('focus-visible-polyfill-ready', false, false, {});\n }\n\n window.dispatchEvent(event);\n }\n\n if (typeof document !== 'undefined') {\n // Apply the polyfill to the global document, so that no JavaScript\n // coordination is required to use the polyfill in the top-level document:\n applyFocusVisiblePolyfill(document);\n }\n\n})));\n", "(function(global) {\r\n /**\r\n * Polyfill URLSearchParams\r\n *\r\n * Inspired from : https://github.com/WebReflection/url-search-params/blob/master/src/url-search-params.js\r\n */\r\n\r\n var checkIfIteratorIsSupported = function() {\r\n try {\r\n return !!Symbol.iterator;\r\n } catch (error) {\r\n return false;\r\n }\r\n };\r\n\r\n\r\n var iteratorSupported = checkIfIteratorIsSupported();\r\n\r\n var createIterator = function(items) {\r\n var iterator = {\r\n next: function() {\r\n var value = items.shift();\r\n return { done: value === void 0, value: value };\r\n }\r\n };\r\n\r\n if (iteratorSupported) {\r\n iterator[Symbol.iterator] = function() {\r\n return iterator;\r\n };\r\n }\r\n\r\n return iterator;\r\n };\r\n\r\n /**\r\n * Search param name and values should be encoded according to https://url.spec.whatwg.org/#urlencoded-serializing\r\n * encodeURIComponent() produces the same result except encoding spaces as `%20` instead of `+`.\r\n */\r\n var serializeParam = function(value) {\r\n return encodeURIComponent(value).replace(/%20/g, '+');\r\n };\r\n\r\n var deserializeParam = function(value) {\r\n return decodeURIComponent(String(value).replace(/\\+/g, ' '));\r\n };\r\n\r\n var polyfillURLSearchParams = function() {\r\n\r\n var URLSearchParams = function(searchString) {\r\n Object.defineProperty(this, '_entries', { writable: true, value: {} });\r\n var typeofSearchString = typeof searchString;\r\n\r\n if (typeofSearchString === 'undefined') {\r\n // do nothing\r\n } else if (typeofSearchString === 'string') {\r\n if (searchString !== '') {\r\n this._fromString(searchString);\r\n }\r\n } else if (searchString instanceof URLSearchParams) {\r\n var _this = this;\r\n searchString.forEach(function(value, name) {\r\n _this.append(name, value);\r\n });\r\n } else if ((searchString !== null) && (typeofSearchString === 'object')) {\r\n if (Object.prototype.toString.call(searchString) === '[object Array]') {\r\n for (var i = 0; i < searchString.length; i++) {\r\n var entry = searchString[i];\r\n if ((Object.prototype.toString.call(entry) === '[object Array]') || (entry.length !== 2)) {\r\n this.append(entry[0], entry[1]);\r\n } else {\r\n throw new TypeError('Expected [string, any] as entry at index ' + i + ' of URLSearchParams\\'s input');\r\n }\r\n }\r\n } else {\r\n for (var key in searchString) {\r\n if (searchString.hasOwnProperty(key)) {\r\n this.append(key, searchString[key]);\r\n }\r\n }\r\n }\r\n } else {\r\n throw new TypeError('Unsupported input\\'s type for URLSearchParams');\r\n }\r\n };\r\n\r\n var proto = URLSearchParams.prototype;\r\n\r\n proto.append = function(name, value) {\r\n if (name in this._entries) {\r\n this._entries[name].push(String(value));\r\n } else {\r\n this._entries[name] = [String(value)];\r\n }\r\n };\r\n\r\n proto.delete = function(name) {\r\n delete this._entries[name];\r\n };\r\n\r\n proto.get = function(name) {\r\n return (name in this._entries) ? this._entries[name][0] : null;\r\n };\r\n\r\n proto.getAll = function(name) {\r\n return (name in this._entries) ? this._entries[name].slice(0) : [];\r\n };\r\n\r\n proto.has = function(name) {\r\n return (name in this._entries);\r\n };\r\n\r\n proto.set = function(name, value) {\r\n this._entries[name] = [String(value)];\r\n };\r\n\r\n proto.forEach = function(callback, thisArg) {\r\n var entries;\r\n for (var name in this._entries) {\r\n if (this._entries.hasOwnProperty(name)) {\r\n entries = this._entries[name];\r\n for (var i = 0; i < entries.length; i++) {\r\n callback.call(thisArg, entries[i], name, this);\r\n }\r\n }\r\n }\r\n };\r\n\r\n proto.keys = function() {\r\n var items = [];\r\n this.forEach(function(value, name) {\r\n items.push(name);\r\n });\r\n return createIterator(items);\r\n };\r\n\r\n proto.values = function() {\r\n var items = [];\r\n this.forEach(function(value) {\r\n items.push(value);\r\n });\r\n return createIterator(items);\r\n };\r\n\r\n proto.entries = function() {\r\n var items = [];\r\n this.forEach(function(value, name) {\r\n items.push([name, value]);\r\n });\r\n return createIterator(items);\r\n };\r\n\r\n if (iteratorSupported) {\r\n proto[Symbol.iterator] = proto.entries;\r\n }\r\n\r\n proto.toString = function() {\r\n var searchArray = [];\r\n this.forEach(function(value, name) {\r\n searchArray.push(serializeParam(name) + '=' + serializeParam(value));\r\n });\r\n return searchArray.join('&');\r\n };\r\n\r\n\r\n global.URLSearchParams = URLSearchParams;\r\n };\r\n\r\n var checkIfURLSearchParamsSupported = function() {\r\n try {\r\n var URLSearchParams = global.URLSearchParams;\r\n\r\n return (\r\n (new URLSearchParams('?a=1').toString() === 'a=1') &&\r\n (typeof URLSearchParams.prototype.set === 'function') &&\r\n (typeof URLSearchParams.prototype.entries === 'function')\r\n );\r\n } catch (e) {\r\n return false;\r\n }\r\n };\r\n\r\n if (!checkIfURLSearchParamsSupported()) {\r\n polyfillURLSearchParams();\r\n }\r\n\r\n var proto = global.URLSearchParams.prototype;\r\n\r\n if (typeof proto.sort !== 'function') {\r\n proto.sort = function() {\r\n var _this = this;\r\n var items = [];\r\n this.forEach(function(value, name) {\r\n items.push([name, value]);\r\n if (!_this._entries) {\r\n _this.delete(name);\r\n }\r\n });\r\n items.sort(function(a, b) {\r\n if (a[0] < b[0]) {\r\n return -1;\r\n } else if (a[0] > b[0]) {\r\n return +1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n if (_this._entries) { // force reset because IE keeps keys index\r\n _this._entries = {};\r\n }\r\n for (var i = 0; i < items.length; i++) {\r\n this.append(items[i][0], items[i][1]);\r\n }\r\n };\r\n }\r\n\r\n if (typeof proto._fromString !== 'function') {\r\n Object.defineProperty(proto, '_fromString', {\r\n enumerable: false,\r\n configurable: false,\r\n writable: false,\r\n value: function(searchString) {\r\n if (this._entries) {\r\n this._entries = {};\r\n } else {\r\n var keys = [];\r\n this.forEach(function(value, name) {\r\n keys.push(name);\r\n });\r\n for (var i = 0; i < keys.length; i++) {\r\n this.delete(keys[i]);\r\n }\r\n }\r\n\r\n searchString = searchString.replace(/^\\?/, '');\r\n var attributes = searchString.split('&');\r\n var attribute;\r\n for (var i = 0; i < attributes.length; i++) {\r\n attribute = attributes[i].split('=');\r\n this.append(\r\n deserializeParam(attribute[0]),\r\n (attribute.length > 1) ? deserializeParam(attribute[1]) : ''\r\n );\r\n }\r\n }\r\n });\r\n }\r\n\r\n // HTMLAnchorElement\r\n\r\n})(\r\n (typeof global !== 'undefined') ? global\r\n : ((typeof window !== 'undefined') ? window\r\n : ((typeof self !== 'undefined') ? self : this))\r\n);\r\n\r\n(function(global) {\r\n /**\r\n * Polyfill URL\r\n *\r\n * Inspired from : https://github.com/arv/DOM-URL-Polyfill/blob/master/src/url.js\r\n */\r\n\r\n var checkIfURLIsSupported = function() {\r\n try {\r\n var u = new global.URL('b', 'http://a');\r\n u.pathname = 'c d';\r\n return (u.href === 'http://a/c%20d') && u.searchParams;\r\n } catch (e) {\r\n return false;\r\n }\r\n };\r\n\r\n\r\n var polyfillURL = function() {\r\n var _URL = global.URL;\r\n\r\n var URL = function(url, base) {\r\n if (typeof url !== 'string') url = String(url);\r\n if (base && typeof base !== 'string') base = String(base);\r\n\r\n // Only create another document if the base is different from current location.\r\n var doc = document, baseElement;\r\n if (base && (global.location === void 0 || base !== global.location.href)) {\r\n base = base.toLowerCase();\r\n doc = document.implementation.createHTMLDocument('');\r\n baseElement = doc.createElement('base');\r\n baseElement.href = base;\r\n doc.head.appendChild(baseElement);\r\n try {\r\n if (baseElement.href.indexOf(base) !== 0) throw new Error(baseElement.href);\r\n } catch (err) {\r\n throw new Error('URL unable to set base ' + base + ' due to ' + err);\r\n }\r\n }\r\n\r\n var anchorElement = doc.createElement('a');\r\n anchorElement.href = url;\r\n if (baseElement) {\r\n doc.body.appendChild(anchorElement);\r\n anchorElement.href = anchorElement.href; // force href to refresh\r\n }\r\n\r\n var inputElement = doc.createElement('input');\r\n inputElement.type = 'url';\r\n inputElement.value = url;\r\n\r\n if (anchorElement.protocol === ':' || !/:/.test(anchorElement.href) || (!inputElement.checkValidity() && !base)) {\r\n throw new TypeError('Invalid URL');\r\n }\r\n\r\n Object.defineProperty(this, '_anchorElement', {\r\n value: anchorElement\r\n });\r\n\r\n\r\n // create a linked searchParams which reflect its changes on URL\r\n var searchParams = new global.URLSearchParams(this.search);\r\n var enableSearchUpdate = true;\r\n var enableSearchParamsUpdate = true;\r\n var _this = this;\r\n ['append', 'delete', 'set'].forEach(function(methodName) {\r\n var method = searchParams[methodName];\r\n searchParams[methodName] = function() {\r\n method.apply(searchParams, arguments);\r\n if (enableSearchUpdate) {\r\n enableSearchParamsUpdate = false;\r\n _this.search = searchParams.toString();\r\n enableSearchParamsUpdate = true;\r\n }\r\n };\r\n });\r\n\r\n Object.defineProperty(this, 'searchParams', {\r\n value: searchParams,\r\n enumerable: true\r\n });\r\n\r\n var search = void 0;\r\n Object.defineProperty(this, '_updateSearchParams', {\r\n enumerable: false,\r\n configurable: false,\r\n writable: false,\r\n value: function() {\r\n if (this.search !== search) {\r\n search = this.search;\r\n if (enableSearchParamsUpdate) {\r\n enableSearchUpdate = false;\r\n this.searchParams._fromString(this.search);\r\n enableSearchUpdate = true;\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n var proto = URL.prototype;\r\n\r\n var linkURLWithAnchorAttribute = function(attributeName) {\r\n Object.defineProperty(proto, attributeName, {\r\n get: function() {\r\n return this._anchorElement[attributeName];\r\n },\r\n set: function(value) {\r\n this._anchorElement[attributeName] = value;\r\n },\r\n enumerable: true\r\n });\r\n };\r\n\r\n ['hash', 'host', 'hostname', 'port', 'protocol']\r\n .forEach(function(attributeName) {\r\n linkURLWithAnchorAttribute(attributeName);\r\n });\r\n\r\n Object.defineProperty(proto, 'search', {\r\n get: function() {\r\n return this._anchorElement['search'];\r\n },\r\n set: function(value) {\r\n this._anchorElement['search'] = value;\r\n this._updateSearchParams();\r\n },\r\n enumerable: true\r\n });\r\n\r\n Object.defineProperties(proto, {\r\n\r\n 'toString': {\r\n get: function() {\r\n var _this = this;\r\n return function() {\r\n return _this.href;\r\n };\r\n }\r\n },\r\n\r\n 'href': {\r\n get: function() {\r\n return this._anchorElement.href.replace(/\\?$/, '');\r\n },\r\n set: function(value) {\r\n this._anchorElement.href = value;\r\n this._updateSearchParams();\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'pathname': {\r\n get: function() {\r\n return this._anchorElement.pathname.replace(/(^\\/?)/, '/');\r\n },\r\n set: function(value) {\r\n this._anchorElement.pathname = value;\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'origin': {\r\n get: function() {\r\n // get expected port from protocol\r\n var expectedPort = { 'http:': 80, 'https:': 443, 'ftp:': 21 }[this._anchorElement.protocol];\r\n // add port to origin if, expected port is different than actual port\r\n // and it is not empty f.e http://foo:8080\r\n // 8080 != 80 && 8080 != ''\r\n var addPortToOrigin = this._anchorElement.port != expectedPort &&\r\n this._anchorElement.port !== '';\r\n\r\n return this._anchorElement.protocol +\r\n '//' +\r\n this._anchorElement.hostname +\r\n (addPortToOrigin ? (':' + this._anchorElement.port) : '');\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'password': { // TODO\r\n get: function() {\r\n return '';\r\n },\r\n set: function(value) {\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'username': { // TODO\r\n get: function() {\r\n return '';\r\n },\r\n set: function(value) {\r\n },\r\n enumerable: true\r\n },\r\n });\r\n\r\n URL.createObjectURL = function(blob) {\r\n return _URL.createObjectURL.apply(_URL, arguments);\r\n };\r\n\r\n URL.revokeObjectURL = function(url) {\r\n return _URL.revokeObjectURL.apply(_URL, arguments);\r\n };\r\n\r\n global.URL = URL;\r\n\r\n };\r\n\r\n if (!checkIfURLIsSupported()) {\r\n polyfillURL();\r\n }\r\n\r\n if ((global.location !== void 0) && !('origin' in global.location)) {\r\n var getOrigin = function() {\r\n return global.location.protocol + '//' + global.location.hostname + (global.location.port ? (':' + global.location.port) : '');\r\n };\r\n\r\n try {\r\n Object.defineProperty(global.location, 'origin', {\r\n get: getOrigin,\r\n enumerable: true\r\n });\r\n } catch (e) {\r\n setInterval(function() {\r\n global.location.origin = getOrigin();\r\n }, 100);\r\n }\r\n }\r\n\r\n})(\r\n (typeof global !== 'undefined') ? global\r\n : ((typeof window !== 'undefined') ? window\r\n : ((typeof self !== 'undefined') ? self : this))\r\n);\r\n", "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n", "/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});", "/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n", "Array.prototype.flat||Object.defineProperty(Array.prototype,\"flat\",{configurable:!0,value:function r(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,function(a,e){return Array.isArray(e)?a.push.apply(a,r.call(e,t-1)):a.push(e),a},[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,\"flatMap\",{configurable:!0,value:function(r){return Array.prototype.map.apply(this,arguments).flat()},writable:!0})\n", "/*\n * Copyright (c) 2016-2022 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport \"array-flat-polyfill\"\nimport \"focus-visible\"\nimport \"unfetch/polyfill\"\nimport \"url-polyfill\"\n\nimport {\n EMPTY,\n NEVER,\n Subject,\n defer,\n delay,\n filter,\n map,\n merge,\n mergeWith,\n shareReplay,\n switchMap\n} from \"rxjs\"\n\nimport { configuration, feature } from \"./_\"\nimport {\n at,\n getOptionalElement,\n requestJSON,\n setToggle,\n watchDocument,\n watchKeyboard,\n watchLocation,\n watchLocationTarget,\n watchMedia,\n watchPrint,\n watchViewport\n} from \"./browser\"\nimport {\n getComponentElement,\n getComponentElements,\n mountAnnounce,\n mountBackToTop,\n mountConsent,\n mountContent,\n mountDialog,\n mountHeader,\n mountHeaderTitle,\n mountPalette,\n mountSearch,\n mountSearchHiglight,\n mountSidebar,\n mountSource,\n mountTableOfContents,\n mountTabs,\n watchHeader,\n watchMain\n} from \"./components\"\nimport {\n SearchIndex,\n setupClipboardJS,\n setupInstantLoading,\n setupVersionSelector\n} from \"./integrations\"\nimport {\n patchIndeterminate,\n patchScrollfix,\n patchScrolllock\n} from \"./patches\"\nimport \"./polyfills\"\n\n/* ----------------------------------------------------------------------------\n * Application\n * ------------------------------------------------------------------------- */\n\n/* Yay, JavaScript is available */\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\n/* Set up navigation observables and subjects */\nconst document$ = watchDocument()\nconst location$ = watchLocation()\nconst target$ = watchLocationTarget()\nconst keyboard$ = watchKeyboard()\n\n/* Set up media observables */\nconst viewport$ = watchViewport()\nconst tablet$ = watchMedia(\"(min-width: 960px)\")\nconst screen$ = watchMedia(\"(min-width: 1220px)\")\nconst print$ = watchPrint()\n\n/* Retrieve search index, if search is enabled */\nconst config = configuration()\nconst index$ = document.forms.namedItem(\"search\")\n ? Promise.resolve({})\n : NEVER\n\n/* Set up Clipboard.js integration */\nconst alert$ = new Subject()\nsetupClipboardJS({ alert$ })\n\n/* Set up instant loading, if enabled */\nif (feature(\"navigation.instant\"))\n setupInstantLoading({ document$, location$, viewport$ })\n\n/* Set up version selector */\nif (config.version?.provider === \"mike\")\n setupVersionSelector({ document$ })\n\n/* Always close drawer and search on navigation */\nmerge(location$, target$)\n .pipe(\n delay(125)\n )\n .subscribe(() => {\n setToggle(\"drawer\", false)\n setToggle(\"search\", false)\n })\n\n/* Set up global keyboard handlers */\nkeyboard$\n .pipe(\n filter(({ mode }) => mode === \"global\")\n )\n .subscribe(key => {\n switch (key.type) {\n\n /* Go to previous page */\n case \"p\":\n case \",\":\n const prev = getOptionalElement(\"[href][rel=prev]\")\n if (typeof prev !== \"undefined\")\n prev.click()\n break\n\n /* Go to next page */\n case \"n\":\n case \".\":\n const next = getOptionalElement(\"[href][rel=next]\")\n if (typeof next !== \"undefined\")\n next.click()\n break\n }\n })\n\n/* Set up patches */\npatchIndeterminate({ document$, tablet$ })\npatchScrollfix({ document$ })\npatchScrolllock({ viewport$, tablet$ })\n\n/* Set up header and main area observable */\nconst header$ = watchHeader(getComponentElement(\"header\"), { viewport$ })\nconst main$ = document$\n .pipe(\n map(() => getComponentElement(\"main\")),\n switchMap(el => watchMain(el, { viewport$, header$ })),\n shareReplay(1)\n )\n\n/* Set up control component observables */\nconst control$ = merge(\n\n /* Consent */\n ...getComponentElements(\"consent\")\n .map(el => mountConsent(el, { target$ })),\n\n /* Dialog */\n ...getComponentElements(\"dialog\")\n .map(el => mountDialog(el, { alert$ })),\n\n /* Header */\n ...getComponentElements(\"header\")\n .map(el => mountHeader(el, { viewport$, header$, main$ })),\n\n /* Color palette */\n ...getComponentElements(\"palette\")\n .map(el => mountPalette(el)),\n\n /* Search */\n ...getComponentElements(\"search\")\n .map(el => mountSearch(el, { index$, keyboard$ })),\n\n /* Repository information */\n ...getComponentElements(\"source\")\n .map(el => mountSource(el))\n)\n\n/* Set up content component observables */\nconst content$ = defer(() => merge(\n\n /* Announcement bar */\n ...getComponentElements(\"announce\")\n .map(el => mountAnnounce(el)),\n\n /* Content */\n ...getComponentElements(\"content\")\n .map(el => mountContent(el, { viewport$, target$, print$ })),\n\n /* Search highlighting */\n ...getComponentElements(\"content\")\n .map(el => feature(\"search.highlight\")\n ? mountSearchHiglight(el, { index$, location$ })\n : EMPTY\n ),\n\n /* Header title */\n ...getComponentElements(\"header-title\")\n .map(el => mountHeaderTitle(el, { viewport$, header$ })),\n\n /* Sidebar */\n ...getComponentElements(\"sidebar\")\n .map(el => el.getAttribute(\"data-md-type\") === \"navigation\"\n ? at(screen$, () => mountSidebar(el, { viewport$, header$, main$ }))\n : at(tablet$, () => mountSidebar(el, { viewport$, header$, main$ }))\n ),\n\n /* Navigation tabs */\n ...getComponentElements(\"tabs\")\n .map(el => mountTabs(el, { viewport$, header$ })),\n\n /* Table of contents */\n ...getComponentElements(\"toc\")\n .map(el => mountTableOfContents(el, { viewport$, header$, target$ })),\n\n /* Back-to-top button */\n ...getComponentElements(\"top\")\n .map(el => mountBackToTop(el, { viewport$, header$, main$, target$ }))\n))\n\n/* Set up component observables */\nconst component$ = document$\n .pipe(\n switchMap(() => content$),\n mergeWith(control$),\n shareReplay(1)\n )\n\n/* Subscribe to all components */\ncomponent$.subscribe()\n\n/* ----------------------------------------------------------------------------\n * Exports\n * ------------------------------------------------------------------------- */\n\nwindow.document$ = document$ /* Document observable */\nwindow.location$ = location$ /* Location subject */\nwindow.target$ = target$ /* Location target observable */\nwindow.keyboard$ = keyboard$ /* Keyboard observable */\nwindow.viewport$ = viewport$ /* Viewport observable */\nwindow.tablet$ = tablet$ /* Media tablet observable */\nwindow.screen$ = screen$ /* Media screen observable */\nwindow.print$ = print$ /* Media print observable */\nwindow.alert$ = alert$ /* Alert subject */\nwindow.component$ = component$ /* Component observable */\n", "self.fetch||(self.fetch=function(e,n){return n=n||{},new Promise(function(t,s){var r=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(r.status/100|0),statusText:r.statusText,status:r.status,url:r.responseURL,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var c in r.open(n.method||\"get\",e,!0),r.onload=function(){r.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+\",\"+t:t}),t(a())},r.onerror=s,r.withCredentials=\"include\"==n.credentials,n.headers)r.setRequestHeader(c,n.headers[c]);r.send(n.body||null)})});\n", "import tslib from '../tslib.js';\r\nconst {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __exportStar,\r\n __createBinding,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n} = tslib;\r\nexport {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __exportStar,\r\n __createBinding,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n};\r\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n /** @nocollapse */\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n next(value?: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new observable\n * @nocollapse\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param operator the operator defining the operation to take on the observable\n * @return a new observable with the Operator applied\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {Subscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next a handler for each value emitted by the observable\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @method toPromise\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n onFinalize?: () => void\n): Subscriber {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture necessary state from the operator function itself.\n */\nexport class OperatorSubscriber extends Subscriber {\n /**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional finalization logic here. This will only be called on finalization if the\n * subscriber itself is not already closed. This is called after all other finalization logic is executed.\n * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe.\n * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription\n * to the resulting observable does not actually disconnect from the source if there are active subscriptions\n * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!)\n */\n constructor(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n private onFinalize?: () => void,\n private shouldUnsubscribe?: () => boolean\n ) {\n // It's important - for performance reasons - that all of this class's\n // members are initialized and that they are always initialized in the same\n // order. This will ensure that all OperatorSubscriber instances have the\n // same hidden class in V8. This, in turn, will help keep the number of\n // hidden classes involved in property accesses within the base class as\n // low as possible. If the number of hidden classes involved exceeds four,\n // the property accesses will become megamorphic and performance penalties\n // will be incurred - i.e. inline caches won't be used.\n //\n // The reasons for ensuring all instances have the same hidden class are\n // further discussed in this blog post from Benedikt Meurer:\n // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/\n super(destination);\n this._next = onNext\n ? function (this: OperatorSubscriber, value: T) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (this: OperatorSubscriber, err: any) {\n try {\n onError(err);\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function (this: OperatorSubscriber) {\n try {\n onComplete();\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n\n unsubscribe() {\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n // Execute additional teardown if we have any and we didn't already do so.\n !closed && this.onFinalize?.();\n }\n }\n}\n", "import { Subscription } from '../Subscription';\n\ninterface AnimationFrameProvider {\n schedule(callback: FrameRequestCallback): Subscription;\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n delegate:\n | {\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n }\n | undefined;\n}\n\nexport const animationFrameProvider: AnimationFrameProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n // Clear the cancel function. The request has been fulfilled, so\n // attempting to cancel the request upon unsubscription would be\n // pointless.\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel?.(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n", "import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject extends Observable implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @nocollapse\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => {\n return new AnonymousSubject(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift(operator: Operator): Observable {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return {Observable} Observable that the Subject casts to\n */\n asObservable(): Observable {\n const observable: any = new Observable();\n observable.source = this;\n return observable;\n }\n}\n\n/**\n * @class AnonymousSubject\n */\nexport class AnonymousSubject extends Subject {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer,\n source?: Observable\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n", "import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject extends Subject {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param bufferSize The size of the buffer to replay on subscription\n * @param windowTime The amount of time the buffered items will stay buffered\n * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action\n */\nexport class Action extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n", "import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction extends Action {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n", "import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return {number} A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\n/**\n *\n * Async Scheduler\n *\n * Schedule task as if you used setTimeout(task, duration)\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asapScheduler} scheduler.\n *\n * ## Examples\n * Use async scheduler to delay task\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * const task = () => console.log('it works!');\n *\n * asyncScheduler.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n * ```\n *\n * Use async scheduler to repeat task in intervals\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * asyncScheduler.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n * ```\n */\n\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\n\n/**\n * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.\n */\nexport const async = asyncScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nimport { SchedulerAction } from '../types';\nimport { animationFrameProvider } from './animationFrameProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AnimationFrameAction extends AsyncAction {\n constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n\n protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested animation frame and set the scheduled flag to\n // undefined so the next AnimationFrameAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n animationFrameProvider.cancelAnimationFrame(id as number);\n scheduler._scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AnimationFrameScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n\n/**\n *\n * Animation Frame Scheduler\n *\n * Perform task when `window.requestAnimationFrame` would fire\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * ## Example\n * Schedule div height animation\n * ```ts\n * // html:
\n * import { animationFrameScheduler } from 'rxjs';\n *\n * const div = document.querySelector('div');\n *\n * animationFrameScheduler.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see a div element growing in height\n * ```\n */\n\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\n\n/**\n * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.\n */\nexport const animationFrame = animationFrameScheduler;\n", "import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * Just emits 'complete', and nothing else.\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n", "export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');", "import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike {\n return isFunction(value?.then);\n}\n", "import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable {\n return isFunction(input[Symbol_observable]);\n}\n", "import { isFunction } from './isFunction';\n\nexport function isAsyncIterable(obj: any): obj is AsyncIterable {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n", "/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n", "export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n", "import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable {\n return isFunction(input?.[Symbol_iterator]);\n}\n", "import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an