From 9db635d5f5f046443b665dd4a217852ccffee474 Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Sat, 13 Jan 2024 07:02:03 +0000 Subject: [PATCH] v2.0.5 fix(ColorConvert): fix circular dependencies issue. #137 12eaa947b68267f30a2ef02af57f4fbeefe7c6a2 --- asset-manifest.json | 106 +-- coverage/badges.svg | 18 +- coverage/coverage-summary.json | 6 +- .../color-alpha/src/Pointer.tsx.html | 2 +- .../lcov-report/color-alpha/src/index.html | 2 +- .../color-alpha/src/index.tsx.html | 2 +- .../lcov-report/color-block/src/index.html | 2 +- .../color-block/src/index.tsx.html | 2 +- .../color-chrome/src/Arrow.tsx.html | 2 +- .../lcov-report/color-chrome/src/index.html | 2 +- .../color-chrome/src/index.tsx.html | 2 +- .../color-circle/src/Point.tsx.html | 2 +- .../lcov-report/color-circle/src/index.html | 2 +- .../color-circle/src/index.tsx.html | 2 +- .../lcov-report/color-colorful/src/index.html | 2 +- .../color-colorful/src/index.tsx.html | 2 +- .../lcov-report/color-compact/src/index.html | 2 +- .../color-compact/src/index.tsx.html | 2 +- .../src/getContrastingColor.ts.html | 115 ---- .../lcov-report/color-convert/src/index.html | 72 +-- .../color-convert/src/index.ts.html | 546 +++++++++------- .../color-convert/src/utils.ts.html | 175 ----- .../color-editable-input-hsla/src/index.html | 2 +- .../src/index.tsx.html | 2 +- .../color-editable-input-rgba/src/index.html | 2 +- .../src/index.tsx.html | 2 +- .../color-editable-input/src/index.html | 2 +- .../color-editable-input/src/index.tsx.html | 2 +- .../color-github/src/Point.tsx.html | 2 +- .../lcov-report/color-github/src/index.html | 2 +- .../color-github/src/index.tsx.html | 2 +- coverage/lcov-report/color-hue/src/index.html | 2 +- .../lcov-report/color-hue/src/index.tsx.html | 2 +- .../lcov-report/color-material/src/index.html | 2 +- .../color-material/src/index.tsx.html | 2 +- .../lcov-report/color-name/src/index.html | 2 +- .../lcov-report/color-name/src/index.tsx.html | 2 +- .../color-saturation/src/Pointer.tsx.html | 2 +- .../color-saturation/src/index.html | 2 +- .../color-saturation/src/index.tsx.html | 2 +- .../color-shade-slider/src/index.html | 2 +- .../color-shade-slider/src/index.tsx.html | 2 +- .../lcov-report/color-sketch/src/index.html | 2 +- .../color-sketch/src/index.tsx.html | 2 +- .../lcov-report/color-slider/src/index.html | 2 +- .../color-slider/src/index.tsx.html | 2 +- .../lcov-report/color-swatch/src/index.html | 2 +- .../color-swatch/src/index.tsx.html | 2 +- .../color-wheel/src/Pointer.tsx.html | 2 +- .../lcov-report/color-wheel/src/index.html | 2 +- .../color-wheel/src/index.tsx.html | 2 +- .../lcov-report/color-wheel/src/utils.ts.html | 2 +- coverage/lcov-report/color/src/index.html | 2 +- coverage/lcov-report/color/src/index.tsx.html | 2 +- .../drag-event-interactive/src/index.html | 2 +- .../drag-event-interactive/src/index.tsx.html | 2 +- .../drag-event-interactive/src/utils.ts.html | 2 +- coverage/lcov-report/index.html | 40 +- coverage/lcov.info | 608 +++++++++--------- index.html | 2 +- ...f560a.chunk.css => 682.4e43dbd8.chunk.css} | 2 +- ...unk.css.map => 682.4e43dbd8.chunk.css.map} | 2 +- ...ca7997d.chunk.js => 113.af007b06.chunk.js} | 4 +- ...chunk.js.map => 113.af007b06.chunk.js.map} | 2 +- ...5fd76ec.chunk.js => 118.668edd6a.chunk.js} | 4 +- ...chunk.js.map => 118.668edd6a.chunk.js.map} | 2 +- static/js/281.04f00b63.chunk.js | 2 + static/js/281.04f00b63.chunk.js.map | 1 + static/js/281.a23b4cd8.chunk.js | 2 - static/js/281.a23b4cd8.chunk.js.map | 1 - ...d85593b.chunk.js => 297.75b2592c.chunk.js} | 4 +- ...chunk.js.map => 297.75b2592c.chunk.js.map} | 2 +- ...164c0f5.chunk.js => 308.bd94eb40.chunk.js} | 4 +- ...chunk.js.map => 308.bd94eb40.chunk.js.map} | 2 +- ...783f321.chunk.js => 309.c25d6129.chunk.js} | 4 +- ...chunk.js.map => 309.c25d6129.chunk.js.map} | 2 +- static/js/31.4c831a4d.chunk.js | 2 + ....chunk.js.map => 31.4c831a4d.chunk.js.map} | 2 +- static/js/31.f7fcaedc.chunk.js | 2 - static/js/329.eeb46153.chunk.js | 3 - ...4056b1d.chunk.js => 466.522ea72b.chunk.js} | 4 +- ...chunk.js.map => 466.522ea72b.chunk.js.map} | 2 +- ...8555ad2.chunk.js => 494.5d013a2d.chunk.js} | 4 +- static/js/494.5d013a2d.chunk.js.map | 1 + static/js/494.e8555ad2.chunk.js.map | 1 - ...d11d60f.chunk.js => 546.56d4db54.chunk.js} | 4 +- ...chunk.js.map => 546.56d4db54.chunk.js.map} | 2 +- ...2cd7492.chunk.js => 569.6d031637.chunk.js} | 4 +- ...chunk.js.map => 569.6d031637.chunk.js.map} | 2 +- ...c751486.chunk.js => 620.b2436511.chunk.js} | 4 +- ...chunk.js.map => 620.b2436511.chunk.js.map} | 2 +- ...7275294.chunk.js => 649.e33f8ded.chunk.js} | 4 +- ...chunk.js.map => 649.e33f8ded.chunk.js.map} | 2 +- static/js/682.bda4a371.chunk.js | 3 + ....txt => 682.bda4a371.chunk.js.LICENSE.txt} | 0 ...chunk.js.map => 682.bda4a371.chunk.js.map} | 2 +- ...d8f7cb6.chunk.js => 721.24868da4.chunk.js} | 4 +- ...chunk.js.map => 721.24868da4.chunk.js.map} | 2 +- ...5dd9fa8.chunk.js => 756.c4374ee9.chunk.js} | 4 +- ...chunk.js.map => 756.c4374ee9.chunk.js.map} | 2 +- ...06cec8a.chunk.js => 781.88a802ca.chunk.js} | 4 +- ...chunk.js.map => 781.88a802ca.chunk.js.map} | 2 +- ...f21cfa0.chunk.js => 785.c0c5dfeb.chunk.js} | 4 +- ...chunk.js.map => 785.c0c5dfeb.chunk.js.map} | 2 +- ...5245507.chunk.js => 875.338a400a.chunk.js} | 4 +- ...chunk.js.map => 875.338a400a.chunk.js.map} | 2 +- ...86c4610.chunk.js => 919.c6e2e20b.chunk.js} | 4 +- ...chunk.js.map => 919.c6e2e20b.chunk.js.map} | 2 +- ...47091f4e.chunk.js => 94.2dac96c0.chunk.js} | 4 +- ....chunk.js.map => 94.2dac96c0.chunk.js.map} | 2 +- ...b9281ec.chunk.js => 952.4fb5bbbb.chunk.js} | 4 +- static/js/952.4fb5bbbb.chunk.js.map | 1 + static/js/952.ab9281ec.chunk.js.map | 1 - ...7b7fb13.chunk.js => 955.8b8b4131.chunk.js} | 4 +- ...chunk.js.map => 955.8b8b4131.chunk.js.map} | 2 +- static/js/982.693e07e6.chunk.js | 2 - static/js/982.7f8149f7.chunk.js | 2 + ...chunk.js.map => 982.7f8149f7.chunk.js.map} | 2 +- static/js/main.0faec81c.js | 3 + ...CENSE.txt => main.0faec81c.js.LICENSE.txt} | 6 +- static/js/main.0faec81c.js.map | 1 + static/js/main.ab015eec.js | 3 - static/js/main.ab015eec.js.map | 1 - 123 files changed, 854 insertions(+), 1098 deletions(-) delete mode 100644 coverage/lcov-report/color-convert/src/getContrastingColor.ts.html delete mode 100644 coverage/lcov-report/color-convert/src/utils.ts.html rename static/css/{329.046f560a.chunk.css => 682.4e43dbd8.chunk.css} (99%) rename static/css/{329.046f560a.chunk.css.map => 682.4e43dbd8.chunk.css.map} (99%) rename static/js/{113.9ca7997d.chunk.js => 113.af007b06.chunk.js} (51%) rename static/js/{113.9ca7997d.chunk.js.map => 113.af007b06.chunk.js.map} (98%) rename static/js/{118.c5fd76ec.chunk.js => 118.668edd6a.chunk.js} (97%) rename static/js/{118.c5fd76ec.chunk.js.map => 118.668edd6a.chunk.js.map} (99%) create mode 100644 static/js/281.04f00b63.chunk.js create mode 100644 static/js/281.04f00b63.chunk.js.map delete mode 100644 static/js/281.a23b4cd8.chunk.js delete mode 100644 static/js/281.a23b4cd8.chunk.js.map rename static/js/{297.fd85593b.chunk.js => 297.75b2592c.chunk.js} (97%) rename static/js/{297.fd85593b.chunk.js.map => 297.75b2592c.chunk.js.map} (99%) rename static/js/{308.5164c0f5.chunk.js => 308.bd94eb40.chunk.js} (97%) rename static/js/{308.5164c0f5.chunk.js.map => 308.bd94eb40.chunk.js.map} (99%) rename static/js/{309.1783f321.chunk.js => 309.c25d6129.chunk.js} (97%) rename static/js/{309.1783f321.chunk.js.map => 309.c25d6129.chunk.js.map} (99%) create mode 100644 static/js/31.4c831a4d.chunk.js rename static/js/{31.f7fcaedc.chunk.js.map => 31.4c831a4d.chunk.js.map} (99%) delete mode 100644 static/js/31.f7fcaedc.chunk.js delete mode 100644 static/js/329.eeb46153.chunk.js rename static/js/{466.f4056b1d.chunk.js => 466.522ea72b.chunk.js} (97%) rename static/js/{466.f4056b1d.chunk.js.map => 466.522ea72b.chunk.js.map} (99%) rename static/js/{494.e8555ad2.chunk.js => 494.5d013a2d.chunk.js} (60%) create mode 100644 static/js/494.5d013a2d.chunk.js.map delete mode 100644 static/js/494.e8555ad2.chunk.js.map rename static/js/{546.6d11d60f.chunk.js => 546.56d4db54.chunk.js} (97%) rename static/js/{546.6d11d60f.chunk.js.map => 546.56d4db54.chunk.js.map} (99%) rename static/js/{569.52cd7492.chunk.js => 569.6d031637.chunk.js} (97%) rename static/js/{569.52cd7492.chunk.js.map => 569.6d031637.chunk.js.map} (99%) rename static/js/{620.bc751486.chunk.js => 620.b2436511.chunk.js} (97%) rename static/js/{620.bc751486.chunk.js.map => 620.b2436511.chunk.js.map} (99%) rename static/js/{649.67275294.chunk.js => 649.e33f8ded.chunk.js} (97%) rename static/js/{649.67275294.chunk.js.map => 649.e33f8ded.chunk.js.map} (99%) create mode 100644 static/js/682.bda4a371.chunk.js rename static/js/{329.eeb46153.chunk.js.LICENSE.txt => 682.bda4a371.chunk.js.LICENSE.txt} (100%) rename static/js/{329.eeb46153.chunk.js.map => 682.bda4a371.chunk.js.map} (54%) rename static/js/{721.bd8f7cb6.chunk.js => 721.24868da4.chunk.js} (97%) rename static/js/{721.bd8f7cb6.chunk.js.map => 721.24868da4.chunk.js.map} (99%) rename static/js/{756.f5dd9fa8.chunk.js => 756.c4374ee9.chunk.js} (57%) rename static/js/{756.f5dd9fa8.chunk.js.map => 756.c4374ee9.chunk.js.map} (97%) rename static/js/{781.506cec8a.chunk.js => 781.88a802ca.chunk.js} (55%) rename static/js/{781.506cec8a.chunk.js.map => 781.88a802ca.chunk.js.map} (99%) rename static/js/{785.6f21cfa0.chunk.js => 785.c0c5dfeb.chunk.js} (69%) rename static/js/{785.6f21cfa0.chunk.js.map => 785.c0c5dfeb.chunk.js.map} (98%) rename static/js/{875.e5245507.chunk.js => 875.338a400a.chunk.js} (78%) rename static/js/{875.e5245507.chunk.js.map => 875.338a400a.chunk.js.map} (98%) rename static/js/{919.686c4610.chunk.js => 919.c6e2e20b.chunk.js} (56%) rename static/js/{919.686c4610.chunk.js.map => 919.c6e2e20b.chunk.js.map} (99%) rename static/js/{94.47091f4e.chunk.js => 94.2dac96c0.chunk.js} (97%) rename static/js/{94.47091f4e.chunk.js.map => 94.2dac96c0.chunk.js.map} (99%) rename static/js/{952.ab9281ec.chunk.js => 952.4fb5bbbb.chunk.js} (63%) create mode 100644 static/js/952.4fb5bbbb.chunk.js.map delete mode 100644 static/js/952.ab9281ec.chunk.js.map rename static/js/{955.57b7fb13.chunk.js => 955.8b8b4131.chunk.js} (64%) rename static/js/{955.57b7fb13.chunk.js.map => 955.8b8b4131.chunk.js.map} (98%) delete mode 100644 static/js/982.693e07e6.chunk.js create mode 100644 static/js/982.7f8149f7.chunk.js rename static/js/{982.693e07e6.chunk.js.map => 982.7f8149f7.chunk.js.map} (99%) create mode 100644 static/js/main.0faec81c.js rename static/js/{main.ab015eec.js.LICENSE.txt => main.0faec81c.js.LICENSE.txt} (93%) create mode 100644 static/js/main.0faec81c.js.map delete mode 100644 static/js/main.ab015eec.js delete mode 100644 static/js/main.ab015eec.js.map diff --git a/asset-manifest.json b/asset-manifest.json index c590838bc..ac385ad92 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,30 +1,30 @@ { "files": { "main.css": "/static/css/main.6ef0c5a4.css", - "main.js": "/static/js/main.ab015eec.js", + "main.js": "/static/js/main.0faec81c.js", "static/css/281.c7b2c18c.chunk.css": "/static/css/281.c7b2c18c.chunk.css", - "static/js/281.a23b4cd8.chunk.js": "/static/js/281.a23b4cd8.chunk.js", - "static/js/113.9ca7997d.chunk.js": "/static/js/113.9ca7997d.chunk.js", - "static/js/308.5164c0f5.chunk.js": "/static/js/308.5164c0f5.chunk.js", - "static/js/494.e8555ad2.chunk.js": "/static/js/494.e8555ad2.chunk.js", - "static/js/785.6f21cfa0.chunk.js": "/static/js/785.6f21cfa0.chunk.js", - "static/js/952.ab9281ec.chunk.js": "/static/js/952.ab9281ec.chunk.js", - "static/js/919.686c4610.chunk.js": "/static/js/919.686c4610.chunk.js", - "static/js/781.506cec8a.chunk.js": "/static/js/781.506cec8a.chunk.js", - "static/js/955.57b7fb13.chunk.js": "/static/js/955.57b7fb13.chunk.js", + "static/js/281.04f00b63.chunk.js": "/static/js/281.04f00b63.chunk.js", + "static/js/113.af007b06.chunk.js": "/static/js/113.af007b06.chunk.js", + "static/js/308.bd94eb40.chunk.js": "/static/js/308.bd94eb40.chunk.js", + "static/js/494.5d013a2d.chunk.js": "/static/js/494.5d013a2d.chunk.js", + "static/js/785.c0c5dfeb.chunk.js": "/static/js/785.c0c5dfeb.chunk.js", + "static/js/952.4fb5bbbb.chunk.js": "/static/js/952.4fb5bbbb.chunk.js", + "static/js/919.c6e2e20b.chunk.js": "/static/js/919.c6e2e20b.chunk.js", + "static/js/781.88a802ca.chunk.js": "/static/js/781.88a802ca.chunk.js", + "static/js/955.8b8b4131.chunk.js": "/static/js/955.8b8b4131.chunk.js", "static/js/446.143df30c.chunk.js": "/static/js/446.143df30c.chunk.js", - "static/js/546.6d11d60f.chunk.js": "/static/js/546.6d11d60f.chunk.js", - "static/js/756.f5dd9fa8.chunk.js": "/static/js/756.f5dd9fa8.chunk.js", - "static/js/569.52cd7492.chunk.js": "/static/js/569.52cd7492.chunk.js", - "static/js/309.1783f321.chunk.js": "/static/js/309.1783f321.chunk.js", - "static/js/297.fd85593b.chunk.js": "/static/js/297.fd85593b.chunk.js", - "static/js/466.f4056b1d.chunk.js": "/static/js/466.f4056b1d.chunk.js", - "static/js/649.67275294.chunk.js": "/static/js/649.67275294.chunk.js", - "static/js/620.bc751486.chunk.js": "/static/js/620.bc751486.chunk.js", - "static/js/875.e5245507.chunk.js": "/static/js/875.e5245507.chunk.js", - "static/js/118.c5fd76ec.chunk.js": "/static/js/118.c5fd76ec.chunk.js", - "static/js/94.47091f4e.chunk.js": "/static/js/94.47091f4e.chunk.js", - "static/js/721.bd8f7cb6.chunk.js": "/static/js/721.bd8f7cb6.chunk.js", + "static/js/546.56d4db54.chunk.js": "/static/js/546.56d4db54.chunk.js", + "static/js/756.c4374ee9.chunk.js": "/static/js/756.c4374ee9.chunk.js", + "static/js/569.6d031637.chunk.js": "/static/js/569.6d031637.chunk.js", + "static/js/309.c25d6129.chunk.js": "/static/js/309.c25d6129.chunk.js", + "static/js/297.75b2592c.chunk.js": "/static/js/297.75b2592c.chunk.js", + "static/js/466.522ea72b.chunk.js": "/static/js/466.522ea72b.chunk.js", + "static/js/649.e33f8ded.chunk.js": "/static/js/649.e33f8ded.chunk.js", + "static/js/620.b2436511.chunk.js": "/static/js/620.b2436511.chunk.js", + "static/js/875.338a400a.chunk.js": "/static/js/875.338a400a.chunk.js", + "static/js/118.668edd6a.chunk.js": "/static/js/118.668edd6a.chunk.js", + "static/js/94.2dac96c0.chunk.js": "/static/js/94.2dac96c0.chunk.js", + "static/js/721.24868da4.chunk.js": "/static/js/721.24868da4.chunk.js", "static/js/3.8c297d32.chunk.js": "/static/js/3.8c297d32.chunk.js", "static/js/18.66749cfe.chunk.js": "/static/js/18.66749cfe.chunk.js", "static/js/426.deacc93d.chunk.js": "/static/js/426.deacc93d.chunk.js", @@ -43,42 +43,42 @@ "static/js/469.c281ae42.chunk.js": "/static/js/469.c281ae42.chunk.js", "static/js/624.2a2c884f.chunk.js": "/static/js/624.2a2c884f.chunk.js", "static/js/458.d767c1e7.chunk.js": "/static/js/458.d767c1e7.chunk.js", - "static/js/982.693e07e6.chunk.js": "/static/js/982.693e07e6.chunk.js", + "static/js/982.7f8149f7.chunk.js": "/static/js/982.7f8149f7.chunk.js", "static/js/107.34e13438.chunk.js": "/static/js/107.34e13438.chunk.js", "static/js/2.97cc29ed.chunk.js": "/static/js/2.97cc29ed.chunk.js", "static/js/995.765653cf.chunk.js": "/static/js/995.765653cf.chunk.js", "refractor-vendor.js": "/static/js/refractor-vendor.1802c8b7.chunk.js", "react-vendor.js": "/static/js/react-vendor.ef3775ea.js", - "static/css/329.046f560a.chunk.css": "/static/css/329.046f560a.chunk.css", - "static/js/329.eeb46153.chunk.js": "/static/js/329.eeb46153.chunk.js", - "static/js/31.f7fcaedc.chunk.js": "/static/js/31.f7fcaedc.chunk.js", + "static/css/682.4e43dbd8.chunk.css": "/static/css/682.4e43dbd8.chunk.css", + "static/js/682.bda4a371.chunk.js": "/static/js/682.bda4a371.chunk.js", + "static/js/31.4c831a4d.chunk.js": "/static/js/31.4c831a4d.chunk.js", "index.html": "/index.html", "static/media/home.svg": "/static/media/home.7d51f25c64fe597ec540c3e724748f4e.svg", "main.6ef0c5a4.css.map": "/static/css/main.6ef0c5a4.css.map", - "main.ab015eec.js.map": "/static/js/main.ab015eec.js.map", + "main.0faec81c.js.map": "/static/js/main.0faec81c.js.map", "281.c7b2c18c.chunk.css.map": "/static/css/281.c7b2c18c.chunk.css.map", - "281.a23b4cd8.chunk.js.map": "/static/js/281.a23b4cd8.chunk.js.map", - "113.9ca7997d.chunk.js.map": "/static/js/113.9ca7997d.chunk.js.map", - "308.5164c0f5.chunk.js.map": "/static/js/308.5164c0f5.chunk.js.map", - "494.e8555ad2.chunk.js.map": "/static/js/494.e8555ad2.chunk.js.map", - "785.6f21cfa0.chunk.js.map": "/static/js/785.6f21cfa0.chunk.js.map", - "952.ab9281ec.chunk.js.map": "/static/js/952.ab9281ec.chunk.js.map", - "919.686c4610.chunk.js.map": "/static/js/919.686c4610.chunk.js.map", - "781.506cec8a.chunk.js.map": "/static/js/781.506cec8a.chunk.js.map", - "955.57b7fb13.chunk.js.map": "/static/js/955.57b7fb13.chunk.js.map", + "281.04f00b63.chunk.js.map": "/static/js/281.04f00b63.chunk.js.map", + "113.af007b06.chunk.js.map": "/static/js/113.af007b06.chunk.js.map", + "308.bd94eb40.chunk.js.map": "/static/js/308.bd94eb40.chunk.js.map", + "494.5d013a2d.chunk.js.map": "/static/js/494.5d013a2d.chunk.js.map", + "785.c0c5dfeb.chunk.js.map": "/static/js/785.c0c5dfeb.chunk.js.map", + "952.4fb5bbbb.chunk.js.map": "/static/js/952.4fb5bbbb.chunk.js.map", + "919.c6e2e20b.chunk.js.map": "/static/js/919.c6e2e20b.chunk.js.map", + "781.88a802ca.chunk.js.map": "/static/js/781.88a802ca.chunk.js.map", + "955.8b8b4131.chunk.js.map": "/static/js/955.8b8b4131.chunk.js.map", "446.143df30c.chunk.js.map": "/static/js/446.143df30c.chunk.js.map", - "546.6d11d60f.chunk.js.map": "/static/js/546.6d11d60f.chunk.js.map", - "756.f5dd9fa8.chunk.js.map": "/static/js/756.f5dd9fa8.chunk.js.map", - "569.52cd7492.chunk.js.map": "/static/js/569.52cd7492.chunk.js.map", - "309.1783f321.chunk.js.map": "/static/js/309.1783f321.chunk.js.map", - "297.fd85593b.chunk.js.map": "/static/js/297.fd85593b.chunk.js.map", - "466.f4056b1d.chunk.js.map": "/static/js/466.f4056b1d.chunk.js.map", - "649.67275294.chunk.js.map": "/static/js/649.67275294.chunk.js.map", - "620.bc751486.chunk.js.map": "/static/js/620.bc751486.chunk.js.map", - "875.e5245507.chunk.js.map": "/static/js/875.e5245507.chunk.js.map", - "118.c5fd76ec.chunk.js.map": "/static/js/118.c5fd76ec.chunk.js.map", - "94.47091f4e.chunk.js.map": "/static/js/94.47091f4e.chunk.js.map", - "721.bd8f7cb6.chunk.js.map": "/static/js/721.bd8f7cb6.chunk.js.map", + "546.56d4db54.chunk.js.map": "/static/js/546.56d4db54.chunk.js.map", + "756.c4374ee9.chunk.js.map": "/static/js/756.c4374ee9.chunk.js.map", + "569.6d031637.chunk.js.map": "/static/js/569.6d031637.chunk.js.map", + "309.c25d6129.chunk.js.map": "/static/js/309.c25d6129.chunk.js.map", + "297.75b2592c.chunk.js.map": "/static/js/297.75b2592c.chunk.js.map", + "466.522ea72b.chunk.js.map": "/static/js/466.522ea72b.chunk.js.map", + "649.e33f8ded.chunk.js.map": "/static/js/649.e33f8ded.chunk.js.map", + "620.b2436511.chunk.js.map": "/static/js/620.b2436511.chunk.js.map", + "875.338a400a.chunk.js.map": "/static/js/875.338a400a.chunk.js.map", + "118.668edd6a.chunk.js.map": "/static/js/118.668edd6a.chunk.js.map", + "94.2dac96c0.chunk.js.map": "/static/js/94.2dac96c0.chunk.js.map", + "721.24868da4.chunk.js.map": "/static/js/721.24868da4.chunk.js.map", "3.8c297d32.chunk.js.map": "/static/js/3.8c297d32.chunk.js.map", "18.66749cfe.chunk.js.map": "/static/js/18.66749cfe.chunk.js.map", "426.deacc93d.chunk.js.map": "/static/js/426.deacc93d.chunk.js.map", @@ -97,19 +97,19 @@ "469.c281ae42.chunk.js.map": "/static/js/469.c281ae42.chunk.js.map", "624.2a2c884f.chunk.js.map": "/static/js/624.2a2c884f.chunk.js.map", "458.d767c1e7.chunk.js.map": "/static/js/458.d767c1e7.chunk.js.map", - "982.693e07e6.chunk.js.map": "/static/js/982.693e07e6.chunk.js.map", + "982.7f8149f7.chunk.js.map": "/static/js/982.7f8149f7.chunk.js.map", "107.34e13438.chunk.js.map": "/static/js/107.34e13438.chunk.js.map", "2.97cc29ed.chunk.js.map": "/static/js/2.97cc29ed.chunk.js.map", "995.765653cf.chunk.js.map": "/static/js/995.765653cf.chunk.js.map", "refractor-vendor.1802c8b7.chunk.js.map": "/static/js/refractor-vendor.1802c8b7.chunk.js.map", "react-vendor.ef3775ea.js.map": "/static/js/react-vendor.ef3775ea.js.map", - "329.046f560a.chunk.css.map": "/static/css/329.046f560a.chunk.css.map", - "329.eeb46153.chunk.js.map": "/static/js/329.eeb46153.chunk.js.map", - "31.f7fcaedc.chunk.js.map": "/static/js/31.f7fcaedc.chunk.js.map" + "682.4e43dbd8.chunk.css.map": "/static/css/682.4e43dbd8.chunk.css.map", + "682.bda4a371.chunk.js.map": "/static/js/682.bda4a371.chunk.js.map", + "31.4c831a4d.chunk.js.map": "/static/js/31.4c831a4d.chunk.js.map" }, "entrypoints": [ "static/js/react-vendor.ef3775ea.js", "static/css/main.6ef0c5a4.css", - "static/js/main.ab015eec.js" + "static/js/main.0faec81c.js" ] } \ No newline at end of file diff --git a/coverage/badges.svg b/coverage/badges.svg index 468be0354..e83ec22f4 100644 --- a/coverage/badges.svg +++ b/coverage/badges.svg @@ -1,20 +1,20 @@ - - coverage: 99.85% - + + coverage: 88.75% + - - + + - - + + \ No newline at end of file diff --git a/coverage/coverage-summary.json b/coverage/coverage-summary.json index dffc6a7f6..2e8f0d88a 100644 --- a/coverage/coverage-summary.json +++ b/coverage/coverage-summary.json @@ -1,4 +1,4 @@ -{"total": {"lines":{"total":667,"covered":666,"skipped":0,"pct":99.85},"statements":{"total":714,"covered":712,"skipped":0,"pct":99.71},"functions":{"total":167,"covered":167,"skipped":0,"pct":100},"branches":{"total":649,"covered":633,"skipped":0,"pct":97.53},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}} +{"total": {"lines":{"total":667,"covered":592,"skipped":0,"pct":88.75},"statements":{"total":714,"covered":627,"skipped":0,"pct":87.81},"functions":{"total":167,"covered":143,"skipped":0,"pct":85.62},"branches":{"total":649,"covered":559,"skipped":0,"pct":86.13},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}} ,"/home/runner/work/react-color/react-color/packages/color-alpha/src/Pointer.tsx": {"lines":{"total":4,"covered":4,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":4,"covered":4,"skipped":0,"pct":100},"branches":{"total":4,"covered":4,"skipped":0,"pct":100}} ,"/home/runner/work/react-color/react-color/packages/color-alpha/src/index.tsx": {"lines":{"total":15,"covered":15,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":15,"covered":15,"skipped":0,"pct":100},"branches":{"total":23,"covered":21,"skipped":0,"pct":91.3}} ,"/home/runner/work/react-color/react-color/packages/color-block/src/index.tsx": {"lines":{"total":17,"covered":17,"skipped":0,"pct":100},"functions":{"total":5,"covered":5,"skipped":0,"pct":100},"statements":{"total":17,"covered":17,"skipped":0,"pct":100},"branches":{"total":17,"covered":17,"skipped":0,"pct":100}} @@ -8,9 +8,7 @@ ,"/home/runner/work/react-color/react-color/packages/color-circle/src/index.tsx": {"lines":{"total":8,"covered":8,"skipped":0,"pct":100},"functions":{"total":3,"covered":3,"skipped":0,"pct":100},"statements":{"total":8,"covered":8,"skipped":0,"pct":100},"branches":{"total":13,"covered":13,"skipped":0,"pct":100}} ,"/home/runner/work/react-color/react-color/packages/color-colorful/src/index.tsx": {"lines":{"total":15,"covered":15,"skipped":0,"pct":100},"functions":{"total":9,"covered":9,"skipped":0,"pct":100},"statements":{"total":16,"covered":16,"skipped":0,"pct":100},"branches":{"total":17,"covered":16,"skipped":0,"pct":94.11}} ,"/home/runner/work/react-color/react-color/packages/color-compact/src/index.tsx": {"lines":{"total":18,"covered":18,"skipped":0,"pct":100},"functions":{"total":7,"covered":7,"skipped":0,"pct":100},"statements":{"total":20,"covered":20,"skipped":0,"pct":100},"branches":{"total":21,"covered":21,"skipped":0,"pct":100}} -,"/home/runner/work/react-color/react-color/packages/color-convert/src/getContrastingColor.ts": {"lines":{"total":6,"covered":6,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":6,"covered":6,"skipped":0,"pct":100},"branches":{"total":4,"covered":4,"skipped":0,"pct":100}} -,"/home/runner/work/react-color/react-color/packages/color-convert/src/index.ts": {"lines":{"total":128,"covered":128,"skipped":0,"pct":100},"functions":{"total":27,"covered":27,"skipped":0,"pct":100},"statements":{"total":139,"covered":139,"skipped":0,"pct":100},"branches":{"total":74,"covered":74,"skipped":0,"pct":100}} -,"/home/runner/work/react-color/react-color/packages/color-convert/src/utils.ts": {"lines":{"total":11,"covered":11,"skipped":0,"pct":100},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":15,"covered":15,"skipped":0,"pct":100},"branches":{"total":6,"covered":6,"skipped":0,"pct":100}} +,"/home/runner/work/react-color/react-color/packages/color-convert/src/index.ts": {"lines":{"total":145,"covered":71,"skipped":0,"pct":48.96},"functions":{"total":32,"covered":8,"skipped":0,"pct":25},"statements":{"total":160,"covered":75,"skipped":0,"pct":46.87},"branches":{"total":84,"covered":10,"skipped":0,"pct":11.9}} ,"/home/runner/work/react-color/react-color/packages/color-editable-input-hsla/src/index.tsx": {"lines":{"total":27,"covered":27,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":35,"covered":35,"skipped":0,"pct":100},"branches":{"total":43,"covered":43,"skipped":0,"pct":100}} ,"/home/runner/work/react-color/react-color/packages/color-editable-input-rgba/src/index.tsx": {"lines":{"total":32,"covered":32,"skipped":0,"pct":100},"functions":{"total":7,"covered":7,"skipped":0,"pct":100},"statements":{"total":34,"covered":34,"skipped":0,"pct":100},"branches":{"total":54,"covered":54,"skipped":0,"pct":100}} ,"/home/runner/work/react-color/react-color/packages/color-editable-input/src/index.tsx": {"lines":{"total":32,"covered":32,"skipped":0,"pct":100},"functions":{"total":7,"covered":7,"skipped":0,"pct":100},"statements":{"total":34,"covered":34,"skipped":0,"pct":100},"branches":{"total":28,"covered":27,"skipped":0,"pct":96.42}} diff --git a/coverage/lcov-report/color-alpha/src/Pointer.tsx.html b/coverage/lcov-report/color-alpha/src/Pointer.tsx.html index 6dcecb279..24ad4ba84 100644 --- a/coverage/lcov-report/color-alpha/src/Pointer.tsx.html +++ b/coverage/lcov-report/color-alpha/src/Pointer.tsx.html @@ -163,7 +163,7 @@

All files / color-alpha/ - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/color-convert/src/index.html b/coverage/lcov-report/color-convert/src/index.html index b8acbae36..4fac972ed 100644 --- a/coverage/lcov-report/color-convert/src/index.html +++ b/coverage/lcov-report/color-convert/src/index.html @@ -23,30 +23,30 @@

All files color-convert/src

- 100% + 46.87% Statements - 160/160 + 75/160
- 100% + 11.9% Branches - 84/84 + 10/84
- 100% + 25% Functions - 32/32 + 8/32
- 100% + 48.96% Lines - 145/145 + 71/145
@@ -61,7 +61,7 @@

All files color-convert/src

-
+
@@ -79,48 +79,18 @@

All files color-convert/src

- - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -131,7 +101,7 @@

All files color-convert/src

- - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/color-editable-input-hsla/src/index.html b/coverage/lcov-report/color-editable-input-hsla/src/index.html index cb6c96035..e5bdf8f4a 100644 --- a/coverage/lcov-report/color-editable-input-hsla/src/index.html +++ b/coverage/lcov-report/color-editable-input-hsla/src/index.html @@ -101,7 +101,7 @@

All files color-editable-input-hsla/src

\ No newline at end of file +Color picker component for React.
\ No newline at end of file diff --git a/static/css/329.046f560a.chunk.css b/static/css/682.4e43dbd8.chunk.css similarity index 99% rename from static/css/329.046f560a.chunk.css rename to static/css/682.4e43dbd8.chunk.css index c30e8e233..3781809c6 100644 --- a/static/css/329.046f560a.chunk.css +++ b/static/css/682.4e43dbd8.chunk.css @@ -1,2 +1,2 @@ .code-preview-layout[data-color-mode*=light],[data-color-mode*=light],body[data-color-mode*=light]{--color-canvas-subtle:#f6f8fa;--color-border-muted:#d8dee4}.code-preview-layout[data-color-mode*=dark],[data-color-mode*=dark],body[data-color-mode*=dark]{--color-canvas-subtle:#161b22;--color-border-muted:#21262d}.w-rcpl.w-bordered{border:1px solid var(--color-border-muted)}.w-rcpl.w-bordered>.w-rcpl-toolbar{border-top:1px solid var(--color-border-muted)}.w-rcpl.w-bordered>.w-rcpl-code:not(.w-hidden){border-top:1px dashed var(--color-border-muted)}.w-rcpl{background-color:var(--color-canvas-subtle);border-radius:5px}.w-rcpl-preview:not(:last-child){border-radius:5px 5px 0 0}.w-rcpl-code.w-hidden{height:0;overflow:hidden;padding:0}.w-rcpl-code{border-top-left-radius:0;border-top-right-radius:0;height:auto;overflow:auto;transition:height cubic-bezier(.36,0,.66,-.56)}.w-rcpl-code>*{margin:0!important;padding:0!important}.w-disable-checkered>.w-rcpl-preview{background-image:none}.w-rcpl-preview{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpattern id='a' width='16' height='16' patternUnits='userSpaceOnUse'%3E%3Cpath fill='rgba(0, 0, 0, 0.06)' d='M0 0h8v8H0zm8 8h8v8H8z'/%3E%3C/pattern%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3C/svg%3E")}.w-rcpl-code,.w-rcpl-preview{padding:15px}.w-rcpl-extra,.w-rcpl-title{align-items:center;display:flex}.w-rcpl-toolbar button svg{display:block;height:18px;opacity:.37;transition:opacity .3s}.w-rcpl-toolbar button svg:hover{opacity:1}.w-rcpl-toolbar button{background-color:transparent;border:0;box-sizing:border-box;color:currentColor;cursor:pointer;display:inline-block;height:inherit;outline:none;padding:3px 4px;position:relative;transition:opacity .2s,background .2s}.w-rcpl-toolbar{display:flex;justify-content:space-between;padding:5px 5px 5px 8px}@media (prefers-color-scheme:dark){.wmde-markdown,.wmde-markdown-var{--color-prettylights-syntax-comment:#8b949e;--color-prettylights-syntax-constant:#79c0ff;--color-prettylights-syntax-entity:#d2a8ff;--color-prettylights-syntax-storage-modifier-import:#c9d1d9;--color-prettylights-syntax-entity-tag:#7ee787;--color-prettylights-syntax-keyword:#ff7b72;--color-prettylights-syntax-string:#a5d6ff;--color-prettylights-syntax-variable:#ffa657;--color-prettylights-syntax-brackethighlighter-unmatched:#f85149;--color-prettylights-syntax-invalid-illegal-text:#f0f6fc;--color-prettylights-syntax-invalid-illegal-bg:#8e1519;--color-prettylights-syntax-carriage-return-text:#f0f6fc;--color-prettylights-syntax-carriage-return-bg:#b62324;--color-prettylights-syntax-string-regexp:#7ee787;--color-prettylights-syntax-markup-list:#f2cc60;--color-prettylights-syntax-markup-heading:#1f6feb;--color-prettylights-syntax-markup-italic:#c9d1d9;--color-prettylights-syntax-markup-bold:#c9d1d9;--color-prettylights-syntax-markup-deleted-text:#ffdcd7;--color-prettylights-syntax-markup-deleted-bg:#67060c;--color-prettylights-syntax-markup-inserted-text:#aff5b4;--color-prettylights-syntax-markup-inserted-bg:#033a16;--color-prettylights-syntax-markup-changed-text:#ffdfb6;--color-prettylights-syntax-markup-changed-bg:#5a1e02;--color-prettylights-syntax-markup-ignored-text:#c9d1d9;--color-prettylights-syntax-markup-ignored-bg:#1158c7;--color-prettylights-syntax-meta-diff-range:#d2a8ff;--color-prettylights-syntax-brackethighlighter-angle:#8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark:#484f58;--color-prettylights-syntax-constant-other-reference-link:#a5d6ff;--color-fg-default:#c9d1d9;--color-fg-muted:#8b949e;--color-fg-subtle:#484f58;--color-canvas-default:#0d1117;--color-canvas-subtle:#161b22;--color-border-default:#30363d;--color-border-muted:#21262d;--color-neutral-muted:hsla(215,8%,47%,.4);--color-accent-fg:#58a6ff;--color-accent-emphasis:#1f6feb;--color-attention-subtle:rgba(187,128,9,.15);--color-danger-fg:#f85149;color-scheme:dark}}@media (prefers-color-scheme:light){.wmde-markdown,.wmde-markdown-var{--color-prettylights-syntax-comment:#6e7781;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-entity:#8250df;--color-prettylights-syntax-storage-modifier-import:#24292f;--color-prettylights-syntax-entity-tag:#116329;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#24292f;--color-prettylights-syntax-markup-bold:#24292f;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#eaeef2;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-brackethighlighter-angle:#57606a;--color-prettylights-syntax-sublimelinter-gutter-mark:#8c959f;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-fg-default:#24292f;--color-fg-muted:#57606a;--color-fg-subtle:#6e7781;--color-canvas-default:#fff;--color-canvas-subtle:#f6f8fa;--color-border-default:#d0d7de;--color-border-muted:#d8dee4;--color-neutral-muted:rgba(175,184,193,.2);--color-accent-fg:#0969da;--color-accent-emphasis:#0969da;--color-attention-subtle:#fff8c5;--color-danger-fg:#cf222e;color-scheme:light}}.wmde-markdown-var[data-color-mode*=dark],.wmde-markdown[data-color-mode*=dark],[data-color-mode*=dark] .wmde-markdown,[data-color-mode*=dark] .wmde-markdown-var,body[data-color-mode*=dark]{--color-prettylights-syntax-comment:#8b949e;--color-prettylights-syntax-constant:#79c0ff;--color-prettylights-syntax-entity:#d2a8ff;--color-prettylights-syntax-storage-modifier-import:#c9d1d9;--color-prettylights-syntax-entity-tag:#7ee787;--color-prettylights-syntax-keyword:#ff7b72;--color-prettylights-syntax-string:#a5d6ff;--color-prettylights-syntax-variable:#ffa657;--color-prettylights-syntax-brackethighlighter-unmatched:#f85149;--color-prettylights-syntax-invalid-illegal-text:#f0f6fc;--color-prettylights-syntax-invalid-illegal-bg:#8e1519;--color-prettylights-syntax-carriage-return-text:#f0f6fc;--color-prettylights-syntax-carriage-return-bg:#b62324;--color-prettylights-syntax-string-regexp:#7ee787;--color-prettylights-syntax-markup-list:#f2cc60;--color-prettylights-syntax-markup-heading:#1f6feb;--color-prettylights-syntax-markup-italic:#c9d1d9;--color-prettylights-syntax-markup-bold:#c9d1d9;--color-prettylights-syntax-markup-deleted-text:#ffdcd7;--color-prettylights-syntax-markup-deleted-bg:#67060c;--color-prettylights-syntax-markup-inserted-text:#aff5b4;--color-prettylights-syntax-markup-inserted-bg:#033a16;--color-prettylights-syntax-markup-changed-text:#ffdfb6;--color-prettylights-syntax-markup-changed-bg:#5a1e02;--color-prettylights-syntax-markup-ignored-text:#c9d1d9;--color-prettylights-syntax-markup-ignored-bg:#1158c7;--color-prettylights-syntax-meta-diff-range:#d2a8ff;--color-prettylights-syntax-brackethighlighter-angle:#8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark:#484f58;--color-prettylights-syntax-constant-other-reference-link:#a5d6ff;--color-fg-default:#c9d1d9;--color-fg-muted:#8b949e;--color-fg-subtle:#484f58;--color-canvas-default:#0d1117;--color-canvas-subtle:#161b22;--color-border-default:#30363d;--color-border-muted:#21262d;--color-neutral-muted:hsla(215,8%,47%,.4);--color-accent-fg:#58a6ff;--color-accent-emphasis:#1f6feb;--color-attention-subtle:rgba(187,128,9,.15);--color-danger-fg:#f85149;color-scheme:dark}.wmde-markdown-var[data-color-mode*=light],.wmde-markdown[data-color-mode*=light],[data-color-mode*=light] .wmde-markdown,[data-color-mode*=light] .wmde-markdown-var,body[data-color-mode*=light]{--color-prettylights-syntax-comment:#6e7781;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-entity:#8250df;--color-prettylights-syntax-storage-modifier-import:#24292f;--color-prettylights-syntax-entity-tag:#116329;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#24292f;--color-prettylights-syntax-markup-bold:#24292f;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#eaeef2;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-brackethighlighter-angle:#57606a;--color-prettylights-syntax-sublimelinter-gutter-mark:#8c959f;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-fg-default:#24292f;--color-fg-muted:#57606a;--color-fg-subtle:#6e7781;--color-canvas-default:#fff;--color-canvas-subtle:#f6f8fa;--color-border-default:#d0d7de;--color-border-muted:#d8dee4;--color-neutral-muted:rgba(175,184,193,.2);--color-accent-fg:#0969da;--color-accent-emphasis:#0969da;--color-attention-subtle:#fff8c5;--color-danger-fg:#cf222e;color-scheme:light}.wmde-markdown{-webkit-text-size-adjust:100%;word-wrap:break-word;background-color:var(--color-canvas-default);color:var(--color-fg-default);font-family:-apple-system,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px;line-height:1.5}.wmde-markdown details,.wmde-markdown figcaption,.wmde-markdown figure{display:block}.wmde-markdown summary{display:list-item}.wmde-markdown [hidden]{display:none!important}.wmde-markdown a{background-color:transparent;color:var(--color-accent-fg);text-decoration:none}.wmde-markdown a:active,.wmde-markdown a:hover{outline-width:0}.wmde-markdown abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.wmde-markdown b,.wmde-markdown strong{font-weight:600}.wmde-markdown dfn{font-style:italic}.wmde-markdown h1{border-bottom:1px solid var(--color-border-muted);font-size:2em;font-weight:600;margin:.67em 0;padding-bottom:.3em}.wmde-markdown mark{background-color:var(--color-attention-subtle);color:var(--color-text-primary)}.wmde-markdown small{font-size:90%}.wmde-markdown sub,.wmde-markdown sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.wmde-markdown sub{bottom:-.25em}.wmde-markdown sup{top:-.5em}.wmde-markdown img{background-color:var(--color-canvas-default);border-style:none;box-sizing:content-box;display:inline-block;max-width:100%}.wmde-markdown code,.wmde-markdown kbd,.wmde-markdown pre,.wmde-markdown samp{font-family:monospace,monospace;font-size:1em}.wmde-markdown figure{margin:1em 40px}.wmde-markdown hr{background:transparent;background-color:var(--color-border-default);border:0;border-bottom:1px solid var(--color-border-muted);box-sizing:content-box;height:.25em;margin:24px 0;overflow:hidden;padding:0}.wmde-markdown input{font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible}.wmde-markdown [type=button],.wmde-markdown [type=reset],.wmde-markdown [type=submit]{-webkit-appearance:button}.wmde-markdown [type=button]::-moz-focus-inner,.wmde-markdown [type=reset]::-moz-focus-inner,.wmde-markdown [type=submit]::-moz-focus-inner{border-style:none;padding:0}.wmde-markdown [type=button]:-moz-focusring,.wmde-markdown [type=reset]:-moz-focusring,.wmde-markdown [type=submit]:-moz-focusring{outline:1px dotted ButtonText}.wmde-markdown [type=checkbox],.wmde-markdown [type=radio]{box-sizing:border-box;padding:0}.wmde-markdown [type=number]::-webkit-inner-spin-button,.wmde-markdown [type=number]::-webkit-outer-spin-button{height:auto}.wmde-markdown [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.wmde-markdown [type=search]::-webkit-search-cancel-button,.wmde-markdown [type=search]::-webkit-search-decoration{-webkit-appearance:none}.wmde-markdown ::-webkit-input-placeholder{color:inherit;opacity:.54}.wmde-markdown ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.wmde-markdown a:hover{text-decoration:underline}.wmde-markdown hr:after,.wmde-markdown hr:before{content:"";display:table}.wmde-markdown hr:after{clear:both}.wmde-markdown table{border-collapse:collapse;border-spacing:0;display:block;max-width:100%;width:-moz-max-content;width:max-content}.wmde-markdown td,.wmde-markdown th{padding:0}.wmde-markdown details summary{cursor:pointer}.wmde-markdown details:not([open])>:not(summary){display:none!important}.wmde-markdown kbd{background-color:var(--color-canvas-subtle);border-bottom-color:var(--color-neutral-muted);border:1px solid var(--color-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--color-neutral-muted);color:var(--color-fg-default);display:inline-block;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;padding:3px 5px;vertical-align:middle}.wmde-markdown h1,.wmde-markdown h2,.wmde-markdown h3,.wmde-markdown h4,.wmde-markdown h5,.wmde-markdown h6{font-weight:600;line-height:1.25;margin-bottom:16px;margin-top:24px}.wmde-markdown h2{border-bottom:1px solid var(--color-border-muted);font-size:1.5em;font-weight:600;padding-bottom:.3em}.wmde-markdown h3{font-size:1.25em;font-weight:600}.wmde-markdown h4{font-size:1em;font-weight:600}.wmde-markdown h5{font-size:.875em;font-weight:600}.wmde-markdown h6{color:var(--color-fg-muted);font-size:.85em;font-weight:600}.wmde-markdown p{margin-bottom:10px;margin-top:0}.wmde-markdown blockquote{border-left:.25em solid var(--color-border-default);color:var(--color-fg-muted);margin:0;padding:0 1em}.wmde-markdown ol,.wmde-markdown ul{margin-bottom:0;margin-top:0;padding-left:2em}.wmde-markdown ol ol,.wmde-markdown ul ol{list-style-type:lower-roman}.wmde-markdown ol ol ol,.wmde-markdown ol ul ol,.wmde-markdown ul ol ol,.wmde-markdown ul ul ol{list-style-type:lower-alpha}.wmde-markdown dd{margin-left:0}.wmde-markdown code,.wmde-markdown pre,.wmde-markdown tt{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.wmde-markdown pre{word-wrap:normal;margin-bottom:0;margin-top:0}.wmde-markdown .octicon{fill:currentColor;display:inline-block;overflow:visible!important;vertical-align:text-bottom}.wmde-markdown ::-moz-placeholder{color:var(--color-fg-subtle);opacity:1}.wmde-markdown ::placeholder{color:var(--color-fg-subtle);opacity:1}.wmde-markdown input::-webkit-inner-spin-button,.wmde-markdown input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.wmde-markdown [data-catalyst]{display:block}.wmde-markdown:after,.wmde-markdown:before{content:"";display:table}.wmde-markdown:after{clear:both}.wmde-markdown>:first-child{margin-top:0!important}.wmde-markdown>:last-child{margin-bottom:0!important}.wmde-markdown a:not([href]){color:inherit;text-decoration:none}.wmde-markdown .absent{color:var(--color-danger-fg)}.wmde-markdown a.anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.wmde-markdown .anchor:focus{outline:none}.wmde-markdown blockquote,.wmde-markdown details,.wmde-markdown dl,.wmde-markdown ol,.wmde-markdown p,.wmde-markdown pre,.wmde-markdown table,.wmde-markdown ul{margin-bottom:16px;margin-top:0}.wmde-markdown blockquote>:first-child{margin-top:0}.wmde-markdown blockquote>:last-child{margin-bottom:0}.wmde-markdown sup>a:before{content:"["}.wmde-markdown sup>a:after{content:"]"}.wmde-markdown h1 .octicon-link,.wmde-markdown h2 .octicon-link,.wmde-markdown h3 .octicon-link,.wmde-markdown h4 .octicon-link,.wmde-markdown h5 .octicon-link,.wmde-markdown h6 .octicon-link{color:var(--color-fg-default);vertical-align:middle;visibility:hidden}.wmde-markdown h1:hover .anchor,.wmde-markdown h2:hover .anchor,.wmde-markdown h3:hover .anchor,.wmde-markdown h4:hover .anchor,.wmde-markdown h5:hover .anchor,.wmde-markdown h6:hover .anchor{text-decoration:none}.wmde-markdown h1:hover .anchor .octicon-link,.wmde-markdown h2:hover .anchor .octicon-link,.wmde-markdown h3:hover .anchor .octicon-link,.wmde-markdown h4:hover .anchor .octicon-link,.wmde-markdown h5:hover .anchor .octicon-link,.wmde-markdown h6:hover .anchor .octicon-link{visibility:visible}.wmde-markdown h1 code,.wmde-markdown h1 tt,.wmde-markdown h2 code,.wmde-markdown h2 tt,.wmde-markdown h3 code,.wmde-markdown h3 tt,.wmde-markdown h4 code,.wmde-markdown h4 tt,.wmde-markdown h5 code,.wmde-markdown h5 tt,.wmde-markdown h6 code,.wmde-markdown h6 tt{font-size:inherit;padding:0 .2em}.wmde-markdown ol.no-list,.wmde-markdown ul.no-list{list-style-type:none;padding:0}.wmde-markdown ol[type="1"]{list-style-type:decimal}.wmde-markdown ol[type=a]{list-style-type:lower-alpha}.wmde-markdown ol[type=i]{list-style-type:lower-roman}.wmde-markdown div>ol:not([type]){list-style-type:decimal}.wmde-markdown ol ol,.wmde-markdown ol ul,.wmde-markdown ul ol,.wmde-markdown ul ul{margin-bottom:0;margin-top:0}.wmde-markdown li>p{margin-top:16px}.wmde-markdown li+li{margin-top:.25em}.wmde-markdown dl{padding:0}.wmde-markdown dl dt{font-size:1em;font-style:italic;font-weight:600;margin-top:16px;padding:0}.wmde-markdown dl dd{margin-bottom:16px;padding:0 16px}.wmde-markdown table th{font-weight:600}.wmde-markdown table td,.wmde-markdown table th{border:1px solid var(--color-border-default);padding:6px 13px}.wmde-markdown table tr{background-color:var(--color-canvas-default);border-top:1px solid var(--color-border-muted)}.wmde-markdown table tr:nth-child(2n){background-color:var(--color-canvas-subtle)}.wmde-markdown table img{background-color:transparent}.wmde-markdown img[align=right]{padding-left:20px}.wmde-markdown img[align=left]{padding-right:20px}.wmde-markdown .emoji{background-color:transparent;max-width:none;vertical-align:text-top}.wmde-markdown span.frame{display:block;overflow:hidden}.wmde-markdown span.frame>span{border:1px solid var(--color-border-default);display:block;float:left;margin:13px 0 0;overflow:hidden;padding:7px;width:auto}.wmde-markdown span.frame span img{display:block;float:left}.wmde-markdown span.frame span span{clear:both;color:var(--color-fg-default);display:block;padding:5px 0 0}.wmde-markdown span.align-center{clear:both;display:block;overflow:hidden}.wmde-markdown span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.wmde-markdown span.align-center span img{margin:0 auto;text-align:center}.wmde-markdown span.align-right{clear:both;display:block;overflow:hidden}.wmde-markdown span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.wmde-markdown span.align-right span img{margin:0;text-align:right}.wmde-markdown span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.wmde-markdown span.float-left span{margin:13px 0 0}.wmde-markdown span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.wmde-markdown span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.wmde-markdown code,.wmde-markdown tt{background-color:var(--color-neutral-muted);border-radius:6px;font-size:85%;margin:0;padding:.2em .4em}.wmde-markdown code br,.wmde-markdown tt br{display:none}.wmde-markdown del code{text-decoration:inherit}.wmde-markdown pre code{font-size:100%}.wmde-markdown pre>code{background:transparent;border:0;margin:0;padding:0;white-space:pre;word-break:normal}.wmde-markdown pre{background-color:var(--color-canvas-subtle);border-radius:6px;font-size:85%;line-height:1.45}.wmde-markdown pre code,.wmde-markdown pre tt{word-wrap:normal;background-color:transparent;border:0;display:inline;line-height:inherit;margin:0;max-width:auto;overflow:visible;padding:0}.wmde-markdown pre>code{display:block;overflow:auto;padding:16px}.wmde-markdown .csv-data td,.wmde-markdown .csv-data th{font-size:12px;line-height:1;overflow:hidden;padding:5px;text-align:left;white-space:nowrap}.wmde-markdown .csv-data .blob-num{background:var(--color-canvas-default);border:0;padding:10px 8px 9px;text-align:right}.wmde-markdown .csv-data tr{border-top:0}.wmde-markdown .csv-data th{background:var(--color-canvas-subtle);border-top:0;font-weight:600}.wmde-markdown .footnotes{border-top:1px solid var(--color-border-default);color:var(--color-fg-muted);font-size:12px}.wmde-markdown .footnotes ol{padding-left:16px}.wmde-markdown .footnotes li{position:relative}.wmde-markdown .footnotes li:target:before{border:2px solid var(--color-accent-emphasis);border-radius:6px;bottom:-8px;content:"";left:-24px;pointer-events:none;position:absolute;right:-8px;top:-8px}.wmde-markdown .footnotes li:target{color:var(--color-fg-default)}.wmde-markdown .footnotes .data-footnote-backref g-emoji{font-family:monospace}.wmde-markdown .task-list-item{list-style-type:none}.wmde-markdown .task-list-item label{font-weight:400}.wmde-markdown .task-list-item.enabled label{cursor:pointer}.wmde-markdown .task-list-item+.wmde-markdown .task-list-item{margin-top:3px}.wmde-markdown .task-list-item .handle{display:none}.wmde-markdown .contains-task-list input[type=checkbox],.wmde-markdown .task-list-item-checkbox{margin:0 .2em .25em -1.6em;vertical-align:middle}.wmde-markdown .contains-task-list:dir(rtl) .task-list-item-checkbox,.wmde-markdown .contains-task-list:dir(rtl) input[type=checkbox]{margin:0 -1.6em .25em .2em}.wmde-markdown ::-webkit-calendar-picker-indicator{filter:invert(50%)}.wmde-markdown pre{position:relative}.wmde-markdown pre .copied{background:var(--color-border-default);border-radius:5px;color:var(--color-fg-defaul);cursor:pointer;display:flex;font-size:12px;padding:6px;position:absolute;right:6px;top:6px;transition:all .3s;visibility:hidden}.wmde-markdown pre .copied .octicon-copy{display:block}.wmde-markdown pre .copied .octicon-check{display:none}.wmde-markdown pre:hover .copied{visibility:visible}.wmde-markdown pre:hover .copied:hover{background:var(--color-prettylights-syntax-entity-tag);color:var(--color-canvas-default)}.wmde-markdown pre .copied.active,.wmde-markdown pre:hover .copied:active{background:#2e9b33;color:var(--color-canvas-default)}.wmde-markdown pre .active .octicon-copy{display:none}.wmde-markdown pre .active .octicon-check{display:block}.highlight-line{background-color:var(--color-neutral-muted)}.code-line.line-number:before{color:var(--color-fg-subtle);content:attr(line);display:inline-block;margin-right:16px;text-align:right;white-space:nowrap;width:1rem}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:var(--color-prettylights-syntax-comment)}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.selector,.token.symbol,.token.tag{color:var(--color-prettylights-syntax-entity-tag)}.token.maybe-class-name{color:var(--color-prettylights-syntax-variable)}.token.attr-name,.token.boolean,.token.builtin,.token.char,.token.number,.token.operator,.token.property-access,.token.selector .token.class,.token.string{color:var(--color-prettylights-syntax-constant)}.token.deleted{color:var(--color-prettylights-syntax-markup-deleted-text)}.code-line .token.deleted{background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.token.inserted{color:var(--color-prettylights-syntax-markup-inserted-text)}.code-line .token.inserted{background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.token.variable{color:var(--color-prettylights-syntax-constant)}.language-css .token.string,.style .token.string,.token.atrule,.token.attr-value,.token.class-name,.token.color,.token.entity,.token.function,.token.url{color:var(--color-prettylights-syntax-string)}.token.important,.token.keyword,.token.regex,.token.rule{color:var(--color-prettylights-syntax-keyword)}.token.coord{color:var(--color-prettylights-syntax-meta-diff-range)}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} -/*# sourceMappingURL=329.046f560a.chunk.css.map*/ \ No newline at end of file +/*# sourceMappingURL=682.4e43dbd8.chunk.css.map*/ \ No newline at end of file diff --git a/static/css/329.046f560a.chunk.css.map b/static/css/682.4e43dbd8.chunk.css.map similarity index 99% rename from static/css/329.046f560a.chunk.css.map rename to static/css/682.4e43dbd8.chunk.css.map index 38611137f..e9b6135fc 100644 --- a/static/css/329.046f560a.chunk.css.map +++ b/static/css/682.4e43dbd8.chunk.css.map @@ -1 +1 @@ -{"version":3,"file":"static/css/329.046f560a.chunk.css","mappings":"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xB,eAAgB,CAFhB,QAGF,CACA,+BACE,aACF,CAKA,2CAFE,UAAW,CADX,aAOF,CAJA,qBAEE,UAEF,CACA,4BACE,sBACF,CACA,2BACE,yBACF,CACA,6BACE,aAAc,CACd,oBACF,CACA,uBACE,4BACF,CACA,wBACE,UAAW,CAGX,aAAc,CADd,iBAAkB,CADlB,iBAGF,CACA,6BACE,YACF,CACA,gKASE,kBAAmB,CADnB,YAEF,CACA,uCACE,YACF,CACA,sCACE,eACF,CACA,4BACE,WACF,CACA,2BACE,WACF,CACA,gMAME,6BAA8B,CAC9B,qBAAsB,CACtB,iBACF,CACA,gMAME,oBACF,CACA,oRAME,kBACF,CACA,wQAaE,iBAAkB,CADlB,cAEF,CACA,oDAGE,oBAAqB,CADrB,SAEF,CACA,4BACE,uBACF,CACA,0BACE,2BACF,CACA,0BACE,2BACF,CACA,kCACE,uBACF,CACA,oFAKE,eAAgB,CADhB,YAEF,CACA,oBACE,eACF,CACA,qBACE,gBACF,CACA,kBACE,SACF,CACA,qBAGE,aAAc,CACd,iBAAkB,CAClB,eAAgB,CAHhB,eAAgB,CADhB,SAKF,CACA,qBAEE,kBAAmB,CADnB,cAEF,CACA,wBACE,eACF,CACA,gDAGE,4CAA6C,CAD7C,gBAEF,CACA,wBACE,4CAA6C,CAC7C,8CACF,CACA,sCACE,2CACF,CACA,yBACE,4BACF,CACA,gCACE,iBACF,CACA,+BACE,kBACF,CACA,sBAGE,4BAA6B,CAF7B,cAAe,CACf,uBAEF,CACA,0BACE,aAAc,CACd,eACF,CACA,+BAOE,4CAA6C,CAN7C,aAAc,CACd,UAAW,CAGX,eAAgB,CAChB,eAAgB,CAFhB,WAAY,CADZ,UAKF,CACA,mCACE,aAAc,CACd,UACF,CACA,oCAGE,UAAW,CACX,6BAA8B,CAH9B,aAAc,CACd,eAGF,CACA,iCAGE,UAAW,CAFX,aAAc,CACd,eAEF,CACA,sCACE,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,iBACF,CACA,0CACE,aAAc,CACd,iBACF,CACA,gCAGE,UAAW,CAFX,aAAc,CACd,eAEF,CACA,qCACE,aAAc,CACd,eAAgB,CAChB,eAAgB,CAChB,gBACF,CACA,yCACE,QAAS,CACT,gBACF,CACA,+BACE,aAAc,CACd,UAAW,CACX,iBAAkB,CAClB,eACF,CACA,oCACE,eACF,CACA,gCACE,aAAc,CACd,WAAY,CACZ,gBAAiB,CACjB,eACF,CACA,qCACE,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,gBACF,CACA,sCAKE,2CAA4C,CAC5C,iBAAkB,CAFlB,aAAc,CADd,QAAS,CADT,iBAKF,CACA,4CAEE,YACF,CACA,wBACE,uBACF,CACA,wBACE,cACF,CACA,wBAKE,sBAAuB,CACvB,QAAS,CAJT,QAAS,CADT,SAAU,CAGV,eAAgB,CADhB,iBAIF,CACA,mBAGE,2CAA4C,CAC5C,iBAAkB,CAHlB,aAAc,CACd,gBAGF,CACA,8CAQE,gBAAiB,CACjB,4BAA6B,CAC7B,QAAS,CART,cAAe,CAKf,mBAAoB,CAFpB,QAAS,CAFT,cAAe,CAGf,gBAAiB,CAFjB,SAOF,CACA,wBAGE,aAAc,CADd,aAAc,CADd,YAGF,CACA,wDAIE,cAAe,CACf,aAAc,CAFd,eAAgB,CADhB,WAAY,CAIZ,eAAgB,CAChB,kBACF,CACA,mCAGE,sCAAuC,CACvC,QAAS,CAHT,oBAAqB,CACrB,gBAGF,CACA,4BACE,YACF,CACA,4BAEE,qCAAsC,CACtC,YAAa,CAFb,eAGF,CACA,0BAGE,gDAAiD,CADjD,2BAA4B,CAD5B,cAGF,CACA,6BACE,iBACF,CACA,6BACE,iBACF,CACA,2CAQE,6CAA8C,CAC9C,iBAAkB,CALlB,WAAY,CAGZ,UAAW,CAFX,UAAW,CACX,mBAAoB,CALpB,iBAAkB,CAElB,UAAW,CADX,QAQF,CACA,oCACE,6BACF,CACA,yDACE,qBACF,CACA,+BACE,oBACF,CACA,qCACE,eACF,CACA,6CACE,cACF,CACA,8DACE,cACF,CACA,uCACE,YACF,CACA,gGAEE,0BAA6B,CAC7B,qBACF,CACA,sIAEE,0BACF,CACA,mDACE,kBACF,CACA,mBACE,iBACF,CACA,2BASE,sCAAuC,CADvC,iBAAkB,CAHlB,4BAA6B,CAD7B,cAAe,CAFf,YAAa,CASb,cAAe,CADf,WAAY,CAPZ,iBAAkB,CAIlB,SAAU,CADV,OAAQ,CAMR,kBAAoB,CAXpB,iBAYF,CACA,yCACE,aACF,CACA,0CACE,YACF,CACA,iCACE,kBACF,CACA,uCACE,sDAAuD,CACvD,iCACF,CACA,0EAEE,kBAAmB,CACnB,iCACF,CACA,yCACE,YACF,CACA,0CACE,aACF,CACA,gBACE,2CACF,CACA,8BAKE,4BAA6B,CAC7B,kBAAmB,CALnB,oBAAqB,CAGrB,iBAAkB,CADlB,gBAAiB,CAIjB,kBAAmB,CALnB,UAMF,CACA,yDAIE,8CACF,CACA,iBACE,UACF,CACA,wFAME,iDACF,CACA,wBACE,+CACF,CACA,2JASE,+CACF,CACA,eACE,0DACF,CACA,0BACE,mEACF,CACA,gBACE,2DACF,CACA,2BACE,oEACF,CACA,gBACE,+CACF,CAOA,yJAKE,6CACF,CACA,yDAIE,8CACF,CACA,aACE,sDACF,CACA,6BAEE,eACF,CACA,cACE,iBACF,CACA,cACE,WACF","sources":["../../node_modules/react-code-preview-layout/esm/styles.css","../../node_modules/@uiw/react-markdown-preview/esm/styles/markdown.css"],"sourcesContent":[".code-preview-layout[data-color-mode*='light'], [data-color-mode*='light'], body[data-color-mode*='light'] {\n --color-canvas-subtle: #f6f8fa;\n --color-border-muted: hsl(210, 18%, 87%);\n}\n.code-preview-layout[data-color-mode*='dark'], [data-color-mode*='dark'], body[data-color-mode*='dark'] {\n --color-canvas-subtle: #161b22;\n --color-border-muted: #21262d;\n}\n\n.w-rcpl.w-bordered {\n border: 1px solid var(--color-border-muted);\n}\n.w-rcpl.w-bordered > .w-rcpl-toolbar {\n border-top: 1px solid var(--color-border-muted);\n}\n.w-rcpl.w-bordered > .w-rcpl-code:not(.w-hidden) {\n border-top: 1px dashed var(--color-border-muted);\n}\n\n.w-rcpl {\n border-radius: 5px;\n background-color: var(--color-canvas-subtle);\n}\n.w-rcpl-preview:not(:last-child) {\n border-radius: 5px 5px 0 0;\n}\n.w-rcpl-code.w-hidden {\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.w-rcpl-code {\n transition: height cubic-bezier(0.360, 0.000, 0.660, -0.560);;\n height: auto;\n overflow: auto;\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n.w-rcpl-code > * {\n padding: 0 !important;\n margin: 0 !important;\n}\n.w-disable-checkered > .w-rcpl-preview {\n background-image: none;\n}\n.w-rcpl-preview {\n background: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpattern id='a' width='16' height='16' patternUnits='userSpaceOnUse'%3E%3Cpath fill='rgba(0, 0, 0, 0.06)' d='M0 0h8v8H0zm8 8h8v8H8z'/%3E%3C/pattern%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3C/svg%3E\")\n}\n.w-rcpl-preview, .w-rcpl-code {\n padding: 15px;\n}\n.w-rcpl-extra, .w-rcpl-title {\n display: flex;\n align-items: center;\n}\n.w-rcpl-toolbar button svg {\n opacity: 0.37;\n display: block;\n height: 18px;\n transition: opacity 0.3s;\n}\n.w-rcpl-toolbar button svg:hover {\n opacity: 1;\n}\n.w-rcpl-toolbar button {\n color: currentColor;\n position: relative;\n background-color: transparent;\n display: inline-block;\n height: inherit;\n padding: 3px 4px;\n border: 0;\n box-sizing: border-box;\n cursor: pointer;\n outline: none;\n transition: opacity .2s, background .2s;\n}\n.w-rcpl-toolbar {\n display: flex;\n justify-content: space-between;\n padding: 5px 5px;\n padding-left: 8px;\n}","@media (prefers-color-scheme: dark) {\n .wmde-markdown,\n .wmde-markdown-var {\n color-scheme: dark;\n --color-prettylights-syntax-comment: #8b949e;\n --color-prettylights-syntax-constant: #79c0ff;\n --color-prettylights-syntax-entity: #d2a8ff;\n --color-prettylights-syntax-storage-modifier-import: #c9d1d9;\n --color-prettylights-syntax-entity-tag: #7ee787;\n --color-prettylights-syntax-keyword: #ff7b72;\n --color-prettylights-syntax-string: #a5d6ff;\n --color-prettylights-syntax-variable: #ffa657;\n --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;\n --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;\n --color-prettylights-syntax-invalid-illegal-bg: #8e1519;\n --color-prettylights-syntax-carriage-return-text: #f0f6fc;\n --color-prettylights-syntax-carriage-return-bg: #b62324;\n --color-prettylights-syntax-string-regexp: #7ee787;\n --color-prettylights-syntax-markup-list: #f2cc60;\n --color-prettylights-syntax-markup-heading: #1f6feb;\n --color-prettylights-syntax-markup-italic: #c9d1d9;\n --color-prettylights-syntax-markup-bold: #c9d1d9;\n --color-prettylights-syntax-markup-deleted-text: #ffdcd7;\n --color-prettylights-syntax-markup-deleted-bg: #67060c;\n --color-prettylights-syntax-markup-inserted-text: #aff5b4;\n --color-prettylights-syntax-markup-inserted-bg: #033a16;\n --color-prettylights-syntax-markup-changed-text: #ffdfb6;\n --color-prettylights-syntax-markup-changed-bg: #5a1e02;\n --color-prettylights-syntax-markup-ignored-text: #c9d1d9;\n --color-prettylights-syntax-markup-ignored-bg: #1158c7;\n --color-prettylights-syntax-meta-diff-range: #d2a8ff;\n --color-prettylights-syntax-brackethighlighter-angle: #8b949e;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;\n --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;\n --color-fg-default: #c9d1d9;\n --color-fg-muted: #8b949e;\n --color-fg-subtle: #484f58;\n --color-canvas-default: #0d1117;\n --color-canvas-subtle: #161b22;\n --color-border-default: #30363d;\n --color-border-muted: #21262d;\n --color-neutral-muted: rgba(110, 118, 129, 0.4);\n --color-accent-fg: #58a6ff;\n --color-accent-emphasis: #1f6feb;\n --color-attention-subtle: rgba(187, 128, 9, 0.15);\n --color-danger-fg: #f85149;\n }\n}\n@media (prefers-color-scheme: light) {\n .wmde-markdown,\n .wmde-markdown-var {\n color-scheme: light;\n --color-prettylights-syntax-comment: #6e7781;\n --color-prettylights-syntax-constant: #0550ae;\n --color-prettylights-syntax-entity: #8250df;\n --color-prettylights-syntax-storage-modifier-import: #24292f;\n --color-prettylights-syntax-entity-tag: #116329;\n --color-prettylights-syntax-keyword: #cf222e;\n --color-prettylights-syntax-string: #0a3069;\n --color-prettylights-syntax-variable: #953800;\n --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;\n --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;\n --color-prettylights-syntax-invalid-illegal-bg: #82071e;\n --color-prettylights-syntax-carriage-return-text: #f6f8fa;\n --color-prettylights-syntax-carriage-return-bg: #cf222e;\n --color-prettylights-syntax-string-regexp: #116329;\n --color-prettylights-syntax-markup-list: #3b2300;\n --color-prettylights-syntax-markup-heading: #0550ae;\n --color-prettylights-syntax-markup-italic: #24292f;\n --color-prettylights-syntax-markup-bold: #24292f;\n --color-prettylights-syntax-markup-deleted-text: #82071e;\n --color-prettylights-syntax-markup-deleted-bg: #ffebe9;\n --color-prettylights-syntax-markup-inserted-text: #116329;\n --color-prettylights-syntax-markup-inserted-bg: #dafbe1;\n --color-prettylights-syntax-markup-changed-text: #953800;\n --color-prettylights-syntax-markup-changed-bg: #ffd8b5;\n --color-prettylights-syntax-markup-ignored-text: #eaeef2;\n --color-prettylights-syntax-markup-ignored-bg: #0550ae;\n --color-prettylights-syntax-meta-diff-range: #8250df;\n --color-prettylights-syntax-brackethighlighter-angle: #57606a;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;\n --color-prettylights-syntax-constant-other-reference-link: #0a3069;\n --color-fg-default: #24292f;\n --color-fg-muted: #57606a;\n --color-fg-subtle: #6e7781;\n --color-canvas-default: #ffffff;\n --color-canvas-subtle: #f6f8fa;\n --color-border-default: #d0d7de;\n --color-border-muted: hsl(210, 18%, 87%);\n --color-neutral-muted: rgba(175, 184, 193, 0.2);\n --color-accent-fg: #0969da;\n --color-accent-emphasis: #0969da;\n --color-attention-subtle: #fff8c5;\n --color-danger-fg: #cf222e;\n }\n}\n[data-color-mode*='dark'] .wmde-markdown,\n[data-color-mode*='dark'] .wmde-markdown-var,\n.wmde-markdown-var[data-color-mode*='dark'],\n.wmde-markdown[data-color-mode*='dark'],\nbody[data-color-mode*='dark'] {\n color-scheme: dark;\n --color-prettylights-syntax-comment: #8b949e;\n --color-prettylights-syntax-constant: #79c0ff;\n --color-prettylights-syntax-entity: #d2a8ff;\n --color-prettylights-syntax-storage-modifier-import: #c9d1d9;\n --color-prettylights-syntax-entity-tag: #7ee787;\n --color-prettylights-syntax-keyword: #ff7b72;\n --color-prettylights-syntax-string: #a5d6ff;\n --color-prettylights-syntax-variable: #ffa657;\n --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;\n --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;\n --color-prettylights-syntax-invalid-illegal-bg: #8e1519;\n --color-prettylights-syntax-carriage-return-text: #f0f6fc;\n --color-prettylights-syntax-carriage-return-bg: #b62324;\n --color-prettylights-syntax-string-regexp: #7ee787;\n --color-prettylights-syntax-markup-list: #f2cc60;\n --color-prettylights-syntax-markup-heading: #1f6feb;\n --color-prettylights-syntax-markup-italic: #c9d1d9;\n --color-prettylights-syntax-markup-bold: #c9d1d9;\n --color-prettylights-syntax-markup-deleted-text: #ffdcd7;\n --color-prettylights-syntax-markup-deleted-bg: #67060c;\n --color-prettylights-syntax-markup-inserted-text: #aff5b4;\n --color-prettylights-syntax-markup-inserted-bg: #033a16;\n --color-prettylights-syntax-markup-changed-text: #ffdfb6;\n --color-prettylights-syntax-markup-changed-bg: #5a1e02;\n --color-prettylights-syntax-markup-ignored-text: #c9d1d9;\n --color-prettylights-syntax-markup-ignored-bg: #1158c7;\n --color-prettylights-syntax-meta-diff-range: #d2a8ff;\n --color-prettylights-syntax-brackethighlighter-angle: #8b949e;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;\n --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;\n --color-fg-default: #c9d1d9;\n --color-fg-muted: #8b949e;\n --color-fg-subtle: #484f58;\n --color-canvas-default: #0d1117;\n --color-canvas-subtle: #161b22;\n --color-border-default: #30363d;\n --color-border-muted: #21262d;\n --color-neutral-muted: rgba(110, 118, 129, 0.4);\n --color-accent-fg: #58a6ff;\n --color-accent-emphasis: #1f6feb;\n --color-attention-subtle: rgba(187, 128, 9, 0.15);\n --color-danger-fg: #f85149;\n}\n[data-color-mode*='light'] .wmde-markdown,\n[data-color-mode*='light'] .wmde-markdown-var,\n.wmde-markdown-var[data-color-mode*='light'],\n.wmde-markdown[data-color-mode*='light'],\nbody[data-color-mode*='light'] {\n color-scheme: light;\n --color-prettylights-syntax-comment: #6e7781;\n --color-prettylights-syntax-constant: #0550ae;\n --color-prettylights-syntax-entity: #8250df;\n --color-prettylights-syntax-storage-modifier-import: #24292f;\n --color-prettylights-syntax-entity-tag: #116329;\n --color-prettylights-syntax-keyword: #cf222e;\n --color-prettylights-syntax-string: #0a3069;\n --color-prettylights-syntax-variable: #953800;\n --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;\n --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;\n --color-prettylights-syntax-invalid-illegal-bg: #82071e;\n --color-prettylights-syntax-carriage-return-text: #f6f8fa;\n --color-prettylights-syntax-carriage-return-bg: #cf222e;\n --color-prettylights-syntax-string-regexp: #116329;\n --color-prettylights-syntax-markup-list: #3b2300;\n --color-prettylights-syntax-markup-heading: #0550ae;\n --color-prettylights-syntax-markup-italic: #24292f;\n --color-prettylights-syntax-markup-bold: #24292f;\n --color-prettylights-syntax-markup-deleted-text: #82071e;\n --color-prettylights-syntax-markup-deleted-bg: #ffebe9;\n --color-prettylights-syntax-markup-inserted-text: #116329;\n --color-prettylights-syntax-markup-inserted-bg: #dafbe1;\n --color-prettylights-syntax-markup-changed-text: #953800;\n --color-prettylights-syntax-markup-changed-bg: #ffd8b5;\n --color-prettylights-syntax-markup-ignored-text: #eaeef2;\n --color-prettylights-syntax-markup-ignored-bg: #0550ae;\n --color-prettylights-syntax-meta-diff-range: #8250df;\n --color-prettylights-syntax-brackethighlighter-angle: #57606a;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;\n --color-prettylights-syntax-constant-other-reference-link: #0a3069;\n --color-fg-default: #24292f;\n --color-fg-muted: #57606a;\n --color-fg-subtle: #6e7781;\n --color-canvas-default: #ffffff;\n --color-canvas-subtle: #f6f8fa;\n --color-border-default: #d0d7de;\n --color-border-muted: hsl(210, 18%, 87%);\n --color-neutral-muted: rgba(175, 184, 193, 0.2);\n --color-accent-fg: #0969da;\n --color-accent-emphasis: #0969da;\n --color-attention-subtle: #fff8c5;\n --color-danger-fg: #cf222e;\n}\n.wmde-markdown {\n -webkit-text-size-adjust: 100%;\n font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\n font-size: 16px;\n line-height: 1.5;\n word-wrap: break-word;\n color: var(--color-fg-default);\n background-color: var(--color-canvas-default);\n}\n.wmde-markdown details,\n.wmde-markdown figcaption,\n.wmde-markdown figure {\n display: block;\n}\n.wmde-markdown summary {\n display: list-item;\n}\n.wmde-markdown [hidden] {\n display: none !important;\n}\n.wmde-markdown a {\n background-color: transparent;\n color: var(--color-accent-fg);\n text-decoration: none;\n}\n.wmde-markdown a:active,\n.wmde-markdown a:hover {\n outline-width: 0;\n}\n.wmde-markdown abbr[title] {\n border-bottom: none;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n.wmde-markdown b,\n.wmde-markdown strong {\n font-weight: 600;\n}\n.wmde-markdown dfn {\n font-style: italic;\n}\n.wmde-markdown h1 {\n margin: 0.67em 0;\n font-weight: 600;\n padding-bottom: 0.3em;\n font-size: 2em;\n border-bottom: 1px solid var(--color-border-muted);\n}\n.wmde-markdown mark {\n background-color: var(--color-attention-subtle);\n color: var(--color-text-primary);\n}\n.wmde-markdown small {\n font-size: 90%;\n}\n.wmde-markdown sub,\n.wmde-markdown sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n.wmde-markdown sub {\n bottom: -0.25em;\n}\n.wmde-markdown sup {\n top: -0.5em;\n}\n.wmde-markdown img {\n display: inline-block;\n border-style: none;\n max-width: 100%;\n box-sizing: content-box;\n background-color: var(--color-canvas-default);\n}\n.wmde-markdown code,\n.wmde-markdown kbd,\n.wmde-markdown pre,\n.wmde-markdown samp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n.wmde-markdown figure {\n margin: 1em 40px;\n}\n.wmde-markdown hr {\n box-sizing: content-box;\n overflow: hidden;\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--color-border-muted);\n height: 0.25em;\n padding: 0;\n margin: 24px 0;\n background-color: var(--color-border-default);\n}\n.wmde-markdown input {\n font: inherit;\n margin: 0;\n overflow: visible;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n.wmde-markdown [type='button'],\n.wmde-markdown [type='reset'],\n.wmde-markdown [type='submit'] {\n -webkit-appearance: button;\n}\n.wmde-markdown [type='button']::-moz-focus-inner,\n.wmde-markdown [type='reset']::-moz-focus-inner,\n.wmde-markdown [type='submit']::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n.wmde-markdown [type='button']:-moz-focusring,\n.wmde-markdown [type='reset']:-moz-focusring,\n.wmde-markdown [type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n.wmde-markdown [type='checkbox'],\n.wmde-markdown [type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n.wmde-markdown [type='number']::-webkit-inner-spin-button,\n.wmde-markdown [type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n.wmde-markdown [type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n.wmde-markdown [type='search']::-webkit-search-cancel-button,\n.wmde-markdown [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n.wmde-markdown ::-webkit-input-placeholder {\n color: inherit;\n opacity: 0.54;\n}\n.wmde-markdown ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n.wmde-markdown a:hover {\n text-decoration: underline;\n}\n.wmde-markdown hr::before {\n display: table;\n content: '';\n}\n.wmde-markdown hr::after {\n display: table;\n clear: both;\n content: '';\n}\n.wmde-markdown table {\n border-spacing: 0;\n border-collapse: collapse;\n display: block;\n width: -webkit-max-content;\n width: max-content;\n max-width: 100%;\n}\n.wmde-markdown td,\n.wmde-markdown th {\n padding: 0;\n}\n.wmde-markdown details summary {\n cursor: pointer;\n}\n.wmde-markdown details:not([open]) > *:not(summary) {\n display: none !important;\n}\n.wmde-markdown kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n line-height: 10px;\n color: var(--color-fg-default);\n vertical-align: middle;\n background-color: var(--color-canvas-subtle);\n border: solid 1px var(--color-neutral-muted);\n border-bottom-color: var(--color-neutral-muted);\n border-radius: 6px;\n box-shadow: inset 0 -1px 0 var(--color-neutral-muted);\n}\n.wmde-markdown h1,\n.wmde-markdown h2,\n.wmde-markdown h3,\n.wmde-markdown h4,\n.wmde-markdown h5,\n.wmde-markdown h6 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n}\n.wmde-markdown td,\n.wmde-markdown th {\n padding: 0;\n}\n.wmde-markdown details summary {\n cursor: pointer;\n}\n.wmde-markdown details:not([open]) > *:not(summary) {\n display: none !important;\n}\n.wmde-markdown kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n line-height: 10px;\n color: var(--color-fg-default);\n vertical-align: middle;\n background-color: var(--color-canvas-subtle);\n border: solid 1px var(--color-neutral-muted);\n border-bottom-color: var(--color-neutral-muted);\n border-radius: 6px;\n box-shadow: inset 0 -1px 0 var(--color-neutral-muted);\n}\n.wmde-markdown h1,\n.wmde-markdown h2,\n.wmde-markdown h3,\n.wmde-markdown h4,\n.wmde-markdown h5,\n.wmde-markdown h6 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n}\n.wmde-markdown h2 {\n font-weight: 600;\n padding-bottom: 0.3em;\n font-size: 1.5em;\n border-bottom: 1px solid var(--color-border-muted);\n}\n.wmde-markdown h3 {\n font-weight: 600;\n font-size: 1.25em;\n}\n.wmde-markdown h4 {\n font-weight: 600;\n font-size: 1em;\n}\n.wmde-markdown h5 {\n font-weight: 600;\n font-size: 0.875em;\n}\n.wmde-markdown h6 {\n font-weight: 600;\n font-size: 0.85em;\n color: var(--color-fg-muted);\n}\n.wmde-markdown p {\n margin-top: 0;\n margin-bottom: 10px;\n}\n.wmde-markdown blockquote {\n margin: 0;\n padding: 0 1em;\n color: var(--color-fg-muted);\n border-left: 0.25em solid var(--color-border-default);\n}\n.wmde-markdown ul,\n.wmde-markdown ol {\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 2em;\n}\n.wmde-markdown ol ol,\n.wmde-markdown ul ol {\n list-style-type: lower-roman;\n}\n.wmde-markdown ul ul ol,\n.wmde-markdown ul ol ol,\n.wmde-markdown ol ul ol,\n.wmde-markdown ol ol ol {\n list-style-type: lower-alpha;\n}\n.wmde-markdown dd {\n margin-left: 0;\n}\n.wmde-markdown tt,\n.wmde-markdown code {\n font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n font-size: 12px;\n}\n.wmde-markdown pre {\n margin-top: 0;\n margin-bottom: 0;\n font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n font-size: 12px;\n word-wrap: normal;\n}\n.wmde-markdown .octicon {\n display: inline-block;\n overflow: visible !important;\n vertical-align: text-bottom;\n fill: currentColor;\n}\n.wmde-markdown ::placeholder {\n color: var(--color-fg-subtle);\n opacity: 1;\n}\n.wmde-markdown input::-webkit-outer-spin-button,\n.wmde-markdown input::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none;\n appearance: none;\n}\n.wmde-markdown [data-catalyst] {\n display: block;\n}\n.wmde-markdown::before {\n display: table;\n content: '';\n}\n.wmde-markdown::after {\n display: table;\n clear: both;\n content: '';\n}\n.wmde-markdown > *:first-child {\n margin-top: 0 !important;\n}\n.wmde-markdown > *:last-child {\n margin-bottom: 0 !important;\n}\n.wmde-markdown a:not([href]) {\n color: inherit;\n text-decoration: none;\n}\n.wmde-markdown .absent {\n color: var(--color-danger-fg);\n}\n.wmde-markdown a.anchor {\n float: left;\n padding-right: 4px;\n margin-left: -20px;\n line-height: 1;\n}\n.wmde-markdown .anchor:focus {\n outline: none;\n}\n.wmde-markdown p,\n.wmde-markdown blockquote,\n.wmde-markdown ul,\n.wmde-markdown ol,\n.wmde-markdown dl,\n.wmde-markdown table,\n.wmde-markdown pre,\n.wmde-markdown details {\n margin-top: 0;\n margin-bottom: 16px;\n}\n.wmde-markdown blockquote > :first-child {\n margin-top: 0;\n}\n.wmde-markdown blockquote > :last-child {\n margin-bottom: 0;\n}\n.wmde-markdown sup > a::before {\n content: '[';\n}\n.wmde-markdown sup > a::after {\n content: ']';\n}\n.wmde-markdown h1 .octicon-link,\n.wmde-markdown h2 .octicon-link,\n.wmde-markdown h3 .octicon-link,\n.wmde-markdown h4 .octicon-link,\n.wmde-markdown h5 .octicon-link,\n.wmde-markdown h6 .octicon-link {\n color: var(--color-fg-default);\n vertical-align: middle;\n visibility: hidden;\n}\n.wmde-markdown h1:hover .anchor,\n.wmde-markdown h2:hover .anchor,\n.wmde-markdown h3:hover .anchor,\n.wmde-markdown h4:hover .anchor,\n.wmde-markdown h5:hover .anchor,\n.wmde-markdown h6:hover .anchor {\n text-decoration: none;\n}\n.wmde-markdown h1:hover .anchor .octicon-link,\n.wmde-markdown h2:hover .anchor .octicon-link,\n.wmde-markdown h3:hover .anchor .octicon-link,\n.wmde-markdown h4:hover .anchor .octicon-link,\n.wmde-markdown h5:hover .anchor .octicon-link,\n.wmde-markdown h6:hover .anchor .octicon-link {\n visibility: visible;\n}\n.wmde-markdown h1 tt,\n.wmde-markdown h1 code,\n.wmde-markdown h2 tt,\n.wmde-markdown h2 code,\n.wmde-markdown h3 tt,\n.wmde-markdown h3 code,\n.wmde-markdown h4 tt,\n.wmde-markdown h4 code,\n.wmde-markdown h5 tt,\n.wmde-markdown h5 code,\n.wmde-markdown h6 tt,\n.wmde-markdown h6 code {\n padding: 0 0.2em;\n font-size: inherit;\n}\n.wmde-markdown ul.no-list,\n.wmde-markdown ol.no-list {\n padding: 0;\n list-style-type: none;\n}\n.wmde-markdown ol[type='1'] {\n list-style-type: decimal;\n}\n.wmde-markdown ol[type='a'] {\n list-style-type: lower-alpha;\n}\n.wmde-markdown ol[type='i'] {\n list-style-type: lower-roman;\n}\n.wmde-markdown div > ol:not([type]) {\n list-style-type: decimal;\n}\n.wmde-markdown ul ul,\n.wmde-markdown ul ol,\n.wmde-markdown ol ol,\n.wmde-markdown ol ul {\n margin-top: 0;\n margin-bottom: 0;\n}\n.wmde-markdown li > p {\n margin-top: 16px;\n}\n.wmde-markdown li + li {\n margin-top: 0.25em;\n}\n.wmde-markdown dl {\n padding: 0;\n}\n.wmde-markdown dl dt {\n padding: 0;\n margin-top: 16px;\n font-size: 1em;\n font-style: italic;\n font-weight: 600;\n}\n.wmde-markdown dl dd {\n padding: 0 16px;\n margin-bottom: 16px;\n}\n.wmde-markdown table th {\n font-weight: 600;\n}\n.wmde-markdown table th,\n.wmde-markdown table td {\n padding: 6px 13px;\n border: 1px solid var(--color-border-default);\n}\n.wmde-markdown table tr {\n background-color: var(--color-canvas-default);\n border-top: 1px solid var(--color-border-muted);\n}\n.wmde-markdown table tr:nth-child(2n) {\n background-color: var(--color-canvas-subtle);\n}\n.wmde-markdown table img {\n background-color: transparent;\n}\n.wmde-markdown img[align='right'] {\n padding-left: 20px;\n}\n.wmde-markdown img[align='left'] {\n padding-right: 20px;\n}\n.wmde-markdown .emoji {\n max-width: none;\n vertical-align: text-top;\n background-color: transparent;\n}\n.wmde-markdown span.frame {\n display: block;\n overflow: hidden;\n}\n.wmde-markdown span.frame > span {\n display: block;\n float: left;\n width: auto;\n padding: 7px;\n margin: 13px 0 0;\n overflow: hidden;\n border: 1px solid var(--color-border-default);\n}\n.wmde-markdown span.frame span img {\n display: block;\n float: left;\n}\n.wmde-markdown span.frame span span {\n display: block;\n padding: 5px 0 0;\n clear: both;\n color: var(--color-fg-default);\n}\n.wmde-markdown span.align-center {\n display: block;\n overflow: hidden;\n clear: both;\n}\n.wmde-markdown span.align-center > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: center;\n}\n.wmde-markdown span.align-center span img {\n margin: 0 auto;\n text-align: center;\n}\n.wmde-markdown span.align-right {\n display: block;\n overflow: hidden;\n clear: both;\n}\n.wmde-markdown span.align-right > span {\n display: block;\n margin: 13px 0 0;\n overflow: hidden;\n text-align: right;\n}\n.wmde-markdown span.align-right span img {\n margin: 0;\n text-align: right;\n}\n.wmde-markdown span.float-left {\n display: block;\n float: left;\n margin-right: 13px;\n overflow: hidden;\n}\n.wmde-markdown span.float-left span {\n margin: 13px 0 0;\n}\n.wmde-markdown span.float-right {\n display: block;\n float: right;\n margin-left: 13px;\n overflow: hidden;\n}\n.wmde-markdown span.float-right > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: right;\n}\n.wmde-markdown code,\n.wmde-markdown tt {\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(--color-neutral-muted);\n border-radius: 6px;\n}\n.wmde-markdown code br,\n.wmde-markdown tt br {\n display: none;\n}\n.wmde-markdown del code {\n text-decoration: inherit;\n}\n.wmde-markdown pre code {\n font-size: 100%;\n}\n.wmde-markdown pre > code {\n padding: 0;\n margin: 0;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0;\n}\n.wmde-markdown pre {\n font-size: 85%;\n line-height: 1.45;\n background-color: var(--color-canvas-subtle);\n border-radius: 6px;\n}\n.wmde-markdown pre code,\n.wmde-markdown pre tt {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0;\n}\n.wmde-markdown pre > code {\n padding: 16px;\n overflow: auto;\n display: block;\n}\n.wmde-markdown .csv-data td,\n.wmde-markdown .csv-data th {\n padding: 5px;\n overflow: hidden;\n font-size: 12px;\n line-height: 1;\n text-align: left;\n white-space: nowrap;\n}\n.wmde-markdown .csv-data .blob-num {\n padding: 10px 8px 9px;\n text-align: right;\n background: var(--color-canvas-default);\n border: 0;\n}\n.wmde-markdown .csv-data tr {\n border-top: 0;\n}\n.wmde-markdown .csv-data th {\n font-weight: 600;\n background: var(--color-canvas-subtle);\n border-top: 0;\n}\n.wmde-markdown .footnotes {\n font-size: 12px;\n color: var(--color-fg-muted);\n border-top: 1px solid var(--color-border-default);\n}\n.wmde-markdown .footnotes ol {\n padding-left: 16px;\n}\n.wmde-markdown .footnotes li {\n position: relative;\n}\n.wmde-markdown .footnotes li:target::before {\n position: absolute;\n top: -8px;\n right: -8px;\n bottom: -8px;\n left: -24px;\n pointer-events: none;\n content: '';\n border: 2px solid var(--color-accent-emphasis);\n border-radius: 6px;\n}\n.wmde-markdown .footnotes li:target {\n color: var(--color-fg-default);\n}\n.wmde-markdown .footnotes .data-footnote-backref g-emoji {\n font-family: monospace;\n}\n.wmde-markdown .task-list-item {\n list-style-type: none;\n}\n.wmde-markdown .task-list-item label {\n font-weight: 400;\n}\n.wmde-markdown .task-list-item.enabled label {\n cursor: pointer;\n}\n.wmde-markdown .task-list-item + .wmde-markdown .task-list-item {\n margin-top: 3px;\n}\n.wmde-markdown .task-list-item .handle {\n display: none;\n}\n.wmde-markdown .task-list-item-checkbox,\n.wmde-markdown .contains-task-list input[type='checkbox'] {\n margin: 0 0.2em 0.25em -1.6em;\n vertical-align: middle;\n}\n.wmde-markdown .contains-task-list:dir(rtl) .task-list-item-checkbox,\n.wmde-markdown .contains-task-list:dir(rtl) input[type='checkbox'] {\n margin: 0 -1.6em 0.25em 0.2em;\n}\n.wmde-markdown ::-webkit-calendar-picker-indicator {\n filter: invert(50%);\n}\n.wmde-markdown pre {\n position: relative;\n}\n.wmde-markdown pre .copied {\n visibility: hidden;\n display: flex;\n position: absolute;\n cursor: pointer;\n color: var(--color-fg-defaul);\n top: 6px;\n right: 6px;\n border-radius: 5px;\n background: var(--color-border-default);\n padding: 6px;\n font-size: 12px;\n transition: all 0.3s;\n}\n.wmde-markdown pre .copied .octicon-copy {\n display: block;\n}\n.wmde-markdown pre .copied .octicon-check {\n display: none;\n}\n.wmde-markdown pre:hover .copied {\n visibility: visible;\n}\n.wmde-markdown pre:hover .copied:hover {\n background: var(--color-prettylights-syntax-entity-tag);\n color: var(--color-canvas-default);\n}\n.wmde-markdown pre:hover .copied:active,\n.wmde-markdown pre .copied.active {\n background: #2e9b33;\n color: var(--color-canvas-default);\n}\n.wmde-markdown pre .active .octicon-copy {\n display: none;\n}\n.wmde-markdown pre .active .octicon-check {\n display: block;\n}\n.highlight-line {\n background-color: var(--color-neutral-muted);\n}\n.code-line.line-number::before {\n display: inline-block;\n width: 1rem;\n text-align: right;\n margin-right: 16px;\n color: var(--color-fg-subtle);\n content: attr(line);\n white-space: nowrap;\n}\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n color: var(--color-prettylights-syntax-comment);\n}\n.token.namespace {\n opacity: 0.7;\n}\n.token.property,\n.token.tag,\n.token.selector,\n.token.constant,\n.token.symbol,\n.token.deleted {\n color: var(--color-prettylights-syntax-entity-tag);\n}\n.token.maybe-class-name {\n color: var(--color-prettylights-syntax-variable);\n}\n.token.property-access,\n.token.operator,\n.token.boolean,\n.token.number,\n.token.selector .token.class,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin {\n color: var(--color-prettylights-syntax-constant);\n}\n.token.deleted {\n color: var(--color-prettylights-syntax-markup-deleted-text);\n}\n.code-line .token.deleted {\n background-color: var(--color-prettylights-syntax-markup-deleted-bg);\n}\n.token.inserted {\n color: var(--color-prettylights-syntax-markup-inserted-text);\n}\n.code-line .token.inserted {\n background-color: var(--color-prettylights-syntax-markup-inserted-bg);\n}\n.token.variable {\n color: var(--color-prettylights-syntax-constant);\n}\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n color: var(--color-prettylights-syntax-string);\n}\n.token.color,\n.token.atrule,\n.token.attr-value,\n.token.function,\n.token.class-name {\n color: var(--color-prettylights-syntax-string);\n}\n.token.rule,\n.token.regex,\n.token.important,\n.token.keyword {\n color: var(--color-prettylights-syntax-keyword);\n}\n.token.coord {\n color: var(--color-prettylights-syntax-meta-diff-range);\n}\n.token.important,\n.token.bold {\n font-weight: bold;\n}\n.token.italic {\n font-style: italic;\n}\n.token.entity {\n cursor: help;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/css/682.4e43dbd8.chunk.css","mappings":"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xB,eAAgB,CAFhB,QAGF,CACA,+BACE,aACF,CAKA,2CAFE,UAAW,CADX,aAOF,CAJA,qBAEE,UAEF,CACA,4BACE,sBACF,CACA,2BACE,yBACF,CACA,6BACE,aAAc,CACd,oBACF,CACA,uBACE,4BACF,CACA,wBACE,UAAW,CAGX,aAAc,CADd,iBAAkB,CADlB,iBAGF,CACA,6BACE,YACF,CACA,gKASE,kBAAmB,CADnB,YAEF,CACA,uCACE,YACF,CACA,sCACE,eACF,CACA,4BACE,WACF,CACA,2BACE,WACF,CACA,gMAME,6BAA8B,CAC9B,qBAAsB,CACtB,iBACF,CACA,gMAME,oBACF,CACA,oRAME,kBACF,CACA,wQAaE,iBAAkB,CADlB,cAEF,CACA,oDAGE,oBAAqB,CADrB,SAEF,CACA,4BACE,uBACF,CACA,0BACE,2BACF,CACA,0BACE,2BACF,CACA,kCACE,uBACF,CACA,oFAKE,eAAgB,CADhB,YAEF,CACA,oBACE,eACF,CACA,qBACE,gBACF,CACA,kBACE,SACF,CACA,qBAGE,aAAc,CACd,iBAAkB,CAClB,eAAgB,CAHhB,eAAgB,CADhB,SAKF,CACA,qBAEE,kBAAmB,CADnB,cAEF,CACA,wBACE,eACF,CACA,gDAGE,4CAA6C,CAD7C,gBAEF,CACA,wBACE,4CAA6C,CAC7C,8CACF,CACA,sCACE,2CACF,CACA,yBACE,4BACF,CACA,gCACE,iBACF,CACA,+BACE,kBACF,CACA,sBAGE,4BAA6B,CAF7B,cAAe,CACf,uBAEF,CACA,0BACE,aAAc,CACd,eACF,CACA,+BAOE,4CAA6C,CAN7C,aAAc,CACd,UAAW,CAGX,eAAgB,CAChB,eAAgB,CAFhB,WAAY,CADZ,UAKF,CACA,mCACE,aAAc,CACd,UACF,CACA,oCAGE,UAAW,CACX,6BAA8B,CAH9B,aAAc,CACd,eAGF,CACA,iCAGE,UAAW,CAFX,aAAc,CACd,eAEF,CACA,sCACE,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,iBACF,CACA,0CACE,aAAc,CACd,iBACF,CACA,gCAGE,UAAW,CAFX,aAAc,CACd,eAEF,CACA,qCACE,aAAc,CACd,eAAgB,CAChB,eAAgB,CAChB,gBACF,CACA,yCACE,QAAS,CACT,gBACF,CACA,+BACE,aAAc,CACd,UAAW,CACX,iBAAkB,CAClB,eACF,CACA,oCACE,eACF,CACA,gCACE,aAAc,CACd,WAAY,CACZ,gBAAiB,CACjB,eACF,CACA,qCACE,aAAc,CACd,kBAAmB,CACnB,eAAgB,CAChB,gBACF,CACA,sCAKE,2CAA4C,CAC5C,iBAAkB,CAFlB,aAAc,CADd,QAAS,CADT,iBAKF,CACA,4CAEE,YACF,CACA,wBACE,uBACF,CACA,wBACE,cACF,CACA,wBAKE,sBAAuB,CACvB,QAAS,CAJT,QAAS,CADT,SAAU,CAGV,eAAgB,CADhB,iBAIF,CACA,mBAGE,2CAA4C,CAC5C,iBAAkB,CAHlB,aAAc,CACd,gBAGF,CACA,8CAQE,gBAAiB,CACjB,4BAA6B,CAC7B,QAAS,CART,cAAe,CAKf,mBAAoB,CAFpB,QAAS,CAFT,cAAe,CAGf,gBAAiB,CAFjB,SAOF,CACA,wBAGE,aAAc,CADd,aAAc,CADd,YAGF,CACA,wDAIE,cAAe,CACf,aAAc,CAFd,eAAgB,CADhB,WAAY,CAIZ,eAAgB,CAChB,kBACF,CACA,mCAGE,sCAAuC,CACvC,QAAS,CAHT,oBAAqB,CACrB,gBAGF,CACA,4BACE,YACF,CACA,4BAEE,qCAAsC,CACtC,YAAa,CAFb,eAGF,CACA,0BAGE,gDAAiD,CADjD,2BAA4B,CAD5B,cAGF,CACA,6BACE,iBACF,CACA,6BACE,iBACF,CACA,2CAQE,6CAA8C,CAC9C,iBAAkB,CALlB,WAAY,CAGZ,UAAW,CAFX,UAAW,CACX,mBAAoB,CALpB,iBAAkB,CAElB,UAAW,CADX,QAQF,CACA,oCACE,6BACF,CACA,yDACE,qBACF,CACA,+BACE,oBACF,CACA,qCACE,eACF,CACA,6CACE,cACF,CACA,8DACE,cACF,CACA,uCACE,YACF,CACA,gGAEE,0BAA6B,CAC7B,qBACF,CACA,sIAEE,0BACF,CACA,mDACE,kBACF,CACA,mBACE,iBACF,CACA,2BASE,sCAAuC,CADvC,iBAAkB,CAHlB,4BAA6B,CAD7B,cAAe,CAFf,YAAa,CASb,cAAe,CADf,WAAY,CAPZ,iBAAkB,CAIlB,SAAU,CADV,OAAQ,CAMR,kBAAoB,CAXpB,iBAYF,CACA,yCACE,aACF,CACA,0CACE,YACF,CACA,iCACE,kBACF,CACA,uCACE,sDAAuD,CACvD,iCACF,CACA,0EAEE,kBAAmB,CACnB,iCACF,CACA,yCACE,YACF,CACA,0CACE,aACF,CACA,gBACE,2CACF,CACA,8BAKE,4BAA6B,CAC7B,kBAAmB,CALnB,oBAAqB,CAGrB,iBAAkB,CADlB,gBAAiB,CAIjB,kBAAmB,CALnB,UAMF,CACA,yDAIE,8CACF,CACA,iBACE,UACF,CACA,wFAME,iDACF,CACA,wBACE,+CACF,CACA,2JASE,+CACF,CACA,eACE,0DACF,CACA,0BACE,mEACF,CACA,gBACE,2DACF,CACA,2BACE,oEACF,CACA,gBACE,+CACF,CAOA,yJAKE,6CACF,CACA,yDAIE,8CACF,CACA,aACE,sDACF,CACA,6BAEE,eACF,CACA,cACE,iBACF,CACA,cACE,WACF","sources":["../../node_modules/react-code-preview-layout/esm/styles.css","../../node_modules/@uiw/react-markdown-preview/esm/styles/markdown.css"],"sourcesContent":[".code-preview-layout[data-color-mode*='light'], [data-color-mode*='light'], body[data-color-mode*='light'] {\n --color-canvas-subtle: #f6f8fa;\n --color-border-muted: hsl(210, 18%, 87%);\n}\n.code-preview-layout[data-color-mode*='dark'], [data-color-mode*='dark'], body[data-color-mode*='dark'] {\n --color-canvas-subtle: #161b22;\n --color-border-muted: #21262d;\n}\n\n.w-rcpl.w-bordered {\n border: 1px solid var(--color-border-muted);\n}\n.w-rcpl.w-bordered > .w-rcpl-toolbar {\n border-top: 1px solid var(--color-border-muted);\n}\n.w-rcpl.w-bordered > .w-rcpl-code:not(.w-hidden) {\n border-top: 1px dashed var(--color-border-muted);\n}\n\n.w-rcpl {\n border-radius: 5px;\n background-color: var(--color-canvas-subtle);\n}\n.w-rcpl-preview:not(:last-child) {\n border-radius: 5px 5px 0 0;\n}\n.w-rcpl-code.w-hidden {\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.w-rcpl-code {\n transition: height cubic-bezier(0.360, 0.000, 0.660, -0.560);;\n height: auto;\n overflow: auto;\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n.w-rcpl-code > * {\n padding: 0 !important;\n margin: 0 !important;\n}\n.w-disable-checkered > .w-rcpl-preview {\n background-image: none;\n}\n.w-rcpl-preview {\n background: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpattern id='a' width='16' height='16' patternUnits='userSpaceOnUse'%3E%3Cpath fill='rgba(0, 0, 0, 0.06)' d='M0 0h8v8H0zm8 8h8v8H8z'/%3E%3C/pattern%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3C/svg%3E\")\n}\n.w-rcpl-preview, .w-rcpl-code {\n padding: 15px;\n}\n.w-rcpl-extra, .w-rcpl-title {\n display: flex;\n align-items: center;\n}\n.w-rcpl-toolbar button svg {\n opacity: 0.37;\n display: block;\n height: 18px;\n transition: opacity 0.3s;\n}\n.w-rcpl-toolbar button svg:hover {\n opacity: 1;\n}\n.w-rcpl-toolbar button {\n color: currentColor;\n position: relative;\n background-color: transparent;\n display: inline-block;\n height: inherit;\n padding: 3px 4px;\n border: 0;\n box-sizing: border-box;\n cursor: pointer;\n outline: none;\n transition: opacity .2s, background .2s;\n}\n.w-rcpl-toolbar {\n display: flex;\n justify-content: space-between;\n padding: 5px 5px;\n padding-left: 8px;\n}","@media (prefers-color-scheme: dark) {\n .wmde-markdown,\n .wmde-markdown-var {\n color-scheme: dark;\n --color-prettylights-syntax-comment: #8b949e;\n --color-prettylights-syntax-constant: #79c0ff;\n --color-prettylights-syntax-entity: #d2a8ff;\n --color-prettylights-syntax-storage-modifier-import: #c9d1d9;\n --color-prettylights-syntax-entity-tag: #7ee787;\n --color-prettylights-syntax-keyword: #ff7b72;\n --color-prettylights-syntax-string: #a5d6ff;\n --color-prettylights-syntax-variable: #ffa657;\n --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;\n --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;\n --color-prettylights-syntax-invalid-illegal-bg: #8e1519;\n --color-prettylights-syntax-carriage-return-text: #f0f6fc;\n --color-prettylights-syntax-carriage-return-bg: #b62324;\n --color-prettylights-syntax-string-regexp: #7ee787;\n --color-prettylights-syntax-markup-list: #f2cc60;\n --color-prettylights-syntax-markup-heading: #1f6feb;\n --color-prettylights-syntax-markup-italic: #c9d1d9;\n --color-prettylights-syntax-markup-bold: #c9d1d9;\n --color-prettylights-syntax-markup-deleted-text: #ffdcd7;\n --color-prettylights-syntax-markup-deleted-bg: #67060c;\n --color-prettylights-syntax-markup-inserted-text: #aff5b4;\n --color-prettylights-syntax-markup-inserted-bg: #033a16;\n --color-prettylights-syntax-markup-changed-text: #ffdfb6;\n --color-prettylights-syntax-markup-changed-bg: #5a1e02;\n --color-prettylights-syntax-markup-ignored-text: #c9d1d9;\n --color-prettylights-syntax-markup-ignored-bg: #1158c7;\n --color-prettylights-syntax-meta-diff-range: #d2a8ff;\n --color-prettylights-syntax-brackethighlighter-angle: #8b949e;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;\n --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;\n --color-fg-default: #c9d1d9;\n --color-fg-muted: #8b949e;\n --color-fg-subtle: #484f58;\n --color-canvas-default: #0d1117;\n --color-canvas-subtle: #161b22;\n --color-border-default: #30363d;\n --color-border-muted: #21262d;\n --color-neutral-muted: rgba(110, 118, 129, 0.4);\n --color-accent-fg: #58a6ff;\n --color-accent-emphasis: #1f6feb;\n --color-attention-subtle: rgba(187, 128, 9, 0.15);\n --color-danger-fg: #f85149;\n }\n}\n@media (prefers-color-scheme: light) {\n .wmde-markdown,\n .wmde-markdown-var {\n color-scheme: light;\n --color-prettylights-syntax-comment: #6e7781;\n --color-prettylights-syntax-constant: #0550ae;\n --color-prettylights-syntax-entity: #8250df;\n --color-prettylights-syntax-storage-modifier-import: #24292f;\n --color-prettylights-syntax-entity-tag: #116329;\n --color-prettylights-syntax-keyword: #cf222e;\n --color-prettylights-syntax-string: #0a3069;\n --color-prettylights-syntax-variable: #953800;\n --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;\n --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;\n --color-prettylights-syntax-invalid-illegal-bg: #82071e;\n --color-prettylights-syntax-carriage-return-text: #f6f8fa;\n --color-prettylights-syntax-carriage-return-bg: #cf222e;\n --color-prettylights-syntax-string-regexp: #116329;\n --color-prettylights-syntax-markup-list: #3b2300;\n --color-prettylights-syntax-markup-heading: #0550ae;\n --color-prettylights-syntax-markup-italic: #24292f;\n --color-prettylights-syntax-markup-bold: #24292f;\n --color-prettylights-syntax-markup-deleted-text: #82071e;\n --color-prettylights-syntax-markup-deleted-bg: #ffebe9;\n --color-prettylights-syntax-markup-inserted-text: #116329;\n --color-prettylights-syntax-markup-inserted-bg: #dafbe1;\n --color-prettylights-syntax-markup-changed-text: #953800;\n --color-prettylights-syntax-markup-changed-bg: #ffd8b5;\n --color-prettylights-syntax-markup-ignored-text: #eaeef2;\n --color-prettylights-syntax-markup-ignored-bg: #0550ae;\n --color-prettylights-syntax-meta-diff-range: #8250df;\n --color-prettylights-syntax-brackethighlighter-angle: #57606a;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;\n --color-prettylights-syntax-constant-other-reference-link: #0a3069;\n --color-fg-default: #24292f;\n --color-fg-muted: #57606a;\n --color-fg-subtle: #6e7781;\n --color-canvas-default: #ffffff;\n --color-canvas-subtle: #f6f8fa;\n --color-border-default: #d0d7de;\n --color-border-muted: hsl(210, 18%, 87%);\n --color-neutral-muted: rgba(175, 184, 193, 0.2);\n --color-accent-fg: #0969da;\n --color-accent-emphasis: #0969da;\n --color-attention-subtle: #fff8c5;\n --color-danger-fg: #cf222e;\n }\n}\n[data-color-mode*='dark'] .wmde-markdown,\n[data-color-mode*='dark'] .wmde-markdown-var,\n.wmde-markdown-var[data-color-mode*='dark'],\n.wmde-markdown[data-color-mode*='dark'],\nbody[data-color-mode*='dark'] {\n color-scheme: dark;\n --color-prettylights-syntax-comment: #8b949e;\n --color-prettylights-syntax-constant: #79c0ff;\n --color-prettylights-syntax-entity: #d2a8ff;\n --color-prettylights-syntax-storage-modifier-import: #c9d1d9;\n --color-prettylights-syntax-entity-tag: #7ee787;\n --color-prettylights-syntax-keyword: #ff7b72;\n --color-prettylights-syntax-string: #a5d6ff;\n --color-prettylights-syntax-variable: #ffa657;\n --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;\n --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;\n --color-prettylights-syntax-invalid-illegal-bg: #8e1519;\n --color-prettylights-syntax-carriage-return-text: #f0f6fc;\n --color-prettylights-syntax-carriage-return-bg: #b62324;\n --color-prettylights-syntax-string-regexp: #7ee787;\n --color-prettylights-syntax-markup-list: #f2cc60;\n --color-prettylights-syntax-markup-heading: #1f6feb;\n --color-prettylights-syntax-markup-italic: #c9d1d9;\n --color-prettylights-syntax-markup-bold: #c9d1d9;\n --color-prettylights-syntax-markup-deleted-text: #ffdcd7;\n --color-prettylights-syntax-markup-deleted-bg: #67060c;\n --color-prettylights-syntax-markup-inserted-text: #aff5b4;\n --color-prettylights-syntax-markup-inserted-bg: #033a16;\n --color-prettylights-syntax-markup-changed-text: #ffdfb6;\n --color-prettylights-syntax-markup-changed-bg: #5a1e02;\n --color-prettylights-syntax-markup-ignored-text: #c9d1d9;\n --color-prettylights-syntax-markup-ignored-bg: #1158c7;\n --color-prettylights-syntax-meta-diff-range: #d2a8ff;\n --color-prettylights-syntax-brackethighlighter-angle: #8b949e;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;\n --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;\n --color-fg-default: #c9d1d9;\n --color-fg-muted: #8b949e;\n --color-fg-subtle: #484f58;\n --color-canvas-default: #0d1117;\n --color-canvas-subtle: #161b22;\n --color-border-default: #30363d;\n --color-border-muted: #21262d;\n --color-neutral-muted: rgba(110, 118, 129, 0.4);\n --color-accent-fg: #58a6ff;\n --color-accent-emphasis: #1f6feb;\n --color-attention-subtle: rgba(187, 128, 9, 0.15);\n --color-danger-fg: #f85149;\n}\n[data-color-mode*='light'] .wmde-markdown,\n[data-color-mode*='light'] .wmde-markdown-var,\n.wmde-markdown-var[data-color-mode*='light'],\n.wmde-markdown[data-color-mode*='light'],\nbody[data-color-mode*='light'] {\n color-scheme: light;\n --color-prettylights-syntax-comment: #6e7781;\n --color-prettylights-syntax-constant: #0550ae;\n --color-prettylights-syntax-entity: #8250df;\n --color-prettylights-syntax-storage-modifier-import: #24292f;\n --color-prettylights-syntax-entity-tag: #116329;\n --color-prettylights-syntax-keyword: #cf222e;\n --color-prettylights-syntax-string: #0a3069;\n --color-prettylights-syntax-variable: #953800;\n --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;\n --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;\n --color-prettylights-syntax-invalid-illegal-bg: #82071e;\n --color-prettylights-syntax-carriage-return-text: #f6f8fa;\n --color-prettylights-syntax-carriage-return-bg: #cf222e;\n --color-prettylights-syntax-string-regexp: #116329;\n --color-prettylights-syntax-markup-list: #3b2300;\n --color-prettylights-syntax-markup-heading: #0550ae;\n --color-prettylights-syntax-markup-italic: #24292f;\n --color-prettylights-syntax-markup-bold: #24292f;\n --color-prettylights-syntax-markup-deleted-text: #82071e;\n --color-prettylights-syntax-markup-deleted-bg: #ffebe9;\n --color-prettylights-syntax-markup-inserted-text: #116329;\n --color-prettylights-syntax-markup-inserted-bg: #dafbe1;\n --color-prettylights-syntax-markup-changed-text: #953800;\n --color-prettylights-syntax-markup-changed-bg: #ffd8b5;\n --color-prettylights-syntax-markup-ignored-text: #eaeef2;\n --color-prettylights-syntax-markup-ignored-bg: #0550ae;\n --color-prettylights-syntax-meta-diff-range: #8250df;\n --color-prettylights-syntax-brackethighlighter-angle: #57606a;\n --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;\n --color-prettylights-syntax-constant-other-reference-link: #0a3069;\n --color-fg-default: #24292f;\n --color-fg-muted: #57606a;\n --color-fg-subtle: #6e7781;\n --color-canvas-default: #ffffff;\n --color-canvas-subtle: #f6f8fa;\n --color-border-default: #d0d7de;\n --color-border-muted: hsl(210, 18%, 87%);\n --color-neutral-muted: rgba(175, 184, 193, 0.2);\n --color-accent-fg: #0969da;\n --color-accent-emphasis: #0969da;\n --color-attention-subtle: #fff8c5;\n --color-danger-fg: #cf222e;\n}\n.wmde-markdown {\n -webkit-text-size-adjust: 100%;\n font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\n font-size: 16px;\n line-height: 1.5;\n word-wrap: break-word;\n color: var(--color-fg-default);\n background-color: var(--color-canvas-default);\n}\n.wmde-markdown details,\n.wmde-markdown figcaption,\n.wmde-markdown figure {\n display: block;\n}\n.wmde-markdown summary {\n display: list-item;\n}\n.wmde-markdown [hidden] {\n display: none !important;\n}\n.wmde-markdown a {\n background-color: transparent;\n color: var(--color-accent-fg);\n text-decoration: none;\n}\n.wmde-markdown a:active,\n.wmde-markdown a:hover {\n outline-width: 0;\n}\n.wmde-markdown abbr[title] {\n border-bottom: none;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n.wmde-markdown b,\n.wmde-markdown strong {\n font-weight: 600;\n}\n.wmde-markdown dfn {\n font-style: italic;\n}\n.wmde-markdown h1 {\n margin: 0.67em 0;\n font-weight: 600;\n padding-bottom: 0.3em;\n font-size: 2em;\n border-bottom: 1px solid var(--color-border-muted);\n}\n.wmde-markdown mark {\n background-color: var(--color-attention-subtle);\n color: var(--color-text-primary);\n}\n.wmde-markdown small {\n font-size: 90%;\n}\n.wmde-markdown sub,\n.wmde-markdown sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n.wmde-markdown sub {\n bottom: -0.25em;\n}\n.wmde-markdown sup {\n top: -0.5em;\n}\n.wmde-markdown img {\n display: inline-block;\n border-style: none;\n max-width: 100%;\n box-sizing: content-box;\n background-color: var(--color-canvas-default);\n}\n.wmde-markdown code,\n.wmde-markdown kbd,\n.wmde-markdown pre,\n.wmde-markdown samp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n.wmde-markdown figure {\n margin: 1em 40px;\n}\n.wmde-markdown hr {\n box-sizing: content-box;\n overflow: hidden;\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--color-border-muted);\n height: 0.25em;\n padding: 0;\n margin: 24px 0;\n background-color: var(--color-border-default);\n}\n.wmde-markdown input {\n font: inherit;\n margin: 0;\n overflow: visible;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n.wmde-markdown [type='button'],\n.wmde-markdown [type='reset'],\n.wmde-markdown [type='submit'] {\n -webkit-appearance: button;\n}\n.wmde-markdown [type='button']::-moz-focus-inner,\n.wmde-markdown [type='reset']::-moz-focus-inner,\n.wmde-markdown [type='submit']::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n.wmde-markdown [type='button']:-moz-focusring,\n.wmde-markdown [type='reset']:-moz-focusring,\n.wmde-markdown [type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n.wmde-markdown [type='checkbox'],\n.wmde-markdown [type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n.wmde-markdown [type='number']::-webkit-inner-spin-button,\n.wmde-markdown [type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n.wmde-markdown [type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n.wmde-markdown [type='search']::-webkit-search-cancel-button,\n.wmde-markdown [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n.wmde-markdown ::-webkit-input-placeholder {\n color: inherit;\n opacity: 0.54;\n}\n.wmde-markdown ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n.wmde-markdown a:hover {\n text-decoration: underline;\n}\n.wmde-markdown hr::before {\n display: table;\n content: '';\n}\n.wmde-markdown hr::after {\n display: table;\n clear: both;\n content: '';\n}\n.wmde-markdown table {\n border-spacing: 0;\n border-collapse: collapse;\n display: block;\n width: -webkit-max-content;\n width: max-content;\n max-width: 100%;\n}\n.wmde-markdown td,\n.wmde-markdown th {\n padding: 0;\n}\n.wmde-markdown details summary {\n cursor: pointer;\n}\n.wmde-markdown details:not([open]) > *:not(summary) {\n display: none !important;\n}\n.wmde-markdown kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n line-height: 10px;\n color: var(--color-fg-default);\n vertical-align: middle;\n background-color: var(--color-canvas-subtle);\n border: solid 1px var(--color-neutral-muted);\n border-bottom-color: var(--color-neutral-muted);\n border-radius: 6px;\n box-shadow: inset 0 -1px 0 var(--color-neutral-muted);\n}\n.wmde-markdown h1,\n.wmde-markdown h2,\n.wmde-markdown h3,\n.wmde-markdown h4,\n.wmde-markdown h5,\n.wmde-markdown h6 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n}\n.wmde-markdown td,\n.wmde-markdown th {\n padding: 0;\n}\n.wmde-markdown details summary {\n cursor: pointer;\n}\n.wmde-markdown details:not([open]) > *:not(summary) {\n display: none !important;\n}\n.wmde-markdown kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n line-height: 10px;\n color: var(--color-fg-default);\n vertical-align: middle;\n background-color: var(--color-canvas-subtle);\n border: solid 1px var(--color-neutral-muted);\n border-bottom-color: var(--color-neutral-muted);\n border-radius: 6px;\n box-shadow: inset 0 -1px 0 var(--color-neutral-muted);\n}\n.wmde-markdown h1,\n.wmde-markdown h2,\n.wmde-markdown h3,\n.wmde-markdown h4,\n.wmde-markdown h5,\n.wmde-markdown h6 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n}\n.wmde-markdown h2 {\n font-weight: 600;\n padding-bottom: 0.3em;\n font-size: 1.5em;\n border-bottom: 1px solid var(--color-border-muted);\n}\n.wmde-markdown h3 {\n font-weight: 600;\n font-size: 1.25em;\n}\n.wmde-markdown h4 {\n font-weight: 600;\n font-size: 1em;\n}\n.wmde-markdown h5 {\n font-weight: 600;\n font-size: 0.875em;\n}\n.wmde-markdown h6 {\n font-weight: 600;\n font-size: 0.85em;\n color: var(--color-fg-muted);\n}\n.wmde-markdown p {\n margin-top: 0;\n margin-bottom: 10px;\n}\n.wmde-markdown blockquote {\n margin: 0;\n padding: 0 1em;\n color: var(--color-fg-muted);\n border-left: 0.25em solid var(--color-border-default);\n}\n.wmde-markdown ul,\n.wmde-markdown ol {\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 2em;\n}\n.wmde-markdown ol ol,\n.wmde-markdown ul ol {\n list-style-type: lower-roman;\n}\n.wmde-markdown ul ul ol,\n.wmde-markdown ul ol ol,\n.wmde-markdown ol ul ol,\n.wmde-markdown ol ol ol {\n list-style-type: lower-alpha;\n}\n.wmde-markdown dd {\n margin-left: 0;\n}\n.wmde-markdown tt,\n.wmde-markdown code {\n font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n font-size: 12px;\n}\n.wmde-markdown pre {\n margin-top: 0;\n margin-bottom: 0;\n font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n font-size: 12px;\n word-wrap: normal;\n}\n.wmde-markdown .octicon {\n display: inline-block;\n overflow: visible !important;\n vertical-align: text-bottom;\n fill: currentColor;\n}\n.wmde-markdown ::placeholder {\n color: var(--color-fg-subtle);\n opacity: 1;\n}\n.wmde-markdown input::-webkit-outer-spin-button,\n.wmde-markdown input::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none;\n appearance: none;\n}\n.wmde-markdown [data-catalyst] {\n display: block;\n}\n.wmde-markdown::before {\n display: table;\n content: '';\n}\n.wmde-markdown::after {\n display: table;\n clear: both;\n content: '';\n}\n.wmde-markdown > *:first-child {\n margin-top: 0 !important;\n}\n.wmde-markdown > *:last-child {\n margin-bottom: 0 !important;\n}\n.wmde-markdown a:not([href]) {\n color: inherit;\n text-decoration: none;\n}\n.wmde-markdown .absent {\n color: var(--color-danger-fg);\n}\n.wmde-markdown a.anchor {\n float: left;\n padding-right: 4px;\n margin-left: -20px;\n line-height: 1;\n}\n.wmde-markdown .anchor:focus {\n outline: none;\n}\n.wmde-markdown p,\n.wmde-markdown blockquote,\n.wmde-markdown ul,\n.wmde-markdown ol,\n.wmde-markdown dl,\n.wmde-markdown table,\n.wmde-markdown pre,\n.wmde-markdown details {\n margin-top: 0;\n margin-bottom: 16px;\n}\n.wmde-markdown blockquote > :first-child {\n margin-top: 0;\n}\n.wmde-markdown blockquote > :last-child {\n margin-bottom: 0;\n}\n.wmde-markdown sup > a::before {\n content: '[';\n}\n.wmde-markdown sup > a::after {\n content: ']';\n}\n.wmde-markdown h1 .octicon-link,\n.wmde-markdown h2 .octicon-link,\n.wmde-markdown h3 .octicon-link,\n.wmde-markdown h4 .octicon-link,\n.wmde-markdown h5 .octicon-link,\n.wmde-markdown h6 .octicon-link {\n color: var(--color-fg-default);\n vertical-align: middle;\n visibility: hidden;\n}\n.wmde-markdown h1:hover .anchor,\n.wmde-markdown h2:hover .anchor,\n.wmde-markdown h3:hover .anchor,\n.wmde-markdown h4:hover .anchor,\n.wmde-markdown h5:hover .anchor,\n.wmde-markdown h6:hover .anchor {\n text-decoration: none;\n}\n.wmde-markdown h1:hover .anchor .octicon-link,\n.wmde-markdown h2:hover .anchor .octicon-link,\n.wmde-markdown h3:hover .anchor .octicon-link,\n.wmde-markdown h4:hover .anchor .octicon-link,\n.wmde-markdown h5:hover .anchor .octicon-link,\n.wmde-markdown h6:hover .anchor .octicon-link {\n visibility: visible;\n}\n.wmde-markdown h1 tt,\n.wmde-markdown h1 code,\n.wmde-markdown h2 tt,\n.wmde-markdown h2 code,\n.wmde-markdown h3 tt,\n.wmde-markdown h3 code,\n.wmde-markdown h4 tt,\n.wmde-markdown h4 code,\n.wmde-markdown h5 tt,\n.wmde-markdown h5 code,\n.wmde-markdown h6 tt,\n.wmde-markdown h6 code {\n padding: 0 0.2em;\n font-size: inherit;\n}\n.wmde-markdown ul.no-list,\n.wmde-markdown ol.no-list {\n padding: 0;\n list-style-type: none;\n}\n.wmde-markdown ol[type='1'] {\n list-style-type: decimal;\n}\n.wmde-markdown ol[type='a'] {\n list-style-type: lower-alpha;\n}\n.wmde-markdown ol[type='i'] {\n list-style-type: lower-roman;\n}\n.wmde-markdown div > ol:not([type]) {\n list-style-type: decimal;\n}\n.wmde-markdown ul ul,\n.wmde-markdown ul ol,\n.wmde-markdown ol ol,\n.wmde-markdown ol ul {\n margin-top: 0;\n margin-bottom: 0;\n}\n.wmde-markdown li > p {\n margin-top: 16px;\n}\n.wmde-markdown li + li {\n margin-top: 0.25em;\n}\n.wmde-markdown dl {\n padding: 0;\n}\n.wmde-markdown dl dt {\n padding: 0;\n margin-top: 16px;\n font-size: 1em;\n font-style: italic;\n font-weight: 600;\n}\n.wmde-markdown dl dd {\n padding: 0 16px;\n margin-bottom: 16px;\n}\n.wmde-markdown table th {\n font-weight: 600;\n}\n.wmde-markdown table th,\n.wmde-markdown table td {\n padding: 6px 13px;\n border: 1px solid var(--color-border-default);\n}\n.wmde-markdown table tr {\n background-color: var(--color-canvas-default);\n border-top: 1px solid var(--color-border-muted);\n}\n.wmde-markdown table tr:nth-child(2n) {\n background-color: var(--color-canvas-subtle);\n}\n.wmde-markdown table img {\n background-color: transparent;\n}\n.wmde-markdown img[align='right'] {\n padding-left: 20px;\n}\n.wmde-markdown img[align='left'] {\n padding-right: 20px;\n}\n.wmde-markdown .emoji {\n max-width: none;\n vertical-align: text-top;\n background-color: transparent;\n}\n.wmde-markdown span.frame {\n display: block;\n overflow: hidden;\n}\n.wmde-markdown span.frame > span {\n display: block;\n float: left;\n width: auto;\n padding: 7px;\n margin: 13px 0 0;\n overflow: hidden;\n border: 1px solid var(--color-border-default);\n}\n.wmde-markdown span.frame span img {\n display: block;\n float: left;\n}\n.wmde-markdown span.frame span span {\n display: block;\n padding: 5px 0 0;\n clear: both;\n color: var(--color-fg-default);\n}\n.wmde-markdown span.align-center {\n display: block;\n overflow: hidden;\n clear: both;\n}\n.wmde-markdown span.align-center > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: center;\n}\n.wmde-markdown span.align-center span img {\n margin: 0 auto;\n text-align: center;\n}\n.wmde-markdown span.align-right {\n display: block;\n overflow: hidden;\n clear: both;\n}\n.wmde-markdown span.align-right > span {\n display: block;\n margin: 13px 0 0;\n overflow: hidden;\n text-align: right;\n}\n.wmde-markdown span.align-right span img {\n margin: 0;\n text-align: right;\n}\n.wmde-markdown span.float-left {\n display: block;\n float: left;\n margin-right: 13px;\n overflow: hidden;\n}\n.wmde-markdown span.float-left span {\n margin: 13px 0 0;\n}\n.wmde-markdown span.float-right {\n display: block;\n float: right;\n margin-left: 13px;\n overflow: hidden;\n}\n.wmde-markdown span.float-right > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: right;\n}\n.wmde-markdown code,\n.wmde-markdown tt {\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(--color-neutral-muted);\n border-radius: 6px;\n}\n.wmde-markdown code br,\n.wmde-markdown tt br {\n display: none;\n}\n.wmde-markdown del code {\n text-decoration: inherit;\n}\n.wmde-markdown pre code {\n font-size: 100%;\n}\n.wmde-markdown pre > code {\n padding: 0;\n margin: 0;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0;\n}\n.wmde-markdown pre {\n font-size: 85%;\n line-height: 1.45;\n background-color: var(--color-canvas-subtle);\n border-radius: 6px;\n}\n.wmde-markdown pre code,\n.wmde-markdown pre tt {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0;\n}\n.wmde-markdown pre > code {\n padding: 16px;\n overflow: auto;\n display: block;\n}\n.wmde-markdown .csv-data td,\n.wmde-markdown .csv-data th {\n padding: 5px;\n overflow: hidden;\n font-size: 12px;\n line-height: 1;\n text-align: left;\n white-space: nowrap;\n}\n.wmde-markdown .csv-data .blob-num {\n padding: 10px 8px 9px;\n text-align: right;\n background: var(--color-canvas-default);\n border: 0;\n}\n.wmde-markdown .csv-data tr {\n border-top: 0;\n}\n.wmde-markdown .csv-data th {\n font-weight: 600;\n background: var(--color-canvas-subtle);\n border-top: 0;\n}\n.wmde-markdown .footnotes {\n font-size: 12px;\n color: var(--color-fg-muted);\n border-top: 1px solid var(--color-border-default);\n}\n.wmde-markdown .footnotes ol {\n padding-left: 16px;\n}\n.wmde-markdown .footnotes li {\n position: relative;\n}\n.wmde-markdown .footnotes li:target::before {\n position: absolute;\n top: -8px;\n right: -8px;\n bottom: -8px;\n left: -24px;\n pointer-events: none;\n content: '';\n border: 2px solid var(--color-accent-emphasis);\n border-radius: 6px;\n}\n.wmde-markdown .footnotes li:target {\n color: var(--color-fg-default);\n}\n.wmde-markdown .footnotes .data-footnote-backref g-emoji {\n font-family: monospace;\n}\n.wmde-markdown .task-list-item {\n list-style-type: none;\n}\n.wmde-markdown .task-list-item label {\n font-weight: 400;\n}\n.wmde-markdown .task-list-item.enabled label {\n cursor: pointer;\n}\n.wmde-markdown .task-list-item + .wmde-markdown .task-list-item {\n margin-top: 3px;\n}\n.wmde-markdown .task-list-item .handle {\n display: none;\n}\n.wmde-markdown .task-list-item-checkbox,\n.wmde-markdown .contains-task-list input[type='checkbox'] {\n margin: 0 0.2em 0.25em -1.6em;\n vertical-align: middle;\n}\n.wmde-markdown .contains-task-list:dir(rtl) .task-list-item-checkbox,\n.wmde-markdown .contains-task-list:dir(rtl) input[type='checkbox'] {\n margin: 0 -1.6em 0.25em 0.2em;\n}\n.wmde-markdown ::-webkit-calendar-picker-indicator {\n filter: invert(50%);\n}\n.wmde-markdown pre {\n position: relative;\n}\n.wmde-markdown pre .copied {\n visibility: hidden;\n display: flex;\n position: absolute;\n cursor: pointer;\n color: var(--color-fg-defaul);\n top: 6px;\n right: 6px;\n border-radius: 5px;\n background: var(--color-border-default);\n padding: 6px;\n font-size: 12px;\n transition: all 0.3s;\n}\n.wmde-markdown pre .copied .octicon-copy {\n display: block;\n}\n.wmde-markdown pre .copied .octicon-check {\n display: none;\n}\n.wmde-markdown pre:hover .copied {\n visibility: visible;\n}\n.wmde-markdown pre:hover .copied:hover {\n background: var(--color-prettylights-syntax-entity-tag);\n color: var(--color-canvas-default);\n}\n.wmde-markdown pre:hover .copied:active,\n.wmde-markdown pre .copied.active {\n background: #2e9b33;\n color: var(--color-canvas-default);\n}\n.wmde-markdown pre .active .octicon-copy {\n display: none;\n}\n.wmde-markdown pre .active .octicon-check {\n display: block;\n}\n.highlight-line {\n background-color: var(--color-neutral-muted);\n}\n.code-line.line-number::before {\n display: inline-block;\n width: 1rem;\n text-align: right;\n margin-right: 16px;\n color: var(--color-fg-subtle);\n content: attr(line);\n white-space: nowrap;\n}\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n color: var(--color-prettylights-syntax-comment);\n}\n.token.namespace {\n opacity: 0.7;\n}\n.token.property,\n.token.tag,\n.token.selector,\n.token.constant,\n.token.symbol,\n.token.deleted {\n color: var(--color-prettylights-syntax-entity-tag);\n}\n.token.maybe-class-name {\n color: var(--color-prettylights-syntax-variable);\n}\n.token.property-access,\n.token.operator,\n.token.boolean,\n.token.number,\n.token.selector .token.class,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin {\n color: var(--color-prettylights-syntax-constant);\n}\n.token.deleted {\n color: var(--color-prettylights-syntax-markup-deleted-text);\n}\n.code-line .token.deleted {\n background-color: var(--color-prettylights-syntax-markup-deleted-bg);\n}\n.token.inserted {\n color: var(--color-prettylights-syntax-markup-inserted-text);\n}\n.code-line .token.inserted {\n background-color: var(--color-prettylights-syntax-markup-inserted-bg);\n}\n.token.variable {\n color: var(--color-prettylights-syntax-constant);\n}\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n color: var(--color-prettylights-syntax-string);\n}\n.token.color,\n.token.atrule,\n.token.attr-value,\n.token.function,\n.token.class-name {\n color: var(--color-prettylights-syntax-string);\n}\n.token.rule,\n.token.regex,\n.token.important,\n.token.keyword {\n color: var(--color-prettylights-syntax-keyword);\n}\n.token.coord {\n color: var(--color-prettylights-syntax-meta-diff-range);\n}\n.token.important,\n.token.bold {\n font-weight: bold;\n}\n.token.italic {\n font-style: italic;\n}\n.token.entity {\n cursor: help;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/113.9ca7997d.chunk.js b/static/js/113.af007b06.chunk.js similarity index 51% rename from static/js/113.9ca7997d.chunk.js rename to static/js/113.af007b06.chunk.js index dd9cdbc0f..3dea02010 100644 --- a/static/js/113.9ca7997d.chunk.js +++ b/static/js/113.af007b06.chunk.js @@ -1,2 +1,2 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[113],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var s,o,i,a,n,l=r(669),d=r(8573),h=r(2806),c=r(9258),p=r(4760);const u=c.ZP.div(s||(s=(0,l.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),x=c.ZP.a(o||(o=(0,l.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),g=c.ZP.div(i||(i=(0,l.Z)(["\n padding-bottom: 120px;\n"]))),b=c.ZP.footer(a||(a=(0,l.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),m=c.ZP.div(n||(n=(0,l.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class f extends d.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:r}=this.state.mdObj||{};return(0,p.jsxs)(g,{className:"wmde-markdown-var",children:[(0,p.jsxs)(u,{children:[this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(m,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(h.Z,{data:{data:r,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(b,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},5782:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Component:()=>d});var s=r(8573),o=r(9003),i=r(2251),a=r(7905),n=r(4760);function l(){const{hsva:t,dispatch:e}=(0,s.useContext)(a._y),[r,i]=(0,s.useState)(!1);return(0,n.jsxs)("div",{style:{width:256},children:[(0,n.jsx)(o.default,{color:t,disableAlpha:r,onChange:r=>{e({hsva:{...t,...r.hsva}})}}),(0,n.jsx)("div",{children:(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{type:"checkbox",checked:r,onChange:t=>i(t.target.checked)}),r?"Hide":"Show"," Alpha"]})})]})}class d extends i.Z{constructor(){super(...arguments),this.displayName="colorful-Page",this.editorUrl="/packages/color-colorful/README.md",this.getMdStr=()=>r.e(18).then(r.bind(r,18)),this.example=(0,n.jsx)(l,{})}}},9003:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>b});var s=r(5773),o=r(808),i=r(8573),a=r(5301),n=r(6493),l=r(7240),d=r(6319),h=r(7864),c=r(4760),p=["style","color"],u=["prefixCls","className","onChange","color","style","disableAlpha"],x=t=>{var{style:e,color:r}=t,i=(0,o.Z)(t,p),a=(0,s.Z)({"--colorful-pointer-background-color":"#fff","--colorful-pointer-border":"2px solid #fff",height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+l.BACKGROUND_IMG+")",backgroundColor:"var(--colorful-pointer-background-color)",border:"var(--colorful-pointer-border)",zIndex:1},e);return(0,c.jsx)("div",(0,s.Z)({},i,{style:a,children:(0,c.jsx)("div",{style:{backgroundColor:r,borderRadius:"50%",height:" 100%",width:"100%"}})}))},g=i.forwardRef(((t,e)=>{var{prefixCls:r="w-color-colorful",className:i,onChange:p,color:g,style:b,disableAlpha:m}=t,f=(0,o.Z)(t,u),j="string"===typeof g&&(0,a.Ff)(g)?(0,n.hexToHsva)(g):g||{},v=t=>p&&p((0,n.color)(t));return(0,c.jsxs)("div",(0,s.Z)({ref:e,style:(0,s.Z)({width:200,position:"relative"},b)},f,{className:r+" "+(i||""),children:[(0,c.jsx)(d.default,{hsva:j,className:r,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:t=>{var{left:e,top:r,color:s}=t;return(0,c.jsx)(x,{style:{left:e,top:r,transform:"translate(-16px, -16px)"},color:(0,n.hsvaToHex)(j)})},onChange:t=>v((0,s.Z)({},j,t))}),(0,c.jsx)(h.default,{hue:j.h,height:24,radius:m?"0 0 8px 8px":0,className:r,onChange:t=>v((0,s.Z)({},j,t)),pointer:t=>{var{left:e}=t;return(0,c.jsx)(x,{style:{left:e},color:"hsl("+(j.h||0)+"deg 100% 50%)"})}}),!m&&(0,c.jsx)(l.default,{hsva:j,height:24,className:r,radius:"0 0 8px 8px",pointer:t=>{var{left:e}=t;return(0,c.jsx)(x,{style:{left:e},color:(0,n.hsvaToRgbaString)(j)})},onChange:t=>v((0,s.Z)({},j,t))})]}))}));g.displayName="Colorful";const b=g}}]); -//# sourceMappingURL=113.9ca7997d.chunk.js.map \ No newline at end of file +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[113],{363:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=363,e.exports=t},2251:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var s,o,i,a,n,l=r(669),d=r(8573),h=r(2730),c=r(9258),p=r(4760);const u=c.ZP.div(s||(s=(0,l.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),x=c.ZP.a(o||(o=(0,l.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),g=c.ZP.div(i||(i=(0,l.Z)(["\n padding-bottom: 120px;\n"]))),b=c.ZP.footer(a||(a=(0,l.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),m=c.ZP.div(n||(n=(0,l.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class f extends d.Component{constructor(e){super(e),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((e=>{this.setState({mdStr:e.default.source,mdObj:e.default})}))}render(){const{source:e,components:t,data:r}=this.state.mdObj||{};return(0,p.jsxs)(g,{className:"wmde-markdown-var",children:[(0,p.jsxs)(u,{children:[this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(m,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(h.Z,{data:{data:r,components:t,source:e},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(b,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},5782:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Component:()=>d});var s=r(8573),o=r(9003),i=r(2251),a=r(7905),n=r(4760);function l(){const{hsva:e,dispatch:t}=(0,s.useContext)(a._y),[r,i]=(0,s.useState)(!1);return(0,n.jsxs)("div",{style:{width:256},children:[(0,n.jsx)(o.default,{color:e,disableAlpha:r,onChange:r=>{t({hsva:{...e,...r.hsva}})}}),(0,n.jsx)("div",{children:(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{type:"checkbox",checked:r,onChange:e=>i(e.target.checked)}),r?"Hide":"Show"," Alpha"]})})]})}class d extends i.Z{constructor(){super(...arguments),this.displayName="colorful-Page",this.editorUrl="/packages/color-colorful/README.md",this.getMdStr=()=>r.e(18).then(r.bind(r,18)),this.example=(0,n.jsx)(l,{})}}},9003:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var s=r(5773),o=r(808),i=r(8573),a=r(6493),n=r(7240),l=r(6319),d=r(7864),h=r(4760),c=["style","color"],p=["prefixCls","className","onChange","color","style","disableAlpha"],u=e=>{var{style:t,color:r}=e,i=(0,o.Z)(e,c),a=(0,s.Z)({"--colorful-pointer-background-color":"#fff","--colorful-pointer-border":"2px solid #fff",height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+n.BACKGROUND_IMG+")",backgroundColor:"var(--colorful-pointer-background-color)",border:"var(--colorful-pointer-border)",zIndex:1},t);return(0,h.jsx)("div",(0,s.Z)({},i,{style:a,children:(0,h.jsx)("div",{style:{backgroundColor:r,borderRadius:"50%",height:" 100%",width:"100%"}})}))},x=i.forwardRef(((e,t)=>{var{prefixCls:r="w-color-colorful",className:i,onChange:c,color:x,style:g,disableAlpha:b}=e,m=(0,o.Z)(e,p),f="string"===typeof x&&(0,a.validHex)(x)?(0,a.hexToHsva)(x):x||{},j=e=>c&&c((0,a.color)(e));return(0,h.jsxs)("div",(0,s.Z)({ref:t,style:(0,s.Z)({width:200,position:"relative"},g)},m,{className:r+" "+(i||""),children:[(0,h.jsx)(l.default,{hsva:f,className:r,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:e=>{var{left:t,top:r,color:s}=e;return(0,h.jsx)(u,{style:{left:t,top:r,transform:"translate(-16px, -16px)"},color:(0,a.hsvaToHex)(f)})},onChange:e=>j((0,s.Z)({},f,e))}),(0,h.jsx)(d.default,{hue:f.h,height:24,radius:b?"0 0 8px 8px":0,className:r,onChange:e=>j((0,s.Z)({},f,e)),pointer:e=>{var{left:t}=e;return(0,h.jsx)(u,{style:{left:t},color:"hsl("+(f.h||0)+"deg 100% 50%)"})}}),!b&&(0,h.jsx)(n.default,{hsva:f,height:24,className:r,radius:"0 0 8px 8px",pointer:e=>{var{left:t}=e;return(0,h.jsx)(u,{style:{left:t},color:(0,a.hsvaToRgbaString)(f)})},onChange:e=>j((0,s.Z)({},f,e))})]}))}));x.displayName="Colorful";const g=x}}]); +//# sourceMappingURL=113.af007b06.chunk.js.map \ No newline at end of file diff --git a/static/js/113.9ca7997d.chunk.js.map b/static/js/113.af007b06.chunk.js.map similarity index 98% rename from static/js/113.9ca7997d.chunk.js.map rename to static/js/113.af007b06.chunk.js.map index 6a95650b6..2dacc0fe2 100644 --- a/static/js/113.9ca7997d.chunk.js.map +++ b/static/js/113.af007b06.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/113.9ca7997d.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/colorful/index.tsx","../../packages/color-colorful/esm/index.js"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext, useState } from 'react';\nimport Colorful from '@uiw/react-color-colorful';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n const [disableAlpha, setDisableAlpha] = useState(false);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n \n
\n
\n );\n}\n\nexport class Component extends Markdown {\n displayName = 'colorful-Page';\n editorUrl = '/packages/color-colorful/README.md';\n getMdStr = () => import('@uiw/react-color-colorful/README.md');\n example = ();\n}\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\", \"color\"],\n _excluded2 = [\"prefixCls\", \"className\", \"onChange\", \"color\", \"style\", \"disableAlpha\"];\nimport React from 'react';\nimport { validHex, color as handleColor, hexToHsva, hsvaToHex, hsvaToRgbaString } from '@uiw/color-convert';\nimport Alpha, { BACKGROUND_IMG } from '@uiw/react-color-alpha';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Pointer = _ref => {\n var {\n style,\n color\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var stylePointer = _extends({\n '--colorful-pointer-background-color': '#fff',\n '--colorful-pointer-border': '2px solid #fff',\n height: 28,\n width: 28,\n position: 'absolute',\n transform: 'translate(-14px, -4px)',\n boxShadow: '0 2px 4px rgb(0 0 0 / 20%)',\n borderRadius: '50%',\n background: \"url(\" + BACKGROUND_IMG + \")\",\n backgroundColor: 'var(--colorful-pointer-background-color)',\n border: 'var(--colorful-pointer-border)',\n zIndex: 1\n }, style);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, props, {\n style: stylePointer,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: color,\n borderRadius: '50%',\n height: ' 100%',\n width: '100%'\n }\n })\n }));\n};\nvar Colorful = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-colorful',\n className,\n onChange,\n color,\n style,\n disableAlpha\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var handleChange = value => onChange && onChange(handleColor(value));\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: _extends({\n width: 200,\n position: 'relative'\n }, style)\n }, other, {\n className: prefixCls + \" \" + (className || ''),\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n className: prefixCls,\n radius: \"8px 8px 0 0\",\n style: {\n width: 'auto',\n height: 150,\n minWidth: 120,\n borderBottom: '12px solid #000'\n },\n pointer: _ref2 => {\n var {\n left,\n top,\n color\n } = _ref2;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left,\n top,\n transform: 'translate(-16px, -16px)'\n },\n color: hsvaToHex(hsva)\n });\n },\n onChange: newColor => handleChange(_extends({}, hsva, newColor))\n }), /*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n height: 24,\n radius: disableAlpha ? '0 0 8px 8px' : 0,\n className: prefixCls,\n onChange: newHue => handleChange(_extends({}, hsva, newHue)),\n pointer: _ref3 => {\n var {\n left\n } = _ref3;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: \"hsl(\" + (hsva.h || 0) + \"deg 100% 50%)\"\n });\n }\n }), !disableAlpha && /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n height: 24,\n className: prefixCls,\n radius: \"0 0 8px 8px\",\n pointer: _ref4 => {\n var {\n left\n } = _ref4;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: hsvaToRgbaString(hsva)\n });\n },\n onChange: newAlpha => handleChange(_extends({}, hsva, newAlpha))\n })]\n }));\n});\nColorful.displayName = 'Colorful';\nexport default Colorful;"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","disableAlpha","setDisableAlpha","useState","width","Colorful","color","onChange","type","checked","evn","arguments","displayName","_excluded","_excluded2","Pointer","_ref","_objectWithoutPropertiesLoose","stylePointer","_extends","height","position","transform","borderRadius","background","BACKGROUND_IMG","backgroundColor","zIndex","React","ref","prefixCls","other","validHex","hexToHsva","handleChange","value","handleColor","Saturation","radius","minWidth","borderBottom","pointer","_ref2","left","top","hsvaToHex","newColor","Hue","hue","h","newHue","_ref3","Alpha","_ref4","hsvaToRgbaString","newAlpha"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/113.af007b06.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/colorful/index.tsx","../../packages/color-colorful/esm/index.js"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext, useState } from 'react';\nimport Colorful from '@uiw/react-color-colorful';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n const [disableAlpha, setDisableAlpha] = useState(false);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n \n
\n
\n );\n}\n\nexport class Component extends Markdown {\n displayName = 'colorful-Page';\n editorUrl = '/packages/color-colorful/README.md';\n getMdStr = () => import('@uiw/react-color-colorful/README.md');\n example = ();\n}\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\", \"color\"],\n _excluded2 = [\"prefixCls\", \"className\", \"onChange\", \"color\", \"style\", \"disableAlpha\"];\nimport React from 'react';\nimport { validHex, color as handleColor, hexToHsva, hsvaToHex, hsvaToRgbaString } from '@uiw/color-convert';\nimport Alpha, { BACKGROUND_IMG } from '@uiw/react-color-alpha';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Pointer = _ref => {\n var {\n style,\n color\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var stylePointer = _extends({\n '--colorful-pointer-background-color': '#fff',\n '--colorful-pointer-border': '2px solid #fff',\n height: 28,\n width: 28,\n position: 'absolute',\n transform: 'translate(-14px, -4px)',\n boxShadow: '0 2px 4px rgb(0 0 0 / 20%)',\n borderRadius: '50%',\n background: \"url(\" + BACKGROUND_IMG + \")\",\n backgroundColor: 'var(--colorful-pointer-background-color)',\n border: 'var(--colorful-pointer-border)',\n zIndex: 1\n }, style);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, props, {\n style: stylePointer,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: color,\n borderRadius: '50%',\n height: ' 100%',\n width: '100%'\n }\n })\n }));\n};\nvar Colorful = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-colorful',\n className,\n onChange,\n color,\n style,\n disableAlpha\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var handleChange = value => onChange && onChange(handleColor(value));\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: _extends({\n width: 200,\n position: 'relative'\n }, style)\n }, other, {\n className: prefixCls + \" \" + (className || ''),\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n className: prefixCls,\n radius: \"8px 8px 0 0\",\n style: {\n width: 'auto',\n height: 150,\n minWidth: 120,\n borderBottom: '12px solid #000'\n },\n pointer: _ref2 => {\n var {\n left,\n top,\n color\n } = _ref2;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left,\n top,\n transform: 'translate(-16px, -16px)'\n },\n color: hsvaToHex(hsva)\n });\n },\n onChange: newColor => handleChange(_extends({}, hsva, newColor))\n }), /*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n height: 24,\n radius: disableAlpha ? '0 0 8px 8px' : 0,\n className: prefixCls,\n onChange: newHue => handleChange(_extends({}, hsva, newHue)),\n pointer: _ref3 => {\n var {\n left\n } = _ref3;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: \"hsl(\" + (hsva.h || 0) + \"deg 100% 50%)\"\n });\n }\n }), !disableAlpha && /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n height: 24,\n className: prefixCls,\n radius: \"0 0 8px 8px\",\n pointer: _ref4 => {\n var {\n left\n } = _ref4;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: hsvaToRgbaString(hsva)\n });\n },\n onChange: newAlpha => handleChange(_extends({}, hsva, newAlpha))\n })]\n }));\n});\nColorful.displayName = 'Colorful';\nexport default Colorful;"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","disableAlpha","setDisableAlpha","useState","width","Colorful","color","onChange","type","checked","evn","arguments","displayName","_excluded","_excluded2","Pointer","_ref","_objectWithoutPropertiesLoose","stylePointer","_extends","height","position","transform","borderRadius","background","BACKGROUND_IMG","backgroundColor","zIndex","React","ref","prefixCls","other","validHex","hexToHsva","handleChange","value","handleColor","Saturation","radius","minWidth","borderBottom","pointer","_ref2","left","top","hsvaToHex","newColor","Hue","hue","h","newHue","_ref3","Alpha","_ref4","hsvaToRgbaString","newAlpha"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/118.c5fd76ec.chunk.js b/static/js/118.668edd6a.chunk.js similarity index 97% rename from static/js/118.c5fd76ec.chunk.js rename to static/js/118.668edd6a.chunk.js index 83c94bfc4..5d0360978 100644 --- a/static/js/118.c5fd76ec.chunk.js +++ b/static/js/118.668edd6a.chunk.js @@ -1,2 +1,2 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[118],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,o,a,d=s(669),h=s(8573),c=s(2806),l=s(9258),p=s(4760);const g=l.ZP.div(r||(r=(0,d.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),u=l.ZP.a(i||(i=(0,d.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),x=l.ZP.div(n||(n=(0,d.Z)(["\n padding-bottom: 120px;\n"]))),m=l.ZP.footer(o||(o=(0,d.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=l.ZP.div(a||(a=(0,d.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends h.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(x,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(c.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},8865:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>c});var r=s(8573),i=s(9887),n=s(6493),o=s(2251),a=s(7905),d=s(4760);function h(){const{hsva:t,dispatch:e}=(0,r.useContext)(a._y);return(0,d.jsx)("div",{style:{width:256},children:(0,d.jsx)(i.default,{colors:["#D0021B","#F5A623","#f8e61b","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"],color:(0,n.hsvaToHex)(t),onChange:t=>{e({hsva:{...t,...t}})}})})}class c extends o.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-swatch/README.md",this.getMdStr=()=>s.e(107).then(s.bind(s,7107)),this.example=(0,d.jsx)(h,{})}}}}]); -//# sourceMappingURL=118.c5fd76ec.chunk.js.map \ No newline at end of file +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[118],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,o,a,d=s(669),h=s(8573),c=s(2730),l=s(9258),p=s(4760);const g=l.ZP.div(r||(r=(0,d.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),u=l.ZP.a(i||(i=(0,d.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),x=l.ZP.div(n||(n=(0,d.Z)(["\n padding-bottom: 120px;\n"]))),m=l.ZP.footer(o||(o=(0,d.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=l.ZP.div(a||(a=(0,d.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends h.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(x,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(c.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},8865:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>c});var r=s(8573),i=s(9887),n=s(6493),o=s(2251),a=s(7905),d=s(4760);function h(){const{hsva:t,dispatch:e}=(0,r.useContext)(a._y);return(0,d.jsx)("div",{style:{width:256},children:(0,d.jsx)(i.default,{colors:["#D0021B","#F5A623","#f8e61b","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"],color:(0,n.hsvaToHex)(t),onChange:t=>{e({hsva:{...t,...t}})}})})}class c extends o.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-swatch/README.md",this.getMdStr=()=>s.e(107).then(s.bind(s,7107)),this.example=(0,d.jsx)(h,{})}}}}]); +//# sourceMappingURL=118.668edd6a.chunk.js.map \ No newline at end of file diff --git a/static/js/118.c5fd76ec.chunk.js.map b/static/js/118.668edd6a.chunk.js.map similarity index 99% rename from static/js/118.c5fd76ec.chunk.js.map rename to static/js/118.668edd6a.chunk.js.map index ae0cc3061..66ffc1102 100644 --- a/static/js/118.c5fd76ec.chunk.js.map +++ b/static/js/118.668edd6a.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/118.c5fd76ec.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/swatch/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport Swatch from '@uiw/react-color-swatch';\nimport { hsvaToHex } from '@uiw/react-color';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...hsva } });\n }}\n />\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-swatch/README.md';\n getMdStr = () => import('@uiw/react-color-swatch/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","width","Swatch","colors","color","hsvaToHex","onChange","arguments"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/118.668edd6a.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/swatch/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport Swatch from '@uiw/react-color-swatch';\nimport { hsvaToHex } from '@uiw/react-color';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...hsva } });\n }}\n />\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-swatch/README.md';\n getMdStr = () => import('@uiw/react-color-swatch/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","width","Swatch","colors","color","hsvaToHex","onChange","arguments"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/281.04f00b63.chunk.js b/static/js/281.04f00b63.chunk.js new file mode 100644 index 000000000..23fb0f4c0 --- /dev/null +++ b/static/js/281.04f00b63.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[281],{1281:(e,o,r)=>{r.r(o),r.d(o,{Component:()=>m});var a=r(8573),t=r(9003),l=r(1507),s=r(945),i=r(2743),n=r(831),c=r(4479),d=r(9211),h=r(1936),x=r(2867),p=r(6493),f=r(2251),u=r(7905),g=r(4760);function v(e){return(0,g.jsx)("div",{...e,style:{fontSize:12,padding:"5px 0",color:"#6b6b6b",...e.style},children:e.children})}const b="index_warpper__Ajp1G";function y(){const{hsva:e,dispatch:o}=(0,a.useContext)(u._y);return(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:b,children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(t.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{marginLeft:60,marginRight:60},children:[(0,g.jsx)(l.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(s.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:''})]})]}),(0,g.jsxs)("div",{className:b,children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(i.default,{colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#607d8b"],style:{width:252},color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{paddingLeft:20},children:[(0,g.jsx)(n.default,{color:e,style:{boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px, rgb(0 0 0 / 15%) 0px 8px 16px"},onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{marginLeft:25},children:[(0,g.jsx)(c.default,{color:e,width:140,height:140,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:''})]})]}),(0,g.jsxs)("div",{className:b,children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(d.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{marginRight:30,marginLeft:30},children:[(0,g.jsx)(h.default,{color:e,style:{boxShadow:"rgb(0 0 0 / 12%) 0px 2px 10px, rgb(0 0 0 / 16%) 0px 2px 5px"},onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:''})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(x.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]})]})]})}class m extends f.Z{constructor(){super(...arguments),this.displayName="HomePage",this.editorUrl="/packages/color/README.md",this.getMdStr=()=>r.e(3).then(r.bind(r,6003)),this.example=(0,g.jsx)(y,{})}}},2867:(e,o,r)=>{r.r(o),r.d(o,{default:()=>p});var a=r(5773),t=r(808),l=r(8573),s=r(6493),i=r(8702),n=r(9887),c=r(4760),d=["prefixCls","className","style","color","colors","onChange"],h=["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],x=l.forwardRef(((e,o)=>{var{prefixCls:r="w-color-block",className:l,style:x,color:p,colors:f=h,onChange:u}=e,g=(0,t.Z)(e,d),v="string"===typeof p&&(0,s.validHex)(p)?(0,s.hexToHsva)(p):p,b=p?(0,s.hsvaToHex)(v):"",y=(e,o)=>{"string"===typeof e&&(0,s.validHex)(e)&&/(3|6)/.test(String(e.replace(/^#/,"").length))&&u&&u((0,s.color)((0,s.hexToHsva)(e)))},m=(0,a.Z)({"--block-background-color":"rgb(255, 255, 255)","--block-box-shadow":"rgb(0 0 0 / 10%) 0 1px",width:170,borderRadius:6,background:"var(--block-background-color)",boxShadow:"var(--block-box-shadow)",position:"relative"},x);return(0,c.jsxs)("div",(0,a.Z)({ref:o,className:[r,l].filter(Boolean).join(" "),style:m},g,{children:[(0,c.jsx)("div",{style:{width:0,height:0,borderStyle:"solid",borderWidth:"0 10px 10px",borderColor:"transparent transparent "+b,position:"absolute",top:-10,left:"50%",marginLeft:-10}}),(0,c.jsx)("div",{title:b,style:{backgroundColor:""+b,color:(0,s.getContrastingColor)(b),height:110,fontSize:18,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center"},children:b.toLocaleUpperCase()}),(0,c.jsx)(n.default,{colors:f,color:b,style:{paddingLeft:10,paddingTop:10},rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:4,height:22,width:22}},onChange:e=>{u&&u((0,s.color)(e))}}),(0,c.jsx)(i.default,{value:b.toLocaleUpperCase(),onChange:(e,o)=>y(o),onBlur:e=>{var o=e.target.value;e.target.value=o.slice(0,6),y(o.slice(0,6))},inputStyle:{height:22,outline:0,borderRadius:3,padding:"0 7px"},style:{padding:10,paddingTop:0,borderRadius:"0 0 6px 6px"}})]}))}));x.displayName="Block";const p=x},2743:(e,o,r)=>{r.r(o),r.d(o,{default:()=>p});var a=r(2769),t=r(5773),l=r(808),s=r(8573),i=r(6493),n=r(9887),c=r(4760);function d(e){var{style:o,title:r,checked:a,color:l,onClick:i,rectProps:n}=e,d=(0,s.useRef)(null),h=(0,s.useCallback)((()=>{d.current.style.transform="scale(1.2)"}),[]),x=(0,s.useCallback)((()=>{d.current.style.transform="scale(1)"}),[]),p=(0,t.Z)({"--circle-point-background-color":"#fff",height:a?"100%":0,width:a?"100%":0,borderRadius:"50%",backgroundColor:"var(--circle-point-background-color)",boxSizing:"border-box",transition:"height 100ms ease 0s, width 100ms ease 0s"},n.style);return(0,c.jsx)("div",{ref:d,onClick:i,onMouseEnter:h,onMouseLeave:x,title:r,style:(0,t.Z)({},o,{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:3,borderRadius:"50%",marginRight:12,marginBottom:12,boxSizing:"border-box",transform:"scale(1)",boxShadow:l+" 0px 0px "+(a?5:0)+"px",transition:"transform 100ms ease 0s, box-shadow 100ms ease 0s"}),children:(0,c.jsx)("div",(0,t.Z)({},n,{style:p}))})}var h=["prefixCls","className","color","colors","rectProps","onChange"],x=s.forwardRef(((e,o)=>{var{prefixCls:r="w-color-circle",className:s,color:x,colors:p=[],rectProps:f={},onChange:u}=e,g=(0,l.Z)(e,h),v="string"===typeof x&&(0,i.validHex)(x)?(0,i.hexToHsva)(x):x||{},b=x?(0,i.hsvaToHex)(v):"";return(0,c.jsx)(n.default,(0,t.Z)({ref:o,colors:p,color:b},g,{className:[r,s].filter(Boolean).join(" "),rectRender:e=>{var o=(0,t.Z)({},((0,a.Z)(e),e));return(0,c.jsx)(d,(0,t.Z)({},o,{rectProps:f}))},onChange:e=>{u&&u((0,i.color)(e))}}))}));x.displayName="Circle";const p=x},9003:(e,o,r)=>{r.r(o),r.d(o,{default:()=>u});var a=r(5773),t=r(808),l=r(8573),s=r(6493),i=r(7240),n=r(6319),c=r(7864),d=r(4760),h=["style","color"],x=["prefixCls","className","onChange","color","style","disableAlpha"],p=e=>{var{style:o,color:r}=e,l=(0,t.Z)(e,h),s=(0,a.Z)({"--colorful-pointer-background-color":"#fff","--colorful-pointer-border":"2px solid #fff",height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+i.BACKGROUND_IMG+")",backgroundColor:"var(--colorful-pointer-background-color)",border:"var(--colorful-pointer-border)",zIndex:1},o);return(0,d.jsx)("div",(0,a.Z)({},l,{style:s,children:(0,d.jsx)("div",{style:{backgroundColor:r,borderRadius:"50%",height:" 100%",width:"100%"}})}))},f=l.forwardRef(((e,o)=>{var{prefixCls:r="w-color-colorful",className:l,onChange:h,color:f,style:u,disableAlpha:g}=e,v=(0,t.Z)(e,x),b="string"===typeof f&&(0,s.validHex)(f)?(0,s.hexToHsva)(f):f||{},y=e=>h&&h((0,s.color)(e));return(0,d.jsxs)("div",(0,a.Z)({ref:o,style:(0,a.Z)({width:200,position:"relative"},u)},v,{className:r+" "+(l||""),children:[(0,d.jsx)(n.default,{hsva:b,className:r,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:e=>{var{left:o,top:r,color:a}=e;return(0,d.jsx)(p,{style:{left:o,top:r,transform:"translate(-16px, -16px)"},color:(0,s.hsvaToHex)(b)})},onChange:e=>y((0,a.Z)({},b,e))}),(0,d.jsx)(c.default,{hue:b.h,height:24,radius:g?"0 0 8px 8px":0,className:r,onChange:e=>y((0,a.Z)({},b,e)),pointer:e=>{var{left:o}=e;return(0,d.jsx)(p,{style:{left:o},color:"hsl("+(b.h||0)+"deg 100% 50%)"})}}),!g&&(0,d.jsx)(i.default,{hsva:b,height:24,className:r,radius:"0 0 8px 8px",pointer:e=>{var{left:o}=e;return(0,d.jsx)(p,{style:{left:o},color:(0,s.hsvaToRgbaString)(b)})},onChange:e=>y((0,a.Z)({},b,e))})]}))}));f.displayName="Colorful";const u=f},831:(e,o,r)=>{r.r(o),r.d(o,{default:()=>u});var a=r(5773),t=r(808),l=r(8573),s=r(6493),i=r(8702),n=r(3789),c=r(9887),d=r(4760),h=["prefixCls","className","style","onChange","color","colors","rectProps","rectRender"],x=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"];function p(e){return e.checked?(0,d.jsx)("div",{style:{height:5,width:5,borderRadius:"50%",backgroundColor:(0,s.getContrastingColor)(e.color)}}):null}var f=l.forwardRef(((e,o)=>{var{prefixCls:r="w-color-compact",className:f,style:u,onChange:g,color:v,colors:b=x,rectProps:y,rectRender:m}=e,C=(0,t.Z)(e,h),j="string"===typeof v&&(0,s.validHex)(v)?(0,s.hexToHsva)(v):v,w=v?(0,s.hsvaToHex)(j).replace(/^#/,""):"",k=(0,l.useCallback)((e=>g&&g((0,s.color)(e))),[]),Z={style:{alignItems:"baseline"},inputStyle:{boxShadow:"none",backgroundColor:"transparent",outline:0}},R=(0,a.Z)({"--compact-background-color":"#f6f6f6",background:"var(--compact-background-color)",borderRadius:3,display:"flex",width:240,flexWrap:"wrap",paddingTop:5,paddingLeft:5},u);return(0,d.jsxs)("div",(0,a.Z)({ref:o,style:R,className:[r,f||""].filter(Boolean).join(" ")},C,{children:[(0,d.jsx)(c.default,{colors:b,color:v?(0,s.hsvaToHex)(j):void 0,rectRender:m,rectProps:(0,a.Z)({children:(0,d.jsx)(p,{})},y,{style:(0,a.Z)({display:"flex",alignItems:"center",justifyContent:"center"},null==y?void 0:y.style)}),onChange:e=>k(e)}),(0,d.jsxs)("div",{style:{display:"flex",margin:"0 4px 3px 0"},children:[(0,d.jsx)(i.default,{onChange:(e,o)=>{var r;"string"===typeof(r=o)&&(0,s.validHex)(r)&&/(3|6)/.test(String(r.length))&&k((0,s.hexToHsva)(r))},labelStyle:{paddingRight:5,marginTop:-1},value:w.toLocaleUpperCase(),label:(0,d.jsx)("div",{style:{width:8,height:8,backgroundColor:"#"+w}}),inputStyle:{outline:"none",boxShadow:"initial",background:"transparent"},style:{flexDirection:"row-reverse",flex:"1 1 0%",minWidth:80}}),(0,d.jsx)(n.default,{hsva:j,placement:"left",onChange:e=>k(e.hsva),aProps:!1,rProps:Z,gProps:Z,bProps:Z})]})]}))}));f.displayName="Compact";const u=f},1936:(e,o,r)=>{r.r(o),r.d(o,{default:()=>p});var a=r(5773),t=r(808),l=r(8573),s=r(6493),i=r(8702),n=r(3789),c=r(4760),d=["prefixCls","className","style","color","onChange"],h={boxShadow:"initial",borderWidth:"0 0 1px 0",borderBottomColor:"var(--material-border-bottom-color)",borderBottomStyle:"solid",height:30,outline:0,fontSize:15,padding:0},x=l.forwardRef(((e,o)=>{var{prefixCls:r="w-color-material",className:l,style:x,color:p,onChange:f}=e,u=(0,t.Z)(e,d),g="string"===typeof p&&(0,s.validHex)(p)?(0,s.hexToHsva)(p):p,v=p?(0,s.hsvaToHex)(g).replace(/^#/,""):"",b=(e,o)=>{"string"===typeof e&&(0,s.validHex)(e)&&/(3|6)/.test(String(e.length))&&f&&f((0,s.color)((0,s.hexToHsva)(e)))},y=(0,a.Z)({"--material-border-bottom-color":"#eee","--material-background-color":"#fff",padding:16,width:98,fontFamily:"Roboto",backgroundColor:"var(--material-background-color)"},x);return(0,c.jsxs)("div",(0,a.Z)({ref:o,className:[r,l||""].filter(Boolean).join(" "),style:y},u,{children:[(0,c.jsx)(i.default,{label:"Hex",value:v.toLocaleUpperCase(),onChange:(e,o)=>b(o),onBlur:e=>{var o=e.target.value;e.target.value=o.slice(0,6),b(o.slice(0,6))},inputStyle:{outline:0,border:0,height:30,fontSize:15,padding:0,boxShadow:"initial",borderWidth:"0 0 2px 0",borderBottomColor:v?"#"+v:"var(--material-border-bottom-color)",borderBottomStyle:"solid",background:"transparent"},style:{flexDirection:"column-reverse",alignItems:"flex-start"}}),(0,c.jsx)(n.default,{hsva:g,placement:"top",style:{marginTop:11},rProps:{style:{alignItems:"flex-start"},inputStyle:(0,a.Z)({},h)},gProps:{style:{alignItems:"flex-start"},inputStyle:(0,a.Z)({},h)},bProps:{style:{alignItems:"flex-start"},inputStyle:(0,a.Z)({},h)},aProps:!1,onChange:e=>{return o=e.hsva,void(f&&f((0,s.color)(o)));var o}})]}))}));x.displayName="Material";const p=x},4479:(e,o,r)=>{r.r(o),r.d(o,{default:()=>b});var a=r(5773),t=r(808),l=r(8573),s=r(6493),i=r(6813),n=r(4760),c=e=>{var{className:o,color:r,left:t,top:l,style:s,prefixCls:i}=e,c=(0,a.Z)({},s,{position:"absolute",top:l,left:t}),d=i+"-pointer "+(o||"");return(0,n.jsx)("div",{className:d,style:c,children:(0,n.jsx)("div",{className:i+"-fill",style:{width:10,height:10,transform:"translate(-5px, -5px)",boxShadow:"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",borderRadius:"50%",backgroundColor:"#fff"},children:(0,n.jsx)("div",{style:{inset:0,borderRadius:"50%",position:"absolute",backgroundColor:r}})})})},d=2*Math.PI,h=(e,o)=>(e%o+o)%o,x=(e,o)=>Math.sqrt(e*e+o*o);function p(e){var{width:o=0}=e,r=o/2;return{width:o,radius:r,cx:r,cy:r}}function f(e){var{width:o=0}=e;return o/2}function u(e,o,r){var a=e.angle||0,t=e.direction;return r&&"clockwise"===t?o=a+o:"clockwise"===t?o=360-a+o:r&&"anticlockwise"===t?o=a+180-o:"anticlockwise"===t&&(o=a-o),h(o,360)}var g=["prefixCls","radius","pointer","className","style","width","height","oval","direction","angle","color","onChange"],v=l.forwardRef(((e,o)=>{var{prefixCls:r="w-color-wheel",radius:l=0,pointer:h,className:v,style:b,width:y=200,height:m=200,oval:C,direction:j="anticlockwise",angle:w=180,color:k,onChange:Z}=e,R=(0,t.Z)(e,g),N="string"===typeof k&&(0,s.validHex)(k)?(0,s.hexToHsva)(k):k||{},H=k?(0,s.hsvaToHex)(N):"",S=function(e,o){var{cx:r,cy:a}=p(e),t=f(e),l=(180+u(e,o.h,!0))*(d/360),s=o.s/100*t,i="clockwise"===e.direction?-1:1;return{x:r+s*Math.cos(l)*i,y:a+s*Math.sin(l)*i}}({width:y},N),B={top:"0",left:"0",color:H},F=(e,o)=>{var r=function(e,o,r){var{cx:a,cy:t}=p(e),l=f(e);o=a-o,r=t-r;var s=u(e,Math.atan2(-r,-o)*(360/d)),i=Math.min(x(o,r),l);return{h:Math.round(s),s:Math.round(100/l*i)}}({width:y},y-e.x,m-e.y),a={h:r.h,s:r.s,v:N.v,a:N.a};Z&&Z((0,s.color)(a))},T={zIndex:1,transform:"translate("+S.x+"px, "+S.y+"px) "+("x"===C||"X"===C?"scaleY(2)":"y"===C||"Y"===C?"scaleX(2)":"")},D=h&&"function"===typeof h?h((0,a.Z)({prefixCls:r,style:T},B)):(0,n.jsx)(c,(0,a.Z)({prefixCls:r,style:T},B));return(0,n.jsxs)(i.default,(0,a.Z)({className:[r,v||""].filter(Boolean).join(" ")},R,{style:(0,a.Z)({position:"relative",width:y,transform:"x"===C||"X"===C?"scaleY(0.5)":"y"===C||"Y"===C?"scaleX(0.5)":"",height:m},b),ref:o,onMove:F,onDown:F,children:[D,(0,n.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"anticlockwise"===j?"conic-gradient(red, yellow, lime, aqua, blue, magenta, red)":"conic-gradient(red, magenta, blue, aqua, lime, yellow, red)",transform:"rotateZ("+(w+90)+"deg)",inset:0}}),(0,n.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"radial-gradient(circle closest-side, #fff, transparent)",inset:0}}),(0,n.jsx)("div",{style:{backgroundColor:"#000",borderRadius:"50%",position:"absolute",inset:0,opacity:"number"===typeof N.v?1-N.v/100:0}})]}))}));v.displayName="Wheel";const b=v}}]); +//# sourceMappingURL=281.04f00b63.chunk.js.map \ No newline at end of file diff --git a/static/js/281.04f00b63.chunk.js.map b/static/js/281.04f00b63.chunk.js.map new file mode 100644 index 000000000..80304241c --- /dev/null +++ b/static/js/281.04f00b63.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/281.04f00b63.chunk.js","mappings":"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","sources":["components/Title.tsx","webpack://website/./src/pages/home/index.module.less?e0b9","pages/home/index.tsx","../../packages/color-block/esm/index.js","../../packages/color-circle/esm/Point.js","../../packages/color-circle/esm/index.js","../../packages/color-colorful/esm/index.js","../../packages/color-compact/esm/index.js","../../packages/color-material/esm/index.js","../../packages/color-wheel/esm/Pointer.js","../../packages/color-wheel/esm/utils.js","../../packages/color-wheel/esm/index.js"],"sourcesContent":["interface TitleProps extends React.HTMLAttributes {}\n\nexport default function Title(props: TitleProps) {\n return (\n
\n {props.children}\n
\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"warpper\":\"index_warpper__Ajp1G\"};","import { useContext } from 'react';\nimport { Colorful, Sketch, Block, Circle, Compact, Wheel, Github, Material, Chrome } from '@uiw/react-color';\nimport { hsvaToHex } from '@uiw/react-color';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\nimport Title from '../../components/Title';\nimport styles from './index.module.less';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Colorful color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Sketch color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Chrome color=\"...\" />`}\n
\n
\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Circle color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Compact color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Wheel color=\"...\" />`}\n
\n
\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Github color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Material color=\"...\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Block color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n
\n );\n}\n\nexport class Component extends Markdown {\n displayName = 'HomePage';\n editorUrl = '/packages/color/README.md';\n getMdStr = () => import('@uiw/react-color/README.md');\n example = ();\n}\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"color\", \"colors\", \"onChange\"];\nimport React from 'react';\nimport { color as handleColor, validHex, hexToHsva, hsvaToHex, getContrastingColor } from '@uiw/color-convert';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport Swatch from '@uiw/react-color-swatch';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar CORLER_HEX = ['#D9E3F0', '#F47373', '#697689', '#37D67A', '#2CCCE4', '#555555', '#dce775', '#ff8a65', '#ba68c8'];\nvar Block = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-block',\n className,\n style,\n color,\n colors = CORLER_HEX,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva) : '';\n var handleChange = hsv => {\n onChange && onChange(handleColor(hsv));\n };\n var handleHex = (value, evn) => {\n if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.replace(/^#/, '').length))) {\n onChange && onChange(handleColor(hexToHsva(value)));\n }\n };\n var stylePointer = _extends({\n '--block-background-color': 'rgb(255, 255, 255)',\n '--block-box-shadow': 'rgb(0 0 0 / 10%) 0 1px',\n width: 170,\n borderRadius: 6,\n background: 'var(--block-background-color)',\n boxShadow: 'var(--block-box-shadow)',\n position: 'relative'\n }, style);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n className: [prefixCls, className].filter(Boolean).join(' '),\n style: stylePointer\n }, other, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n style: {\n width: 0,\n height: 0,\n borderStyle: 'solid',\n borderWidth: '0 10px 10px',\n borderColor: \"transparent transparent \" + hex,\n position: 'absolute',\n top: -10,\n left: '50%',\n marginLeft: -10\n }\n }), /*#__PURE__*/_jsx(\"div\", {\n title: hex,\n style: {\n backgroundColor: \"\" + hex,\n color: getContrastingColor(hex),\n height: 110,\n fontSize: 18,\n borderRadius: '6px 6px 0 0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n children: hex.toLocaleUpperCase()\n }), /*#__PURE__*/_jsx(Swatch, {\n colors: colors,\n color: hex,\n style: {\n paddingLeft: 10,\n paddingTop: 10\n },\n rectProps: {\n style: {\n marginRight: 10,\n marginBottom: 10,\n borderRadius: 4,\n height: 22,\n width: 22\n }\n },\n onChange: handleChange\n }), /*#__PURE__*/_jsx(EditableInput, {\n value: hex.toLocaleUpperCase(),\n onChange: (evn, val) => handleHex(val, evn),\n onBlur: evn => {\n var value = evn.target.value;\n evn.target.value = value.slice(0, 6);\n handleHex(value.slice(0, 6), evn);\n },\n inputStyle: {\n height: 22,\n outline: 0,\n borderRadius: 3,\n padding: '0 7px'\n },\n style: {\n padding: 10,\n paddingTop: 0,\n borderRadius: '0 0 6px 6px'\n }\n })]\n }));\n});\nBlock.displayName = 'Block';\nexport default Block;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { useCallback } from 'react';\nimport { useRef } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Point(_ref) {\n var {\n style,\n title,\n checked,\n color,\n onClick,\n rectProps\n } = _ref;\n var btn = useRef(null);\n var handleMouseEnter = useCallback(() => {\n btn.current.style['transform'] = 'scale(1.2)';\n }, []);\n var handleMouseLeave = useCallback(() => {\n btn.current.style['transform'] = 'scale(1)';\n }, []);\n var styleWrapper = _extends({\n '--circle-point-background-color': '#fff',\n height: checked ? '100%' : 0,\n width: checked ? '100%' : 0,\n borderRadius: '50%',\n backgroundColor: 'var(--circle-point-background-color)',\n boxSizing: 'border-box',\n transition: 'height 100ms ease 0s, width 100ms ease 0s'\n }, rectProps.style);\n return /*#__PURE__*/_jsx(\"div\", {\n ref: btn,\n onClick: onClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n title: title,\n style: _extends({}, style, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 28,\n height: 28,\n padding: 3,\n borderRadius: '50%',\n marginRight: 12,\n marginBottom: 12,\n boxSizing: 'border-box',\n transform: 'scale(1)',\n boxShadow: color + \" 0px 0px \" + (checked ? 5 : 0) + \"px\",\n transition: 'transform 100ms ease 0s, box-shadow 100ms ease 0s'\n }),\n children: /*#__PURE__*/_jsx(\"div\", _extends({}, rectProps, {\n style: styleWrapper\n }))\n });\n}","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"color\", \"colors\", \"rectProps\", \"onChange\"];\nimport React from 'react';\nimport { validHex, hsvaToHex, hexToHsva, color as handleColor } from '@uiw/color-convert';\nimport Swatch from '@uiw/react-color-swatch';\nimport Point from './Point';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Circle = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-circle',\n className,\n color,\n colors = [],\n rectProps = {},\n onChange: _onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var hex = color ? hsvaToHex(hsva) : '';\n return /*#__PURE__*/_jsx(Swatch, _extends({\n ref: ref,\n colors: colors,\n color: hex\n }, other, {\n className: [prefixCls, className].filter(Boolean).join(' '),\n rectRender: _ref => {\n var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/_jsx(Point, _extends({}, props, {\n rectProps: rectProps\n }));\n },\n onChange: hsvColor => {\n _onChange && _onChange(handleColor(hsvColor));\n }\n }));\n});\nCircle.displayName = 'Circle';\nexport default Circle;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\", \"color\"],\n _excluded2 = [\"prefixCls\", \"className\", \"onChange\", \"color\", \"style\", \"disableAlpha\"];\nimport React from 'react';\nimport { validHex, color as handleColor, hexToHsva, hsvaToHex, hsvaToRgbaString } from '@uiw/color-convert';\nimport Alpha, { BACKGROUND_IMG } from '@uiw/react-color-alpha';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Pointer = _ref => {\n var {\n style,\n color\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var stylePointer = _extends({\n '--colorful-pointer-background-color': '#fff',\n '--colorful-pointer-border': '2px solid #fff',\n height: 28,\n width: 28,\n position: 'absolute',\n transform: 'translate(-14px, -4px)',\n boxShadow: '0 2px 4px rgb(0 0 0 / 20%)',\n borderRadius: '50%',\n background: \"url(\" + BACKGROUND_IMG + \")\",\n backgroundColor: 'var(--colorful-pointer-background-color)',\n border: 'var(--colorful-pointer-border)',\n zIndex: 1\n }, style);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, props, {\n style: stylePointer,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: color,\n borderRadius: '50%',\n height: ' 100%',\n width: '100%'\n }\n })\n }));\n};\nvar Colorful = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-colorful',\n className,\n onChange,\n color,\n style,\n disableAlpha\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var handleChange = value => onChange && onChange(handleColor(value));\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: _extends({\n width: 200,\n position: 'relative'\n }, style)\n }, other, {\n className: prefixCls + \" \" + (className || ''),\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n className: prefixCls,\n radius: \"8px 8px 0 0\",\n style: {\n width: 'auto',\n height: 150,\n minWidth: 120,\n borderBottom: '12px solid #000'\n },\n pointer: _ref2 => {\n var {\n left,\n top,\n color\n } = _ref2;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left,\n top,\n transform: 'translate(-16px, -16px)'\n },\n color: hsvaToHex(hsva)\n });\n },\n onChange: newColor => handleChange(_extends({}, hsva, newColor))\n }), /*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n height: 24,\n radius: disableAlpha ? '0 0 8px 8px' : 0,\n className: prefixCls,\n onChange: newHue => handleChange(_extends({}, hsva, newHue)),\n pointer: _ref3 => {\n var {\n left\n } = _ref3;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: \"hsl(\" + (hsva.h || 0) + \"deg 100% 50%)\"\n });\n }\n }), !disableAlpha && /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n height: 24,\n className: prefixCls,\n radius: \"0 0 8px 8px\",\n pointer: _ref4 => {\n var {\n left\n } = _ref4;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: hsvaToRgbaString(hsva)\n });\n },\n onChange: newAlpha => handleChange(_extends({}, hsva, newAlpha))\n })]\n }));\n});\nColorful.displayName = 'Colorful';\nexport default Colorful;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"onChange\", \"color\", \"colors\", \"rectProps\", \"rectRender\"];\nimport React, { useCallback } from 'react';\nimport { color as handleColor, hexToHsva, validHex, hsvaToHex, getContrastingColor } from '@uiw/color-convert';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport RGBA from '@uiw/react-color-editable-input-rgba';\nimport Swatch from '@uiw/react-color-swatch';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar COLORS = ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#cccccc', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'];\nfunction Point(props) {\n if (!props.checked) return null;\n return /*#__PURE__*/_jsx(\"div\", {\n style: {\n height: 5,\n width: 5,\n borderRadius: '50%',\n backgroundColor: getContrastingColor(props.color)\n }\n });\n}\nvar Compact = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-compact',\n className,\n style,\n onChange,\n color,\n colors = COLORS,\n rectProps,\n rectRender\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva).replace(/^#/, '') : '';\n var handleChangeCallback = useCallback(hsv => onChange && onChange(handleColor(hsv)), []);\n var handleHex = (value, evn) => {\n if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.length))) {\n handleChangeCallback(hexToHsva(value));\n }\n };\n var rgbProps = {\n style: {\n alignItems: 'baseline'\n },\n inputStyle: {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n outline: 0\n }\n };\n var wrapperStyle = _extends({\n '--compact-background-color': '#f6f6f6',\n background: 'var(--compact-background-color)',\n borderRadius: 3,\n display: 'flex',\n width: 240,\n flexWrap: 'wrap',\n paddingTop: 5,\n paddingLeft: 5\n }, style);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: wrapperStyle,\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other, {\n children: [/*#__PURE__*/_jsx(Swatch, {\n colors: colors,\n color: color ? hsvaToHex(hsva) : undefined,\n rectRender: rectRender,\n rectProps: _extends({\n children: /*#__PURE__*/_jsx(Point, {})\n }, rectProps, {\n style: _extends({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n }, rectProps == null ? void 0 : rectProps.style)\n }),\n onChange: hsvColor => handleChangeCallback(hsvColor)\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n display: 'flex',\n margin: '0 4px 3px 0'\n },\n children: [/*#__PURE__*/_jsx(EditableInput, {\n onChange: (evn, val) => handleHex(val, evn),\n labelStyle: {\n paddingRight: 5,\n marginTop: -1\n },\n value: hex.toLocaleUpperCase(),\n label: /*#__PURE__*/_jsx(\"div\", {\n style: {\n width: 8,\n height: 8,\n backgroundColor: \"#\" + hex\n }\n }),\n inputStyle: {\n outline: 'none',\n boxShadow: 'initial',\n background: 'transparent'\n },\n style: {\n flexDirection: 'row-reverse',\n flex: '1 1 0%',\n minWidth: 80\n }\n }), /*#__PURE__*/_jsx(RGBA, {\n hsva: hsva,\n placement: \"left\",\n onChange: result => handleChangeCallback(result.hsva),\n aProps: false,\n rProps: rgbProps,\n gProps: rgbProps,\n bProps: rgbProps\n })]\n })]\n }));\n});\nCompact.displayName = 'Compact';\nexport default Compact;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"color\", \"onChange\"];\nimport React from 'react';\nimport { color as handleColor, validHex, hexToHsva, hsvaToHex } from '@uiw/color-convert';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport RGBA from '@uiw/react-color-editable-input-rgba';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar styleRBG = {\n boxShadow: 'initial',\n borderWidth: '0 0 1px 0',\n borderBottomColor: 'var(--material-border-bottom-color)',\n borderBottomStyle: 'solid',\n height: 30,\n outline: 0,\n fontSize: 15,\n padding: 0\n};\nvar Material = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-material',\n className,\n style,\n color,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva).replace(/^#/, '') : '';\n var handleChange = hsv => {\n onChange && onChange(handleColor(hsv));\n };\n var handleHex = (value, evn) => {\n if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.length))) {\n onChange && onChange(handleColor(hexToHsva(value)));\n }\n };\n var styleWrapper = _extends({\n '--material-border-bottom-color': '#eee',\n '--material-background-color': '#fff',\n padding: 16,\n width: 98,\n fontFamily: 'Roboto',\n backgroundColor: 'var(--material-background-color)'\n }, style);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n className: [prefixCls, className || ''].filter(Boolean).join(' '),\n style: styleWrapper\n }, other, {\n children: [/*#__PURE__*/_jsx(EditableInput, {\n label: \"Hex\",\n value: hex.toLocaleUpperCase(),\n onChange: (evn, val) => handleHex(val, evn),\n onBlur: evn => {\n var value = evn.target.value;\n evn.target.value = value.slice(0, 6);\n handleHex(value.slice(0, 6), evn);\n },\n inputStyle: {\n outline: 0,\n border: 0,\n height: 30,\n fontSize: 15,\n padding: 0,\n boxShadow: 'initial',\n borderWidth: '0 0 2px 0',\n borderBottomColor: hex ? \"#\" + hex : 'var(--material-border-bottom-color)',\n borderBottomStyle: 'solid',\n background: 'transparent'\n },\n style: {\n flexDirection: 'column-reverse',\n alignItems: 'flex-start'\n }\n }), /*#__PURE__*/_jsx(RGBA, {\n hsva: hsva,\n placement: \"top\",\n style: {\n marginTop: 11\n },\n rProps: {\n style: {\n alignItems: 'flex-start'\n },\n inputStyle: _extends({}, styleRBG)\n },\n gProps: {\n style: {\n alignItems: 'flex-start'\n },\n inputStyle: _extends({}, styleRBG)\n },\n bProps: {\n style: {\n alignItems: 'flex-start'\n },\n inputStyle: _extends({}, styleRBG)\n },\n aProps: false,\n onChange: result => handleChange(result.hsva)\n })]\n }));\n});\nMaterial.displayName = 'Material';\nexport default Material;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar BOXSHADOW = 'rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px';\nexport var Pointer = _ref => {\n var {\n className,\n color,\n left,\n top,\n style,\n prefixCls\n } = _ref;\n var styleWarp = _extends({}, style, {\n position: 'absolute',\n top,\n left\n });\n var cls = prefixCls + \"-pointer \" + (className || '');\n return /*#__PURE__*/_jsx(\"div\", {\n className: cls,\n style: styleWarp,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: prefixCls + \"-fill\",\n style: {\n width: 10,\n height: 10,\n transform: 'translate(-5px, -5px)',\n boxShadow: BOXSHADOW,\n borderRadius: '50%',\n backgroundColor: '#fff'\n },\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n inset: 0,\n borderRadius: '50%',\n position: 'absolute',\n backgroundColor: color\n }\n })\n })\n });\n};","var TAU = Math.PI * 2;\n\n/**\n * javascript's modulo operator doesn't produce positive numbers with negative input\n * https://www.geeksforgeeks.org/how-to-get-negative-result-using-modulo-operator-in-javascript/\n */\nexport var mod = (a, n) => (a % n + n) % n;\n\n/** distance between points (x, y) and (0, 0) */\nvar dist = (x, y) => Math.sqrt(x * x + y * y);\n\n/**\n * Get the point as the center of the wheel\n */\nexport function getWheelDimensions(_ref) {\n var {\n width = 0\n } = _ref;\n var r = width / 2;\n return {\n width,\n radius: r,\n cx: r,\n cy: r\n };\n}\n\n/**\n * Returns true if point (x, y) lands inside the wheel\n */\nexport function isInputInsideWheel(props, x, y) {\n var {\n cx,\n cy,\n width\n } = getWheelDimensions(props);\n var r = width / 2;\n return dist(cx - x, cy - y) < r;\n}\n\n/**\n * Get the current handle position for a given color\n */\nexport function getWheelHandlePosition(props, hsv) {\n var {\n cx,\n cy\n } = getWheelDimensions(props);\n var handleRange = getHandleRange(props);\n var handleAngle = (180 + translateWheelAngle(props, hsv.h, true)) * (TAU / 360);\n var handleDist = hsv.s / 100 * handleRange;\n var direction = props.direction === 'clockwise' ? -1 : 1;\n return {\n x: cx + handleDist * Math.cos(handleAngle) * direction,\n y: cy + handleDist * Math.sin(handleAngle) * direction\n };\n}\n\n/**\n * Get Range\n */\nexport function getHandleRange(_ref2) {\n var {\n width = 0\n } = _ref2;\n return width / 2;\n}\n\n/**\n * Translate an angle according to wheelAngle and wheelDirection\n */\nexport function translateWheelAngle(props, angle, invert) {\n var wheelAngle = props.angle || 0;\n var direction = props.direction;\n // inverted and clockwisee\n if (invert && direction === 'clockwise') angle = wheelAngle + angle;\n // clockwise (input handling)\n else if (direction === 'clockwise') angle = 360 - wheelAngle + angle;\n // inverted and anticlockwise\n else if (invert && direction === 'anticlockwise') angle = wheelAngle + 180 - angle;\n // anticlockwise (input handling)\n else if (direction === 'anticlockwise') angle = wheelAngle - angle;\n return mod(angle, 360);\n}\n\n/**\n * Get the current wheel value from user input\n * @param props - wheel props\n * @param x - global input x position\n * @param y - global input y position\n */\nexport function getWheelValueFromInput(props, x, y) {\n var {\n cx,\n cy\n } = getWheelDimensions(props);\n var handleRange = getHandleRange(props);\n x = cx - x;\n y = cy - y;\n // Calculate the hue by converting the angle to radians\n var hue = translateWheelAngle(props, Math.atan2(-y, -x) * (360 / TAU));\n // Find the point's distance from the center of the wheel\n // This is used to show the saturation level\n var handleDist = Math.min(dist(x, y), handleRange);\n return {\n h: Math.round(hue),\n s: Math.round(100 / handleRange * handleDist)\n };\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"radius\", \"pointer\", \"className\", \"style\", \"width\", \"height\", \"oval\", \"direction\", \"angle\", \"color\", \"onChange\"];\nimport React from 'react';\nimport { validHex, hexToHsva, hsvaToHex, color as handleColor } from '@uiw/color-convert';\nimport Interactive from '@uiw/react-drag-event-interactive';\nimport { Pointer } from './Pointer';\nimport { getWheelHandlePosition, getWheelValueFromInput } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar HUE_GRADIENT_CLOCKWISE = 'conic-gradient(red, yellow, lime, aqua, blue, magenta, red)';\nvar HUE_GRADIENT_ANTICLOCKWISE = 'conic-gradient(red, magenta, blue, aqua, lime, yellow, red)';\nvar Wheel = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-wheel',\n radius = 0,\n pointer,\n className,\n style,\n width = 200,\n height = 200,\n oval,\n direction = 'anticlockwise',\n angle = 180,\n color,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var hex = color ? hsvaToHex(hsva) : '';\n var positions = getWheelHandlePosition({\n width\n }, hsva);\n var comProps = {\n top: '0',\n left: '0',\n color: hex\n };\n var handleChange = (interaction, event) => {\n var result = getWheelValueFromInput({\n width\n }, width - interaction.x, height - interaction.y);\n var handleHsva = {\n h: result.h,\n s: result.s,\n v: hsva.v,\n a: hsva.a\n };\n onChange && onChange(handleColor(handleHsva));\n };\n var pointerStyle = {\n zIndex: 1,\n transform: \"translate(\" + positions.x + \"px, \" + positions.y + \"px) \" + (oval === 'x' || oval === 'X' ? 'scaleY(2)' : oval === 'y' || oval === 'Y' ? 'scaleX(2)' : '')\n };\n var pointerElement = pointer && typeof pointer === 'function' ? pointer(_extends({\n prefixCls,\n style: pointerStyle\n }, comProps)) : /*#__PURE__*/_jsx(Pointer, _extends({\n prefixCls: prefixCls,\n style: pointerStyle\n }, comProps));\n return /*#__PURE__*/_jsxs(Interactive, _extends({\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other, {\n style: _extends({\n position: 'relative',\n width,\n transform: oval === 'x' || oval === 'X' ? 'scaleY(0.5)' : oval === 'y' || oval === 'Y' ? 'scaleX(0.5)' : '',\n height\n }, style),\n ref: ref,\n onMove: handleChange,\n onDown: handleChange,\n children: [pointerElement, /*#__PURE__*/_jsx(\"div\", {\n style: {\n position: 'absolute',\n borderRadius: '50%',\n background: direction === 'anticlockwise' ? HUE_GRADIENT_CLOCKWISE : HUE_GRADIENT_ANTICLOCKWISE,\n transform: \"rotateZ(\" + (angle + 90) + \"deg)\",\n inset: 0\n }\n }), /*#__PURE__*/_jsx(\"div\", {\n style: {\n position: 'absolute',\n borderRadius: '50%',\n background: 'radial-gradient(circle closest-side, #fff, transparent)',\n inset: 0\n }\n }), /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: '#000',\n borderRadius: '50%',\n position: 'absolute',\n inset: 0,\n opacity: typeof hsva.v === 'number' ? 1 - hsva.v / 100 : 0\n }\n })]\n }));\n});\nWheel.displayName = 'Wheel';\nexport default Wheel;"],"names":["Title","props","_jsx","style","fontSize","padding","color","children","Example","hsva","dispatch","useContext","Context","_jsxs","className","styles","Colorful","onChange","concat","hsvaToHex","marginLeft","marginRight","Sketch","Chrome","Circle","colors","width","paddingLeft","Compact","boxShadow","Wheel","height","Github","Material","Block","Component","Markdown","constructor","arguments","displayName","editorUrl","getMdStr","example","_excluded","CORLER_HEX","React","ref","prefixCls","other","_objectWithoutPropertiesLoose","validHex","hexToHsva","hex","handleHex","value","evn","test","String","replace","length","handleColor","stylePointer","_extends","borderRadius","background","position","filter","Boolean","join","borderStyle","borderWidth","borderColor","top","left","title","backgroundColor","getContrastingColor","display","alignItems","justifyContent","toLocaleUpperCase","Swatch","paddingTop","rectProps","marginBottom","hsv","EditableInput","val","onBlur","target","slice","inputStyle","outline","Point","_ref","checked","onClick","btn","useRef","handleMouseEnter","useCallback","current","handleMouseLeave","styleWrapper","boxSizing","transition","onMouseEnter","onMouseLeave","transform","_onChange","rectRender","_objectDestructuringEmpty","hsvColor","_excluded2","Pointer","BACKGROUND_IMG","border","zIndex","disableAlpha","handleChange","Saturation","radius","minWidth","borderBottom","pointer","_ref2","newColor","Hue","hue","h","newHue","_ref3","Alpha","_ref4","hsvaToRgbaString","newAlpha","COLORS","handleChangeCallback","rgbProps","wrapperStyle","flexWrap","undefined","margin","labelStyle","paddingRight","marginTop","label","flexDirection","flex","RGBA","placement","result","aProps","rProps","gProps","bProps","styleRBG","borderBottomColor","borderBottomStyle","fontFamily","styleWarp","cls","inset","TAU","Math","PI","mod","a","n","dist","x","y","sqrt","getWheelDimensions","r","cx","cy","getHandleRange","translateWheelAngle","angle","invert","wheelAngle","direction","oval","positions","handleRange","handleAngle","handleDist","s","cos","sin","getWheelHandlePosition","comProps","interaction","event","atan2","min","round","getWheelValueFromInput","handleHsva","v","pointerStyle","pointerElement","Interactive","onMove","onDown","opacity"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/281.a23b4cd8.chunk.js b/static/js/281.a23b4cd8.chunk.js deleted file mode 100644 index fe3ff40c6..000000000 --- a/static/js/281.a23b4cd8.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[281],{1281:(e,o,r)=>{r.r(o),r.d(o,{Component:()=>m});var a=r(8573),t=r(9003),s=r(1507),l=r(945),i=r(2743),n=r(831),c=r(4479),d=r(9211),h=r(1936),x=r(2867),p=r(6493),f=r(2251),u=r(7905),g=r(4760);function v(e){return(0,g.jsx)("div",{...e,style:{fontSize:12,padding:"5px 0",color:"#6b6b6b",...e.style},children:e.children})}const b="index_warpper__Ajp1G";function y(){const{hsva:e,dispatch:o}=(0,a.useContext)(u._y);return(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:b,children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(t.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{marginLeft:60,marginRight:60},children:[(0,g.jsx)(s.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(l.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:''})]})]}),(0,g.jsxs)("div",{className:b,children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(i.default,{colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#607d8b"],style:{width:252},color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{paddingLeft:20},children:[(0,g.jsx)(n.default,{color:e,style:{boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px, rgb(0 0 0 / 15%) 0px 8px 16px"},onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{marginLeft:25},children:[(0,g.jsx)(c.default,{color:e,width:140,height:140,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:''})]})]}),(0,g.jsxs)("div",{className:b,children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(d.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]}),(0,g.jsxs)("div",{style:{marginRight:30,marginLeft:30},children:[(0,g.jsx)(h.default,{color:e,style:{boxShadow:"rgb(0 0 0 / 12%) 0px 2px 10px, rgb(0 0 0 / 16%) 0px 2px 5px"},onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:''})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(x.default,{color:e,onChange:r=>{o({hsva:{...e,...r.hsva}})}}),(0,g.jsx)(v,{children:'')})]})]})]})}class m extends f.Z{constructor(){super(...arguments),this.displayName="HomePage",this.editorUrl="/packages/color/README.md",this.getMdStr=()=>r.e(3).then(r.bind(r,6003)),this.example=(0,g.jsx)(y,{})}}},2867:(e,o,r)=>{r.r(o),r.d(o,{default:()=>u});var a=r(5773),t=r(808),s=r(8573),l=r(5301),i=r(6493),n=r(7961),c=r(8702),d=r(9887),h=r(4760),x=["prefixCls","className","style","color","colors","onChange"],p=["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],f=s.forwardRef(((e,o)=>{var{prefixCls:r="w-color-block",className:s,style:f,color:u,colors:g=p,onChange:v}=e,b=(0,t.Z)(e,x),y="string"===typeof u&&(0,l.Ff)(u)?(0,i.hexToHsva)(u):u,m=u?(0,i.hsvaToHex)(y):"",C=(e,o)=>{"string"===typeof e&&(0,l.Ff)(e)&&/(3|6)/.test(String(e.replace(/^#/,"").length))&&v&&v((0,i.color)((0,i.hexToHsva)(e)))},j=(0,a.Z)({"--block-background-color":"rgb(255, 255, 255)","--block-box-shadow":"rgb(0 0 0 / 10%) 0 1px",width:170,borderRadius:6,background:"var(--block-background-color)",boxShadow:"var(--block-box-shadow)",position:"relative"},f);return(0,h.jsxs)("div",(0,a.Z)({ref:o,className:[r,s].filter(Boolean).join(" "),style:j},b,{children:[(0,h.jsx)("div",{style:{width:0,height:0,borderStyle:"solid",borderWidth:"0 10px 10px",borderColor:"transparent transparent "+m,position:"absolute",top:-10,left:"50%",marginLeft:-10}}),(0,h.jsx)("div",{title:m,style:{backgroundColor:""+m,color:(0,n.Q)(m),height:110,fontSize:18,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center"},children:m.toLocaleUpperCase()}),(0,h.jsx)(d.default,{colors:g,color:m,style:{paddingLeft:10,paddingTop:10},rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:4,height:22,width:22}},onChange:e=>{v&&v((0,i.color)(e))}}),(0,h.jsx)(c.default,{value:m.toLocaleUpperCase(),onChange:(e,o)=>C(o),onBlur:e=>{var o=e.target.value;e.target.value=o.slice(0,6),C(o.slice(0,6))},inputStyle:{height:22,outline:0,borderRadius:3,padding:"0 7px"},style:{padding:10,paddingTop:0,borderRadius:"0 0 6px 6px"}})]}))}));f.displayName="Block";const u=f},2743:(e,o,r)=>{r.r(o),r.d(o,{default:()=>f});var a=r(2769),t=r(5773),s=r(808),l=r(8573),i=r(5301),n=r(6493),c=r(9887),d=r(4760);function h(e){var{style:o,title:r,checked:a,color:s,onClick:i,rectProps:n}=e,c=(0,l.useRef)(null),h=(0,l.useCallback)((()=>{c.current.style.transform="scale(1.2)"}),[]),x=(0,l.useCallback)((()=>{c.current.style.transform="scale(1)"}),[]),p=(0,t.Z)({"--circle-point-background-color":"#fff",height:a?"100%":0,width:a?"100%":0,borderRadius:"50%",backgroundColor:"var(--circle-point-background-color)",boxSizing:"border-box",transition:"height 100ms ease 0s, width 100ms ease 0s"},n.style);return(0,d.jsx)("div",{ref:c,onClick:i,onMouseEnter:h,onMouseLeave:x,title:r,style:(0,t.Z)({},o,{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:3,borderRadius:"50%",marginRight:12,marginBottom:12,boxSizing:"border-box",transform:"scale(1)",boxShadow:s+" 0px 0px "+(a?5:0)+"px",transition:"transform 100ms ease 0s, box-shadow 100ms ease 0s"}),children:(0,d.jsx)("div",(0,t.Z)({},n,{style:p}))})}var x=["prefixCls","className","color","colors","rectProps","onChange"],p=l.forwardRef(((e,o)=>{var{prefixCls:r="w-color-circle",className:l,color:p,colors:f=[],rectProps:u={},onChange:g}=e,v=(0,s.Z)(e,x),b="string"===typeof p&&(0,i.Ff)(p)?(0,n.hexToHsva)(p):p||{},y=p?(0,n.hsvaToHex)(b):"";return(0,d.jsx)(c.default,(0,t.Z)({ref:o,colors:f,color:y},v,{className:[r,l].filter(Boolean).join(" "),rectRender:e=>{var o=(0,t.Z)({},((0,a.Z)(e),e));return(0,d.jsx)(h,(0,t.Z)({},o,{rectProps:u}))},onChange:e=>{g&&g((0,n.color)(e))}}))}));p.displayName="Circle";const f=p},9003:(e,o,r)=>{r.r(o),r.d(o,{default:()=>g});var a=r(5773),t=r(808),s=r(8573),l=r(5301),i=r(6493),n=r(7240),c=r(6319),d=r(7864),h=r(4760),x=["style","color"],p=["prefixCls","className","onChange","color","style","disableAlpha"],f=e=>{var{style:o,color:r}=e,s=(0,t.Z)(e,x),l=(0,a.Z)({"--colorful-pointer-background-color":"#fff","--colorful-pointer-border":"2px solid #fff",height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+n.BACKGROUND_IMG+")",backgroundColor:"var(--colorful-pointer-background-color)",border:"var(--colorful-pointer-border)",zIndex:1},o);return(0,h.jsx)("div",(0,a.Z)({},s,{style:l,children:(0,h.jsx)("div",{style:{backgroundColor:r,borderRadius:"50%",height:" 100%",width:"100%"}})}))},u=s.forwardRef(((e,o)=>{var{prefixCls:r="w-color-colorful",className:s,onChange:x,color:u,style:g,disableAlpha:v}=e,b=(0,t.Z)(e,p),y="string"===typeof u&&(0,l.Ff)(u)?(0,i.hexToHsva)(u):u||{},m=e=>x&&x((0,i.color)(e));return(0,h.jsxs)("div",(0,a.Z)({ref:o,style:(0,a.Z)({width:200,position:"relative"},g)},b,{className:r+" "+(s||""),children:[(0,h.jsx)(c.default,{hsva:y,className:r,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:e=>{var{left:o,top:r,color:a}=e;return(0,h.jsx)(f,{style:{left:o,top:r,transform:"translate(-16px, -16px)"},color:(0,i.hsvaToHex)(y)})},onChange:e=>m((0,a.Z)({},y,e))}),(0,h.jsx)(d.default,{hue:y.h,height:24,radius:v?"0 0 8px 8px":0,className:r,onChange:e=>m((0,a.Z)({},y,e)),pointer:e=>{var{left:o}=e;return(0,h.jsx)(f,{style:{left:o},color:"hsl("+(y.h||0)+"deg 100% 50%)"})}}),!v&&(0,h.jsx)(n.default,{hsva:y,height:24,className:r,radius:"0 0 8px 8px",pointer:e=>{var{left:o}=e;return(0,h.jsx)(f,{style:{left:o},color:(0,i.hsvaToRgbaString)(y)})},onChange:e=>m((0,a.Z)({},y,e))})]}))}));u.displayName="Colorful";const g=u},831:(e,o,r)=>{r.r(o),r.d(o,{default:()=>v});var a=r(5773),t=r(808),s=r(8573),l=r(7961),i=r(5301),n=r(6493),c=r(8702),d=r(3789),h=r(9887),x=r(4760),p=["prefixCls","className","style","onChange","color","colors","rectProps","rectRender"],f=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"];function u(e){return e.checked?(0,x.jsx)("div",{style:{height:5,width:5,borderRadius:"50%",backgroundColor:(0,l.Q)(e.color)}}):null}var g=s.forwardRef(((e,o)=>{var{prefixCls:r="w-color-compact",className:l,style:g,onChange:v,color:b,colors:y=f,rectProps:m,rectRender:C}=e,j=(0,t.Z)(e,p),w="string"===typeof b&&(0,i.Ff)(b)?(0,n.hexToHsva)(b):b,k=b?(0,n.hsvaToHex)(w).replace(/^#/,""):"",Z=(0,s.useCallback)((e=>v&&v((0,n.color)(e))),[]),F={style:{alignItems:"baseline"},inputStyle:{boxShadow:"none",backgroundColor:"transparent",outline:0}},R=(0,a.Z)({"--compact-background-color":"#f6f6f6",background:"var(--compact-background-color)",borderRadius:3,display:"flex",width:240,flexWrap:"wrap",paddingTop:5,paddingLeft:5},g);return(0,x.jsxs)("div",(0,a.Z)({ref:o,style:R,className:[r,l||""].filter(Boolean).join(" ")},j,{children:[(0,x.jsx)(h.default,{colors:y,color:b?(0,n.hsvaToHex)(w):void 0,rectRender:C,rectProps:(0,a.Z)({children:(0,x.jsx)(u,{})},m,{style:(0,a.Z)({display:"flex",alignItems:"center",justifyContent:"center"},null==m?void 0:m.style)}),onChange:e=>Z(e)}),(0,x.jsxs)("div",{style:{display:"flex",margin:"0 4px 3px 0"},children:[(0,x.jsx)(c.default,{onChange:(e,o)=>{var r;"string"===typeof(r=o)&&(0,i.Ff)(r)&&/(3|6)/.test(String(r.length))&&Z((0,n.hexToHsva)(r))},labelStyle:{paddingRight:5,marginTop:-1},value:k.toLocaleUpperCase(),label:(0,x.jsx)("div",{style:{width:8,height:8,backgroundColor:"#"+k}}),inputStyle:{outline:"none",boxShadow:"initial",background:"transparent"},style:{flexDirection:"row-reverse",flex:"1 1 0%",minWidth:80}}),(0,x.jsx)(d.default,{hsva:w,placement:"left",onChange:e=>Z(e.hsva),aProps:!1,rProps:F,gProps:F,bProps:F})]})]}))}));g.displayName="Compact";const v=g},1936:(e,o,r)=>{r.r(o),r.d(o,{default:()=>f});var a=r(5773),t=r(808),s=r(8573),l=r(5301),i=r(6493),n=r(8702),c=r(3789),d=r(4760),h=["prefixCls","className","style","color","onChange"],x={boxShadow:"initial",borderWidth:"0 0 1px 0",borderBottomColor:"var(--material-border-bottom-color)",borderBottomStyle:"solid",height:30,outline:0,fontSize:15,padding:0},p=s.forwardRef(((e,o)=>{var{prefixCls:r="w-color-material",className:s,style:p,color:f,onChange:u}=e,g=(0,t.Z)(e,h),v="string"===typeof f&&(0,l.Ff)(f)?(0,i.hexToHsva)(f):f,b=f?(0,i.hsvaToHex)(v).replace(/^#/,""):"",y=(e,o)=>{"string"===typeof e&&(0,l.Ff)(e)&&/(3|6)/.test(String(e.length))&&u&&u((0,i.color)((0,i.hexToHsva)(e)))},m=(0,a.Z)({"--material-border-bottom-color":"#eee","--material-background-color":"#fff",padding:16,width:98,fontFamily:"Roboto",backgroundColor:"var(--material-background-color)"},p);return(0,d.jsxs)("div",(0,a.Z)({ref:o,className:[r,s||""].filter(Boolean).join(" "),style:m},g,{children:[(0,d.jsx)(n.default,{label:"Hex",value:b.toLocaleUpperCase(),onChange:(e,o)=>y(o),onBlur:e=>{var o=e.target.value;e.target.value=o.slice(0,6),y(o.slice(0,6))},inputStyle:{outline:0,border:0,height:30,fontSize:15,padding:0,boxShadow:"initial",borderWidth:"0 0 2px 0",borderBottomColor:b?"#"+b:"var(--material-border-bottom-color)",borderBottomStyle:"solid",background:"transparent"},style:{flexDirection:"column-reverse",alignItems:"flex-start"}}),(0,d.jsx)(c.default,{hsva:v,placement:"top",style:{marginTop:11},rProps:{style:{alignItems:"flex-start"},inputStyle:(0,a.Z)({},x)},gProps:{style:{alignItems:"flex-start"},inputStyle:(0,a.Z)({},x)},bProps:{style:{alignItems:"flex-start"},inputStyle:(0,a.Z)({},x)},aProps:!1,onChange:e=>{return o=e.hsva,void(u&&u((0,i.color)(o)));var o}})]}))}));p.displayName="Material";const f=p},4479:(e,o,r)=>{r.r(o),r.d(o,{default:()=>y});var a=r(5773),t=r(808),s=r(8573),l=r(5301),i=r(6493),n=r(6813),c=r(4760),d=e=>{var{className:o,color:r,left:t,top:s,style:l,prefixCls:i}=e,n=(0,a.Z)({},l,{position:"absolute",top:s,left:t}),d=i+"-pointer "+(o||"");return(0,c.jsx)("div",{className:d,style:n,children:(0,c.jsx)("div",{className:i+"-fill",style:{width:10,height:10,transform:"translate(-5px, -5px)",boxShadow:"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",borderRadius:"50%",backgroundColor:"#fff"},children:(0,c.jsx)("div",{style:{inset:0,borderRadius:"50%",position:"absolute",backgroundColor:r}})})})},h=2*Math.PI,x=(e,o)=>(e%o+o)%o,p=(e,o)=>Math.sqrt(e*e+o*o);function f(e){var{width:o=0}=e,r=o/2;return{width:o,radius:r,cx:r,cy:r}}function u(e){var{width:o=0}=e;return o/2}function g(e,o,r){var a=e.angle||0,t=e.direction;return r&&"clockwise"===t?o=a+o:"clockwise"===t?o=360-a+o:r&&"anticlockwise"===t?o=a+180-o:"anticlockwise"===t&&(o=a-o),x(o,360)}var v=["prefixCls","radius","pointer","className","style","width","height","oval","direction","angle","color","onChange"],b=s.forwardRef(((e,o)=>{var{prefixCls:r="w-color-wheel",radius:s=0,pointer:x,className:b,style:y,width:m=200,height:C=200,oval:j,direction:w="anticlockwise",angle:k=180,color:Z,onChange:F}=e,R=(0,t.Z)(e,v),N="string"===typeof Z&&(0,l.Ff)(Z)?(0,i.hexToHsva)(Z):Z||{},S=Z?(0,i.hsvaToHex)(N):"",B=function(e,o){var{cx:r,cy:a}=f(e),t=u(e),s=(180+g(e,o.h,!0))*(h/360),l=o.s/100*t,i="clockwise"===e.direction?-1:1;return{x:r+l*Math.cos(s)*i,y:a+l*Math.sin(s)*i}}({width:m},N),T={top:"0",left:"0",color:S},H=(e,o)=>{var r=function(e,o,r){var{cx:a,cy:t}=f(e),s=u(e);o=a-o,r=t-r;var l=g(e,Math.atan2(-r,-o)*(360/h)),i=Math.min(p(o,r),s);return{h:Math.round(l),s:Math.round(100/s*i)}}({width:m},m-e.x,C-e.y),a={h:r.h,s:r.s,v:N.v,a:N.a};F&&F((0,i.color)(a))},D={zIndex:1,transform:"translate("+B.x+"px, "+B.y+"px) "+("x"===j||"X"===j?"scaleY(2)":"y"===j||"Y"===j?"scaleX(2)":"")},P=x&&"function"===typeof x?x((0,a.Z)({prefixCls:r,style:D},T)):(0,c.jsx)(d,(0,a.Z)({prefixCls:r,style:D},T));return(0,c.jsxs)(n.default,(0,a.Z)({className:[r,b||""].filter(Boolean).join(" ")},R,{style:(0,a.Z)({position:"relative",width:m,transform:"x"===j||"X"===j?"scaleY(0.5)":"y"===j||"Y"===j?"scaleX(0.5)":"",height:C},y),ref:o,onMove:H,onDown:H,children:[P,(0,c.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"anticlockwise"===w?"conic-gradient(red, yellow, lime, aqua, blue, magenta, red)":"conic-gradient(red, magenta, blue, aqua, lime, yellow, red)",transform:"rotateZ("+(k+90)+"deg)",inset:0}}),(0,c.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"radial-gradient(circle closest-side, #fff, transparent)",inset:0}}),(0,c.jsx)("div",{style:{backgroundColor:"#000",borderRadius:"50%",position:"absolute",inset:0,opacity:"number"===typeof N.v?1-N.v/100:0}})]}))}));b.displayName="Wheel";const y=b}}]); -//# sourceMappingURL=281.a23b4cd8.chunk.js.map \ No newline at end of file diff --git a/static/js/281.a23b4cd8.chunk.js.map b/static/js/281.a23b4cd8.chunk.js.map deleted file mode 100644 index 0e32d6de0..000000000 --- a/static/js/281.a23b4cd8.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/281.a23b4cd8.chunk.js","mappings":"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","sources":["components/Title.tsx","webpack://website/./src/pages/home/index.module.less?e0b9","pages/home/index.tsx","../../packages/color-block/esm/index.js","../../packages/color-circle/esm/Point.js","../../packages/color-circle/esm/index.js","../../packages/color-colorful/esm/index.js","../../packages/color-compact/esm/index.js","../../packages/color-material/esm/index.js","../../packages/color-wheel/esm/Pointer.js","../../packages/color-wheel/esm/utils.js","../../packages/color-wheel/esm/index.js"],"sourcesContent":["interface TitleProps extends React.HTMLAttributes {}\n\nexport default function Title(props: TitleProps) {\n return (\n
\n {props.children}\n
\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"warpper\":\"index_warpper__Ajp1G\"};","import { useContext } from 'react';\nimport { Colorful, Sketch, Block, Circle, Compact, Wheel, Github, Material, Chrome } from '@uiw/react-color';\nimport { hsvaToHex } from '@uiw/react-color';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\nimport Title from '../../components/Title';\nimport styles from './index.module.less';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Colorful color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Sketch color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Chrome color=\"...\" />`}\n
\n
\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Circle color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Compact color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Wheel color=\"...\" />`}\n
\n
\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Github color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Material color=\"...\" />`}\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {`<Block color=\"${hsvaToHex(hsva)}\" />`}\n
\n
\n
\n );\n}\n\nexport class Component extends Markdown {\n displayName = 'HomePage';\n editorUrl = '/packages/color/README.md';\n getMdStr = () => import('@uiw/react-color/README.md');\n example = ();\n}\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"color\", \"colors\", \"onChange\"];\nimport React from 'react';\nimport { color as handleColor, validHex, hexToHsva, hsvaToHex, getContrastingColor } from '@uiw/color-convert';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport Swatch from '@uiw/react-color-swatch';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar CORLER_HEX = ['#D9E3F0', '#F47373', '#697689', '#37D67A', '#2CCCE4', '#555555', '#dce775', '#ff8a65', '#ba68c8'];\nvar Block = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-block',\n className,\n style,\n color,\n colors = CORLER_HEX,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva) : '';\n var handleChange = hsv => {\n onChange && onChange(handleColor(hsv));\n };\n var handleHex = (value, evn) => {\n if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.replace(/^#/, '').length))) {\n onChange && onChange(handleColor(hexToHsva(value)));\n }\n };\n var stylePointer = _extends({\n '--block-background-color': 'rgb(255, 255, 255)',\n '--block-box-shadow': 'rgb(0 0 0 / 10%) 0 1px',\n width: 170,\n borderRadius: 6,\n background: 'var(--block-background-color)',\n boxShadow: 'var(--block-box-shadow)',\n position: 'relative'\n }, style);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n className: [prefixCls, className].filter(Boolean).join(' '),\n style: stylePointer\n }, other, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n style: {\n width: 0,\n height: 0,\n borderStyle: 'solid',\n borderWidth: '0 10px 10px',\n borderColor: \"transparent transparent \" + hex,\n position: 'absolute',\n top: -10,\n left: '50%',\n marginLeft: -10\n }\n }), /*#__PURE__*/_jsx(\"div\", {\n title: hex,\n style: {\n backgroundColor: \"\" + hex,\n color: getContrastingColor(hex),\n height: 110,\n fontSize: 18,\n borderRadius: '6px 6px 0 0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n children: hex.toLocaleUpperCase()\n }), /*#__PURE__*/_jsx(Swatch, {\n colors: colors,\n color: hex,\n style: {\n paddingLeft: 10,\n paddingTop: 10\n },\n rectProps: {\n style: {\n marginRight: 10,\n marginBottom: 10,\n borderRadius: 4,\n height: 22,\n width: 22\n }\n },\n onChange: handleChange\n }), /*#__PURE__*/_jsx(EditableInput, {\n value: hex.toLocaleUpperCase(),\n onChange: (evn, val) => handleHex(val, evn),\n onBlur: evn => {\n var value = evn.target.value;\n evn.target.value = value.slice(0, 6);\n handleHex(value.slice(0, 6), evn);\n },\n inputStyle: {\n height: 22,\n outline: 0,\n borderRadius: 3,\n padding: '0 7px'\n },\n style: {\n padding: 10,\n paddingTop: 0,\n borderRadius: '0 0 6px 6px'\n }\n })]\n }));\n});\nBlock.displayName = 'Block';\nexport default Block;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { useCallback } from 'react';\nimport { useRef } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Point(_ref) {\n var {\n style,\n title,\n checked,\n color,\n onClick,\n rectProps\n } = _ref;\n var btn = useRef(null);\n var handleMouseEnter = useCallback(() => {\n btn.current.style['transform'] = 'scale(1.2)';\n }, []);\n var handleMouseLeave = useCallback(() => {\n btn.current.style['transform'] = 'scale(1)';\n }, []);\n var styleWrapper = _extends({\n '--circle-point-background-color': '#fff',\n height: checked ? '100%' : 0,\n width: checked ? '100%' : 0,\n borderRadius: '50%',\n backgroundColor: 'var(--circle-point-background-color)',\n boxSizing: 'border-box',\n transition: 'height 100ms ease 0s, width 100ms ease 0s'\n }, rectProps.style);\n return /*#__PURE__*/_jsx(\"div\", {\n ref: btn,\n onClick: onClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n title: title,\n style: _extends({}, style, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 28,\n height: 28,\n padding: 3,\n borderRadius: '50%',\n marginRight: 12,\n marginBottom: 12,\n boxSizing: 'border-box',\n transform: 'scale(1)',\n boxShadow: color + \" 0px 0px \" + (checked ? 5 : 0) + \"px\",\n transition: 'transform 100ms ease 0s, box-shadow 100ms ease 0s'\n }),\n children: /*#__PURE__*/_jsx(\"div\", _extends({}, rectProps, {\n style: styleWrapper\n }))\n });\n}","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"color\", \"colors\", \"rectProps\", \"onChange\"];\nimport React from 'react';\nimport { validHex, hsvaToHex, hexToHsva, color as handleColor } from '@uiw/color-convert';\nimport Swatch from '@uiw/react-color-swatch';\nimport Point from './Point';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Circle = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-circle',\n className,\n color,\n colors = [],\n rectProps = {},\n onChange: _onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var hex = color ? hsvaToHex(hsva) : '';\n return /*#__PURE__*/_jsx(Swatch, _extends({\n ref: ref,\n colors: colors,\n color: hex\n }, other, {\n className: [prefixCls, className].filter(Boolean).join(' '),\n rectRender: _ref => {\n var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/_jsx(Point, _extends({}, props, {\n rectProps: rectProps\n }));\n },\n onChange: hsvColor => {\n _onChange && _onChange(handleColor(hsvColor));\n }\n }));\n});\nCircle.displayName = 'Circle';\nexport default Circle;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\", \"color\"],\n _excluded2 = [\"prefixCls\", \"className\", \"onChange\", \"color\", \"style\", \"disableAlpha\"];\nimport React from 'react';\nimport { validHex, color as handleColor, hexToHsva, hsvaToHex, hsvaToRgbaString } from '@uiw/color-convert';\nimport Alpha, { BACKGROUND_IMG } from '@uiw/react-color-alpha';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar Pointer = _ref => {\n var {\n style,\n color\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var stylePointer = _extends({\n '--colorful-pointer-background-color': '#fff',\n '--colorful-pointer-border': '2px solid #fff',\n height: 28,\n width: 28,\n position: 'absolute',\n transform: 'translate(-14px, -4px)',\n boxShadow: '0 2px 4px rgb(0 0 0 / 20%)',\n borderRadius: '50%',\n background: \"url(\" + BACKGROUND_IMG + \")\",\n backgroundColor: 'var(--colorful-pointer-background-color)',\n border: 'var(--colorful-pointer-border)',\n zIndex: 1\n }, style);\n return /*#__PURE__*/_jsx(\"div\", _extends({}, props, {\n style: stylePointer,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: color,\n borderRadius: '50%',\n height: ' 100%',\n width: '100%'\n }\n })\n }));\n};\nvar Colorful = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-colorful',\n className,\n onChange,\n color,\n style,\n disableAlpha\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var handleChange = value => onChange && onChange(handleColor(value));\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: _extends({\n width: 200,\n position: 'relative'\n }, style)\n }, other, {\n className: prefixCls + \" \" + (className || ''),\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n className: prefixCls,\n radius: \"8px 8px 0 0\",\n style: {\n width: 'auto',\n height: 150,\n minWidth: 120,\n borderBottom: '12px solid #000'\n },\n pointer: _ref2 => {\n var {\n left,\n top,\n color\n } = _ref2;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left,\n top,\n transform: 'translate(-16px, -16px)'\n },\n color: hsvaToHex(hsva)\n });\n },\n onChange: newColor => handleChange(_extends({}, hsva, newColor))\n }), /*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n height: 24,\n radius: disableAlpha ? '0 0 8px 8px' : 0,\n className: prefixCls,\n onChange: newHue => handleChange(_extends({}, hsva, newHue)),\n pointer: _ref3 => {\n var {\n left\n } = _ref3;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: \"hsl(\" + (hsva.h || 0) + \"deg 100% 50%)\"\n });\n }\n }), !disableAlpha && /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n height: 24,\n className: prefixCls,\n radius: \"0 0 8px 8px\",\n pointer: _ref4 => {\n var {\n left\n } = _ref4;\n return /*#__PURE__*/_jsx(Pointer, {\n style: {\n left\n },\n color: hsvaToRgbaString(hsva)\n });\n },\n onChange: newAlpha => handleChange(_extends({}, hsva, newAlpha))\n })]\n }));\n});\nColorful.displayName = 'Colorful';\nexport default Colorful;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"onChange\", \"color\", \"colors\", \"rectProps\", \"rectRender\"];\nimport React, { useCallback } from 'react';\nimport { color as handleColor, hexToHsva, validHex, hsvaToHex, getContrastingColor } from '@uiw/color-convert';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport RGBA from '@uiw/react-color-editable-input-rgba';\nimport Swatch from '@uiw/react-color-swatch';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar COLORS = ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#cccccc', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'];\nfunction Point(props) {\n if (!props.checked) return null;\n return /*#__PURE__*/_jsx(\"div\", {\n style: {\n height: 5,\n width: 5,\n borderRadius: '50%',\n backgroundColor: getContrastingColor(props.color)\n }\n });\n}\nvar Compact = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-compact',\n className,\n style,\n onChange,\n color,\n colors = COLORS,\n rectProps,\n rectRender\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva).replace(/^#/, '') : '';\n var handleChangeCallback = useCallback(hsv => onChange && onChange(handleColor(hsv)), []);\n var handleHex = (value, evn) => {\n if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.length))) {\n handleChangeCallback(hexToHsva(value));\n }\n };\n var rgbProps = {\n style: {\n alignItems: 'baseline'\n },\n inputStyle: {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n outline: 0\n }\n };\n var wrapperStyle = _extends({\n '--compact-background-color': '#f6f6f6',\n background: 'var(--compact-background-color)',\n borderRadius: 3,\n display: 'flex',\n width: 240,\n flexWrap: 'wrap',\n paddingTop: 5,\n paddingLeft: 5\n }, style);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n style: wrapperStyle,\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other, {\n children: [/*#__PURE__*/_jsx(Swatch, {\n colors: colors,\n color: color ? hsvaToHex(hsva) : undefined,\n rectRender: rectRender,\n rectProps: _extends({\n children: /*#__PURE__*/_jsx(Point, {})\n }, rectProps, {\n style: _extends({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n }, rectProps == null ? void 0 : rectProps.style)\n }),\n onChange: hsvColor => handleChangeCallback(hsvColor)\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n display: 'flex',\n margin: '0 4px 3px 0'\n },\n children: [/*#__PURE__*/_jsx(EditableInput, {\n onChange: (evn, val) => handleHex(val, evn),\n labelStyle: {\n paddingRight: 5,\n marginTop: -1\n },\n value: hex.toLocaleUpperCase(),\n label: /*#__PURE__*/_jsx(\"div\", {\n style: {\n width: 8,\n height: 8,\n backgroundColor: \"#\" + hex\n }\n }),\n inputStyle: {\n outline: 'none',\n boxShadow: 'initial',\n background: 'transparent'\n },\n style: {\n flexDirection: 'row-reverse',\n flex: '1 1 0%',\n minWidth: 80\n }\n }), /*#__PURE__*/_jsx(RGBA, {\n hsva: hsva,\n placement: \"left\",\n onChange: result => handleChangeCallback(result.hsva),\n aProps: false,\n rProps: rgbProps,\n gProps: rgbProps,\n bProps: rgbProps\n })]\n })]\n }));\n});\nCompact.displayName = 'Compact';\nexport default Compact;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"color\", \"onChange\"];\nimport React from 'react';\nimport { color as handleColor, validHex, hexToHsva, hsvaToHex } from '@uiw/color-convert';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport RGBA from '@uiw/react-color-editable-input-rgba';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar styleRBG = {\n boxShadow: 'initial',\n borderWidth: '0 0 1px 0',\n borderBottomColor: 'var(--material-border-bottom-color)',\n borderBottomStyle: 'solid',\n height: 30,\n outline: 0,\n fontSize: 15,\n padding: 0\n};\nvar Material = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-material',\n className,\n style,\n color,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva).replace(/^#/, '') : '';\n var handleChange = hsv => {\n onChange && onChange(handleColor(hsv));\n };\n var handleHex = (value, evn) => {\n if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.length))) {\n onChange && onChange(handleColor(hexToHsva(value)));\n }\n };\n var styleWrapper = _extends({\n '--material-border-bottom-color': '#eee',\n '--material-background-color': '#fff',\n padding: 16,\n width: 98,\n fontFamily: 'Roboto',\n backgroundColor: 'var(--material-background-color)'\n }, style);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: ref,\n className: [prefixCls, className || ''].filter(Boolean).join(' '),\n style: styleWrapper\n }, other, {\n children: [/*#__PURE__*/_jsx(EditableInput, {\n label: \"Hex\",\n value: hex.toLocaleUpperCase(),\n onChange: (evn, val) => handleHex(val, evn),\n onBlur: evn => {\n var value = evn.target.value;\n evn.target.value = value.slice(0, 6);\n handleHex(value.slice(0, 6), evn);\n },\n inputStyle: {\n outline: 0,\n border: 0,\n height: 30,\n fontSize: 15,\n padding: 0,\n boxShadow: 'initial',\n borderWidth: '0 0 2px 0',\n borderBottomColor: hex ? \"#\" + hex : 'var(--material-border-bottom-color)',\n borderBottomStyle: 'solid',\n background: 'transparent'\n },\n style: {\n flexDirection: 'column-reverse',\n alignItems: 'flex-start'\n }\n }), /*#__PURE__*/_jsx(RGBA, {\n hsva: hsva,\n placement: \"top\",\n style: {\n marginTop: 11\n },\n rProps: {\n style: {\n alignItems: 'flex-start'\n },\n inputStyle: _extends({}, styleRBG)\n },\n gProps: {\n style: {\n alignItems: 'flex-start'\n },\n inputStyle: _extends({}, styleRBG)\n },\n bProps: {\n style: {\n alignItems: 'flex-start'\n },\n inputStyle: _extends({}, styleRBG)\n },\n aProps: false,\n onChange: result => handleChange(result.hsva)\n })]\n }));\n});\nMaterial.displayName = 'Material';\nexport default Material;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar BOXSHADOW = 'rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px';\nexport var Pointer = _ref => {\n var {\n className,\n color,\n left,\n top,\n style,\n prefixCls\n } = _ref;\n var styleWarp = _extends({}, style, {\n position: 'absolute',\n top,\n left\n });\n var cls = prefixCls + \"-pointer \" + (className || '');\n return /*#__PURE__*/_jsx(\"div\", {\n className: cls,\n style: styleWarp,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: prefixCls + \"-fill\",\n style: {\n width: 10,\n height: 10,\n transform: 'translate(-5px, -5px)',\n boxShadow: BOXSHADOW,\n borderRadius: '50%',\n backgroundColor: '#fff'\n },\n children: /*#__PURE__*/_jsx(\"div\", {\n style: {\n inset: 0,\n borderRadius: '50%',\n position: 'absolute',\n backgroundColor: color\n }\n })\n })\n });\n};","var TAU = Math.PI * 2;\n\n/**\n * javascript's modulo operator doesn't produce positive numbers with negative input\n * https://www.geeksforgeeks.org/how-to-get-negative-result-using-modulo-operator-in-javascript/\n */\nexport var mod = (a, n) => (a % n + n) % n;\n\n/** distance between points (x, y) and (0, 0) */\nvar dist = (x, y) => Math.sqrt(x * x + y * y);\n\n/**\n * Get the point as the center of the wheel\n */\nexport function getWheelDimensions(_ref) {\n var {\n width = 0\n } = _ref;\n var r = width / 2;\n return {\n width,\n radius: r,\n cx: r,\n cy: r\n };\n}\n\n/**\n * Returns true if point (x, y) lands inside the wheel\n */\nexport function isInputInsideWheel(props, x, y) {\n var {\n cx,\n cy,\n width\n } = getWheelDimensions(props);\n var r = width / 2;\n return dist(cx - x, cy - y) < r;\n}\n\n/**\n * Get the current handle position for a given color\n */\nexport function getWheelHandlePosition(props, hsv) {\n var {\n cx,\n cy\n } = getWheelDimensions(props);\n var handleRange = getHandleRange(props);\n var handleAngle = (180 + translateWheelAngle(props, hsv.h, true)) * (TAU / 360);\n var handleDist = hsv.s / 100 * handleRange;\n var direction = props.direction === 'clockwise' ? -1 : 1;\n return {\n x: cx + handleDist * Math.cos(handleAngle) * direction,\n y: cy + handleDist * Math.sin(handleAngle) * direction\n };\n}\n\n/**\n * Get Range\n */\nexport function getHandleRange(_ref2) {\n var {\n width = 0\n } = _ref2;\n return width / 2;\n}\n\n/**\n * Translate an angle according to wheelAngle and wheelDirection\n */\nexport function translateWheelAngle(props, angle, invert) {\n var wheelAngle = props.angle || 0;\n var direction = props.direction;\n // inverted and clockwisee\n if (invert && direction === 'clockwise') angle = wheelAngle + angle;\n // clockwise (input handling)\n else if (direction === 'clockwise') angle = 360 - wheelAngle + angle;\n // inverted and anticlockwise\n else if (invert && direction === 'anticlockwise') angle = wheelAngle + 180 - angle;\n // anticlockwise (input handling)\n else if (direction === 'anticlockwise') angle = wheelAngle - angle;\n return mod(angle, 360);\n}\n\n/**\n * Get the current wheel value from user input\n * @param props - wheel props\n * @param x - global input x position\n * @param y - global input y position\n */\nexport function getWheelValueFromInput(props, x, y) {\n var {\n cx,\n cy\n } = getWheelDimensions(props);\n var handleRange = getHandleRange(props);\n x = cx - x;\n y = cy - y;\n // Calculate the hue by converting the angle to radians\n var hue = translateWheelAngle(props, Math.atan2(-y, -x) * (360 / TAU));\n // Find the point's distance from the center of the wheel\n // This is used to show the saturation level\n var handleDist = Math.min(dist(x, y), handleRange);\n return {\n h: Math.round(hue),\n s: Math.round(100 / handleRange * handleDist)\n };\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"radius\", \"pointer\", \"className\", \"style\", \"width\", \"height\", \"oval\", \"direction\", \"angle\", \"color\", \"onChange\"];\nimport React from 'react';\nimport { validHex, hexToHsva, hsvaToHex, color as handleColor } from '@uiw/color-convert';\nimport Interactive from '@uiw/react-drag-event-interactive';\nimport { Pointer } from './Pointer';\nimport { getWheelHandlePosition, getWheelValueFromInput } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar HUE_GRADIENT_CLOCKWISE = 'conic-gradient(red, yellow, lime, aqua, blue, magenta, red)';\nvar HUE_GRADIENT_ANTICLOCKWISE = 'conic-gradient(red, magenta, blue, aqua, lime, yellow, red)';\nvar Wheel = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-wheel',\n radius = 0,\n pointer,\n className,\n style,\n width = 200,\n height = 200,\n oval,\n direction = 'anticlockwise',\n angle = 180,\n color,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {};\n var hex = color ? hsvaToHex(hsva) : '';\n var positions = getWheelHandlePosition({\n width\n }, hsva);\n var comProps = {\n top: '0',\n left: '0',\n color: hex\n };\n var handleChange = (interaction, event) => {\n var result = getWheelValueFromInput({\n width\n }, width - interaction.x, height - interaction.y);\n var handleHsva = {\n h: result.h,\n s: result.s,\n v: hsva.v,\n a: hsva.a\n };\n onChange && onChange(handleColor(handleHsva));\n };\n var pointerStyle = {\n zIndex: 1,\n transform: \"translate(\" + positions.x + \"px, \" + positions.y + \"px) \" + (oval === 'x' || oval === 'X' ? 'scaleY(2)' : oval === 'y' || oval === 'Y' ? 'scaleX(2)' : '')\n };\n var pointerElement = pointer && typeof pointer === 'function' ? pointer(_extends({\n prefixCls,\n style: pointerStyle\n }, comProps)) : /*#__PURE__*/_jsx(Pointer, _extends({\n prefixCls: prefixCls,\n style: pointerStyle\n }, comProps));\n return /*#__PURE__*/_jsxs(Interactive, _extends({\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other, {\n style: _extends({\n position: 'relative',\n width,\n transform: oval === 'x' || oval === 'X' ? 'scaleY(0.5)' : oval === 'y' || oval === 'Y' ? 'scaleX(0.5)' : '',\n height\n }, style),\n ref: ref,\n onMove: handleChange,\n onDown: handleChange,\n children: [pointerElement, /*#__PURE__*/_jsx(\"div\", {\n style: {\n position: 'absolute',\n borderRadius: '50%',\n background: direction === 'anticlockwise' ? HUE_GRADIENT_CLOCKWISE : HUE_GRADIENT_ANTICLOCKWISE,\n transform: \"rotateZ(\" + (angle + 90) + \"deg)\",\n inset: 0\n }\n }), /*#__PURE__*/_jsx(\"div\", {\n style: {\n position: 'absolute',\n borderRadius: '50%',\n background: 'radial-gradient(circle closest-side, #fff, transparent)',\n inset: 0\n }\n }), /*#__PURE__*/_jsx(\"div\", {\n style: {\n backgroundColor: '#000',\n borderRadius: '50%',\n position: 'absolute',\n inset: 0,\n opacity: typeof hsva.v === 'number' ? 1 - hsva.v / 100 : 0\n }\n })]\n }));\n});\nWheel.displayName = 'Wheel';\nexport default Wheel;"],"names":["Title","props","_jsx","style","fontSize","padding","color","children","Example","hsva","dispatch","useContext","Context","_jsxs","className","styles","Colorful","onChange","concat","hsvaToHex","marginLeft","marginRight","Sketch","Chrome","Circle","colors","width","paddingLeft","Compact","boxShadow","Wheel","height","Github","Material","Block","Component","Markdown","constructor","arguments","displayName","editorUrl","getMdStr","example","_excluded","CORLER_HEX","React","ref","prefixCls","other","_objectWithoutPropertiesLoose","validHex","hexToHsva","hex","handleHex","value","evn","test","String","replace","length","handleColor","stylePointer","_extends","borderRadius","background","position","filter","Boolean","join","borderStyle","borderWidth","borderColor","top","left","title","backgroundColor","getContrastingColor","display","alignItems","justifyContent","toLocaleUpperCase","Swatch","paddingTop","rectProps","marginBottom","hsv","EditableInput","val","onBlur","target","slice","inputStyle","outline","Point","_ref","checked","onClick","btn","useRef","handleMouseEnter","useCallback","current","handleMouseLeave","styleWrapper","boxSizing","transition","onMouseEnter","onMouseLeave","transform","_onChange","rectRender","_objectDestructuringEmpty","hsvColor","_excluded2","Pointer","BACKGROUND_IMG","border","zIndex","disableAlpha","handleChange","Saturation","radius","minWidth","borderBottom","pointer","_ref2","newColor","Hue","hue","h","newHue","_ref3","Alpha","_ref4","hsvaToRgbaString","newAlpha","COLORS","handleChangeCallback","rgbProps","wrapperStyle","flexWrap","undefined","margin","labelStyle","paddingRight","marginTop","label","flexDirection","flex","RGBA","placement","result","aProps","rProps","gProps","bProps","styleRBG","borderBottomColor","borderBottomStyle","fontFamily","styleWarp","cls","inset","TAU","Math","PI","mod","a","n","dist","x","y","sqrt","getWheelDimensions","r","cx","cy","getHandleRange","translateWheelAngle","angle","invert","wheelAngle","direction","oval","positions","handleRange","handleAngle","handleDist","s","cos","sin","getWheelHandlePosition","comProps","interaction","event","atan2","min","round","getWheelValueFromInput","handleHsva","v","pointerStyle","pointerElement","Interactive","onMove","onDown","opacity"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/297.fd85593b.chunk.js b/static/js/297.75b2592c.chunk.js similarity index 97% rename from static/js/297.fd85593b.chunk.js rename to static/js/297.75b2592c.chunk.js index 8743f97a2..142a274a0 100644 --- a/static/js/297.fd85593b.chunk.js +++ b/static/js/297.75b2592c.chunk.js @@ -1,2 +1,2 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[297],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,o,a,h=s(669),d=s(8573),c=s(2806),l=s(9258),p=s(4760);const g=l.ZP.div(r||(r=(0,h.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),u=l.ZP.a(i||(i=(0,h.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),x=l.ZP.div(n||(n=(0,h.Z)(["\n padding-bottom: 120px;\n"]))),m=l.ZP.footer(o||(o=(0,h.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=l.ZP.div(a||(a=(0,h.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends d.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(x,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(c.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},1144:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>d});var r=s(8573),i=s(7864),n=s(2251),o=s(7905),a=s(4760);function h(){const{hsva:t,dispatch:e}=(0,r.useContext)(o._y);return(0,a.jsx)("div",{style:{width:256},children:(0,a.jsx)(i.default,{hue:t.h,onChange:s=>{e({hsva:{...t,...s}})}})})}class d extends n.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-hue/README.md",this.getMdStr=()=>s.e(852).then(s.bind(s,3852)),this.example=(0,a.jsx)(h,{})}}}}]); -//# sourceMappingURL=297.fd85593b.chunk.js.map \ No newline at end of file +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[297],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,o,a,h=s(669),d=s(8573),c=s(2730),l=s(9258),p=s(4760);const g=l.ZP.div(r||(r=(0,h.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),u=l.ZP.a(i||(i=(0,h.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),x=l.ZP.div(n||(n=(0,h.Z)(["\n padding-bottom: 120px;\n"]))),m=l.ZP.footer(o||(o=(0,h.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=l.ZP.div(a||(a=(0,h.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends d.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(x,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(c.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},1144:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>d});var r=s(8573),i=s(7864),n=s(2251),o=s(7905),a=s(4760);function h(){const{hsva:t,dispatch:e}=(0,r.useContext)(o._y);return(0,a.jsx)("div",{style:{width:256},children:(0,a.jsx)(i.default,{hue:t.h,onChange:s=>{e({hsva:{...t,...s}})}})})}class d extends n.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-hue/README.md",this.getMdStr=()=>s.e(852).then(s.bind(s,3852)),this.example=(0,a.jsx)(h,{})}}}}]); +//# sourceMappingURL=297.75b2592c.chunk.js.map \ No newline at end of file diff --git a/static/js/297.fd85593b.chunk.js.map b/static/js/297.75b2592c.chunk.js.map similarity index 99% rename from static/js/297.fd85593b.chunk.js.map rename to static/js/297.75b2592c.chunk.js.map index ae06e7d2f..e487d1a81 100644 --- a/static/js/297.fd85593b.chunk.js.map +++ b/static/js/297.75b2592c.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/297.fd85593b.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/hue/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport Hue from '@uiw/react-color-hue';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...newHue } });\n }}\n />\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-hue/README.md';\n getMdStr = () => import('@uiw/react-color-hue/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","width","Hue","hue","h","onChange","newHue","arguments"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/297.75b2592c.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/hue/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport Hue from '@uiw/react-color-hue';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...newHue } });\n }}\n />\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-hue/README.md';\n getMdStr = () => import('@uiw/react-color-hue/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","width","Hue","hue","h","onChange","newHue","arguments"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/308.5164c0f5.chunk.js b/static/js/308.bd94eb40.chunk.js similarity index 97% rename from static/js/308.5164c0f5.chunk.js rename to static/js/308.bd94eb40.chunk.js index c99921766..624e576e0 100644 --- a/static/js/308.5164c0f5.chunk.js +++ b/static/js/308.bd94eb40.chunk.js @@ -1,2 +1,2 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[308],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,o,a,d=s(669),h=s(8573),c=s(2806),l=s(9258),p=s(4760);const g=l.ZP.div(r||(r=(0,d.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),u=l.ZP.a(i||(i=(0,d.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),x=l.ZP.div(n||(n=(0,d.Z)(["\n padding-bottom: 120px;\n"]))),m=l.ZP.footer(o||(o=(0,d.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=l.ZP.div(a||(a=(0,d.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends h.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(x,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(c.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},7711:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>h});var r=s(8573),i=s(1507),n=s(2251),o=s(7905),a=s(4760);function d(){const{hsva:t,dispatch:e}=(0,r.useContext)(o._y);return(0,a.jsx)("div",{style:{width:256},children:(0,a.jsx)(i.default,{color:t,onChange:s=>{e({hsva:{...t,...s.hsva}})}})})}class h extends n.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-sketch/README.md",this.getMdStr=()=>s.e(426).then(s.bind(s,7426)),this.example=(0,a.jsx)(d,{})}}}}]); -//# sourceMappingURL=308.5164c0f5.chunk.js.map \ No newline at end of file +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[308],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,o,a,d=s(669),h=s(8573),c=s(2730),l=s(9258),p=s(4760);const g=l.ZP.div(r||(r=(0,d.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),u=l.ZP.a(i||(i=(0,d.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),x=l.ZP.div(n||(n=(0,d.Z)(["\n padding-bottom: 120px;\n"]))),m=l.ZP.footer(o||(o=(0,d.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=l.ZP.div(a||(a=(0,d.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends h.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(x,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(c.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(u,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},7711:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>h});var r=s(8573),i=s(1507),n=s(2251),o=s(7905),a=s(4760);function d(){const{hsva:t,dispatch:e}=(0,r.useContext)(o._y);return(0,a.jsx)("div",{style:{width:256},children:(0,a.jsx)(i.default,{color:t,onChange:s=>{e({hsva:{...t,...s.hsva}})}})})}class h extends n.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-sketch/README.md",this.getMdStr=()=>s.e(426).then(s.bind(s,7426)),this.example=(0,a.jsx)(d,{})}}}}]); +//# sourceMappingURL=308.bd94eb40.chunk.js.map \ No newline at end of file diff --git a/static/js/308.5164c0f5.chunk.js.map b/static/js/308.bd94eb40.chunk.js.map similarity index 99% rename from static/js/308.5164c0f5.chunk.js.map rename to static/js/308.bd94eb40.chunk.js.map index 1b5084c56..1b28090e4 100644 --- a/static/js/308.5164c0f5.chunk.js.map +++ b/static/js/308.bd94eb40.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/308.5164c0f5.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/sketch/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport Sketch from '@uiw/react-color-sketch';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-sketch/README.md';\n getMdStr = () => import('@uiw/react-color-sketch/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","width","Sketch","color","onChange","arguments"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/308.bd94eb40.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/sketch/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport Sketch from '@uiw/react-color-sketch';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-sketch/README.md';\n getMdStr = () => import('@uiw/react-color-sketch/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","width","Sketch","color","onChange","arguments"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/309.1783f321.chunk.js b/static/js/309.c25d6129.chunk.js similarity index 97% rename from static/js/309.1783f321.chunk.js rename to static/js/309.c25d6129.chunk.js index eee58f477..530c1440d 100644 --- a/static/js/309.1783f321.chunk.js +++ b/static/js/309.c25d6129.chunk.js @@ -1,2 +1,2 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[309],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,a,o,h=s(669),l=s(8573),d=s(2806),c=s(9258),p=s(4760);const g=c.ZP.div(r||(r=(0,h.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),x=c.ZP.a(i||(i=(0,h.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),u=c.ZP.div(n||(n=(0,h.Z)(["\n padding-bottom: 120px;\n"]))),m=c.ZP.footer(a||(a=(0,h.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=c.ZP.div(o||(o=(0,h.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends l.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(u,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(d.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},2943:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>l});var r=s(8573),i=s(3789),n=s(2251),a=s(7905),o=s(4760);function h(){const{hsva:t,dispatch:e}=(0,r.useContext)(a._y);return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center",padding:"10px 0 10px 0"},children:[(0,o.jsx)(i.default,{style:{maxWidth:180,marginRight:15},hsva:t,onChange:s=>{e({hsva:{...t,...s.hsva}})}}),(0,o.jsx)(i.default,{style:{maxWidth:180},hsva:t,placement:"top",onChange:s=>{e({hsva:{...t,...s.hsva}})}})]}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center"},children:[(0,o.jsx)(i.default,{style:{maxWidth:180,marginRight:15},hsva:t,placement:"left",onChange:s=>{e({hsva:{...t,...s.hsva}})}}),(0,o.jsx)(i.default,{style:{maxWidth:180},hsva:t,placement:"right",onChange:s=>{e({hsva:{...t,...s.hsva}})}})]})]})}class l extends n.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-editable-input-rgba/README.md",this.getMdStr=()=>s.e(996).then(s.bind(s,4996)),this.example=(0,o.jsx)(h,{})}}}}]); -//# sourceMappingURL=309.1783f321.chunk.js.map \ No newline at end of file +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[309],{363:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=363,t.exports=e},2251:(t,e,s)=>{"use strict";s.d(e,{Z:()=>j});var r,i,n,a,o,h=s(669),l=s(8573),d=s(2730),c=s(9258),p=s(4760);const g=c.ZP.div(r||(r=(0,h.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),x=c.ZP.a(i||(i=(0,h.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),u=c.ZP.div(n||(n=(0,h.Z)(["\n padding-bottom: 120px;\n"]))),m=c.ZP.footer(a||(a=(0,h.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),b=c.ZP.div(o||(o=(0,h.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class j extends l.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:e,data:s}=this.state.mdObj||{};return(0,p.jsxs)(u,{className:"wmde-markdown-var",children:[(0,p.jsxs)(g,{children:[this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,p.jsxs)(b,{children:[(0,p.jsx)("h3",{children:"Example"}),this.example]}),(0,p.jsx)(d.Z,{data:{data:s,components:e,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,p.jsx)(x,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,p.jsxs)(m,{children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},2943:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Component:()=>l});var r=s(8573),i=s(3789),n=s(2251),a=s(7905),o=s(4760);function h(){const{hsva:t,dispatch:e}=(0,r.useContext)(a._y);return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center",padding:"10px 0 10px 0"},children:[(0,o.jsx)(i.default,{style:{maxWidth:180,marginRight:15},hsva:t,onChange:s=>{e({hsva:{...t,...s.hsva}})}}),(0,o.jsx)(i.default,{style:{maxWidth:180},hsva:t,placement:"top",onChange:s=>{e({hsva:{...t,...s.hsva}})}})]}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center"},children:[(0,o.jsx)(i.default,{style:{maxWidth:180,marginRight:15},hsva:t,placement:"left",onChange:s=>{e({hsva:{...t,...s.hsva}})}}),(0,o.jsx)(i.default,{style:{maxWidth:180},hsva:t,placement:"right",onChange:s=>{e({hsva:{...t,...s.hsva}})}})]})]})}class l extends n.Z{constructor(){super(...arguments),this.editorUrl="/packages/color-editable-input-rgba/README.md",this.getMdStr=()=>s.e(996).then(s.bind(s,4996)),this.example=(0,o.jsx)(h,{})}}}}]); +//# sourceMappingURL=309.c25d6129.chunk.js.map \ No newline at end of file diff --git a/static/js/309.1783f321.chunk.js.map b/static/js/309.c25d6129.chunk.js.map similarity index 99% rename from static/js/309.1783f321.chunk.js.map rename to static/js/309.c25d6129.chunk.js.map index 96f2cb269..e0c3cf6fa 100644 --- a/static/js/309.1783f321.chunk.js.map +++ b/static/js/309.c25d6129.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/309.1783f321.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/editable-input-rgba/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport EditableInputRGBA from '@uiw/react-color-editable-input-rgba';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-editable-input-rgba/README.md';\n getMdStr = () => import('@uiw/react-color-editable-input-rgba/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","display","alignItems","justifyContent","padding","EditableInputRGBA","maxWidth","marginRight","onChange","color","placement","arguments"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/309.c25d6129.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","pages/editable-input-rgba/index.tsx"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import { useContext } from 'react';\nimport EditableInputRGBA from '@uiw/react-color-editable-input-rgba';\nimport Markdown from '../../components/Markdown';\nimport { Context } from '../../Store';\n\nfunction Example() {\n const { hsva, dispatch } = useContext(Context);\n return (\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n
\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n {\n dispatch!({ hsva: { ...hsva, ...color.hsva } });\n }}\n />\n
\n
\n );\n}\n\nexport class Component extends Markdown {\n editorUrl = '/packages/color-editable-input-rgba/README.md';\n getMdStr = () => import('@uiw/react-color-editable-input-rgba/README.md');\n example = ();\n}\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","hsva","dispatch","useContext","Context","display","alignItems","justifyContent","padding","EditableInputRGBA","maxWidth","marginRight","onChange","color","placement","arguments"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/31.4c831a4d.chunk.js b/static/js/31.4c831a4d.chunk.js new file mode 100644 index 000000000..e6c7fde0f --- /dev/null +++ b/static/js/31.4c831a4d.chunk.js @@ -0,0 +1,2 @@ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[31],{363:t=>{function r(t){var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=363,t.exports=r},2251:(t,r,e)=>{"use strict";e.d(r,{Z:()=>f});var o,a,s,n,l,i=e(669),d=e(8573),p=e(2730),h=e(9258),c=e(4760);const u=h.ZP.div(o||(o=(0,i.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),g=h.ZP.a(a||(a=(0,i.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),b=h.ZP.div(s||(s=(0,i.Z)(["\n padding-bottom: 120px;\n"]))),x=h.ZP.footer(n||(n=(0,i.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),m=h.ZP.div(l||(l=(0,i.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class f extends d.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:r,data:e}=this.state.mdObj||{};return(0,c.jsxs)(b,{className:"wmde-markdown-var",children:[(0,c.jsxs)(u,{children:[this.editorUrl&&(0,c.jsx)(g,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,c.jsxs)(m,{children:[(0,c.jsx)("h3",{children:"Example"}),this.example]}),(0,c.jsx)(p.Z,{data:{data:e,components:r,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,c.jsx)(g,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,c.jsxs)(x,{children:[(0,c.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,c.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,c.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,c.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},945:(t,r,e)=>{"use strict";e.r(r),e.d(r,{ChromeInputType:()=>f,default:()=>y});var o=e(5773),a=e(808),s=e(8573),n=e(6493),l=e(9211),i=e(6319),d=e(7864),p=e(7240),h=e(8702),c=e(3789),u=e(1718),g=e(4760),b=["style"];function x(t){var{style:r}=t,e=(0,a.Z)(t,b),n=(0,s.useRef)(null),l=(0,s.useCallback)((()=>{n.current.style.backgroundColor="var(--chrome-arrow-background-color)"}),[]),i=(0,s.useCallback)((()=>{n.current.style.backgroundColor="transparent"}),[]);return(0,g.jsx)("div",(0,o.Z)({ref:n,style:(0,o.Z)({marginLeft:5,cursor:"pointer",transition:"background-color .3s",borderRadius:2},r)},e,{onMouseEnter:l,onMouseLeave:i,children:(0,g.jsx)("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",style:{display:"block"},children:(0,g.jsx)("path",{d:"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z",fill:"var(--chrome-arrow-fill)"})})}))}var m=["prefixCls","className","style","color","inputType","rectProps","onChange"],f=function(t){return t.HEXA="hexa",t.RGBA="rgba",t.HSLA="hsla",t}({}),v=s.forwardRef(((t,r)=>{var{prefixCls:e="w-color-chrome",className:b,style:v,color:y,inputType:j=f.RGBA,rectProps:w={},onChange:C}=t,R=(0,a.Z)(t,m),T="string"===typeof y&&(0,n.validHex)(y)?(0,n.hexToHsva)(y):y||{h:0,s:0,l:0,a:0},k=t=>C&&C((0,n.color)(t)),[B,S]=(0,s.useState)(j),Z={paddingTop:6},P={textAlign:"center",paddingTop:4,paddingBottom:4},L=(0,o.Z)({"--chrome-arrow-fill":"#333","--chrome-arrow-background-color":"#e8e8e8",borderRadius:0,flexDirection:"column",width:230,padding:0},v),E={"--chrome-alpha-box-shadow":"rgb(0 0 0 / 25%) 0px 0px 1px inset",borderRadius:"50%",background:(0,n.hsvaToRgbaString)(T),boxShadow:"var(--chrome-alpha-box-shadow)"};return(0,g.jsx)(l.default,(0,o.Z)({ref:r,color:T,style:L,colors:void 0,className:[e,b].filter(Boolean).join(" "),placement:l.GithubPlacement.TopLeft},R,{addonAfter:(0,g.jsxs)(s.Fragment,{children:[(0,g.jsx)(i.default,{hsva:T,style:{width:"100%",height:130},onChange:t=>{k((0,o.Z)({},T,t,{a:T.a}))}}),(0,g.jsxs)("div",{style:{padding:15,display:"flex",alignItems:"center"},children:[(0,g.jsx)(p.default,{width:24,height:24,hsva:T,radius:2,style:{marginRight:15,borderRadius:"50%"},bgProps:{style:{background:"transparent"}},innerProps:{style:E},pointer:()=>(0,g.jsx)(s.Fragment,{})}),(0,g.jsxs)("div",{style:{flex:1},children:[(0,g.jsx)(d.default,{hue:T.h,style:{width:"100%"},bgProps:{style:{borderRadius:2}},onChange:t=>{k((0,o.Z)({},T,t))}}),(0,g.jsx)(p.default,{hsva:T,style:{marginTop:10},bgProps:{style:{borderRadius:2}},onChange:t=>{k((0,o.Z)({},T,t))}})]})]}),(0,g.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",padding:"0 15px 15px 15px",userSelect:"none"},children:[(0,g.jsxs)("div",{style:{flex:1},children:[B==f.RGBA&&(0,g.jsx)(c.default,{hsva:T,rProps:{labelStyle:Z,inputStyle:P},gProps:{labelStyle:Z,inputStyle:P},bProps:{labelStyle:Z,inputStyle:P},aProps:{labelStyle:Z,inputStyle:P},onChange:t=>k(t.hsva)}),B===f.HEXA&&(0,g.jsx)(h.default,{label:"HEX",labelStyle:Z,inputStyle:P,value:T.a>0&&T.a<1?(0,n.hsvaToHexa)(T).toLocaleUpperCase():(0,n.hsvaToHex)(T).toLocaleUpperCase(),onChange:(t,r)=>{"string"===typeof r&&k((0,n.hexToHsva)(/^#/.test(r)?r:"#"+r))}}),B===f.HSLA&&(0,g.jsx)(u.default,{hsva:T,hProps:{labelStyle:Z,inputStyle:P},sProps:{labelStyle:Z,inputStyle:P},lProps:{labelStyle:Z,inputStyle:P},aProps:{labelStyle:Z,inputStyle:P},onChange:t=>k(t.hsva)})]}),(0,g.jsx)(x,{onClick:()=>{B===f.RGBA&&S(f.HSLA),B===f.HSLA&&S(f.HEXA),B===f.HEXA&&S(f.RGBA)}})]})]}),rectRender:()=>(0,g.jsx)(s.Fragment,{})}))}));v.displayName="Chrome";const y=v},1718:(t,r,e)=>{"use strict";e.r(r),e.d(r,{default:()=>h});var o=e(5773),a=e(808),s=e(8573),n=e(3789),l=e(6493),i=e(4760),d=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],p=s.forwardRef(((t,r)=>{var{prefixCls:e="w-color-editable-input-hsla",hsva:s,hProps:p={},sProps:h={},lProps:c={},aProps:u={},className:g,onChange:b}=t,x=(0,a.Z)(t,d),m=s?(0,l.hsvaToHsla)(s):{h:0,s:0,l:0,a:0},f=(t,r,e)=>{"number"===typeof t&&("h"===r&&(t<0&&(t=0),t>360&&(t=360),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{h:t}))))),"s"===r&&(t<0&&(t=0),t>100&&(t=100),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{s:t}))))),"l"===r&&(t<0&&(t=0),t>100&&(t=100),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{l:t}))))),"a"===r&&(t<0&&(t=0),t>1&&(t=1),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{a:t}))))))};return(0,i.jsx)(n.default,(0,o.Z)({ref:r,hsva:s,rProps:(0,o.Z)({label:"H",value:Math.round(m.h)},p,{onChange:(t,r)=>f(r,"h")}),gProps:(0,o.Z)({label:"S",value:Math.round(m.s)+"%"},h,{onChange:(t,r)=>f(r,"s")}),bProps:(0,o.Z)({label:"L",value:Math.round(m.l)+"%"},c,{onChange:(t,r)=>f(r,"l")}),aProps:(0,o.Z)({label:"A",value:Math.round(100*m.a)/100},u,{onChange:(t,r)=>f(r,"a")}),className:[e,g||""].filter(Boolean).join(" ")},x))}));p.displayName="EditableInputHSLA";const h=p},9211:(t,r,e)=>{"use strict";e.r(r),e.d(r,{GithubPlacement:()=>g,default:()=>x});var o=e(2769),a=e(5773),s=e(808),n=e(8573),l=e(6493),i=e(9887),d=e(4760),p={marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25};function h(t){var{style:r,title:e,checked:o,color:s,onClick:l,rectProps:i}=t,h=(0,n.useRef)(null),c=(0,n.useCallback)((()=>{h.current.style.zIndex="2",h.current.style.outline="#fff solid 2px",h.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"}),[]),u=(0,n.useCallback)((()=>{o||(h.current.style.zIndex="0",h.current.style.outline="initial",h.current.style.boxShadow="initial")}),[o]),g=o?{zIndex:1,outline:"#fff solid 2px",boxShadow:"rgb(0 0 0 / 25%) 0 0 5px 2px"}:{zIndex:0};return(0,d.jsx)("div",(0,a.Z)({ref:h,title:e},i,{onClick:l,onMouseEnter:c,onMouseLeave:u,style:(0,a.Z)({},r,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},p,g,null==i?void 0:i.style)}))}var c=["prefixCls","placement","className","style","color","colors","rectProps","onChange","rectRender"],u=["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],g=function(t){return t.Left="L",t.LeftTop="LT",t.LeftBottom="LB",t.Right="R",t.RightTop="RT",t.RightBottom="RB",t.Top="T",t.TopRight="TR",t.TopLeft="TL",t.Bottom="B",t.BottomLeft="BL",t.BottomRight="BR",t}({}),b=n.forwardRef(((t,r)=>{var{prefixCls:e="w-color-github",placement:p=g.TopRight,className:b,style:x,color:m,colors:f=u,rectProps:v={},onChange:y,rectRender:j}=t,w=(0,s.Z)(t,c),C="string"===typeof m&&(0,l.validHex)(m)?(0,l.hexToHsva)(m):m,R=m?(0,l.hsvaToHex)(C):"",T=(0,a.Z)({"--github-border":"1px solid rgba(0, 0, 0, 0.2)","--github-background-color":"#fff","--github-box-shadow":"rgb(0 0 0 / 15%) 0px 3px 12px","--github-arrow-border-color":"rgba(0, 0, 0, 0.15)",width:200,borderRadius:4,background:"var(--github-background-color)",boxShadow:"var(--github-box-shadow)",border:"var(--github-border)",position:"relative",padding:5},x),k={borderStyle:"solid",position:"absolute"},B=(0,a.Z)({},k),S=(0,a.Z)({},k);/^T/.test(p)&&(B.borderWidth="0 8px 8px",B.borderColor="transparent transparent var(--github-arrow-border-color)",S.borderWidth="0 7px 7px",S.borderColor="transparent transparent var(--github-background-color)"),p===g.TopRight&&(B.top=-8,S.top=-7),p===g.Top&&(B.top=-8,S.top=-7),p===g.TopLeft&&(B.top=-8,S.top=-7),/^B/.test(p)&&(B.borderWidth="8px 8px 0",B.borderColor="var(--github-arrow-border-color) transparent transparent",S.borderWidth="7px 7px 0",S.borderColor="var(--github-background-color) transparent transparent",p===g.BottomRight&&(B.top="100%",S.top="100%"),p===g.Bottom&&(B.top="100%",S.top="100%"),p===g.BottomLeft&&(B.top="100%",S.top="100%")),/^(B|T)/.test(p)&&(p!==g.Top&&p!==g.Bottom||(B.left="50%",B.marginLeft=-8,S.left="50%",S.marginLeft=-7),p!==g.TopRight&&p!==g.BottomRight||(B.right=10,S.right=11),p!==g.TopLeft&&p!==g.BottomLeft||(B.left=7,S.left=8)),/^L/.test(p)&&(B.borderWidth="8px 8px 8px 0",B.borderColor="transparent var(--github-arrow-border-color) transparent transparent",S.borderWidth="7px 7px 7px 0",S.borderColor="transparent var(--github-background-color) transparent transparent",B.left=-8,S.left=-7),/^R/.test(p)&&(B.borderWidth="8px 0 8px 8px",B.borderColor="transparent transparent transparent var(--github-arrow-border-color)",S.borderWidth="7px 0 7px 7px",S.borderColor="transparent transparent transparent var(--github-background-color)",B.right=-8,S.right=-7),/^(L|R)/.test(p)&&(p!==g.RightTop&&p!==g.LeftTop||(B.top=5,S.top=6),p!==g.Left&&p!==g.Right||(B.top="50%",S.top="50%",B.marginTop=-8,S.marginTop=-7),p!==g.LeftBottom&&p!==g.RightBottom||(B.top="100%",S.top="100%",B.marginTop=-21,S.marginTop=-20));return(0,d.jsx)(i.default,(0,a.Z)({ref:r,className:[e,b].filter(Boolean).join(" "),colors:f,color:R,rectRender:t=>{var r=(0,a.Z)({},((0,o.Z)(t),t)),e=j&&j((0,a.Z)({},r));return e||(0,d.jsx)(h,(0,a.Z)({},r,{rectProps:v}))}},w,{onChange:t=>y&&y((0,l.color)(t)),style:T,rectProps:{style:{marginRight:0,marginBottom:0,borderRadius:0,height:25,width:25}},addonBefore:(0,d.jsxs)(n.Fragment,{children:[(0,d.jsx)("div",{style:B}),(0,d.jsx)("div",{style:S})]})}))}));b.displayName="Github";const x=b},2769:(t,r,e)=>{"use strict";function o(t){if(null==t)throw new TypeError("Cannot destructure "+t)}e.d(r,{Z:()=>o})}}]); +//# sourceMappingURL=31.4c831a4d.chunk.js.map \ No newline at end of file diff --git a/static/js/31.f7fcaedc.chunk.js.map b/static/js/31.4c831a4d.chunk.js.map similarity index 99% rename from static/js/31.f7fcaedc.chunk.js.map rename to static/js/31.4c831a4d.chunk.js.map index d4bb6546c..e30c9c63e 100644 --- a/static/js/31.f7fcaedc.chunk.js.map +++ b/static/js/31.4c831a4d.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/31.f7fcaedc.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","../../packages/color-chrome/esm/Arrow.js","../../packages/color-chrome/esm/index.js","../../packages/color-editable-input-hsla/esm/index.js","../../packages/color-github/esm/Point.js","../../packages/color-github/esm/index.js","../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\"];\nimport React, { useRef, useCallback } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Arrow(props) {\n var {\n style\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var btn = useRef(null);\n var handleMouseEnter = useCallback(() => {\n btn.current.style['backgroundColor'] = 'var(--chrome-arrow-background-color)';\n }, []);\n var handleMouseLeave = useCallback(() => {\n btn.current.style['backgroundColor'] = 'transparent';\n }, []);\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: btn,\n style: _extends({\n marginLeft: 5,\n cursor: 'pointer',\n transition: 'background-color .3s',\n borderRadius: 2\n }, style)\n }, other, {\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n children: /*#__PURE__*/_jsx(\"svg\", {\n viewBox: \"0 0 1024 1024\",\n width: \"24\",\n height: \"24\",\n style: {\n display: 'block'\n },\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z\",\n fill: \"var(--chrome-arrow-fill)\"\n })\n })\n }));\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"color\", \"inputType\", \"rectProps\", \"onChange\"];\nimport React, { Fragment } from 'react';\nimport { hsvaToRgbaString, color as handleColor, validHex, hexToHsva, hsvaToHex, hsvaToHexa } from '@uiw/color-convert';\nimport Github, { GithubPlacement } from '@uiw/react-color-github';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport Alpha from '@uiw/react-color-alpha';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport EditableInputRGBA from '@uiw/react-color-editable-input-rgba';\nimport EditableInputHSLA from '@uiw/react-color-editable-input-hsla';\nimport { useState } from 'react';\nimport Arrow from './Arrow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var ChromeInputType = /*#__PURE__*/function (ChromeInputType) {\n ChromeInputType[\"HEXA\"] = \"hexa\";\n ChromeInputType[\"RGBA\"] = \"rgba\";\n ChromeInputType[\"HSLA\"] = \"hsla\";\n return ChromeInputType;\n}({});\nvar Chrome = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-chrome',\n className,\n style,\n color,\n inputType = ChromeInputType.RGBA,\n rectProps = {},\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {\n h: 0,\n s: 0,\n l: 0,\n a: 0\n };\n var handleChange = hsv => onChange && onChange(handleColor(hsv));\n var [type, setType] = useState(inputType);\n var handleClick = () => {\n if (type === ChromeInputType.RGBA) {\n setType(ChromeInputType.HSLA);\n }\n if (type === ChromeInputType.HSLA) {\n setType(ChromeInputType.HEXA);\n }\n if (type === ChromeInputType.HEXA) {\n setType(ChromeInputType.RGBA);\n }\n };\n var labelStyle = {\n paddingTop: 6\n };\n var inputStyle = {\n textAlign: 'center',\n paddingTop: 4,\n paddingBottom: 4\n };\n var wrapperStyle = _extends({\n '--chrome-arrow-fill': '#333',\n '--chrome-arrow-background-color': '#e8e8e8',\n borderRadius: 0,\n flexDirection: 'column',\n width: 230,\n padding: 0\n }, style);\n var alphaStyle = {\n '--chrome-alpha-box-shadow': 'rgb(0 0 0 / 25%) 0px 0px 1px inset',\n borderRadius: '50%',\n background: hsvaToRgbaString(hsva),\n boxShadow: 'var(--chrome-alpha-box-shadow)'\n };\n return /*#__PURE__*/_jsx(Github, _extends({\n ref: ref,\n color: hsva,\n style: wrapperStyle,\n colors: undefined,\n className: [prefixCls, className].filter(Boolean).join(' '),\n placement: GithubPlacement.TopLeft\n }, other, {\n addonAfter: /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n style: {\n width: '100%',\n height: 130\n },\n onChange: newColor => {\n handleChange(_extends({}, hsva, newColor, {\n a: hsva.a\n }));\n }\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n padding: 15,\n display: 'flex',\n alignItems: 'center'\n },\n children: [/*#__PURE__*/_jsx(Alpha, {\n width: 24,\n height: 24,\n hsva: hsva,\n radius: 2,\n style: {\n marginRight: 15,\n borderRadius: '50%'\n },\n bgProps: {\n style: {\n background: 'transparent'\n }\n },\n innerProps: {\n style: alphaStyle\n },\n pointer: () => /*#__PURE__*/_jsx(Fragment, {})\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n flex: 1\n },\n children: [/*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n style: {\n width: '100%'\n },\n bgProps: {\n style: {\n borderRadius: 2\n }\n },\n onChange: newHue => {\n handleChange(_extends({}, hsva, newHue));\n }\n }), /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n style: {\n marginTop: 10\n },\n bgProps: {\n style: {\n borderRadius: 2\n }\n },\n onChange: newAlpha => {\n handleChange(_extends({}, hsva, newAlpha));\n }\n })]\n })]\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'flex-start',\n padding: '0 15px 15px 15px',\n userSelect: 'none'\n },\n children: [/*#__PURE__*/_jsxs(\"div\", {\n style: {\n flex: 1\n },\n children: [type == ChromeInputType.RGBA && /*#__PURE__*/_jsx(EditableInputRGBA, {\n hsva: hsva,\n rProps: {\n labelStyle,\n inputStyle\n },\n gProps: {\n labelStyle,\n inputStyle\n },\n bProps: {\n labelStyle,\n inputStyle\n },\n aProps: {\n labelStyle,\n inputStyle\n },\n onChange: reColor => handleChange(reColor.hsva)\n }), type === ChromeInputType.HEXA && /*#__PURE__*/_jsx(EditableInput, {\n label: \"HEX\",\n labelStyle: labelStyle,\n inputStyle: inputStyle,\n value: hsva.a > 0 && hsva.a < 1 ? hsvaToHexa(hsva).toLocaleUpperCase() : hsvaToHex(hsva).toLocaleUpperCase(),\n onChange: (_, value) => {\n if (typeof value === 'string') {\n handleChange(hexToHsva(/^#/.test(value) ? value : \"#\" + value));\n }\n }\n }), type === ChromeInputType.HSLA && /*#__PURE__*/_jsx(EditableInputHSLA, {\n hsva: hsva,\n hProps: {\n labelStyle,\n inputStyle\n },\n sProps: {\n labelStyle,\n inputStyle\n },\n lProps: {\n labelStyle,\n inputStyle\n },\n aProps: {\n labelStyle,\n inputStyle\n },\n onChange: reColor => handleChange(reColor.hsva)\n })]\n }), /*#__PURE__*/_jsx(Arrow, {\n onClick: handleClick\n })]\n })]\n }),\n rectRender: () => /*#__PURE__*/_jsx(Fragment, {})\n }));\n});\nChrome.displayName = 'Chrome';\nexport default Chrome;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"hsva\", \"hProps\", \"sProps\", \"lProps\", \"aProps\", \"className\", \"onChange\"];\nimport React from 'react';\nimport EditableInputRGBA from '@uiw/react-color-editable-input-rgba';\nimport { color as handleColor, hsvaToHsla, hslaToHsva } from '@uiw/color-convert';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar EditableInputHSLA = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-editable-input-hsla',\n hsva,\n hProps = {},\n sProps = {},\n lProps = {},\n aProps = {},\n className,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsla = hsva ? hsvaToHsla(hsva) : {\n h: 0,\n s: 0,\n l: 0,\n a: 0\n };\n var handleChange = (value, type, evn) => {\n if (typeof value === 'number') {\n if (type === 'h') {\n if (value < 0) value = 0;\n if (value > 360) value = 360;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n h: value\n }))));\n }\n if (type === 's') {\n if (value < 0) value = 0;\n if (value > 100) value = 100;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n s: value\n }))));\n }\n if (type === 'l') {\n if (value < 0) value = 0;\n if (value > 100) value = 100;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n l: value\n }))));\n }\n if (type === 'a') {\n if (value < 0) value = 0;\n if (value > 1) value = 1;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n a: value\n }))));\n }\n }\n };\n return /*#__PURE__*/_jsx(EditableInputRGBA, _extends({\n ref: ref,\n hsva: hsva,\n rProps: _extends({\n label: 'H',\n value: Math.round(hsla.h)\n }, hProps, {\n onChange: (evn, val) => handleChange(val, 'h', evn)\n }),\n gProps: _extends({\n label: 'S',\n value: Math.round(hsla.s) + \"%\"\n }, sProps, {\n onChange: (evn, val) => handleChange(val, 's', evn)\n }),\n bProps: _extends({\n label: 'L',\n value: Math.round(hsla.l) + \"%\"\n }, lProps, {\n onChange: (evn, val) => handleChange(val, 'l', evn)\n }),\n aProps: _extends({\n label: 'A',\n value: Math.round(hsla.a * 100) / 100\n }, aProps, {\n onChange: (evn, val) => handleChange(val, 'a', evn)\n }),\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other));\n});\nEditableInputHSLA.displayName = 'EditableInputHSLA';\nexport default EditableInputHSLA;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { useCallback } from 'react';\nimport { useRef } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar defalutStyle = {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n boxSizing: 'border-box',\n height: 25,\n width: 25\n};\nexport default function Point(_ref) {\n var {\n style,\n title,\n checked,\n color,\n onClick,\n rectProps\n } = _ref;\n var btn = useRef(null);\n var handleMouseEnter = useCallback(() => {\n btn.current.style['zIndex'] = '2';\n btn.current.style['outline'] = '#fff solid 2px';\n btn.current.style['boxShadow'] = 'rgb(0 0 0 / 25%) 0 0 5px 2px';\n }, []);\n var handleMouseLeave = useCallback(() => {\n if (!checked) {\n btn.current.style['zIndex'] = '0';\n btn.current.style['outline'] = 'initial';\n btn.current.style['boxShadow'] = 'initial';\n }\n }, [checked]);\n var rectStyle = checked ? {\n zIndex: 1,\n outline: '#fff solid 2px',\n boxShadow: 'rgb(0 0 0 / 25%) 0 0 5px 2px'\n } : {\n zIndex: 0\n };\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: btn,\n title: title\n }, rectProps, {\n onClick: onClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n style: _extends({}, style, {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n boxSizing: 'border-box',\n height: 25,\n width: 25\n }, defalutStyle, rectStyle, rectProps == null ? void 0 : rectProps.style)\n }));\n}","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"placement\", \"className\", \"style\", \"color\", \"colors\", \"rectProps\", \"onChange\", \"rectRender\"];\nimport React, { Fragment } from 'react';\nimport { color as handleColor, validHex, hexToHsva, hsvaToHex } from '@uiw/color-convert';\nimport Swatch from '@uiw/react-color-swatch';\nimport Point from './Point';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar CORLER_HEX = ['#B80000', '#DB3E00', '#FCCB00', '#008B02', '#006B76', '#1273DE', '#004DCF', '#5300EB', '#EB9694', '#FAD0C3', '#FEF3BD', '#C1E1C5', '#BEDADC', '#C4DEF6', '#BED3F3', '#D4C4FB'];\nexport var GithubPlacement = /*#__PURE__*/function (GithubPlacement) {\n GithubPlacement[\"Left\"] = \"L\";\n GithubPlacement[\"LeftTop\"] = \"LT\";\n GithubPlacement[\"LeftBottom\"] = \"LB\";\n GithubPlacement[\"Right\"] = \"R\";\n GithubPlacement[\"RightTop\"] = \"RT\";\n GithubPlacement[\"RightBottom\"] = \"RB\";\n GithubPlacement[\"Top\"] = \"T\";\n GithubPlacement[\"TopRight\"] = \"TR\";\n GithubPlacement[\"TopLeft\"] = \"TL\";\n GithubPlacement[\"Bottom\"] = \"B\";\n GithubPlacement[\"BottomLeft\"] = \"BL\";\n GithubPlacement[\"BottomRight\"] = \"BR\";\n return GithubPlacement;\n}({});\nvar Github = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-github',\n placement = GithubPlacement.TopRight,\n className,\n style,\n color,\n colors = CORLER_HEX,\n rectProps = {},\n onChange,\n rectRender\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva) : '';\n var handleChange = hsv => onChange && onChange(handleColor(hsv));\n var styleWrapper = _extends({\n '--github-border': '1px solid rgba(0, 0, 0, 0.2)',\n '--github-background-color': '#fff',\n '--github-box-shadow': 'rgb(0 0 0 / 15%) 0px 3px 12px',\n '--github-arrow-border-color': 'rgba(0, 0, 0, 0.15)',\n width: 200,\n borderRadius: 4,\n background: 'var(--github-background-color)',\n boxShadow: 'var(--github-box-shadow)',\n border: 'var(--github-border)',\n position: 'relative',\n padding: 5\n }, style);\n var rStyle = {\n borderStyle: 'solid',\n position: 'absolute'\n };\n var arrBrStyl = _extends({}, rStyle);\n var arrStyl = _extends({}, rStyle);\n if (/^T/.test(placement)) {\n arrBrStyl.borderWidth = '0 8px 8px';\n arrBrStyl.borderColor = 'transparent transparent var(--github-arrow-border-color)';\n arrStyl.borderWidth = '0 7px 7px';\n arrStyl.borderColor = 'transparent transparent var(--github-background-color)';\n }\n if (placement === GithubPlacement.TopRight) {\n arrBrStyl.top = -8;\n arrStyl.top = -7;\n }\n if (placement === GithubPlacement.Top) {\n arrBrStyl.top = -8;\n arrStyl.top = -7;\n }\n if (placement === GithubPlacement.TopLeft) {\n arrBrStyl.top = -8;\n arrStyl.top = -7;\n }\n if (/^B/.test(placement)) {\n arrBrStyl.borderWidth = '8px 8px 0';\n arrBrStyl.borderColor = 'var(--github-arrow-border-color) transparent transparent';\n arrStyl.borderWidth = '7px 7px 0';\n arrStyl.borderColor = 'var(--github-background-color) transparent transparent';\n if (placement === GithubPlacement.BottomRight) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n }\n if (placement === GithubPlacement.Bottom) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n }\n if (placement === GithubPlacement.BottomLeft) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n }\n }\n if (/^(B|T)/.test(placement)) {\n if (placement === GithubPlacement.Top || placement === GithubPlacement.Bottom) {\n arrBrStyl.left = '50%';\n arrBrStyl.marginLeft = -8;\n arrStyl.left = '50%';\n arrStyl.marginLeft = -7;\n }\n if (placement === GithubPlacement.TopRight || placement === GithubPlacement.BottomRight) {\n arrBrStyl.right = 10;\n arrStyl.right = 11;\n }\n if (placement === GithubPlacement.TopLeft || placement === GithubPlacement.BottomLeft) {\n arrBrStyl.left = 7;\n arrStyl.left = 8;\n }\n }\n if (/^L/.test(placement)) {\n arrBrStyl.borderWidth = '8px 8px 8px 0';\n arrBrStyl.borderColor = 'transparent var(--github-arrow-border-color) transparent transparent';\n arrStyl.borderWidth = '7px 7px 7px 0';\n arrStyl.borderColor = 'transparent var(--github-background-color) transparent transparent';\n arrBrStyl.left = -8;\n arrStyl.left = -7;\n }\n if (/^R/.test(placement)) {\n arrBrStyl.borderWidth = '8px 0 8px 8px';\n arrBrStyl.borderColor = 'transparent transparent transparent var(--github-arrow-border-color)';\n arrStyl.borderWidth = '7px 0 7px 7px';\n arrStyl.borderColor = 'transparent transparent transparent var(--github-background-color)';\n arrBrStyl.right = -8;\n arrStyl.right = -7;\n }\n if (/^(L|R)/.test(placement)) {\n if (placement === GithubPlacement.RightTop || placement === GithubPlacement.LeftTop) {\n arrBrStyl.top = 5;\n arrStyl.top = 6;\n }\n if (placement === GithubPlacement.Left || placement === GithubPlacement.Right) {\n arrBrStyl.top = '50%';\n arrStyl.top = '50%';\n arrBrStyl.marginTop = -8;\n arrStyl.marginTop = -7;\n }\n if (placement === GithubPlacement.LeftBottom || placement === GithubPlacement.RightBottom) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n arrBrStyl.marginTop = -21;\n arrStyl.marginTop = -20;\n }\n }\n var render = _ref => {\n var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var handle = rectRender && rectRender(_extends({}, props));\n if (handle) return handle;\n return /*#__PURE__*/_jsx(Point, _extends({}, props, {\n rectProps: rectProps\n }));\n };\n return /*#__PURE__*/_jsx(Swatch, _extends({\n ref: ref,\n className: [prefixCls, className].filter(Boolean).join(' '),\n colors: colors,\n color: hex,\n rectRender: render\n }, other, {\n onChange: handleChange,\n style: styleWrapper,\n rectProps: {\n style: {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n height: 25,\n width: 25\n }\n },\n addonBefore: /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n style: arrBrStyl\n }), /*#__PURE__*/_jsx(\"div\", {\n style: arrStyl\n })]\n })\n }));\n});\nGithub.displayName = 'Github';\nexport default Github;","export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","_excluded","Arrow","other","_objectWithoutPropertiesLoose","btn","useRef","handleMouseEnter","useCallback","current","handleMouseLeave","_extends","ref","marginLeft","cursor","transition","borderRadius","onMouseEnter","onMouseLeave","viewBox","width","height","display","d","fill","ChromeInputType","Chrome","React","prefixCls","color","inputType","RGBA","rectProps","onChange","hsva","validHex","hexToHsva","h","s","l","handleChange","hsv","handleColor","type","setType","useState","labelStyle","paddingTop","inputStyle","textAlign","paddingBottom","wrapperStyle","flexDirection","padding","alphaStyle","background","hsvaToRgbaString","Github","colors","undefined","filter","Boolean","join","placement","GithubPlacement","TopLeft","addonAfter","Fragment","Saturation","newColor","alignItems","Alpha","radius","marginRight","bgProps","innerProps","pointer","flex","Hue","hue","newHue","marginTop","newAlpha","userSelect","EditableInputRGBA","rProps","gProps","bProps","aProps","reColor","HEXA","EditableInput","label","value","hsvaToHexa","toLocaleUpperCase","hsvaToHex","_","test","HSLA","EditableInputHSLA","hProps","sProps","lProps","onClick","handleClick","rectRender","displayName","hsla","hsvaToHsla","evn","hslaToHsva","Math","round","val","defalutStyle","marginBottom","boxSizing","Point","_ref","title","checked","rectStyle","zIndex","outline","CORLER_HEX","TopRight","hex","styleWrapper","position","rStyle","borderStyle","arrBrStyl","arrStyl","borderWidth","borderColor","top","Top","BottomRight","Bottom","BottomLeft","left","right","RightTop","LeftTop","Left","Right","LeftBottom","RightBottom","Swatch","_objectDestructuringEmpty","handle","addonBefore","obj","TypeError"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/31.4c831a4d.chunk.js","mappings":"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","sources":["../../node_modules/@babel/standalone|sync","components/Markdown.tsx","../../packages/color-chrome/esm/Arrow.js","../../packages/color-chrome/esm/index.js","../../packages/color-editable-input-hsla/esm/index.js","../../packages/color-github/esm/Point.js","../../packages/color-github/esm/index.js","../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 363;\nmodule.exports = webpackEmptyContext;","import { Component } from 'react';\nimport { CodeBlockData } from 'markdown-react-code-preview-loader';\nimport MarkdownPreviewExample from '@uiw/react-markdown-preview-example/markdown';\nimport styled from 'styled-components';\n\nconst MarkdownWrapper = styled.div`\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n`;\n\ninterface MarkdownProps {}\ninterface MarkdownState {\n mdStr: string;\n mdObj?: CodeBlockData;\n}\n\nconst EditorUrl = styled.a`\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n`;\n\nconst Wrapper = styled.div`\n padding-bottom: 120px;\n`;\n\nconst Footer = styled.footer`\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n`;\n\nconst Example = styled.div`\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n`;\n\nexport default class Markdown extends Component {\n constructor(props: MarkdownProps) {\n super(props);\n this.state = {\n mdStr: '',\n };\n }\n editorUrl?: string;\n getMdStr?: any;\n example?: React.ReactNode;\n componentDidMount() {\n if (this.getMdStr) {\n this.getMdStr().then((str: any) => {\n this.setState({\n mdStr: str.default.source,\n mdObj: str.default,\n });\n });\n }\n }\n render() {\n const { source, components, data } = (this.state.mdObj || {}) as CodeBlockData;\n return (\n \n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n {this.example && (\n \n

Example

\n {this.example}\n
\n )}\n \n {this.editorUrl && (\n \n Edit this page\n \n )}\n
\n \n
\n );\n }\n}\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\"];\nimport React, { useRef, useCallback } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Arrow(props) {\n var {\n style\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var btn = useRef(null);\n var handleMouseEnter = useCallback(() => {\n btn.current.style['backgroundColor'] = 'var(--chrome-arrow-background-color)';\n }, []);\n var handleMouseLeave = useCallback(() => {\n btn.current.style['backgroundColor'] = 'transparent';\n }, []);\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: btn,\n style: _extends({\n marginLeft: 5,\n cursor: 'pointer',\n transition: 'background-color .3s',\n borderRadius: 2\n }, style)\n }, other, {\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n children: /*#__PURE__*/_jsx(\"svg\", {\n viewBox: \"0 0 1024 1024\",\n width: \"24\",\n height: \"24\",\n style: {\n display: 'block'\n },\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z\",\n fill: \"var(--chrome-arrow-fill)\"\n })\n })\n }));\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"color\", \"inputType\", \"rectProps\", \"onChange\"];\nimport React, { Fragment } from 'react';\nimport { hsvaToRgbaString, color as handleColor, validHex, hexToHsva, hsvaToHex, hsvaToHexa } from '@uiw/color-convert';\nimport Github, { GithubPlacement } from '@uiw/react-color-github';\nimport Saturation from '@uiw/react-color-saturation';\nimport Hue from '@uiw/react-color-hue';\nimport Alpha from '@uiw/react-color-alpha';\nimport EditableInput from '@uiw/react-color-editable-input';\nimport EditableInputRGBA from '@uiw/react-color-editable-input-rgba';\nimport EditableInputHSLA from '@uiw/react-color-editable-input-hsla';\nimport { useState } from 'react';\nimport Arrow from './Arrow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport var ChromeInputType = /*#__PURE__*/function (ChromeInputType) {\n ChromeInputType[\"HEXA\"] = \"hexa\";\n ChromeInputType[\"RGBA\"] = \"rgba\";\n ChromeInputType[\"HSLA\"] = \"hsla\";\n return ChromeInputType;\n}({});\nvar Chrome = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-chrome',\n className,\n style,\n color,\n inputType = ChromeInputType.RGBA,\n rectProps = {},\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {\n h: 0,\n s: 0,\n l: 0,\n a: 0\n };\n var handleChange = hsv => onChange && onChange(handleColor(hsv));\n var [type, setType] = useState(inputType);\n var handleClick = () => {\n if (type === ChromeInputType.RGBA) {\n setType(ChromeInputType.HSLA);\n }\n if (type === ChromeInputType.HSLA) {\n setType(ChromeInputType.HEXA);\n }\n if (type === ChromeInputType.HEXA) {\n setType(ChromeInputType.RGBA);\n }\n };\n var labelStyle = {\n paddingTop: 6\n };\n var inputStyle = {\n textAlign: 'center',\n paddingTop: 4,\n paddingBottom: 4\n };\n var wrapperStyle = _extends({\n '--chrome-arrow-fill': '#333',\n '--chrome-arrow-background-color': '#e8e8e8',\n borderRadius: 0,\n flexDirection: 'column',\n width: 230,\n padding: 0\n }, style);\n var alphaStyle = {\n '--chrome-alpha-box-shadow': 'rgb(0 0 0 / 25%) 0px 0px 1px inset',\n borderRadius: '50%',\n background: hsvaToRgbaString(hsva),\n boxShadow: 'var(--chrome-alpha-box-shadow)'\n };\n return /*#__PURE__*/_jsx(Github, _extends({\n ref: ref,\n color: hsva,\n style: wrapperStyle,\n colors: undefined,\n className: [prefixCls, className].filter(Boolean).join(' '),\n placement: GithubPlacement.TopLeft\n }, other, {\n addonAfter: /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(Saturation, {\n hsva: hsva,\n style: {\n width: '100%',\n height: 130\n },\n onChange: newColor => {\n handleChange(_extends({}, hsva, newColor, {\n a: hsva.a\n }));\n }\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n padding: 15,\n display: 'flex',\n alignItems: 'center'\n },\n children: [/*#__PURE__*/_jsx(Alpha, {\n width: 24,\n height: 24,\n hsva: hsva,\n radius: 2,\n style: {\n marginRight: 15,\n borderRadius: '50%'\n },\n bgProps: {\n style: {\n background: 'transparent'\n }\n },\n innerProps: {\n style: alphaStyle\n },\n pointer: () => /*#__PURE__*/_jsx(Fragment, {})\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n flex: 1\n },\n children: [/*#__PURE__*/_jsx(Hue, {\n hue: hsva.h,\n style: {\n width: '100%'\n },\n bgProps: {\n style: {\n borderRadius: 2\n }\n },\n onChange: newHue => {\n handleChange(_extends({}, hsva, newHue));\n }\n }), /*#__PURE__*/_jsx(Alpha, {\n hsva: hsva,\n style: {\n marginTop: 10\n },\n bgProps: {\n style: {\n borderRadius: 2\n }\n },\n onChange: newAlpha => {\n handleChange(_extends({}, hsva, newAlpha));\n }\n })]\n })]\n }), /*#__PURE__*/_jsxs(\"div\", {\n style: {\n display: 'flex',\n alignItems: 'flex-start',\n padding: '0 15px 15px 15px',\n userSelect: 'none'\n },\n children: [/*#__PURE__*/_jsxs(\"div\", {\n style: {\n flex: 1\n },\n children: [type == ChromeInputType.RGBA && /*#__PURE__*/_jsx(EditableInputRGBA, {\n hsva: hsva,\n rProps: {\n labelStyle,\n inputStyle\n },\n gProps: {\n labelStyle,\n inputStyle\n },\n bProps: {\n labelStyle,\n inputStyle\n },\n aProps: {\n labelStyle,\n inputStyle\n },\n onChange: reColor => handleChange(reColor.hsva)\n }), type === ChromeInputType.HEXA && /*#__PURE__*/_jsx(EditableInput, {\n label: \"HEX\",\n labelStyle: labelStyle,\n inputStyle: inputStyle,\n value: hsva.a > 0 && hsva.a < 1 ? hsvaToHexa(hsva).toLocaleUpperCase() : hsvaToHex(hsva).toLocaleUpperCase(),\n onChange: (_, value) => {\n if (typeof value === 'string') {\n handleChange(hexToHsva(/^#/.test(value) ? value : \"#\" + value));\n }\n }\n }), type === ChromeInputType.HSLA && /*#__PURE__*/_jsx(EditableInputHSLA, {\n hsva: hsva,\n hProps: {\n labelStyle,\n inputStyle\n },\n sProps: {\n labelStyle,\n inputStyle\n },\n lProps: {\n labelStyle,\n inputStyle\n },\n aProps: {\n labelStyle,\n inputStyle\n },\n onChange: reColor => handleChange(reColor.hsva)\n })]\n }), /*#__PURE__*/_jsx(Arrow, {\n onClick: handleClick\n })]\n })]\n }),\n rectRender: () => /*#__PURE__*/_jsx(Fragment, {})\n }));\n});\nChrome.displayName = 'Chrome';\nexport default Chrome;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"hsva\", \"hProps\", \"sProps\", \"lProps\", \"aProps\", \"className\", \"onChange\"];\nimport React from 'react';\nimport EditableInputRGBA from '@uiw/react-color-editable-input-rgba';\nimport { color as handleColor, hsvaToHsla, hslaToHsva } from '@uiw/color-convert';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar EditableInputHSLA = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-editable-input-hsla',\n hsva,\n hProps = {},\n sProps = {},\n lProps = {},\n aProps = {},\n className,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsla = hsva ? hsvaToHsla(hsva) : {\n h: 0,\n s: 0,\n l: 0,\n a: 0\n };\n var handleChange = (value, type, evn) => {\n if (typeof value === 'number') {\n if (type === 'h') {\n if (value < 0) value = 0;\n if (value > 360) value = 360;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n h: value\n }))));\n }\n if (type === 's') {\n if (value < 0) value = 0;\n if (value > 100) value = 100;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n s: value\n }))));\n }\n if (type === 'l') {\n if (value < 0) value = 0;\n if (value > 100) value = 100;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n l: value\n }))));\n }\n if (type === 'a') {\n if (value < 0) value = 0;\n if (value > 1) value = 1;\n onChange && onChange(handleColor(hslaToHsva(_extends({}, hsla, {\n a: value\n }))));\n }\n }\n };\n return /*#__PURE__*/_jsx(EditableInputRGBA, _extends({\n ref: ref,\n hsva: hsva,\n rProps: _extends({\n label: 'H',\n value: Math.round(hsla.h)\n }, hProps, {\n onChange: (evn, val) => handleChange(val, 'h', evn)\n }),\n gProps: _extends({\n label: 'S',\n value: Math.round(hsla.s) + \"%\"\n }, sProps, {\n onChange: (evn, val) => handleChange(val, 's', evn)\n }),\n bProps: _extends({\n label: 'L',\n value: Math.round(hsla.l) + \"%\"\n }, lProps, {\n onChange: (evn, val) => handleChange(val, 'l', evn)\n }),\n aProps: _extends({\n label: 'A',\n value: Math.round(hsla.a * 100) / 100\n }, aProps, {\n onChange: (evn, val) => handleChange(val, 'a', evn)\n }),\n className: [prefixCls, className || ''].filter(Boolean).join(' ')\n }, other));\n});\nEditableInputHSLA.displayName = 'EditableInputHSLA';\nexport default EditableInputHSLA;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React, { useCallback } from 'react';\nimport { useRef } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar defalutStyle = {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n boxSizing: 'border-box',\n height: 25,\n width: 25\n};\nexport default function Point(_ref) {\n var {\n style,\n title,\n checked,\n color,\n onClick,\n rectProps\n } = _ref;\n var btn = useRef(null);\n var handleMouseEnter = useCallback(() => {\n btn.current.style['zIndex'] = '2';\n btn.current.style['outline'] = '#fff solid 2px';\n btn.current.style['boxShadow'] = 'rgb(0 0 0 / 25%) 0 0 5px 2px';\n }, []);\n var handleMouseLeave = useCallback(() => {\n if (!checked) {\n btn.current.style['zIndex'] = '0';\n btn.current.style['outline'] = 'initial';\n btn.current.style['boxShadow'] = 'initial';\n }\n }, [checked]);\n var rectStyle = checked ? {\n zIndex: 1,\n outline: '#fff solid 2px',\n boxShadow: 'rgb(0 0 0 / 25%) 0 0 5px 2px'\n } : {\n zIndex: 0\n };\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: btn,\n title: title\n }, rectProps, {\n onClick: onClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n style: _extends({}, style, {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n boxSizing: 'border-box',\n height: 25,\n width: 25\n }, defalutStyle, rectStyle, rectProps == null ? void 0 : rectProps.style)\n }));\n}","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"prefixCls\", \"placement\", \"className\", \"style\", \"color\", \"colors\", \"rectProps\", \"onChange\", \"rectRender\"];\nimport React, { Fragment } from 'react';\nimport { color as handleColor, validHex, hexToHsva, hsvaToHex } from '@uiw/color-convert';\nimport Swatch from '@uiw/react-color-swatch';\nimport Point from './Point';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar CORLER_HEX = ['#B80000', '#DB3E00', '#FCCB00', '#008B02', '#006B76', '#1273DE', '#004DCF', '#5300EB', '#EB9694', '#FAD0C3', '#FEF3BD', '#C1E1C5', '#BEDADC', '#C4DEF6', '#BED3F3', '#D4C4FB'];\nexport var GithubPlacement = /*#__PURE__*/function (GithubPlacement) {\n GithubPlacement[\"Left\"] = \"L\";\n GithubPlacement[\"LeftTop\"] = \"LT\";\n GithubPlacement[\"LeftBottom\"] = \"LB\";\n GithubPlacement[\"Right\"] = \"R\";\n GithubPlacement[\"RightTop\"] = \"RT\";\n GithubPlacement[\"RightBottom\"] = \"RB\";\n GithubPlacement[\"Top\"] = \"T\";\n GithubPlacement[\"TopRight\"] = \"TR\";\n GithubPlacement[\"TopLeft\"] = \"TL\";\n GithubPlacement[\"Bottom\"] = \"B\";\n GithubPlacement[\"BottomLeft\"] = \"BL\";\n GithubPlacement[\"BottomRight\"] = \"BR\";\n return GithubPlacement;\n}({});\nvar Github = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n prefixCls = 'w-color-github',\n placement = GithubPlacement.TopRight,\n className,\n style,\n color,\n colors = CORLER_HEX,\n rectProps = {},\n onChange,\n rectRender\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color;\n var hex = color ? hsvaToHex(hsva) : '';\n var handleChange = hsv => onChange && onChange(handleColor(hsv));\n var styleWrapper = _extends({\n '--github-border': '1px solid rgba(0, 0, 0, 0.2)',\n '--github-background-color': '#fff',\n '--github-box-shadow': 'rgb(0 0 0 / 15%) 0px 3px 12px',\n '--github-arrow-border-color': 'rgba(0, 0, 0, 0.15)',\n width: 200,\n borderRadius: 4,\n background: 'var(--github-background-color)',\n boxShadow: 'var(--github-box-shadow)',\n border: 'var(--github-border)',\n position: 'relative',\n padding: 5\n }, style);\n var rStyle = {\n borderStyle: 'solid',\n position: 'absolute'\n };\n var arrBrStyl = _extends({}, rStyle);\n var arrStyl = _extends({}, rStyle);\n if (/^T/.test(placement)) {\n arrBrStyl.borderWidth = '0 8px 8px';\n arrBrStyl.borderColor = 'transparent transparent var(--github-arrow-border-color)';\n arrStyl.borderWidth = '0 7px 7px';\n arrStyl.borderColor = 'transparent transparent var(--github-background-color)';\n }\n if (placement === GithubPlacement.TopRight) {\n arrBrStyl.top = -8;\n arrStyl.top = -7;\n }\n if (placement === GithubPlacement.Top) {\n arrBrStyl.top = -8;\n arrStyl.top = -7;\n }\n if (placement === GithubPlacement.TopLeft) {\n arrBrStyl.top = -8;\n arrStyl.top = -7;\n }\n if (/^B/.test(placement)) {\n arrBrStyl.borderWidth = '8px 8px 0';\n arrBrStyl.borderColor = 'var(--github-arrow-border-color) transparent transparent';\n arrStyl.borderWidth = '7px 7px 0';\n arrStyl.borderColor = 'var(--github-background-color) transparent transparent';\n if (placement === GithubPlacement.BottomRight) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n }\n if (placement === GithubPlacement.Bottom) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n }\n if (placement === GithubPlacement.BottomLeft) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n }\n }\n if (/^(B|T)/.test(placement)) {\n if (placement === GithubPlacement.Top || placement === GithubPlacement.Bottom) {\n arrBrStyl.left = '50%';\n arrBrStyl.marginLeft = -8;\n arrStyl.left = '50%';\n arrStyl.marginLeft = -7;\n }\n if (placement === GithubPlacement.TopRight || placement === GithubPlacement.BottomRight) {\n arrBrStyl.right = 10;\n arrStyl.right = 11;\n }\n if (placement === GithubPlacement.TopLeft || placement === GithubPlacement.BottomLeft) {\n arrBrStyl.left = 7;\n arrStyl.left = 8;\n }\n }\n if (/^L/.test(placement)) {\n arrBrStyl.borderWidth = '8px 8px 8px 0';\n arrBrStyl.borderColor = 'transparent var(--github-arrow-border-color) transparent transparent';\n arrStyl.borderWidth = '7px 7px 7px 0';\n arrStyl.borderColor = 'transparent var(--github-background-color) transparent transparent';\n arrBrStyl.left = -8;\n arrStyl.left = -7;\n }\n if (/^R/.test(placement)) {\n arrBrStyl.borderWidth = '8px 0 8px 8px';\n arrBrStyl.borderColor = 'transparent transparent transparent var(--github-arrow-border-color)';\n arrStyl.borderWidth = '7px 0 7px 7px';\n arrStyl.borderColor = 'transparent transparent transparent var(--github-background-color)';\n arrBrStyl.right = -8;\n arrStyl.right = -7;\n }\n if (/^(L|R)/.test(placement)) {\n if (placement === GithubPlacement.RightTop || placement === GithubPlacement.LeftTop) {\n arrBrStyl.top = 5;\n arrStyl.top = 6;\n }\n if (placement === GithubPlacement.Left || placement === GithubPlacement.Right) {\n arrBrStyl.top = '50%';\n arrStyl.top = '50%';\n arrBrStyl.marginTop = -8;\n arrStyl.marginTop = -7;\n }\n if (placement === GithubPlacement.LeftBottom || placement === GithubPlacement.RightBottom) {\n arrBrStyl.top = '100%';\n arrStyl.top = '100%';\n arrBrStyl.marginTop = -21;\n arrStyl.marginTop = -20;\n }\n }\n var render = _ref => {\n var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var handle = rectRender && rectRender(_extends({}, props));\n if (handle) return handle;\n return /*#__PURE__*/_jsx(Point, _extends({}, props, {\n rectProps: rectProps\n }));\n };\n return /*#__PURE__*/_jsx(Swatch, _extends({\n ref: ref,\n className: [prefixCls, className].filter(Boolean).join(' '),\n colors: colors,\n color: hex,\n rectRender: render\n }, other, {\n onChange: handleChange,\n style: styleWrapper,\n rectProps: {\n style: {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n height: 25,\n width: 25\n }\n },\n addonBefore: /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n style: arrBrStyl\n }), /*#__PURE__*/_jsx(\"div\", {\n style: arrStyl\n })]\n })\n }));\n});\nGithub.displayName = 'Github';\nexport default Github;","export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","MarkdownWrapper","styled","div","_templateObject","_taggedTemplateLiteral","EditorUrl","a","_templateObject2","Wrapper","_templateObject3","Footer","footer","_templateObject4","Example","_templateObject5","Markdown","Component","constructor","props","super","editorUrl","getMdStr","example","this","state","mdStr","componentDidMount","then","str","setState","default","source","mdObj","render","components","data","_jsxs","className","children","_jsx","target","rel","href","concat","MarkdownPreviewExample","style","border","boxShadow","src","alt","_excluded","Arrow","other","_objectWithoutPropertiesLoose","btn","useRef","handleMouseEnter","useCallback","current","handleMouseLeave","_extends","ref","marginLeft","cursor","transition","borderRadius","onMouseEnter","onMouseLeave","viewBox","width","height","display","d","fill","ChromeInputType","Chrome","React","prefixCls","color","inputType","RGBA","rectProps","onChange","hsva","validHex","hexToHsva","h","s","l","handleChange","hsv","handleColor","type","setType","useState","labelStyle","paddingTop","inputStyle","textAlign","paddingBottom","wrapperStyle","flexDirection","padding","alphaStyle","background","hsvaToRgbaString","Github","colors","undefined","filter","Boolean","join","placement","GithubPlacement","TopLeft","addonAfter","Fragment","Saturation","newColor","alignItems","Alpha","radius","marginRight","bgProps","innerProps","pointer","flex","Hue","hue","newHue","marginTop","newAlpha","userSelect","EditableInputRGBA","rProps","gProps","bProps","aProps","reColor","HEXA","EditableInput","label","value","hsvaToHexa","toLocaleUpperCase","hsvaToHex","_","test","HSLA","EditableInputHSLA","hProps","sProps","lProps","onClick","handleClick","rectRender","displayName","hsla","hsvaToHsla","evn","hslaToHsva","Math","round","val","defalutStyle","marginBottom","boxSizing","Point","_ref","title","checked","rectStyle","zIndex","outline","CORLER_HEX","TopRight","hex","styleWrapper","position","rStyle","borderStyle","arrBrStyl","arrStyl","borderWidth","borderColor","top","Top","BottomRight","Bottom","BottomLeft","left","right","RightTop","LeftTop","Left","Right","LeftBottom","RightBottom","Swatch","_objectDestructuringEmpty","handle","addonBefore","obj","TypeError"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/31.f7fcaedc.chunk.js b/static/js/31.f7fcaedc.chunk.js deleted file mode 100644 index 35fd51613..000000000 --- a/static/js/31.f7fcaedc.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[31],{363:t=>{function r(t){var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=363,t.exports=r},2251:(t,r,e)=>{"use strict";e.d(r,{Z:()=>f});var o,a,s,n,l,i=e(669),d=e(8573),p=e(2806),h=e(9258),c=e(4760);const u=h.ZP.div(o||(o=(0,i.Z)(["\n background-color: var(--color-theme-bg);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 15%),\n 0 8px 16px rgb(0 0 0 / 15%);\n border-radius: 16px;\n max-width: 860px;\n margin: 0 auto;\n padding-bottom: 20px;\n position: relative;\n"]))),g=h.ZP.a(a||(a=(0,i.Z)(["\n position: absolute;\n right: 20px;\n padding: 3px 8px 4px 8px;\n background: #333333;\n border-radius: 0 0 6px 6px;\n text-decoration: initial;\n color: #fff;\n transition: all 0.3s;\n font-size: 14px;\n &:hover {\n background-color: #3f51b4;\n }\n"]))),b=h.ZP.div(s||(s=(0,i.Z)(["\n padding-bottom: 120px;\n"]))),x=h.ZP.footer(n||(n=(0,i.Z)(["\n text-align: center;\n margin-top: 40px;\n a {\n margin: 0 5px;\n }\n p {\n font-size: 12px;\n text-align: center;\n }\n"]))),m=h.ZP.div(l||(l=(0,i.Z)(["\n border-bottom: 1px solid var(--color-border-default);\n border-radius: 16px 16px 0 0;\n padding: 28px;\n > h3 {\n margin: 0;\n padding-bottom: 12px;\n }\n"])));class f extends d.Component{constructor(t){super(t),this.editorUrl=void 0,this.getMdStr=void 0,this.example=void 0,this.state={mdStr:""}}componentDidMount(){this.getMdStr&&this.getMdStr().then((t=>{this.setState({mdStr:t.default.source,mdObj:t.default})}))}render(){const{source:t,components:r,data:e}=this.state.mdObj||{};return(0,c.jsxs)(b,{className:"wmde-markdown-var",children:[(0,c.jsxs)(u,{children:[this.editorUrl&&(0,c.jsx)(g,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"}),this.example&&(0,c.jsxs)(m,{children:[(0,c.jsx)("h3",{children:"Example"}),this.example]}),(0,c.jsx)(p.Z,{data:{data:e,components:r,source:t},style:{border:0,boxShadow:"0 0 0"}}),this.editorUrl&&(0,c.jsx)(g,{target:"_blank",rel:"noreferrer",href:"https://github.com/uiwjs/react-color/edit/main".concat(this.editorUrl),children:"Edit this page"})]}),(0,c.jsxs)(x,{children:[(0,c.jsx)("a",{href:"https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-color/file/README.md",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/badge/Open%20in-unpkg-blue",alt:"Open in unpkg"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color/issues",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-color",alt:"Github Issues"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color/stargazers",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-color.svg",alt:"Github Stars"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color/releases",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-color.svg",alt:"Github Release"})}),(0,c.jsx)("a",{href:"https://github.com/uiwjs/react-color",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,c.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-color",target:"__blank",children:(0,c.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-color.svg",alt:"npm"})}),(0,c.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,c.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})}}},945:(t,r,e)=>{"use strict";e.r(r),e.d(r,{ChromeInputType:()=>v,default:()=>j});var o=e(5773),a=e(808),s=e(8573),n=e(5301),l=e(6493),i=e(9211),d=e(6319),p=e(7864),h=e(7240),c=e(8702),u=e(3789),g=e(1718),b=e(4760),x=["style"];function m(t){var{style:r}=t,e=(0,a.Z)(t,x),n=(0,s.useRef)(null),l=(0,s.useCallback)((()=>{n.current.style.backgroundColor="var(--chrome-arrow-background-color)"}),[]),i=(0,s.useCallback)((()=>{n.current.style.backgroundColor="transparent"}),[]);return(0,b.jsx)("div",(0,o.Z)({ref:n,style:(0,o.Z)({marginLeft:5,cursor:"pointer",transition:"background-color .3s",borderRadius:2},r)},e,{onMouseEnter:l,onMouseLeave:i,children:(0,b.jsx)("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",style:{display:"block"},children:(0,b.jsx)("path",{d:"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z",fill:"var(--chrome-arrow-fill)"})})}))}var f=["prefixCls","className","style","color","inputType","rectProps","onChange"],v=function(t){return t.HEXA="hexa",t.RGBA="rgba",t.HSLA="hsla",t}({}),y=s.forwardRef(((t,r)=>{var{prefixCls:e="w-color-chrome",className:x,style:y,color:j,inputType:w=v.RGBA,rectProps:C={},onChange:R}=t,T=(0,a.Z)(t,f),k="string"===typeof j&&(0,n.Ff)(j)?(0,l.hexToHsva)(j):j||{h:0,s:0,l:0,a:0},B=t=>R&&R((0,l.color)(t)),[S,Z]=(0,s.useState)(w),P={paddingTop:6},L={textAlign:"center",paddingTop:4,paddingBottom:4},E=(0,o.Z)({"--chrome-arrow-fill":"#333","--chrome-arrow-background-color":"#e8e8e8",borderRadius:0,flexDirection:"column",width:230,padding:0},y),H={"--chrome-alpha-box-shadow":"rgb(0 0 0 / 25%) 0px 0px 1px inset",borderRadius:"50%",background:(0,l.hsvaToRgbaString)(k),boxShadow:"var(--chrome-alpha-box-shadow)"};return(0,b.jsx)(i.default,(0,o.Z)({ref:r,color:k,style:E,colors:void 0,className:[e,x].filter(Boolean).join(" "),placement:i.GithubPlacement.TopLeft},T,{addonAfter:(0,b.jsxs)(s.Fragment,{children:[(0,b.jsx)(d.default,{hsva:k,style:{width:"100%",height:130},onChange:t=>{B((0,o.Z)({},k,t,{a:k.a}))}}),(0,b.jsxs)("div",{style:{padding:15,display:"flex",alignItems:"center"},children:[(0,b.jsx)(h.default,{width:24,height:24,hsva:k,radius:2,style:{marginRight:15,borderRadius:"50%"},bgProps:{style:{background:"transparent"}},innerProps:{style:H},pointer:()=>(0,b.jsx)(s.Fragment,{})}),(0,b.jsxs)("div",{style:{flex:1},children:[(0,b.jsx)(p.default,{hue:k.h,style:{width:"100%"},bgProps:{style:{borderRadius:2}},onChange:t=>{B((0,o.Z)({},k,t))}}),(0,b.jsx)(h.default,{hsva:k,style:{marginTop:10},bgProps:{style:{borderRadius:2}},onChange:t=>{B((0,o.Z)({},k,t))}})]})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",padding:"0 15px 15px 15px",userSelect:"none"},children:[(0,b.jsxs)("div",{style:{flex:1},children:[S==v.RGBA&&(0,b.jsx)(u.default,{hsva:k,rProps:{labelStyle:P,inputStyle:L},gProps:{labelStyle:P,inputStyle:L},bProps:{labelStyle:P,inputStyle:L},aProps:{labelStyle:P,inputStyle:L},onChange:t=>B(t.hsva)}),S===v.HEXA&&(0,b.jsx)(c.default,{label:"HEX",labelStyle:P,inputStyle:L,value:k.a>0&&k.a<1?(0,l.hsvaToHexa)(k).toLocaleUpperCase():(0,l.hsvaToHex)(k).toLocaleUpperCase(),onChange:(t,r)=>{"string"===typeof r&&B((0,l.hexToHsva)(/^#/.test(r)?r:"#"+r))}}),S===v.HSLA&&(0,b.jsx)(g.default,{hsva:k,hProps:{labelStyle:P,inputStyle:L},sProps:{labelStyle:P,inputStyle:L},lProps:{labelStyle:P,inputStyle:L},aProps:{labelStyle:P,inputStyle:L},onChange:t=>B(t.hsva)})]}),(0,b.jsx)(m,{onClick:()=>{S===v.RGBA&&Z(v.HSLA),S===v.HSLA&&Z(v.HEXA),S===v.HEXA&&Z(v.RGBA)}})]})]}),rectRender:()=>(0,b.jsx)(s.Fragment,{})}))}));y.displayName="Chrome";const j=y},1718:(t,r,e)=>{"use strict";e.r(r),e.d(r,{default:()=>h});var o=e(5773),a=e(808),s=e(8573),n=e(3789),l=e(6493),i=e(4760),d=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],p=s.forwardRef(((t,r)=>{var{prefixCls:e="w-color-editable-input-hsla",hsva:s,hProps:p={},sProps:h={},lProps:c={},aProps:u={},className:g,onChange:b}=t,x=(0,a.Z)(t,d),m=s?(0,l.hsvaToHsla)(s):{h:0,s:0,l:0,a:0},f=(t,r,e)=>{"number"===typeof t&&("h"===r&&(t<0&&(t=0),t>360&&(t=360),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{h:t}))))),"s"===r&&(t<0&&(t=0),t>100&&(t=100),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{s:t}))))),"l"===r&&(t<0&&(t=0),t>100&&(t=100),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{l:t}))))),"a"===r&&(t<0&&(t=0),t>1&&(t=1),b&&b((0,l.color)((0,l.hslaToHsva)((0,o.Z)({},m,{a:t}))))))};return(0,i.jsx)(n.default,(0,o.Z)({ref:r,hsva:s,rProps:(0,o.Z)({label:"H",value:Math.round(m.h)},p,{onChange:(t,r)=>f(r,"h")}),gProps:(0,o.Z)({label:"S",value:Math.round(m.s)+"%"},h,{onChange:(t,r)=>f(r,"s")}),bProps:(0,o.Z)({label:"L",value:Math.round(m.l)+"%"},c,{onChange:(t,r)=>f(r,"l")}),aProps:(0,o.Z)({label:"A",value:Math.round(100*m.a)/100},u,{onChange:(t,r)=>f(r,"a")}),className:[e,g||""].filter(Boolean).join(" ")},x))}));p.displayName="EditableInputHSLA";const h=p},9211:(t,r,e)=>{"use strict";e.r(r),e.d(r,{GithubPlacement:()=>b,default:()=>m});var o=e(2769),a=e(5773),s=e(808),n=e(8573),l=e(5301),i=e(6493),d=e(9887),p=e(4760),h={marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25};function c(t){var{style:r,title:e,checked:o,color:s,onClick:l,rectProps:i}=t,d=(0,n.useRef)(null),c=(0,n.useCallback)((()=>{d.current.style.zIndex="2",d.current.style.outline="#fff solid 2px",d.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"}),[]),u=(0,n.useCallback)((()=>{o||(d.current.style.zIndex="0",d.current.style.outline="initial",d.current.style.boxShadow="initial")}),[o]),g=o?{zIndex:1,outline:"#fff solid 2px",boxShadow:"rgb(0 0 0 / 25%) 0 0 5px 2px"}:{zIndex:0};return(0,p.jsx)("div",(0,a.Z)({ref:d,title:e},i,{onClick:l,onMouseEnter:c,onMouseLeave:u,style:(0,a.Z)({},r,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},h,g,null==i?void 0:i.style)}))}var u=["prefixCls","placement","className","style","color","colors","rectProps","onChange","rectRender"],g=["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],b=function(t){return t.Left="L",t.LeftTop="LT",t.LeftBottom="LB",t.Right="R",t.RightTop="RT",t.RightBottom="RB",t.Top="T",t.TopRight="TR",t.TopLeft="TL",t.Bottom="B",t.BottomLeft="BL",t.BottomRight="BR",t}({}),x=n.forwardRef(((t,r)=>{var{prefixCls:e="w-color-github",placement:h=b.TopRight,className:x,style:m,color:f,colors:v=g,rectProps:y={},onChange:j,rectRender:w}=t,C=(0,s.Z)(t,u),R="string"===typeof f&&(0,l.Ff)(f)?(0,i.hexToHsva)(f):f,T=f?(0,i.hsvaToHex)(R):"",k=(0,a.Z)({"--github-border":"1px solid rgba(0, 0, 0, 0.2)","--github-background-color":"#fff","--github-box-shadow":"rgb(0 0 0 / 15%) 0px 3px 12px","--github-arrow-border-color":"rgba(0, 0, 0, 0.15)",width:200,borderRadius:4,background:"var(--github-background-color)",boxShadow:"var(--github-box-shadow)",border:"var(--github-border)",position:"relative",padding:5},m),B={borderStyle:"solid",position:"absolute"},S=(0,a.Z)({},B),Z=(0,a.Z)({},B);/^T/.test(h)&&(S.borderWidth="0 8px 8px",S.borderColor="transparent transparent var(--github-arrow-border-color)",Z.borderWidth="0 7px 7px",Z.borderColor="transparent transparent var(--github-background-color)"),h===b.TopRight&&(S.top=-8,Z.top=-7),h===b.Top&&(S.top=-8,Z.top=-7),h===b.TopLeft&&(S.top=-8,Z.top=-7),/^B/.test(h)&&(S.borderWidth="8px 8px 0",S.borderColor="var(--github-arrow-border-color) transparent transparent",Z.borderWidth="7px 7px 0",Z.borderColor="var(--github-background-color) transparent transparent",h===b.BottomRight&&(S.top="100%",Z.top="100%"),h===b.Bottom&&(S.top="100%",Z.top="100%"),h===b.BottomLeft&&(S.top="100%",Z.top="100%")),/^(B|T)/.test(h)&&(h!==b.Top&&h!==b.Bottom||(S.left="50%",S.marginLeft=-8,Z.left="50%",Z.marginLeft=-7),h!==b.TopRight&&h!==b.BottomRight||(S.right=10,Z.right=11),h!==b.TopLeft&&h!==b.BottomLeft||(S.left=7,Z.left=8)),/^L/.test(h)&&(S.borderWidth="8px 8px 8px 0",S.borderColor="transparent var(--github-arrow-border-color) transparent transparent",Z.borderWidth="7px 7px 7px 0",Z.borderColor="transparent var(--github-background-color) transparent transparent",S.left=-8,Z.left=-7),/^R/.test(h)&&(S.borderWidth="8px 0 8px 8px",S.borderColor="transparent transparent transparent var(--github-arrow-border-color)",Z.borderWidth="7px 0 7px 7px",Z.borderColor="transparent transparent transparent var(--github-background-color)",S.right=-8,Z.right=-7),/^(L|R)/.test(h)&&(h!==b.RightTop&&h!==b.LeftTop||(S.top=5,Z.top=6),h!==b.Left&&h!==b.Right||(S.top="50%",Z.top="50%",S.marginTop=-8,Z.marginTop=-7),h!==b.LeftBottom&&h!==b.RightBottom||(S.top="100%",Z.top="100%",S.marginTop=-21,Z.marginTop=-20));return(0,p.jsx)(d.default,(0,a.Z)({ref:r,className:[e,x].filter(Boolean).join(" "),colors:v,color:T,rectRender:t=>{var r=(0,a.Z)({},((0,o.Z)(t),t)),e=w&&w((0,a.Z)({},r));return e||(0,p.jsx)(c,(0,a.Z)({},r,{rectProps:y}))}},C,{onChange:t=>j&&j((0,i.color)(t)),style:k,rectProps:{style:{marginRight:0,marginBottom:0,borderRadius:0,height:25,width:25}},addonBefore:(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)("div",{style:S}),(0,p.jsx)("div",{style:Z})]})}))}));x.displayName="Github";const m=x},2769:(t,r,e)=>{"use strict";function o(t){if(null==t)throw new TypeError("Cannot destructure "+t)}e.d(r,{Z:()=>o})}}]); -//# sourceMappingURL=31.f7fcaedc.chunk.js.map \ No newline at end of file diff --git a/static/js/329.eeb46153.chunk.js b/static/js/329.eeb46153.chunk.js deleted file mode 100644 index fe34312cb..000000000 --- a/static/js/329.eeb46153.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 329.eeb46153.chunk.js.LICENSE.txt */ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[329],{3376:function(e){e.exports=function(){"use strict";function e(e,t){if("undefined"===typeof document)return;const r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style={position:"absolute",left:"-9999px"},document.body.appendChild(r);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);r.select();let a=!1;try{a=!!document.execCommand("copy")}catch(s){a=!1}document.body.removeChild(r),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(a)}return e}()},2806:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ju});var n={};r.r(n),r.d(n,{attentionMarkers:()=>er,contentInitial:()=>Yt,disable:()=>tr,document:()=>Kt,flow:()=>Jt,flowInitial:()=>Xt,insideSpan:()=>Zt,string:()=>Qt,text:()=>$t});var a=r(5773),s=r(808);var i=r(8573),o=r(4760),d={},c=(0,i.createContext)({}),l=(e,t)=>(0,a.Z)({},e,t),u=e=>{var{children:t,value:r}=e,[n,s]=(0,i.useReducer)(l,(0,a.Z)({},d,r));return(0,o.jsx)(c.Provider,{value:(0,a.Z)({},n,{dispatch:s}),children:t})},p=["tagName","className","children"],f=i.forwardRef(((e,t)=>{var{tagName:r="div",className:n,children:o}=e,d=(0,s.Z)(e,p),l=[S+"-code",n].filter(Boolean).join(" ").trim();if((0,i.useContext)(c).collapse)return null;var u=e.href&&"string"===typeof r?"a":r,f=(0,a.Z)({},d,{className:l,ref:t});return i.createElement(u,f,o)}));f.displayName="uiw.CodeLayoutCode";var g=["className","children"],h=i.forwardRef(((e,t)=>{var{className:r,children:n}=e,i=(0,s.Z)(e,g),d=[S+"-preview",r].filter(Boolean).join(" ").trim();return(0,o.jsx)("div",(0,a.Z)({},i,{className:d,ref:t,children:n}))}));h.displayName="uiw.Preview";var m=r(3376),y=r.n(m),b=e=>(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)("path",{d:"M8.64 5.23a1 1 0 0 0-1.41.13l-5 6a1 1 0 0 0 0 1.27l4.83 6a1 1 0 0 0 .78.37 1 1 0 0 0 .78-1.63L4.29 12l4.48-5.36a1 1 0 0 0-.13-1.41zm13.14 6.14-4.78-6a1 1 0 0 0-1.41-.15 1 1 0 0 0-.15 1.41L19.71 12l-4.48 5.37a1 1 0 0 0 .13 1.41A1 1 0 0 0 16 19a1 1 0 0 0 .77-.36l5-6a1 1 0 0 0 .01-1.27z","data-name":"code"})}),v=e=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[(0,o.jsx)("path",{d:"M18 21h-6a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3zm-6-10a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1z"}),(0,o.jsx)("path",{d:"M9.73 15H5.67A2.68 2.68 0 0 1 3 12.33V5.67A2.68 2.68 0 0 1 5.67 3h6.66A2.68 2.68 0 0 1 15 5.67V9.4h-2V5.67a.67.67 0 0 0-.67-.67H5.67a.67.67 0 0 0-.67.67v6.66a.67.67 0 0 0 .67.67h4.06z"})]}),R=e=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"green",children:[(0,o.jsx)("path",{d:"M9.71 11.29a1 1 0 0 0-1.42 1.42l3 3A1 1 0 0 0 12 16a1 1 0 0 0 .72-.34l7-8a1 1 0 0 0-1.5-1.32L12 13.54z"}),(0,o.jsx)("path",{d:"M21 11a1 1 0 0 0-1 1 8 8 0 0 1-8 8A8 8 0 0 1 6.33 6.36 7.93 7.93 0 0 1 12 4a8.79 8.79 0 0 1 1.9.22 1 1 0 1 0 .47-1.94A10.54 10.54 0 0 0 12 2a10 10 0 0 0-7 17.09A9.93 9.93 0 0 0 12 22a10 10 0 0 0 10-10 1 1 0 0 0-1-1z"})]}),x=e=>{var[t,r]=(0,i.useState)(!1);return(0,o.jsx)("button",{onClick:()=>{r(!0),y()(e.text||"",(()=>{var e=setTimeout((()=>{r(!1),clearTimeout(e)}),2e3)}))},children:t?(0,o.jsx)(R,{}):(0,o.jsx)(v,{})})},E=["className","children","extra","text","copied","collapse","visibleButton","visible"],T=i.forwardRef(((e,t)=>{var{className:r,children:n,extra:d,text:l="",copied:u=!0,collapse:p=!0,visibleButton:f=!0,visible:g=!0}=e,h=(0,s.Z)(e,E),m=(0,i.useContext)(c),y=[S+"-toolbar",r].filter(Boolean).join(" ").trim();if((0,i.useEffect)((()=>m.dispatch({collapse:p})),[p]),!g)return null;return(0,o.jsxs)("div",(0,a.Z)({className:y},h,{ref:t,children:[(0,o.jsx)("div",{className:S+"-title",children:n}),(0,o.jsxs)("div",{className:S+"-extra",children:[d,u&&(0,o.jsx)(x,{text:l}),f&&(0,o.jsx)("button",{onClick:()=>m.dispatch({collapse:!m.collapse}),children:(0,o.jsx)(b,{})})]})]}))}));T.displayName="uiw.Toolbar";var w=["children","prefixCls","className","bordered","disableCheckered"],S="w-rcpl",A=i.forwardRef(((e,t)=>{var{children:r,prefixCls:n=S,className:d,bordered:c=!0,disableCheckered:l}=e,u=(0,s.Z)(e,w),p=[n,d,c?"w-bordered":null,l?"w-disable-checkered":null].filter(Boolean).join(" ").trim();return(0,o.jsx)("div",(0,a.Z)({ref:t},u,{className:p,children:i.Children.map(r,((e,t)=>i.isValidElement(e)?i.cloneElement(e,(0,a.Z)({},e.props,{key:t})):e))}))})),j=i.forwardRef(((e,t)=>(0,o.jsx)(u,{value:{collapse:!1},children:(0,o.jsx)(A,(0,a.Z)({},e,{ref:t}))})));j.Preview=h,j.Toolbar=T,j.Code=f;const C=j;r(8634),r(872),r(4838),r(8916);var k=e=>{for(var t,r=/([^?=&]+)=([^&]*)/g,n={};t=r.exec(e);)n[t[1]]=t[2];return n},_=function(e){void 0===e&&(e="");var[t=""]=/mdx:(.[\w|:]+)/i.exec(e)||[];return t.replace(/^mdx:preview:?/,"")},P=function(e){return void 0===e&&(e=""),e&&e.includes("mdx:preview")};var I=r(1064);const D=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O={};function F(e,t){return((t||O).jsx?N:D).test(e)}const L=/[ \t\n\f\r]/g;function B(e){return"object"===typeof e?"text"===e.type&&M(e.value):M(e)}function M(e){return""===e.replace(L,"")}var U=r(9314),H=r(5077);const G={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var q=r(103),W=r(1752);const z=W.default||W,V=Y("end"),K=Y("start");function Y(e){return function(t){const r=t&&t.position&&t.position[e]||{};if("number"===typeof r.line&&r.line>0&&"number"===typeof r.column&&r.column>0)return{line:r.line,column:r.column,offset:"number"===typeof r.offset&&r.offset>-1?r.offset:void 0}}}function X(e){return e&&"object"===typeof e?"position"in e||"type"in e?Q(e.position):"start"in e||"end"in e?Q(e):"line"in e||"column"in e?J(e):"":""}function J(e){return $(e&&e.line)+":"+$(e&&e.column)}function Q(e){return J(e&&e.start)+"-"+J(e&&e.end)}function $(e){return e&&"number"===typeof e?e:1}class Z extends Error{constructor(e,t,r){super(),"string"===typeof t&&(r=t,t=void 0);let n="",a={},s=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"===typeof e?n=e:!a.cause&&e&&(s=!0,n=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"===typeof r){const e=r.indexOf(":");-1===e?a.ruleId=r:(a.source=r.slice(0,e),a.ruleId=r.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=i?i.line:void 0,this.name=X(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&"string"===typeof a.cause.stack?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Z.prototype.file="",Z.prototype.name="",Z.prototype.reason="",Z.prototype.message="",Z.prototype.stack="",Z.prototype.column=void 0,Z.prototype.line=void 0,Z.prototype.ancestors=void 0,Z.prototype.cause=void 0,Z.prototype.fatal=void 0,Z.prototype.place=void 0,Z.prototype.ruleId=void 0,Z.prototype.source=void 0;const ee={}.hasOwnProperty,te=new Map,re=/[A-Z]/g,ne=/-([a-z])/g,ae=new Set(["table","tbody","thead","tfoot","tr"]),se=new Set(["td","th"]),ie="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function oe(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if("function"!==typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=function(e,t){return r;function r(r,n,a,s){const i=Array.isArray(a.children),o=K(r);return t(n,a,s,i,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}(r,t.jsxDEV)}else{if("function"!==typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!==typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");n=function(e,t,r){return n;function n(e,n,a,s){const i=Array.isArray(a.children)?r:t;return s?i(n,a,s):i(n,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?U.YP:U.dy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},s=de(a,e,void 0);return s&&"string"!==typeof s?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function de(e,t,r){return"element"===t.type?function(e,t,r){const n=e.schema;let a=n;"svg"===t.tagName.toLowerCase()&&"html"===n.space&&(a=U.YP,e.schema=a);e.ancestors.push(t);const s=fe(e,t.tagName,!1),i=function(e,t){const r={};let n,a;for(a in t.properties)if("children"!==a&&ee.call(t.properties,a)){const s=pe(e,a,t.properties[a]);if(s){const[a,i]=s;e.tableCellAlignToStyle&&"align"===a&&"string"===typeof i&&se.has(t.tagName)?n=i:r[a]=i}}if(n){(r.style||(r.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n}return r}(e,t);let o=ue(e,t);ae.has(t.tagName)&&(o=o.filter((function(e){return"string"!==typeof e||!B(e)})));return ce(e,i,s,t),le(i,o),e.ancestors.pop(),e.schema=n,e.create(t,s,i,r)}(e,t,r):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ge(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,r){const n=e.schema;let a=n;"svg"===t.name&&"html"===n.space&&(a=U.YP,e.schema=a);e.ancestors.push(t);const s=null===t.name?e.Fragment:fe(e,t.name,!0),i=function(e,t){const r={};for(const n of t.attributes)if("mdxJsxExpressionAttribute"===n.type)if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];t.type;const a=t.expression;a.type;const s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else ge(e,t.position);else{const a=n.name;let s;if(n.value&&"object"===typeof n.value)if(n.value.data&&n.value.data.estree&&e.evaluater){const t=n.value.data.estree.body[0];t.type,s=e.evaluater.evaluateExpression(t.expression)}else ge(e,t.position);else s=null===n.value||n.value;r[a]=s}return r}(e,t),o=ue(e,t);return ce(e,i,s,t),le(i,o),e.ancestors.pop(),e.schema=n,e.create(t,s,i,r)}(e,t,r):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ge(e,t.position)}(e,t):"root"===t.type?function(e,t,r){const n={};return le(n,ue(e,t)),e.create(t,e.Fragment,n,r)}(e,t,r):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function ce(e,t,r,n){"string"!==typeof r&&r!==e.Fragment&&e.passNode&&(t.node=n)}function le(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function ue(e,t){const r=[];let n=-1;const a=e.passKeys?new Map:te;for(;++na?0:a+t:t>a?a:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);i0?(Te(e,e.length,0,t),e):t}function Se(e){const t={};let r,n,a,s,i,o,d,c=-1;for(;++c-1&&e.test(String.fromCharCode(t))}}function ze(e,t,r,n){const a=n?n-1:Number.POSITIVE_INFINITY;let s=0;return function(n){if(He(n))return e.enter(r),i(n);return t(n)};function i(n){return He(n)&&s++s))return;const r=t.events.length;let a,o,d=r;for(;d--;)if("exit"===t.events[d][0]&&"chunkFlow"===t.events[d][1].type){if(a){o=t.events[d][1].end;break}a=!0}for(y(i),e=r;en;){const n=r[a];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function b(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Ye={tokenize:function(e,t,r){return ze(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const Xe={tokenize:function(e,t,r){return function(t){return He(t)?ze(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||Me(e)?t(e):r(e)}},partial:!0};const Je={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?a(t):Me(t)?e.check(Qe,s,a)(t):(e.consume(t),n)}function a(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function s(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return Se(e),e}},Qe={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ze(e,a,"linePrefix")};function a(a){if(null===a||Me(a))return r(a);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}},partial:!0};const $e={tokenize:function(e){const t=this,r=e.attempt(Xe,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,ze(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Je,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const Ze={resolveAll:nt()},et=rt("string"),tt=rt("text");function rt(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],a=t.attempt(n,s,i);return s;function s(e){return d(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return d(e)?(t.exit("data"),a(e)):(t.consume(e),o)}function d(e){if(null===e)return!0;const t=n[e];let a=-1;if(t)for(;++a-1){const e=i[0];"string"===typeof e?i[0]=e.slice(n):i.shift()}s>0&&i.push(e[a].slice(0,s))}return i}(i,e)}function g(){const{line:e,column:t,offset:r,_index:a,_bufferIndex:s}=n;return{line:e,column:t,offset:r,_index:a,_bufferIndex:s}}function h(){let e;for(;n._index=3&&(null===s||Me(s))?(e.exit("thematicBreak"),t(s)):r(s)}function i(t){return t===n?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),He(t)?ze(e,s,"whitespace")(t):s(t))}}};const dt={name:"list",tokenize:function(e,t,r){const n=this,a=n.events[n.events.length-1];let s=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!n.containerState.marker||t===n.containerState.marker:Fe(t)){if(n.containerState.type||(n.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(ot,r,d)(t):d(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(t)}return r(t)};function o(t){return Fe(t)&&++i<10?(e.consume(t),o):(!n.interrupt||i<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),d(t)):r(t)}function d(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(Xe,n.interrupt?r:c,e.attempt(ct,u,l))}function c(e){return n.containerState.initialBlankLine=!0,s++,u(e)}function l(t){return He(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):r(t)}function u(r){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Xe,a,s);function a(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ze(e,t,"listItemIndent",n.containerState.size+1)(r)}function s(r){return n.containerState.furtherBlankLines||!He(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(lt,t,i)(r))}function i(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ze(e,e.attempt(dt,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},ct={tokenize:function(e,t,r){const n=this;return ze(e,(function(e){const a=n.events[n.events.length-1];return!He(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},lt={tokenize:function(e,t,r){const n=this;return ze(e,(function(e){const a=n.events[n.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const ut={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return r(t)};function a(r){return He(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){const n=this;return function(t){if(He(t))return ze(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(n){return e.attempt(ut,t,r)(n)}}},exit:function(e){e.exit("blockQuote")}};function pt(e,t,r,n,a,s,i,o,d){const c=d||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(a),e.enter(s),e.consume(t),e.exit(s),u;if(null===t||32===t||41===t||Oe(t))return r(t);return e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(t)};function u(r){return 62===r?(e.enter(s),e.consume(r),e.exit(s),e.exit(a),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(r))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(o),u(t)):null===t||60===t||Me(t)?r(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(a){return l||null!==a&&41!==a&&!Ue(a)?l999||null===u||91===u||93===u&&!o||94===u&&!d&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):93===u?(e.exit(s),e.enter(a),e.consume(u),e.exit(a),e.exit(n),t):Me(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),l(u))}function l(t){return null===t||91===t||93===t||Me(t)||d++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!He(t)),92===t?u:l)}function u(t){return 91===t||92===t||93===t?(e.consume(t),d++,l):l(t)}}function gt(e,t,r,n,a,s){let i;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,o;return r(t)};function o(r){return r===i?(e.enter(a),e.consume(r),e.exit(a),e.exit(n),t):(e.enter(s),d(r))}function d(t){return t===i?(e.exit(s),o(i)):null===t?r(t):Me(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ze(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Me(t)?(e.exit("chunkString"),d(t)):(e.consume(t),92===t?l:c)}function l(t){return t===i||92===t?(e.consume(t),c):c(t)}}function ht(e,t){let r;return function n(a){if(Me(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n;if(He(a))return ze(e,n,r?"linePrefix":"lineSuffix")(a);return t(a)}}function mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt={name:"definition",tokenize:function(e,t,r){const n=this;let a;return function(t){return e.enter("definition"),function(t){return ft.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function s(t){return a=mt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):r(t)}function i(t){return Ue(t)?ht(e,o)(t):o(t)}function o(t){return pt(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function d(t){return e.attempt(bt,c,c)(t)}function c(t){return He(t)?ze(e,l,"whitespace")(t):l(t)}function l(s){return null===s||Me(s)?(e.exit("definition"),n.parser.defined.push(a),t(s)):r(s)}}},bt={tokenize:function(e,t,r){return function(t){return Ue(t)?ht(e,n)(t):r(t)};function n(t){return gt(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return He(t)?ze(e,s,"whitespace")(t):s(t)}function s(e){return null===e||Me(e)?t(e):r(e)}},partial:!0};const vt={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),ze(e,a,"linePrefix",5)(t)};function a(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?s(e):r(e)}function s(t){return null===t?o(t):Me(t)?e.attempt(Rt,s,o)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Me(t)?(e.exit("codeFlowValue"),s(t)):(e.consume(t),i)}function o(r){return e.exit("codeIndented"),t(r)}}},Rt={tokenize:function(e,t,r){const n=this;return a;function a(t){return n.parser.lazy[n.now().line]?r(t):Me(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):ze(e,s,"linePrefix",5)(t)}function s(e){const s=n.events[n.events.length-1];return s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(e):Me(e)?a(e):r(e)}},partial:!0};const xt={name:"headingAtx",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&n++<6?(e.consume(t),a):null===t||Ue(t)?(e.exit("atxHeadingSequence"),s(t)):r(t)}function s(r){return 35===r?(e.enter("atxHeadingSequence"),i(r)):null===r||Me(r)?(e.exit("atxHeading"),t(r)):He(r)?ze(e,s,"whitespace")(r):(e.enter("atxHeadingText"),o(r))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),s(t))}function o(t){return null===t||35===t||Ue(t)?(e.exit("atxHeadingText"),s(t)):(e.consume(t),o)}},resolve:function(e,t){let r,n,a=e.length-2,s=3;"whitespace"===e[s][1].type&&(s+=2);a-2>s&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(s===a-1||a-4>s&&"whitespace"===e[a-2][1].type)&&(a-=s+1===a?2:4);a>s&&(r={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},n={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},Te(e,s,a-s+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const Et={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let a;return function(t){let i,o=n.events.length;for(;o--;)if("lineEnding"!==n.events[o][1].type&&"linePrefix"!==n.events[o][1].type&&"content"!==n.events[o][1].type){i="paragraph"===n.events[o][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),s(t)}(t);return r(t)};function s(t){return t===a?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),He(t)?ze(e,i,"lineSuffix")(t):i(t))}function i(n){return null===n||Me(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,a,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){r=s;break}"paragraph"===e[s][1].type&&(n=s)}else"content"===e[s][1].type&&e.splice(s,1),a||"definition"!==e[s][1].type||(a=s);const i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=i;return e.push(["exit",i,t]),e}};const Tt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wt=["pre","script","style","textarea"],St={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let a,s,i,o,d;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(o){return 33===o?(e.consume(o),l):47===o?(e.consume(o),s=!0,f):63===o?(e.consume(o),a=3,n.interrupt?t:N):Ie(o)?(e.consume(o),i=String.fromCharCode(o),g):r(o)}function l(s){return 45===s?(e.consume(s),a=2,u):91===s?(e.consume(s),a=5,o=0,p):Ie(s)?(e.consume(s),a=4,n.interrupt?t:N):r(s)}function u(a){return 45===a?(e.consume(a),n.interrupt?t:N):r(a)}function p(a){const s="CDATA[";return a===s.charCodeAt(o++)?(e.consume(a),6===o?n.interrupt?t:A:p):r(a)}function f(t){return Ie(t)?(e.consume(t),i=String.fromCharCode(t),g):r(t)}function g(o){if(null===o||47===o||62===o||Ue(o)){const d=47===o,c=i.toLowerCase();return d||s||!wt.includes(c)?Tt.includes(i.toLowerCase())?(a=6,d?(e.consume(o),h):n.interrupt?t(o):A(o)):(a=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(o):s?m(o):y(o)):(a=1,n.interrupt?t(o):A(o))}return 45===o||De(o)?(e.consume(o),i+=String.fromCharCode(o),g):r(o)}function h(a){return 62===a?(e.consume(a),n.interrupt?t:A):r(a)}function m(t){return He(t)?(e.consume(t),m):w(t)}function y(t){return 47===t?(e.consume(t),w):58===t||95===t||Ie(t)?(e.consume(t),b):He(t)?(e.consume(t),y):w(t)}function b(t){return 45===t||46===t||58===t||95===t||De(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),R):He(t)?(e.consume(t),v):y(t)}function R(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),d=t,x):He(t)?(e.consume(t),R):E(t)}function x(t){return t===d?(e.consume(t),d=null,T):null===t||Me(t)?r(t):(e.consume(t),x)}function E(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Ue(t)?v(t):(e.consume(t),E)}function T(e){return 47===e||62===e||He(e)?y(e):r(e)}function w(t){return 62===t?(e.consume(t),S):r(t)}function S(t){return null===t||Me(t)?A(t):He(t)?(e.consume(t),S):r(t)}function A(t){return 45===t&&2===a?(e.consume(t),_):60===t&&1===a?(e.consume(t),P):62===t&&4===a?(e.consume(t),O):63===t&&3===a?(e.consume(t),N):93===t&&5===a?(e.consume(t),D):!Me(t)||6!==a&&7!==a?null===t||Me(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),A):(e.exit("htmlFlowData"),e.check(At,F,j)(t))}function j(t){return e.check(jt,C,F)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),k}function k(t){return null===t||Me(t)?j(t):(e.enter("htmlFlowData"),A(t))}function _(t){return 45===t?(e.consume(t),N):A(t)}function P(t){return 47===t?(e.consume(t),i="",I):A(t)}function I(t){if(62===t){const r=i.toLowerCase();return wt.includes(r)?(e.consume(t),O):A(t)}return Ie(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),I):A(t)}function D(t){return 93===t?(e.consume(t),N):A(t)}function N(t){return 62===t?(e.consume(t),O):45===t&&2===a?(e.consume(t),N):A(t)}function O(t){return null===t||Me(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),O)}function F(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},At={tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Xe,t,r)}},partial:!0},jt={tokenize:function(e,t,r){const n=this;return function(t){if(Me(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return r(t)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const Ct={tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},kt={name:"codeFenced",tokenize:function(e,t,r){const n=this,a={tokenize:function(e,t,r){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d}function d(t){return e.enter("codeFencedFence"),He(t)?ze(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===s?(e.enter("codeFencedFenceSequence"),l(t)):r(t)}function l(t){return t===s?(a++,e.consume(t),l):a>=o?(e.exit("codeFencedFenceSequence"),He(t)?ze(e,u,"whitespace")(t):u(t)):r(t)}function u(n){return null===n||Me(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0};let s,i=0,o=0;return function(t){return function(t){const r=n.events[n.events.length-1];return i=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,s=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(t)}(t)};function d(t){return t===s?(o++,e.consume(t),d):o<3?r(t):(e.exit("codeFencedFenceSequence"),He(t)?ze(e,c,"whitespace")(t):c(t))}function c(r){return null===r||Me(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(Ct,f,b)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(r))}function l(t){return null===t||Me(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):He(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ze(e,u,"whitespace")(t)):96===t&&t===s?r(t):(e.consume(t),l)}function u(t){return null===t||Me(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Me(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===s?r(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,g)(t)}function g(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return i>0&&He(t)?ze(e,m,"linePrefix",i+1)(t):m(t)}function m(t){return null===t||Me(t)?e.check(Ct,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Me(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),y)}function b(r){return e.exit("codeFenced"),t(r)}},concrete:!0};var _t=r(6068);const Pt={name:"characterReference",tokenize:function(e,t,r){const n=this;let a,s,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function o(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=De,c(t))}function d(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Le,c):(e.enter("characterReferenceValue"),a=7,s=Fe,c(t))}function c(o){if(59===o&&i){const a=e.exit("characterReferenceValue");return s!==De||(0,_t.T)(n.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(o)}return s(o)&&i++1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const u=Object.assign({},e[r][1].end),p=Object.assign({},e[l][1].start);Ht(u,-o),Ht(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[r][1].end)},i={type:o>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:p},a={type:o>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:o>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},i.end)},e[r][1].end=Object.assign({},s.start),e[l][1].start=Object.assign({},i.end),d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=we(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=we(d,[["enter",n,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=we(d,st(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),d=we(d,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(c=2,d=we(d,[["enter",e[l][1],t],["exit",e[l][1],t]])):c=0,Te(e,r-1,l-r+3,d),l=r+d.length-c-2;break}l=-1;for(;++l13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535===(65535&r)||65534===(65535&r)||r>1114111?"\ufffd":String.fromCodePoint(r)}const ar=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sr(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return nr(r.slice(t?2:1),t?16:10)}return(0,_t.T)(r)||e}const ir={}.hasOwnProperty;function or(e,t,r){return"string"!==typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:s(Q),blockQuote:s(z),characterEscape:S,characterReference:S,codeFenced:s(V),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:s(V,i),codeText:s(K,i),codeTextData:S,data:S,codeFlowValue:S,definition:s(Y),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:s(J),hardBreakEscape:s($),hardBreakTrailing:s($),htmlFlow:s(Z,i),htmlFlowData:S,htmlText:s(Z,i),htmlTextData:S,image:s(ee),label:i,link:s(te),listItem:s(ne),listItemValue:p,listOrdered:s(re,u),listUnordered:s(re),paragraph:s(ae),reference:M,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:s(Q),strong:s(se),thematicBreak:s(oe)},exit:{atxHeading:d(),atxHeadingSequence:x,autolink:d(),autolinkEmail:W,autolinkProtocol:q,blockQuote:d(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:G,codeFenced:d(m),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:A,codeIndented:d(y),codeText:d(P),codeTextData:A,data:A,definition:d(),definitionDestinationString:R,definitionLabelString:b,definitionTitleString:v,emphasis:d(),hardBreakEscape:d(C),hardBreakTrailing:d(C),htmlFlow:d(k),htmlFlowData:A,htmlText:d(_),htmlTextData:A,image:d(D),label:O,labelText:N,lineEnding:j,link:d(I),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:U,resourceDestinationString:F,resourceTitleString:L,resource:B,setextHeading:d(w),setextHeadingLineSequence:T,setextHeadingText:E,strong:d(),thematicBreak:d()}};cr(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let n={type:"root",children:[]};const s={stack:[n],tokenStack:[],config:t,enter:o,exit:c,buffer:i,resume:l,data:r},d=[];let u=-1;for(;++u0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||ur).call(s,void 0,e[0])}for(n.position={start:dr(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:dr(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u((e,t)=>{const r=(t,r)=>(e.set(r,t),t),n=a=>{if(e.has(a))return e.get(a);const[s,i]=t[a];switch(s){case 0:case-1:return r(i,a);case 1:{const e=r([],a);for(const t of i)e.push(n(t));return e}case 2:{const e=r({},a);for(const[t,r]of i)e[n(t)]=n(r);return e}case 3:return r(new Date(i),a);case 4:{const{source:e,flags:t}=i;return r(new RegExp(e,t),a)}case 5:{const e=r(new Map,a);for(const[t,r]of i)e.set(n(t),n(r));return e}case 6:{const e=r(new Set,a);for(const t of i)e.add(n(t));return e}case 7:{const{name:e,message:t}=i;return r(new fr[e](t),a)}case 8:return r(BigInt(i),a);case"BigInt":return r(Object(BigInt(i)),a)}return r(new fr[s](i),a)};return n})(new Map,e)(0),hr="",{toString:mr}={},{keys:yr}=Object,br=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const r=mr.call(e).slice(8,-1);switch(r){case"Array":return[1,hr];case"Object":return[2,hr];case"Date":return[3,hr];case"RegExp":return[4,hr];case"Map":return[5,hr];case"Set":return[6,hr]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},vr=e=>{let[t,r]=e;return 0===t&&("function"===r||"symbol"===r)},Rr=function(e){let{json:t,lossy:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[];return((e,t,r,n)=>{const a=(e,t)=>{const a=n.push(e)-1;return r.set(t,a),a},s=n=>{if(r.has(n))return r.get(n);let[i,o]=br(n);switch(i){case 0:{let t=n;switch(o){case"bigint":i=8,t=n.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);t=null;break;case"undefined":return a([-1],n)}return a([i,t],n)}case 1:{if(o)return a([o,[...n]],n);const e=[],t=a([i,e],n);for(const r of n)e.push(s(r));return t}case 2:{if(o)switch(o){case"BigInt":return a([o,n.toString()],n);case"Boolean":case"Number":case"String":return a([o,n.valueOf()],n)}if(t&&"toJSON"in n)return s(n.toJSON());const r=[],d=a([i,r],n);for(const t of yr(n))!e&&vr(br(n[t]))||r.push([s(t),s(n[t])]);return d}case 3:return a([i,n.toISOString()],n);case 4:{const{source:e,flags:t}=n;return a([i,{source:e,flags:t}],n)}case 5:{const t=[],r=a([i,t],n);for(const[a,i]of n)(e||!vr(br(a))&&!vr(br(i)))&&t.push([s(a),s(i)]);return r}case 6:{const t=[],r=a([i,t],n);for(const a of n)!e&&vr(br(a))||t.push(s(a));return r}}const{message:d}=n;return a([i,{name:o,message:d}],n)};return s})(!(t||r),!!t,new Map,n)(e),n},xr="function"===typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?gr(Rr(e,t)):structuredClone(e):(e,t)=>gr(Rr(e,t));function Er(e){const t=[];let r=-1,n=0,a=0;for(;++r55295&&s<57344){const t=e.charCodeAt(r+1);s<56320&&t>56319&&t<57344?(i=String.fromCharCode(s,t),a=1):i="\ufffd"}else i=String.fromCharCode(s);i&&(t.push(e.slice(n,r),encodeURIComponent(i)),n=r+a+1,i=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}function Tr(e,t){const r=[{type:"text",value:"\u21a9"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function wr(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Sr=function(e){if(null===e||void 0===e)return jr;if("function"===typeof e)return Ar(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r":"")+")"})}return l;function l(){let c,l,u,p=kr;if((!t||s(a,o,d[d.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[_r,e];return null===e||void 0===e?kr:[e]}(r(a,d)),p[0]===Pr))return p;if("children"in a&&a.children){const t=a;if(t.children&&p[0]!==Ir)for(l=(n?t.children.length:-1)+i,u=d.concat(t);l>-1&&l1:t}const Lr=9,Br=32;function Mr(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),a=0;const s=[];for(;n;)s.push(Ur(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return s.push(Ur(t.slice(a),a>0,!1)),s.join("")}function Ur(e,t,r){let n=0,a=e.length;if(t){let t=e.codePointAt(n);for(;t===Lr||t===Br;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(a-1);for(;t===Lr||t===Br;)a--,t=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}const Hr={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){const r=t.value?t.value+"\n":"",n={};t.lang&&(n.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){const r="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),a=Er(n.toLowerCase()),s=e.footnoteOrder.indexOf(n);let i,o=e.footnoteCounts.get(n);void 0===o?(o=0,e.footnoteOrder.push(n),i=e.footnoteOrder.length):i=s+1,o+=1,e.footnoteCounts.set(n,o);const d={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,d);const c={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Or(e,t);const a={src:Er(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(a.title=n.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)},image:function(e,t){const r={src:Er(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Or(e,t);const a={href:Er(n.url||"")};null!==n.title&&void 0!==n.title&&(a.title=n.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)},link:function(e,t){const r={href:Er(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){const n=e.all(t),a=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n0&&r.children.unshift({type:"text",value:" "}),r.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o0){const n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=K(t.children[1]),i=V(t.children[t.children.length-1]);s&&i&&(n.position={start:s,end:i}),a.push(n)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)},tableCell:function(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){const n=r?r.children:void 0,a=0===(n?n.indexOf(t):1)?"th":"td",s=r&&"table"===r.type?r.align:void 0,i=s?s.length:t.children.length;let o=-1;const d=[];for(;++o0&&r.push({type:"text",value:"\n"}),r}function Xr(e){let t=0,r=e.charCodeAt(t);for(;9===r||32===r;)t++,r=e.charCodeAt(t);return e.slice(t)}function Jr(e,t){const r=function(e,t){const r=t||Wr,n=new Map,a=new Map,s=new Map,i={...Hr,...r.handlers},o={all:function(e){const t=[];if("children"in e){const r=e.children;let n=-1;for(;++n0&&u.push({type:"text",value:" "});let e="string"===typeof r?r:r(d,l);"string"===typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(l>1?"-"+l:""),dataFootnoteBackref:"",ariaLabel:"string"===typeof n?n:n(d,l),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=s[s.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else s.push(...u);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(s,!0)};e.patch(a,g),o.push(g)}if(0!==o.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...xr(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:"\n"}]}}(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&s.children.push({type:"text",value:"\n"},a),s}function Qr(e,t){return e&&"run"in e?async function(r,n){const a=Jr(r,t);await e.run(a,n)}:function(r){return Jr(r,t||e)}}function $r(e){if(e)throw e}var Zr=r(432);function en(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tn(){const e=[],t={run:function(){for(var t=arguments.length,r=new Array(t),n=0;n1?d-1:0),l=1;la.length;let c;d&&a.push(s);try{c=e.apply(this,a)}catch(n){if(d&&r)throw n;return s(n)}d||(c instanceof Promise?c.then(i,s):c instanceof Error?s(c):i(c))}function s(e){if(!r){r=!0;for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;se.length){for(;s--;)if(47===e.codePointAt(s)){if(r){n=s+1;break}}else a<0&&(r=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let i=-1,o=t.length-1;for(;s--;)if(47===e.codePointAt(s)){if(r){n=s+1;break}}else i<0&&(r=!0,i=s+1),o>-1&&(e.codePointAt(s)===t.codePointAt(o--)?o<0&&(a=s):(o=-1,a=i));n===a?a=i:a<0&&(a=e.length);return e.slice(n,a)},dirname:function(e){if(nn(e),0===e.length)return".";let t,r=-1,n=e.length;for(;--n;)if(47===e.codePointAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.codePointAt(0)?"/":".":1===r&&47===e.codePointAt(0)?"//":e.slice(0,r)},extname:function(e){nn(e);let t,r=e.length,n=-1,a=0,s=-1,i=0;for(;r--;){const o=e.codePointAt(r);if(47!==o)n<0&&(t=!0,n=r+1),46===o?s<0?s=r:1!==i&&(i=1):s>-1&&(i=-1);else if(t){a=r+1;break}}if(s<0||n<0||0===i||1===i&&s===n-1&&s===a+1)return"";return e.slice(s,n)},join:function(){let e,t=-1;for(var r=arguments.length,n=new Array(r),a=0;a2){if(n=a.lastIndexOf("/"),n!==a.length-1){n<0?(a="",s=0):(a=a.slice(0,n),s=a.length-1-a.lastIndexOf("/")),i=d,o=0;continue}}else if(a.length>0){a="",s=0,i=d,o=0;continue}t&&(a=a.length>0?a+"/..":"..",s=2)}else a.length>0?a+="/"+e.slice(i+1,d):a=e.slice(i+1,d),s=d-i-1;i=d,o=0}else 46===r&&o>-1?o++:o=-1}return a}(e,!t);0!==r.length||t||(r=".");r.length>0&&47===e.codePointAt(e.length-1)&&(r+="/");return t?"/"+r:r}(e)},sep:"/"};function nn(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const an={cwd:function(){return"/"}};function sn(e){return Boolean(null!==e&&"object"===typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function on(e){if("string"===typeof e)e=new URL(e);else if(!sn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let r=-1;for(;++r1?n-1:0),s=1;s0){let[n,...s]=r;const i=t[a][1];en(i)&&en(n)&&(n=Zr(!0,i,n)),t[a]=[e,n,...s]}}}}const mn=(new hn).freeze();function yn(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function bn(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function vn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rn(e){if(!en(e)||"string"!==typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function xn(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function En(e){return function(e){return Boolean(e&&"object"===typeof e&&"message"in e&&"messages"in e)}(e)?e:new cn(e)}const Tn=[],wn={allowDangerousHtml:!0},Sn=/^(https?|ircs?|mailto|xmpp)$/i,An=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function jn(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",a=e.className,s=e.components,i=e.disallowedElements,d=e.rehypePlugins||Tn,c=e.remarkPlugins||Tn,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wn}:wn,u=e.skipHtml,p=e.unwrapDisallowed,f=e.urlTransform||Cn,g=mn().use(pr).use(c).use(Qr,l).use(d),h=new cn;"string"===typeof n&&(h.value=n);for(const o of An)Object.hasOwn(e,o.from)&&(o.from,o.to&&o.to,o.id);const m=g.parse(h);let y=g.runSync(m,h);return a&&(y={type:"element",tagName:"div",properties:{className:a},children:"root"===y.type?y.children:[y]}),Nr(y,(function(e,n,a){if("raw"===e.type&&a&&"number"===typeof n)return u?a.children.splice(n,1):a.children[n]={type:"text",value:e.value},n;if("element"===e.type){let t;for(t in be)if(Object.hasOwn(be,t)&&Object.hasOwn(e.properties,t)){const r=e.properties[t],n=be[t];(null===n||n.includes(e.tagName))&&(e.properties[t]=f(String(r||""),t,e))}}if("element"===e.type){let s=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!s&&r&&"number"===typeof n&&(s=!r(e,n,a)),s&&a&&"number"===typeof n)return p&&e.children?a.children.splice(n,1,...e.children):a.children.splice(n,1),n}})),oe(y,{Fragment:o.Fragment,components:s,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0})}function Cn(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),a=e.indexOf("/");return t<0||a>-1&&t>a||r>-1&&t>r||n>-1&&t>n||Sn.test(e.slice(0,t))?e:""}function kn(e,t){const r=String(e);if("string"!==typeof t)throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;-1!==a;)n++,a=r.indexOf(t,a+t.length);return n}function _n(e,t,r){const n=Sr((r||{}).ignore||[]),a=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n0?{type:"text",value:s}:void 0),!1===s?n.lastIndex=r+1:(o!==r&&l.push({type:"text",value:e.value.slice(o,r)}),Array.isArray(s)?l.push(...s):s&&l.push(s),o=r+u[0].length,c=!0),!n.global)break;u=n.exec(e.value)}c?(o?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const a=kn(e,"(");let s=kn(e,")");for(;-1!==n&&a>s;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[e,r]}(r+n);if(!i[0])return!1;const o={type:"link",title:null,url:s+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[o,{type:"text",value:i[1]}]:o}function qn(e,t,r,n){return!(!Wn(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Wn(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||qe(r)||Ge(r))&&(!t||47!==r)}function zn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Vn(){this.buffer()}function Kn(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=mt(this.sliceSerialize(e)).toLowerCase()}function Yn(e){this.exit(e)}function Xn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Jn(){this.buffer()}function Qn(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=mt(this.sliceSerialize(e)).toLowerCase()}function $n(e){this.exit(e)}function Zn(e,t,r,n){const a=r.createTracker(n);let s=a.move("[^");const i=r.enter("footnoteReference"),o=r.enter("reference");return s+=a.move(r.safe(r.associationId(e),{...a.current(),before:s,after:"]"})),o(),i(),s+=a.move("]"),s}function ea(e,t,r,n){const a=r.createTracker(n);let s=a.move("[^");const i=r.enter("footnoteDefinition"),o=r.enter("label");return s+=a.move(r.safe(r.associationId(e),{...a.current(),before:s,after:"]"})),o(),s+=a.move("]:"+(e.children&&e.children.length>0?" ":"")),a.shift(4),s+=a.move(r.indentLines(r.containerFlow(e,a.current()),ta)),i(),s}function ta(e,t,r){return 0===t?e:(r?"":" ")+e}Zn.peek=function(){return"["};const ra=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function na(e){this.enter({type:"delete",children:[]},e)}function aa(e){this.exit(e)}function sa(e,t,r,n){const a=r.createTracker(n),s=r.enter("strikethrough");let i=a.move("~~");return i+=r.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),s(),i}function ia(e){return null===e||void 0===e?"":String(e)}function oa(e){return e.length}function da(e){const t="string"===typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function ca(e,t,r){return">"+(r?"":" ")+e}function la(e,t,r){if("string"===typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n",...d.current()})),c+=d.move(">")):(o=r.enter("destinationRaw"),c+=d.move(r.safe(e.url,{before:c,after:e.title?" ":")",...d.current()}))),o(),e.title&&(o=r.enter("title".concat(s)),c+=d.move(" "+a),c+=d.move(r.safe(e.title,{before:c,after:a,...d.current()})),c+=d.move(a),o()),c+=d.move(")"),i(),c}function ya(e,t,r,n){const a=e.referenceType,s=r.enter("imageReference");let i=r.enter("label");const o=r.createTracker(n);let d=o.move("![");const c=r.safe(e.alt,{before:d,after:"]",...o.current()});d+=o.move(c+"]["),i();const l=r.stack;r.stack=[],i=r.enter("reference");const u=r.safe(r.associationId(e),{before:d,after:"]",...o.current()});return i(),r.stack=l,s(),"full"!==a&&c&&c===u?"shortcut"===a?d=d.slice(0,-1):d+=o.move("]"):d+=o.move(u+"]"),d}function ba(e,t,r){let n=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s\u007F]/.test(e.url))}function Ra(e,t,r,n){const a=fa(r),s='"'===a?"Quote":"Apostrophe",i=r.createTracker(n);let o,d;if(va(e,r)){const t=r.stack;r.stack=[],o=r.enter("autolink");let n=i.move("<");return n+=i.move(r.containerPhrasing(e,{before:n,after:">",...i.current()})),n+=i.move(">"),o(),r.stack=t,n}o=r.enter("link"),d=r.enter("label");let c=i.move("[");return c+=i.move(r.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(r.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(d=r.enter("destinationRaw"),c+=i.move(r.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),d(),e.title&&(d=r.enter("title".concat(s)),c+=i.move(" "+a),c+=i.move(r.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),d()),c+=i.move(")"),o(),c}function xa(e,t,r,n){const a=e.referenceType,s=r.enter("linkReference");let i=r.enter("label");const o=r.createTracker(n);let d=o.move("[");const c=r.containerPhrasing(e,{before:d,after:"]",...o.current()});d+=o.move(c+"]["),i();const l=r.stack;r.stack=[],i=r.enter("reference");const u=r.safe(r.associationId(e),{before:d,after:"]",...o.current()});return i(),r.stack=l,s(),"full"!==a&&c&&c===u?"shortcut"===a?d=d.slice(0,-1):d+=o.move("]"):d+=o.move(u+"]"),d}function Ea(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ta(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}sa.peek=function(){return"~"},ga.peek=function(e,t,r){return r.options.emphasis||"*"},ha.peek=function(){return"<"},ma.peek=function(){return"!"},ya.peek=function(){return"!"},ba.peek=function(){return"`"},Ra.peek=function(e,t,r){return va(e,r)?"<":"["},xa.peek=function(){return"["};const wa=Sr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function Sa(e,t,r,n){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(r),s=r.enter("strong"),i=r.createTracker(n);let o=i.move(a+a);return o+=i.move(r.containerPhrasing(e,{before:o,after:a,...i.current()})),o+=i.move(a+a),s(),o}Sa.peek=function(e,t,r){return r.options.strong||"*"};const Aa={blockquote:function(e,t,r,n){const a=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);const i=r.indentLines(r.containerFlow(e,s.current()),ca);return a(),i},break:ua,code:function(e,t,r,n){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(r),s=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,r)){const e=r.enter("codeIndented"),t=r.indentLines(s,pa);return e(),t}const o=r.createTracker(n),d=a.repeat(Math.max(function(e,t){const r=String(e);let n=r.indexOf(t),a=n,s=0,i=0;if("string"!==typeof t)throw new TypeError("Expected substring");for(;-1!==n;)n===a?++s>i&&(i=s):s=1,a=n+t.length,n=r.indexOf(t,a);return i}(s,a)+1,3)),c=r.enter("codeFenced");let l=o.move(d);if(e.lang){const t=r.enter("codeFencedLang".concat(i));l+=o.move(r.safe(e.lang,{before:l,after:" ",encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){const t=r.enter("codeFencedMeta".concat(i));l+=o.move(" "),l+=o.move(r.safe(e.meta,{before:l,after:"\n",encode:["`"],...o.current()})),t()}return l+=o.move("\n"),s&&(l+=o.move(s+"\n")),l+=o.move(d),c(),l},definition:function(e,t,r,n){const a=fa(r),s='"'===a?"Quote":"Apostrophe",i=r.enter("definition");let o=r.enter("label");const d=r.createTracker(n);let c=d.move("[");return c+=d.move(r.safe(r.associationId(e),{before:c,after:"]",...d.current()})),c+=d.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=d.move("<"),c+=d.move(r.safe(e.url,{before:c,after:">",...d.current()})),c+=d.move(">")):(o=r.enter("destinationRaw"),c+=d.move(r.safe(e.url,{before:c,after:e.title?" ":"\n",...d.current()}))),o(),e.title&&(o=r.enter("title".concat(s)),c+=d.move(" "+a),c+=d.move(r.safe(e.title,{before:c,after:a,...d.current()})),c+=d.move(a),o()),i(),c},emphasis:ga,hardBreak:ua,heading:function(e,t,r,n){const a=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(n);if(function(e,t){let r=!1;return Nr(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,Pr})),Boolean((!e.depth||e.depth<3)&&Re(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),n=r.enter("phrasing"),i=r.containerPhrasing(e,{...s.current(),before:"\n",after:"\n"});return n(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),o=r.enter("headingAtx"),d=r.enter("phrasing");s.move(i+" ");let c=r.containerPhrasing(e,{before:"# ",after:"\n",...s.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?i+" "+c:i,r.options.closeAtx&&(c+=" "+i),d(),o(),c},html:ha,image:ma,imageReference:ya,inlineCode:ba,link:Ra,linkReference:xa,list:function(e,t,r,n){const a=r.enter("list"),s=r.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(r):Ea(r);const o=e.ordered?"."===i?")":".":function(e){const t=Ea(e),r=e.options.bulletOther;if(!r)return"*"===t?"-":"*";if("*"!==r&&"+"!==r&&"-"!==r)throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}(r);let d=!(!t||!r.bulletLastUsed)&&i===r.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==r.stack[r.stack.length-1]||"listItem"!==r.stack[r.stack.length-2]||"list"!==r.stack[r.stack.length-3]||"listItem"!==r.stack[r.stack.length-4]||0!==r.indexStack[r.indexStack.length-1]||0!==r.indexStack[r.indexStack.length-2]||0!==r.indexStack[r.indexStack.length-3]||(d=!0),Ta(r)===i&&t){let t=-1;for(;++t-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+s);let i=s.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const o=r.createTracker(n);o.move(s+" ".repeat(i-s.length)),o.shift(i);const d=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(i))+e;return(r?s:s+" ".repeat(i-s.length))+e}));return d(),c},paragraph:function(e,t,r,n){const a=r.enter("paragraph"),s=r.enter("phrasing"),i=r.containerPhrasing(e,n);return s(),a(),i},root:function(e,t,r,n){return(e.children.some((function(e){return wa(e)}))?r.containerPhrasing:r.containerFlow).call(r,e,n)},strong:Sa,text:function(e,t,r,n){return r.safe(e.value,n)},thematicBreak:function(e,t,r){const n=(Ta(r)+(r.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(r));return r.options.ruleSpaces?n.slice(0,-1):n}};function ja(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Ca(e){this.exit(e),this.data.inTable=void 0}function ka(e){this.enter({type:"tableRow",children:[]},e)}function _a(e){this.exit(e)}function Pa(e){this.enter({type:"tableCell",children:[]},e)}function Ia(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Da));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Da(e,t){return"|"===t?t:e}function Na(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,a=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,r){let n=Aa.inlineCode(e,t,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n},table:function(e,t,r,n){return o(function(e,t,r){const n=e.children;let a=-1;const s=[],i=t.enter("table");for(;++a1&&void 0!==arguments[1]?arguments[1]:{};const r=(t.align||[]).concat(),n=t.stringLength||oa,a=[],s=[],i=[],o=[];let d=0,c=-1;for(;++cd&&(d=e[c].length);++lo[l])&&(o[l]=e)}r.push(s)}s[c]=r,i[c]=a}let l=-1;if("object"===typeof r&&"length"in r)for(;++lo[l]&&(o[l]=s),p[l]=s),u[l]=i}s.splice(1,0,u),i.splice(1,0,p),c=-1;const f=[];for(;++c0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Va[43]=za,Va[45]=za,Va[46]=za,Va[95]=za,Va[72]=[za,Wa],Va[104]=[za,Wa],Va[87]=[za,qa],Va[119]=[za,qa];const Za={tokenize:function(e,t,r){const n=this;return ze(e,(function(e){const a=n.events[n.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function es(e,t,r){const n=this;let a=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i;for(;a--;){const e=n.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return r(a);const o=mt(n.sliceSerialize({start:i.end,end:n.now()}));if(94!==o.codePointAt(0)||!s.includes(o.slice(1)))return r(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function ts(e,t){let r,n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function rs(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(o){if(i>999||93===o&&!s||null===o||91===o||Ue(o))return r(o);if(93===o){e.exit("chunkString");const s=e.exit("gfmFootnoteCallString");return a.includes(mt(n.sliceSerialize(s)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(o)}return Ue(o)||(s=!0),i++,e.consume(o),92===o?c:d}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,d):d(t)}}function ns(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,i,o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),d};function d(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(t)}function c(t){if(o>999||93===t&&!i||null===t||91===t||Ue(t))return r(t);if(93===t){e.exit("chunkString");const r=e.exit("gfmFootnoteDefinitionLabelString");return s=mt(n.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return Ue(t)||(i=!0),o++,e.consume(t),92===t?l:c}function l(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(s)||a.push(s),ze(e,p,"gfmFootnoteDefinitionWhitespace")):r(t)}function p(e){return t(e)}}function as(e,t,r){return e.check(Xe,t,e.attempt(Za,t,r))}function ss(e){e.exit("gfmFootnoteDefinition")}function is(e){let t=(e||{}).singleTilde;const r={tokenize:function(e,r,n){const a=this.previous,s=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==s[s.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),o(t)};function o(s){const d=Mt(a);if(126===s)return i>1?n(s):(e.consume(s),i++,o);if(i<2&&!t)return n(s);const c=e.exit("strikethroughSequenceTemporary"),l=Mt(s);return c._open=!l||2===l&&Boolean(d),c._close=!d||2===d&&Boolean(l),r(s)}},resolveAll:function(e,t){let r=-1;for(;++r0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}}function ds(e,t){let r=!1;const n=[];for(;t-1;){const e=n.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?n.events[t][1].type:null,s="tableHead"===a||"tableRow"===a?R:o;if(s===R&&n.parser.lazy[n.now().line])return r(e);return s(e)};function o(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return d(e);return a=!0,i+=1,d(e)}(t)}function d(t){return null===t?r(t):Me(t)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):r(t):He(t)?ze(e,d,"whitespace")(t):(i+=1,a&&(a=!1,s+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Ue(t)?(e.exit("data"),d(t)):(e.consume(t),92===t?l:c)}function l(t){return 92===t||124===t?(e.consume(t),c):c(t)}function u(t){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(t):(e.enter("tableDelimiterRow"),a=!1,He(t)?ze(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?g(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return He(t)?ze(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(i+=1,h(t)):null===t||Me(t)?b(t):v(t)}function h(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):v(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return He(t)?ze(e,b,"whitespace")(t):b(t)}function b(r){return 124===r?p(r):(null===r||Me(r))&&a&&s===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(r)):v(r)}function v(e){return r(e)}function R(t){return e.enter("tableRow"),x(t)}function x(r){return 124===r?(e.enter("tableCellDivider"),e.consume(r),e.exit("tableCellDivider"),x):null===r||Me(r)?(e.exit("tableRow"),t(r)):He(r)?ze(e,x,"whitespace")(r):(e.enter("data"),E(r))}function E(t){return null===t||124===t||Ue(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?T:E)}function T(t){return 92===t||124===t?(e.consume(t),E):E(t)}}function ls(e,t){let r,n,a,s=-1,i=!0,o=0,d=[0,0,0,0],c=[0,0,0,0],l=!1,u=0;const p=new os;for(;++sr[2]+1){const t=r[2]+1,n=r[3]-r[2]-1;e.add(t,n,[])}}e.add(r[3]+1,0,[["exit",i,t]])}return void 0!==a&&(s.end=Object.assign({},fs(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function ps(e,t,r,n,a){const s=[],i=fs(t.events,r);a&&(a.end=Object.assign({},i),s.push(["exit",a,t])),n.end=Object.assign({},i),s.push(["exit",n,t]),e.add(r+1,0,s)}function fs(e,t){const r=e[t],n="enter"===r[0]?"start":"end";return r[1][n]}const gs={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return Ue(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),s):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),s):r(t)}function s(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):r(t)}function i(n){return Me(n)?t(n):He(n)?e.check({tokenize:hs},t,r)(n):r(n)}}};function hs(e,t,r){return ze(e,(function(e){return null===e?r(e):t(e)}),"whitespace")}const ms={};function ys(e){const t=e||ms,r=this.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(function(e){return Ce([{text:Va},{document:{91:{tokenize:ns,continuation:{tokenize:as},exit:ss}},text:{91:{tokenize:rs},93:{add:"after",tokenize:es,resolveTo:ts}}},is(e),{flow:{null:{tokenize:cs,resolveAll:ls}}},{text:{91:gs}}])}(t)),a.push([{transforms:[Hn],enter:{literalAutolink:On,literalAutolinkEmail:Fn,literalAutolinkHttp:Fn,literalAutolinkWww:Fn},exit:{literalAutolink:Un,literalAutolinkEmail:Mn,literalAutolinkHttp:Ln,literalAutolinkWww:Bn}},{enter:{gfmFootnoteDefinition:zn,gfmFootnoteDefinitionLabelString:Vn,gfmFootnoteCall:Xn,gfmFootnoteCallString:Jn},exit:{gfmFootnoteDefinition:Yn,gfmFootnoteDefinitionLabelString:Kn,gfmFootnoteCall:$n,gfmFootnoteCallString:Qn}},{canContainEols:["delete"],enter:{strikethrough:na},exit:{strikethrough:aa}},{enter:{table:ja,tableData:Pa,tableHeader:Pa,tableRow:ka},exit:{codeText:Ia,table:Ca,tableData:_a,tableHeader:_a,tableRow:_a}},{exit:{taskListCheckValueChecked:Oa,taskListCheckValueUnchecked:Oa,paragraph:Fa}}]),s.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dn,notInConstruct:Nn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dn,notInConstruct:Nn},{character:":",before:"[ps]",after:"\\/",inConstruct:Dn,notInConstruct:Nn}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ea,footnoteReference:Zn}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ra}],handlers:{delete:sa}},Na(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:La}}]}}(t))}const bs=/[#.]/g;var vs=r(9627);const Rs=new Set(["button","menu","reset","submit"]),xs={}.hasOwnProperty;function Es(e,t,r){const n=r&&function(e){const t={};let r=-1;for(;++r2?o-2:0),c=2;c-1&&ee)return{line:t+1,column:e-(t>0?r[t-1]:0)+1,offset:e}},toOffset:function(e){const t=e&&e.line,n=e&&e.column;if("number"===typeof t&&"number"===typeof n&&!Number.isNaN(t)&&!Number.isNaN(n)&&t-1 in r){const e=(r[t-2]||0)+n-1||0;if(e>-1&&e1?s-1:0),o=1;o=55296&&e<=57343}function ri(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function ni(e){return e>=64976&&e<=65007||Vs.has(e)}var ai;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(ai=ai||(ai={}));class si{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:r,offset:n}=this;return{code:e,startLine:t,endLine:t,startCol:r,endCol:r,startOffset:n,endOffset:n}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Ys.EOF;return this._err(ai.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let r=0;r=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Ys.EOF;const r=this.html.charCodeAt(t);return r===Ys.CARRIAGE_RETURN?Ys.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Ys.EOF;let e=this.html.charCodeAt(this.pos);if(e===Ys.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Ys.LINE_FEED;if(e===Ys.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,ti(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Ys.LINE_FEED||e===Ys.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){ri(e)?this._err(ai.controlCharacterInInputStream):ni(e)&&this._err(ai.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(ii=ii||(ii={}));const di=new Uint16Array('\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c'.split("").map((e=>e.charCodeAt(0)))),ci=new Uint16Array("\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map((e=>e.charCodeAt(0))));var li;const ui=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),pi=null!==(li=String.fromCodePoint)&&void 0!==li?li:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function fi(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=ui.get(e))&&void 0!==t?t:e}var gi;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(gi||(gi={}));var hi,mi,yi;function bi(e){return e>=gi.ZERO&&e<=gi.NINE}function vi(e){return e>=gi.UPPER_A&&e<=gi.UPPER_F||e>=gi.LOWER_A&&e<=gi.LOWER_F}function Ri(e){return e===gi.EQUALS||function(e){return e>=gi.UPPER_A&&e<=gi.UPPER_Z||e>=gi.LOWER_A&&e<=gi.LOWER_Z||bi(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(hi||(hi={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(mi||(mi={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(yi||(yi={}));class xi{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=mi.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yi.Strict}startEntity(e){this.decodeMode=e,this.state=mi.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case mi.EntityStart:return e.charCodeAt(t)===gi.NUM?(this.state=mi.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=mi.NamedEntity,this.stateNamedEntity(e,t));case mi.NumericStart:return this.stateNumericStart(e,t);case mi.NumericDecimal:return this.stateNumericDecimal(e,t);case mi.NumericHex:return this.stateNumericHex(e,t);case mi.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===gi.LOWER_X?(this.state=mi.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=mi.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){const a=r-t;this.result=this.result*Math.pow(n,a)+parseInt(e.substr(t,a),n),this.consumed+=a}}stateNumericHex(e,t){const r=t;for(;t>14;for(;t>14,0!==a){if(s===gi.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==yi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,n=(r[t]&hi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:n}=this;return this.emitCodePoint(1===t?n[e]&~hi.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case mi.NamedEntity:return 0===this.result||this.decodeMode===yi.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case mi.NumericDecimal:return this.emitNumericEntity(0,2);case mi.NumericHex:return this.emitNumericEntity(0,3);case mi.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mi.EntityStart:return 0}}}function Ei(e){let t="";const r=new xi(e,(e=>t+=pi(e)));return function(e,n){let a=0,s=0;for(;(s=e.indexOf("&",s))>=0;){t+=e.slice(a,s),r.startEntity(n);const i=r.write(e,s+1);if(i<0){a=s+r.end();break}a=s+i,s=0===i?a+1:a}const i=t+e.slice(a);return t="",i}}function Ti(e,t,r,n){const a=(t&hi.BRANCH_LENGTH)>>7,s=t&hi.JUMP_TABLE;if(0===a)return 0!==s&&n===s?r:-1;if(s){const t=n-s;return t<0||t>=a?-1:e[r+t]-1}let i=r,o=i+a-1;for(;i<=o;){const t=i+o>>>1,r=e[t];if(rn))return e[t+a];o=t-1}}return-1}Ei(di),Ei(ci);var wi,Si,Ai,ji,Ci;!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(wi=wi||(wi={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(Si=Si||(Si={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(Ai=Ai||(Ai={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(ji=ji||(ji={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(Ci=Ci||(Ci={}));const ki=new Map([[ji.A,Ci.A],[ji.ADDRESS,Ci.ADDRESS],[ji.ANNOTATION_XML,Ci.ANNOTATION_XML],[ji.APPLET,Ci.APPLET],[ji.AREA,Ci.AREA],[ji.ARTICLE,Ci.ARTICLE],[ji.ASIDE,Ci.ASIDE],[ji.B,Ci.B],[ji.BASE,Ci.BASE],[ji.BASEFONT,Ci.BASEFONT],[ji.BGSOUND,Ci.BGSOUND],[ji.BIG,Ci.BIG],[ji.BLOCKQUOTE,Ci.BLOCKQUOTE],[ji.BODY,Ci.BODY],[ji.BR,Ci.BR],[ji.BUTTON,Ci.BUTTON],[ji.CAPTION,Ci.CAPTION],[ji.CENTER,Ci.CENTER],[ji.CODE,Ci.CODE],[ji.COL,Ci.COL],[ji.COLGROUP,Ci.COLGROUP],[ji.DD,Ci.DD],[ji.DESC,Ci.DESC],[ji.DETAILS,Ci.DETAILS],[ji.DIALOG,Ci.DIALOG],[ji.DIR,Ci.DIR],[ji.DIV,Ci.DIV],[ji.DL,Ci.DL],[ji.DT,Ci.DT],[ji.EM,Ci.EM],[ji.EMBED,Ci.EMBED],[ji.FIELDSET,Ci.FIELDSET],[ji.FIGCAPTION,Ci.FIGCAPTION],[ji.FIGURE,Ci.FIGURE],[ji.FONT,Ci.FONT],[ji.FOOTER,Ci.FOOTER],[ji.FOREIGN_OBJECT,Ci.FOREIGN_OBJECT],[ji.FORM,Ci.FORM],[ji.FRAME,Ci.FRAME],[ji.FRAMESET,Ci.FRAMESET],[ji.H1,Ci.H1],[ji.H2,Ci.H2],[ji.H3,Ci.H3],[ji.H4,Ci.H4],[ji.H5,Ci.H5],[ji.H6,Ci.H6],[ji.HEAD,Ci.HEAD],[ji.HEADER,Ci.HEADER],[ji.HGROUP,Ci.HGROUP],[ji.HR,Ci.HR],[ji.HTML,Ci.HTML],[ji.I,Ci.I],[ji.IMG,Ci.IMG],[ji.IMAGE,Ci.IMAGE],[ji.INPUT,Ci.INPUT],[ji.IFRAME,Ci.IFRAME],[ji.KEYGEN,Ci.KEYGEN],[ji.LABEL,Ci.LABEL],[ji.LI,Ci.LI],[ji.LINK,Ci.LINK],[ji.LISTING,Ci.LISTING],[ji.MAIN,Ci.MAIN],[ji.MALIGNMARK,Ci.MALIGNMARK],[ji.MARQUEE,Ci.MARQUEE],[ji.MATH,Ci.MATH],[ji.MENU,Ci.MENU],[ji.META,Ci.META],[ji.MGLYPH,Ci.MGLYPH],[ji.MI,Ci.MI],[ji.MO,Ci.MO],[ji.MN,Ci.MN],[ji.MS,Ci.MS],[ji.MTEXT,Ci.MTEXT],[ji.NAV,Ci.NAV],[ji.NOBR,Ci.NOBR],[ji.NOFRAMES,Ci.NOFRAMES],[ji.NOEMBED,Ci.NOEMBED],[ji.NOSCRIPT,Ci.NOSCRIPT],[ji.OBJECT,Ci.OBJECT],[ji.OL,Ci.OL],[ji.OPTGROUP,Ci.OPTGROUP],[ji.OPTION,Ci.OPTION],[ji.P,Ci.P],[ji.PARAM,Ci.PARAM],[ji.PLAINTEXT,Ci.PLAINTEXT],[ji.PRE,Ci.PRE],[ji.RB,Ci.RB],[ji.RP,Ci.RP],[ji.RT,Ci.RT],[ji.RTC,Ci.RTC],[ji.RUBY,Ci.RUBY],[ji.S,Ci.S],[ji.SCRIPT,Ci.SCRIPT],[ji.SECTION,Ci.SECTION],[ji.SELECT,Ci.SELECT],[ji.SOURCE,Ci.SOURCE],[ji.SMALL,Ci.SMALL],[ji.SPAN,Ci.SPAN],[ji.STRIKE,Ci.STRIKE],[ji.STRONG,Ci.STRONG],[ji.STYLE,Ci.STYLE],[ji.SUB,Ci.SUB],[ji.SUMMARY,Ci.SUMMARY],[ji.SUP,Ci.SUP],[ji.TABLE,Ci.TABLE],[ji.TBODY,Ci.TBODY],[ji.TEMPLATE,Ci.TEMPLATE],[ji.TEXTAREA,Ci.TEXTAREA],[ji.TFOOT,Ci.TFOOT],[ji.TD,Ci.TD],[ji.TH,Ci.TH],[ji.THEAD,Ci.THEAD],[ji.TITLE,Ci.TITLE],[ji.TR,Ci.TR],[ji.TRACK,Ci.TRACK],[ji.TT,Ci.TT],[ji.U,Ci.U],[ji.UL,Ci.UL],[ji.SVG,Ci.SVG],[ji.VAR,Ci.VAR],[ji.WBR,Ci.WBR],[ji.XMP,Ci.XMP]]);function _i(e){var t;return null!==(t=ki.get(e))&&void 0!==t?t:Ci.UNKNOWN}const Pi=Ci,Ii={[wi.HTML]:new Set([Pi.ADDRESS,Pi.APPLET,Pi.AREA,Pi.ARTICLE,Pi.ASIDE,Pi.BASE,Pi.BASEFONT,Pi.BGSOUND,Pi.BLOCKQUOTE,Pi.BODY,Pi.BR,Pi.BUTTON,Pi.CAPTION,Pi.CENTER,Pi.COL,Pi.COLGROUP,Pi.DD,Pi.DETAILS,Pi.DIR,Pi.DIV,Pi.DL,Pi.DT,Pi.EMBED,Pi.FIELDSET,Pi.FIGCAPTION,Pi.FIGURE,Pi.FOOTER,Pi.FORM,Pi.FRAME,Pi.FRAMESET,Pi.H1,Pi.H2,Pi.H3,Pi.H4,Pi.H5,Pi.H6,Pi.HEAD,Pi.HEADER,Pi.HGROUP,Pi.HR,Pi.HTML,Pi.IFRAME,Pi.IMG,Pi.INPUT,Pi.LI,Pi.LINK,Pi.LISTING,Pi.MAIN,Pi.MARQUEE,Pi.MENU,Pi.META,Pi.NAV,Pi.NOEMBED,Pi.NOFRAMES,Pi.NOSCRIPT,Pi.OBJECT,Pi.OL,Pi.P,Pi.PARAM,Pi.PLAINTEXT,Pi.PRE,Pi.SCRIPT,Pi.SECTION,Pi.SELECT,Pi.SOURCE,Pi.STYLE,Pi.SUMMARY,Pi.TABLE,Pi.TBODY,Pi.TD,Pi.TEMPLATE,Pi.TEXTAREA,Pi.TFOOT,Pi.TH,Pi.THEAD,Pi.TITLE,Pi.TR,Pi.TRACK,Pi.UL,Pi.WBR,Pi.XMP]),[wi.MATHML]:new Set([Pi.MI,Pi.MO,Pi.MN,Pi.MS,Pi.MTEXT,Pi.ANNOTATION_XML]),[wi.SVG]:new Set([Pi.TITLE,Pi.FOREIGN_OBJECT,Pi.DESC]),[wi.XLINK]:new Set,[wi.XML]:new Set,[wi.XMLNS]:new Set};function Di(e){return e===Pi.H1||e===Pi.H2||e===Pi.H3||e===Pi.H4||e===Pi.H5||e===Pi.H6}new Set([ji.STYLE,ji.SCRIPT,ji.XMP,ji.IFRAME,ji.NOEMBED,ji.NOFRAMES,ji.PLAINTEXT]);const Ni=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var Oi;!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(Oi||(Oi={}));const Fi={DATA:Oi.DATA,RCDATA:Oi.RCDATA,RAWTEXT:Oi.RAWTEXT,SCRIPT_DATA:Oi.SCRIPT_DATA,PLAINTEXT:Oi.PLAINTEXT,CDATA_SECTION:Oi.CDATA_SECTION};function Li(e){return e>=Ys.DIGIT_0&&e<=Ys.DIGIT_9}function Bi(e){return e>=Ys.LATIN_CAPITAL_A&&e<=Ys.LATIN_CAPITAL_Z}function Mi(e){return function(e){return e>=Ys.LATIN_SMALL_A&&e<=Ys.LATIN_SMALL_Z}(e)||Bi(e)}function Ui(e){return Mi(e)||Li(e)}function Hi(e){return e>=Ys.LATIN_CAPITAL_A&&e<=Ys.LATIN_CAPITAL_F}function Gi(e){return e>=Ys.LATIN_SMALL_A&&e<=Ys.LATIN_SMALL_F}function qi(e){return e+32}function Wi(e){return e===Ys.SPACE||e===Ys.LINE_FEED||e===Ys.TABULATION||e===Ys.FORM_FEED}function zi(e){return Wi(e)||e===Ys.SOLIDUS||e===Ys.GREATER_THAN_SIGN}class Vi{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Oi.DATA,this.returnState=Oi.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new si(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,r;null===(r=(t=this.handler).onParseError)||void 0===r||r.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null===e||void 0===e||e())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null===r||void 0===r||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(ai.endTagWithAttributes),e.selfClosing&&this._err(ai.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ii.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case ii.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case ii.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ii.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Wi(e)?ii.WHITESPACE_CHARACTER:e===Ys.NULL?ii.NULL_CHARACTER:ii.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ii.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,r=0,n=!1;for(let s=0,i=di[0];s>=0&&(s=Ti(di,i,s+1,e),!(s<0));e=this._consume()){r+=1,i=di[s];const o=i&hi.VALUE_LENGTH;if(o){const i=(o>>14)-1;if(e!==Ys.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((a=this.preprocessor.peek(1))===Ys.EQUALS_SIGN||Ui(a))?(t=[Ys.AMPERSAND],s+=i):(t=0===i?[di[s]&~hi.VALUE_LENGTH]:1===i?[di[++s]]:[di[++s],di[++s]],r=0,n=e!==Ys.SEMICOLON),0===i){this._consume();break}}}var a;return this._unconsume(r),n&&!this.preprocessor.endOfChunkHit&&this._err(ai.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===Oi.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Oi.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Oi.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Oi.DATA:this._stateData(e);break;case Oi.RCDATA:this._stateRcdata(e);break;case Oi.RAWTEXT:this._stateRawtext(e);break;case Oi.SCRIPT_DATA:this._stateScriptData(e);break;case Oi.PLAINTEXT:this._statePlaintext(e);break;case Oi.TAG_OPEN:this._stateTagOpen(e);break;case Oi.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Oi.TAG_NAME:this._stateTagName(e);break;case Oi.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Oi.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Oi.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Oi.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Oi.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Oi.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Oi.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Oi.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Oi.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Oi.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Oi.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Oi.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Oi.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Oi.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Oi.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Oi.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Oi.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Oi.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Oi.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Oi.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Oi.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Oi.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Oi.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Oi.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Oi.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Oi.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Oi.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Oi.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Oi.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Oi.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Oi.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Oi.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Oi.BOGUS_COMMENT:this._stateBogusComment(e);break;case Oi.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Oi.COMMENT_START:this._stateCommentStart(e);break;case Oi.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Oi.COMMENT:this._stateComment(e);break;case Oi.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Oi.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Oi.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Oi.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Oi.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Oi.COMMENT_END:this._stateCommentEnd(e);break;case Oi.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Oi.DOCTYPE:this._stateDoctype(e);break;case Oi.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Oi.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Oi.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Oi.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Oi.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Oi.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Oi.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Oi.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Oi.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Oi.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Oi.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Oi.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Oi.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Oi.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Oi.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Oi.CDATA_SECTION:this._stateCdataSection(e);break;case Oi.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Oi.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Oi.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case Oi.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case Oi.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case Oi.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case Oi.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case Oi.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case Oi.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case Oi.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Ys.LESS_THAN_SIGN:this.state=Oi.TAG_OPEN;break;case Ys.AMPERSAND:this.returnState=Oi.DATA,this.state=Oi.CHARACTER_REFERENCE;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this._emitCodePoint(e);break;case Ys.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Ys.AMPERSAND:this.returnState=Oi.RCDATA,this.state=Oi.CHARACTER_REFERENCE;break;case Ys.LESS_THAN_SIGN:this.state=Oi.RCDATA_LESS_THAN_SIGN;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this._emitChars(Ks);break;case Ys.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Ys.LESS_THAN_SIGN:this.state=Oi.RAWTEXT_LESS_THAN_SIGN;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this._emitChars(Ks);break;case Ys.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Ys.LESS_THAN_SIGN:this.state=Oi.SCRIPT_DATA_LESS_THAN_SIGN;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this._emitChars(Ks);break;case Ys.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Ys.NULL:this._err(ai.unexpectedNullCharacter),this._emitChars(Ks);break;case Ys.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Mi(e))this._createStartTagToken(),this.state=Oi.TAG_NAME,this._stateTagName(e);else switch(e){case Ys.EXCLAMATION_MARK:this.state=Oi.MARKUP_DECLARATION_OPEN;break;case Ys.SOLIDUS:this.state=Oi.END_TAG_OPEN;break;case Ys.QUESTION_MARK:this._err(ai.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Oi.BOGUS_COMMENT,this._stateBogusComment(e);break;case Ys.EOF:this._err(ai.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(ai.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Oi.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Mi(e))this._createEndTagToken(),this.state=Oi.TAG_NAME,this._stateTagName(e);else switch(e){case Ys.GREATER_THAN_SIGN:this._err(ai.missingEndTagName),this.state=Oi.DATA;break;case Ys.EOF:this._err(ai.eofBeforeTagName),this._emitChars("");break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this.state=Oi.SCRIPT_DATA_ESCAPED,this._emitChars(Ks);break;case Ys.EOF:this._err(ai.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Oi.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Ys.SOLIDUS?this.state=Oi.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mi(e)?(this._emitChars("<"),this.state=Oi.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Oi.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Mi(e)?(this.state=Oi.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this.state=Oi.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ks);break;case Ys.EOF:this._err(ai.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Oi.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Ys.SOLIDUS?(this.state=Oi.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Oi.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith($s,!1)&&zi(this.preprocessor.peek($s.length))){this._emitCodePoint(e);for(let e=0;e<$s.length;e++)this._emitCodePoint(this._consume());this.state=Oi.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Oi.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.SOLIDUS:case Ys.GREATER_THAN_SIGN:case Ys.EOF:this.state=Oi.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Ys.EQUALS_SIGN:this._err(ai.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Oi.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=Oi.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:case Ys.SOLIDUS:case Ys.GREATER_THAN_SIGN:case Ys.EOF:this._leaveAttrName(),this.state=Oi.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Ys.EQUALS_SIGN:this._leaveAttrName(),this.state=Oi.BEFORE_ATTRIBUTE_VALUE;break;case Ys.QUOTATION_MARK:case Ys.APOSTROPHE:case Ys.LESS_THAN_SIGN:this._err(ai.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this.currentAttr.name+=Ks;break;default:this.currentAttr.name+=String.fromCodePoint(Bi(e)?qi(e):e)}}_stateAfterAttributeName(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.SOLIDUS:this.state=Oi.SELF_CLOSING_START_TAG;break;case Ys.EQUALS_SIGN:this.state=Oi.BEFORE_ATTRIBUTE_VALUE;break;case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA,this.emitCurrentTagToken();break;case Ys.EOF:this._err(ai.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=Oi.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.QUOTATION_MARK:this.state=Oi.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:this.state=Oi.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Ys.GREATER_THAN_SIGN:this._err(ai.missingAttributeValue),this.state=Oi.DATA,this.emitCurrentTagToken();break;default:this.state=Oi.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Ys.QUOTATION_MARK:this.state=Oi.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Ys.AMPERSAND:this.returnState=Oi.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=Oi.CHARACTER_REFERENCE;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this.currentAttr.value+=Ks;break;case Ys.EOF:this._err(ai.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Ys.APOSTROPHE:this.state=Oi.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Ys.AMPERSAND:this.returnState=Oi.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=Oi.CHARACTER_REFERENCE;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this.currentAttr.value+=Ks;break;case Ys.EOF:this._err(ai.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this._leaveAttrValue(),this.state=Oi.BEFORE_ATTRIBUTE_NAME;break;case Ys.AMPERSAND:this.returnState=Oi.ATTRIBUTE_VALUE_UNQUOTED,this.state=Oi.CHARACTER_REFERENCE;break;case Ys.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Oi.DATA,this.emitCurrentTagToken();break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this.currentAttr.value+=Ks;break;case Ys.QUOTATION_MARK:case Ys.APOSTROPHE:case Ys.LESS_THAN_SIGN:case Ys.EQUALS_SIGN:case Ys.GRAVE_ACCENT:this._err(ai.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Ys.EOF:this._err(ai.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this._leaveAttrValue(),this.state=Oi.BEFORE_ATTRIBUTE_NAME;break;case Ys.SOLIDUS:this._leaveAttrValue(),this.state=Oi.SELF_CLOSING_START_TAG;break;case Ys.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Oi.DATA,this.emitCurrentTagToken();break;case Ys.EOF:this._err(ai.eofInTag),this._emitEOFToken();break;default:this._err(ai.missingWhitespaceBetweenAttributes),this.state=Oi.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Ys.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=Oi.DATA,this.emitCurrentTagToken();break;case Ys.EOF:this._err(ai.eofInTag),this._emitEOFToken();break;default:this._err(ai.unexpectedSolidusInTag),this.state=Oi.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA,this.emitCurrentComment(t);break;case Ys.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.data+=Ks;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Xs,!0)?(this._createCommentToken(Xs.length+1),this.state=Oi.COMMENT_START):this._consumeSequenceIfMatch(Qs,!1)?(this.currentLocation=this.getCurrentLocation(Qs.length+1),this.state=Oi.DOCTYPE):this._consumeSequenceIfMatch(Js,!0)?this.inForeignNode?this.state=Oi.CDATA_SECTION:(this._err(ai.cdataInHtmlContent),this._createCommentToken(Js.length+1),this.currentToken.data="[CDATA[",this.state=Oi.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ai.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Oi.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Ys.HYPHEN_MINUS:this.state=Oi.COMMENT_START_DASH;break;case Ys.GREATER_THAN_SIGN:{this._err(ai.abruptClosingOfEmptyComment),this.state=Oi.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Oi.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Ys.HYPHEN_MINUS:this.state=Oi.COMMENT_END;break;case Ys.GREATER_THAN_SIGN:this._err(ai.abruptClosingOfEmptyComment),this.state=Oi.DATA,this.emitCurrentComment(t);break;case Ys.EOF:this._err(ai.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Oi.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Ys.HYPHEN_MINUS:this.state=Oi.COMMENT_END_DASH;break;case Ys.LESS_THAN_SIGN:t.data+="<",this.state=Oi.COMMENT_LESS_THAN_SIGN;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.data+=Ks;break;case Ys.EOF:this._err(ai.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Ys.EXCLAMATION_MARK:t.data+="!",this.state=Oi.COMMENT_LESS_THAN_SIGN_BANG;break;case Ys.LESS_THAN_SIGN:t.data+="<";break;default:this.state=Oi.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Ys.HYPHEN_MINUS?this.state=Oi.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Oi.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Ys.HYPHEN_MINUS?this.state=Oi.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Oi.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Ys.GREATER_THAN_SIGN&&e!==Ys.EOF&&this._err(ai.nestedComment),this.state=Oi.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Ys.HYPHEN_MINUS:this.state=Oi.COMMENT_END;break;case Ys.EOF:this._err(ai.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Oi.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA,this.emitCurrentComment(t);break;case Ys.EXCLAMATION_MARK:this.state=Oi.COMMENT_END_BANG;break;case Ys.HYPHEN_MINUS:t.data+="-";break;case Ys.EOF:this._err(ai.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=Oi.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Ys.HYPHEN_MINUS:t.data+="--!",this.state=Oi.COMMENT_END_DASH;break;case Ys.GREATER_THAN_SIGN:this._err(ai.incorrectlyClosedComment),this.state=Oi.DATA,this.emitCurrentComment(t);break;case Ys.EOF:this._err(ai.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=Oi.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this.state=Oi.BEFORE_DOCTYPE_NAME;break;case Ys.GREATER_THAN_SIGN:this.state=Oi.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Ys.EOF:{this._err(ai.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(ai.missingWhitespaceBeforeDoctypeName),this.state=Oi.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Bi(e))this._createDoctypeToken(String.fromCharCode(qi(e))),this.state=Oi.DOCTYPE_NAME;else switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),this._createDoctypeToken(Ks),this.state=Oi.DOCTYPE_NAME;break;case Ys.GREATER_THAN_SIGN:{this._err(ai.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Oi.DATA;break}case Ys.EOF:{this._err(ai.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Oi.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this.state=Oi.AFTER_DOCTYPE_NAME;break;case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.name+=Ks;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Bi(e)?qi(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Zs,!1)?this.state=Oi.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ei,!1)?this.state=Oi.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ai.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this.state=Oi.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Ys.QUOTATION_MARK:this._err(ai.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Oi.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:this._err(ai.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Oi.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Ys.GREATER_THAN_SIGN:this._err(ai.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.QUOTATION_MARK:t.publicId="",this.state=Oi.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:t.publicId="",this.state=Oi.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Ys.GREATER_THAN_SIGN:this._err(ai.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Ys.QUOTATION_MARK:this.state=Oi.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.publicId+=Ks;break;case Ys.GREATER_THAN_SIGN:this._err(ai.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Ys.APOSTROPHE:this.state=Oi.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.publicId+=Ks;break;case Ys.GREATER_THAN_SIGN:this._err(ai.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this.state=Oi.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.QUOTATION_MARK:this._err(ai.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:this._err(ai.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.QUOTATION_MARK:t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:this.state=Oi.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Ys.QUOTATION_MARK:this._err(ai.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:this._err(ai.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Ys.GREATER_THAN_SIGN:this._err(ai.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.QUOTATION_MARK:t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Ys.APOSTROPHE:t.systemId="",this.state=Oi.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Ys.GREATER_THAN_SIGN:this._err(ai.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Oi.DATA,this.emitCurrentDoctype(t);break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Ys.QUOTATION_MARK:this.state=Oi.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.systemId+=Ks;break;case Ys.GREATER_THAN_SIGN:this._err(ai.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Ys.APOSTROPHE:this.state=Oi.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter),t.systemId+=Ks;break;case Ys.GREATER_THAN_SIGN:this._err(ai.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Ys.SPACE:case Ys.LINE_FEED:case Ys.TABULATION:case Ys.FORM_FEED:break;case Ys.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.EOF:this._err(ai.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(ai.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Oi.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Ys.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Oi.DATA;break;case Ys.NULL:this._err(ai.unexpectedNullCharacter);break;case Ys.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Ys.RIGHT_SQUARE_BRACKET:this.state=Oi.CDATA_SECTION_BRACKET;break;case Ys.EOF:this._err(ai.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Ys.RIGHT_SQUARE_BRACKET?this.state=Oi.CDATA_SECTION_END:(this._emitChars("]"),this.state=Oi.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Ys.GREATER_THAN_SIGN:this.state=Oi.DATA;break;case Ys.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=Oi.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===Ys.NUMBER_SIGN?this.state=Oi.NUMERIC_CHARACTER_REFERENCE:Ui(e)?(this.state=Oi.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(Ys.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation());else if(t){for(let e=0;e1114111)this._err(ai.characterReferenceOutsideUnicodeRange),this.charRefCode=Ys.REPLACEMENT_CHARACTER;else if(ti(this.charRefCode))this._err(ai.surrogateCharacterReference),this.charRefCode=Ys.REPLACEMENT_CHARACTER;else if(ni(this.charRefCode))this._err(ai.noncharacterCharacterReference);else if(ri(this.charRefCode)||this.charRefCode===Ys.CARRIAGE_RETURN){this._err(ai.controlCharacterReference);const e=Ni.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const Ki=new Set([Ci.DD,Ci.DT,Ci.LI,Ci.OPTGROUP,Ci.OPTION,Ci.P,Ci.RB,Ci.RP,Ci.RT,Ci.RTC]),Yi=new Set([...Ki,Ci.CAPTION,Ci.COLGROUP,Ci.TBODY,Ci.TD,Ci.TFOOT,Ci.TH,Ci.THEAD,Ci.TR]),Xi=new Map([[Ci.APPLET,wi.HTML],[Ci.CAPTION,wi.HTML],[Ci.HTML,wi.HTML],[Ci.MARQUEE,wi.HTML],[Ci.OBJECT,wi.HTML],[Ci.TABLE,wi.HTML],[Ci.TD,wi.HTML],[Ci.TEMPLATE,wi.HTML],[Ci.TH,wi.HTML],[Ci.ANNOTATION_XML,wi.MATHML],[Ci.MI,wi.MATHML],[Ci.MN,wi.MATHML],[Ci.MO,wi.MATHML],[Ci.MS,wi.MATHML],[Ci.MTEXT,wi.MATHML],[Ci.DESC,wi.SVG],[Ci.FOREIGN_OBJECT,wi.SVG],[Ci.TITLE,wi.SVG]]),Ji=[Ci.H1,Ci.H2,Ci.H3,Ci.H4,Ci.H5,Ci.H6],Qi=[Ci.TR,Ci.TEMPLATE,Ci.HTML],$i=[Ci.TBODY,Ci.TFOOT,Ci.THEAD,Ci.TEMPLATE,Ci.HTML],Zi=[Ci.TABLE,Ci.TEMPLATE,Ci.HTML],eo=[Ci.TD,Ci.TH];class to{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Ci.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Ci.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===wi.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){const n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==wi.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;r--)if(e.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Zi,wi.HTML)}clearBackToTableBodyContext(){this.clearBackTo($i,wi.HTML)}clearBackToTableRowContext(){this.clearBackTo(Qi,wi.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Ci.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===Ci.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===wi.HTML)return!0;if(Xi.get(r)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],r=this.treeAdapter.getNamespaceURI(this.items[e]);if(Di(t)&&r===wi.HTML)return!0;if(Xi.get(t)===r)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===wi.HTML)return!0;if((r===Ci.UL||r===Ci.OL)&&n===wi.HTML||Xi.get(r)===n)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===wi.HTML)return!0;if(r===Ci.BUTTON&&n===wi.HTML||Xi.get(r)===n)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===wi.HTML){if(r===e)return!0;if(r===Ci.TABLE||r===Ci.TEMPLATE||r===Ci.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===wi.HTML){if(t===Ci.TBODY||t===Ci.THEAD||t===Ci.TFOOT)return!0;if(t===Ci.TABLE||t===Ci.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===wi.HTML){if(r===e)return!0;if(r!==Ci.OPTION&&r!==Ci.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;Ki.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Yi.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&Yi.has(this.currentTagId);)this.pop()}}var ro;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(ro=ro||(ro={}));const no={type:ro.Marker};class ao{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const r=[],n=t.length,a=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let i=0;i[e.name,e.value])));let a=0;for(let s=0;sn.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(no)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:ro.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ro.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(no);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===ro.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===ro.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===ro.Element&&t.element===e))}}function so(e){return{nodeName:"#text",value:e,parentNode:null}}const io={createDocument:()=>({nodeName:"#document",mode:Ai.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,r)=>({nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,r,n){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=r,a.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};io.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(io.isTextNode(r))return void(r.value+=t)}io.appendChild(e,so(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&io.isTextNode(n)?n.value+=t:io.insertBefore(e,so(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map((e=>e.name)));for(let n=0;ne.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},oo="html",co="about:legacy-compat",lo="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",uo=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],po=[...uo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],fo=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),go=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ho=[...go,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function mo(e,t){return t.some((t=>e.startsWith(t)))}const yo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},bo="definitionurl",vo="definitionURL",Ro=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),xo=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:wi.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:wi.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:wi.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:wi.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:wi.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:wi.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:wi.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:wi.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:wi.XML}],["xml:space",{prefix:"xml",name:"space",namespace:wi.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:wi.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:wi.XMLNS}]]),Eo=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),To=new Set([Ci.B,Ci.BIG,Ci.BLOCKQUOTE,Ci.BODY,Ci.BR,Ci.CENTER,Ci.CODE,Ci.DD,Ci.DIV,Ci.DL,Ci.DT,Ci.EM,Ci.EMBED,Ci.H1,Ci.H2,Ci.H3,Ci.H4,Ci.H5,Ci.H6,Ci.HEAD,Ci.HR,Ci.I,Ci.IMG,Ci.LI,Ci.LISTING,Ci.MENU,Ci.META,Ci.NOBR,Ci.OL,Ci.P,Ci.PRE,Ci.RUBY,Ci.S,Ci.SMALL,Ci.SPAN,Ci.STRONG,Ci.STRIKE,Ci.SUB,Ci.SUP,Ci.TABLE,Ci.TT,Ci.U,Ci.UL,Ci.VAR]);function wo(e){for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=Po.INITIAL,this.originalInsertionMode=Po.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...No,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!==t&&void 0!==t?t:this.treeAdapter.createDocument(),this.tokenizer=new Vi(this.options,this),this.activeFormattingElements=new ao(this.treeAdapter),this.fragmentContextID=r?_i(this.treeAdapter.getTagName(r)):Ci.UNKNOWN,this._setContextModes(null!==r&&void 0!==r?r:this.document,this.fragmentContextID),this.openElements=new to(this.document,this.treeAdapter,this)}static parse(e,t){const r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){const r={...No,...t};null!==e&&void 0!==e||(e=r.treeAdapter.createElement(ji.TEMPLATE,wi.HTML,[]));const n=r.treeAdapter.createElement("documentmock",wi.HTML,[]),a=new this(r,n,e);return a.fragmentContextID===Ci.TEMPLATE&&a.tmplInsertionModeStack.unshift(Po.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;const a=null!==(n=e.location)&&void 0!==n?n:Io,s={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(e,t,r){var n,a;null===(a=(n=this.treeAdapter).onItemPush)||void 0===a||a.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(n=(r=this.treeAdapter).onItemPop)||void 0===n||n.call(r,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const r=e===this.document||this.treeAdapter.getNamespaceURI(e)===wi.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,wi.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Po.TEXT}switchToPlaintextParsing(){this.insertionMode=Po.TEXT,this.originalInsertionMode=Po.IN_BODY,this.tokenizer.state=Fi.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===ji.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===wi.HTML)switch(this.fragmentContextID){case Ci.TITLE:case Ci.TEXTAREA:this.tokenizer.state=Fi.RCDATA;break;case Ci.STYLE:case Ci.XMP:case Ci.IFRAME:case Ci.NOEMBED:case Ci.NOFRAMES:case Ci.NOSCRIPT:this.tokenizer.state=Fi.RAWTEXT;break;case Ci.SCRIPT:this.tokenizer.state=Fi.SCRIPT_DATA;break;case Ci.PLAINTEXT:this.tokenizer.state=Fi.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const r=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){const r=this.treeAdapter.createElement(e,wi.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,wi.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(ji.HTML,wi.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Ci.HTML)}_appendCommentNode(e,t){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:r}=this._findFosterParentingLocation()),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const n=this.treeAdapter.getChildNodes(t),a=r?n.lastIndexOf(r):n.length,s=n[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:t,endCol:r,endOffset:n}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:t,endCol:r,endOffset:n})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const r=t.location,n=this.treeAdapter.getTagName(e),a=t.type===ii.END_TAG&&n===t.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):({current:t,currentTagId:r}=this.openElements),(e.tagID!==Ci.SVG||this.treeAdapter.getTagName(t)!==ji.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==wi.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===Ci.MGLYPH||e.tagID===Ci.MALIGNMARK)&&!this._isIntegrationPoint(r,t,wi.HTML))}_processToken(e){switch(e.type){case ii.CHARACTER:this.onCharacter(e);break;case ii.NULL_CHARACTER:this.onNullCharacter(e);break;case ii.COMMENT:this.onComment(e);break;case ii.DOCTYPE:this.onDoctype(e);break;case ii.START_TAG:this._processStartTag(e);break;case ii.END_TAG:this.onEndTag(e);break;case ii.EOF:this.onEof(e);break;case ii.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,r){return jo(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===ro.Marker||this.openElements.contains(e.element)));for(let r=t<0?e-1:t-1;r>=0;r--){const e=this.activeFormattingElements.entries[r];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Po.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Ci.P),this.openElements.popUntilTagNamePopped(Ci.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Ci.TR:return void(this.insertionMode=Po.IN_ROW);case Ci.TBODY:case Ci.THEAD:case Ci.TFOOT:return void(this.insertionMode=Po.IN_TABLE_BODY);case Ci.CAPTION:return void(this.insertionMode=Po.IN_CAPTION);case Ci.COLGROUP:return void(this.insertionMode=Po.IN_COLUMN_GROUP);case Ci.TABLE:return void(this.insertionMode=Po.IN_TABLE);case Ci.BODY:return void(this.insertionMode=Po.IN_BODY);case Ci.FRAMESET:return void(this.insertionMode=Po.IN_FRAMESET);case Ci.SELECT:return void this._resetInsertionModeForSelect(e);case Ci.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case Ci.HTML:return void(this.insertionMode=this.headElement?Po.AFTER_HEAD:Po.BEFORE_HEAD);case Ci.TD:case Ci.TH:if(e>0)return void(this.insertionMode=Po.IN_CELL);break;case Ci.HEAD:if(e>0)return void(this.insertionMode=Po.IN_HEAD)}this.insertionMode=Po.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===Ci.TEMPLATE)break;if(e===Ci.TABLE)return void(this.insertionMode=Po.IN_SELECT_IN_TABLE)}this.insertionMode=Po.IN_SELECT}_isElementCausesFosterParenting(e){return Do.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Ci.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===wi.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Ci.TABLE:{const r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const r=this.treeAdapter.getNamespaceURI(e);return Ii[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case Po.INITIAL:zo(this,e);break;case Po.BEFORE_HTML:Vo(this,e);break;case Po.BEFORE_HEAD:Ko(this,e);break;case Po.IN_HEAD:Jo(this,e);break;case Po.IN_HEAD_NO_SCRIPT:Qo(this,e);break;case Po.AFTER_HEAD:$o(this,e);break;case Po.IN_BODY:case Po.IN_CAPTION:case Po.IN_CELL:case Po.IN_TEMPLATE:td(this,e);break;case Po.TEXT:case Po.IN_SELECT:case Po.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Po.IN_TABLE:case Po.IN_TABLE_BODY:case Po.IN_ROW:ld(this,e);break;case Po.IN_TABLE_TEXT:hd(this,e);break;case Po.IN_COLUMN_GROUP:vd(this,e);break;case Po.AFTER_BODY:Cd(this,e);break;case Po.AFTER_AFTER_BODY:kd(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Ks,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case Po.INITIAL:zo(this,e);break;case Po.BEFORE_HTML:Vo(this,e);break;case Po.BEFORE_HEAD:Ko(this,e);break;case Po.IN_HEAD:Jo(this,e);break;case Po.IN_HEAD_NO_SCRIPT:Qo(this,e);break;case Po.AFTER_HEAD:$o(this,e);break;case Po.TEXT:this._insertCharacters(e);break;case Po.IN_TABLE:case Po.IN_TABLE_BODY:case Po.IN_ROW:ld(this,e);break;case Po.IN_COLUMN_GROUP:vd(this,e);break;case Po.AFTER_BODY:Cd(this,e);break;case Po.AFTER_AFTER_BODY:kd(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)qo(this,e);else switch(this.insertionMode){case Po.INITIAL:case Po.BEFORE_HTML:case Po.BEFORE_HEAD:case Po.IN_HEAD:case Po.IN_HEAD_NO_SCRIPT:case Po.AFTER_HEAD:case Po.IN_BODY:case Po.IN_TABLE:case Po.IN_CAPTION:case Po.IN_COLUMN_GROUP:case Po.IN_TABLE_BODY:case Po.IN_ROW:case Po.IN_CELL:case Po.IN_SELECT:case Po.IN_SELECT_IN_TABLE:case Po.IN_TEMPLATE:case Po.IN_FRAMESET:case Po.AFTER_FRAMESET:qo(this,e);break;case Po.IN_TABLE_TEXT:md(this,e);break;case Po.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case Po.AFTER_AFTER_BODY:case Po.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Po.INITIAL:!function(e,t){e._setDocumentType(t);const r=t.forceQuirks?Ai.QUIRKS:function(e){if(e.name!==oo)return Ai.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===lo)return Ai.QUIRKS;let{publicId:r}=e;if(null!==r){if(r=r.toLowerCase(),fo.has(r))return Ai.QUIRKS;let e=null===t?po:uo;if(mo(r,e))return Ai.QUIRKS;if(e=null===t?go:ho,mo(r,e))return Ai.LIMITED_QUIRKS}return Ai.NO_QUIRKS}(t);(function(e){return e.name===oo&&null===e.publicId&&(null===e.systemId||e.systemId===co)})(t)||e._err(t,ai.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=Po.BEFORE_HTML}(this,e);break;case Po.BEFORE_HEAD:case Po.IN_HEAD:case Po.IN_HEAD_NO_SCRIPT:case Po.AFTER_HEAD:this._err(e,ai.misplacedDoctype);break;case Po.IN_TABLE_TEXT:md(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,ai.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===Ci.FONT&&e.attrs.some((e=>{let{name:t}=e;return t===Si.COLOR||t===Si.SIZE||t===Si.FACE}))||To.has(t)}(t))_d(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===wi.MATHML?wo(t):n===wi.SVG&&(!function(e){const t=Eo.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=_i(e.tagName))}(t),So(t)),Ao(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Po.INITIAL:zo(this,e);break;case Po.BEFORE_HTML:!function(e,t){t.tagID===Ci.HTML?(e._insertElement(t,wi.HTML),e.insertionMode=Po.BEFORE_HEAD):Vo(e,t)}(this,e);break;case Po.BEFORE_HEAD:!function(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.HEAD:e._insertElement(t,wi.HTML),e.headElement=e.openElements.current,e.insertionMode=Po.IN_HEAD;break;default:Ko(e,t)}}(this,e);break;case Po.IN_HEAD:Yo(this,e);break;case Po.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.BASEFONT:case Ci.BGSOUND:case Ci.HEAD:case Ci.LINK:case Ci.META:case Ci.NOFRAMES:case Ci.STYLE:Yo(e,t);break;case Ci.NOSCRIPT:e._err(t,ai.nestedNoscriptInHead);break;default:Qo(e,t)}}(this,e);break;case Po.AFTER_HEAD:!function(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.BODY:e._insertElement(t,wi.HTML),e.framesetOk=!1,e.insertionMode=Po.IN_BODY;break;case Ci.FRAMESET:e._insertElement(t,wi.HTML),e.insertionMode=Po.IN_FRAMESET;break;case Ci.BASE:case Ci.BASEFONT:case Ci.BGSOUND:case Ci.LINK:case Ci.META:case Ci.NOFRAMES:case Ci.SCRIPT:case Ci.STYLE:case Ci.TEMPLATE:case Ci.TITLE:e._err(t,ai.abandonedHeadElementChild),e.openElements.push(e.headElement,Ci.HEAD),Yo(e,t),e.openElements.remove(e.headElement);break;case Ci.HEAD:e._err(t,ai.misplacedStartTagForHeadElement);break;default:$o(e,t)}}(this,e);break;case Po.IN_BODY:id(this,e);break;case Po.IN_TABLE:ud(this,e);break;case Po.IN_TABLE_TEXT:md(this,e);break;case Po.IN_CAPTION:!function(e,t){const r=t.tagID;yd.has(r)?e.openElements.hasInTableScope(Ci.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Ci.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Po.IN_TABLE,ud(e,t)):id(e,t)}(this,e);break;case Po.IN_COLUMN_GROUP:bd(this,e);break;case Po.IN_TABLE_BODY:Rd(this,e);break;case Po.IN_ROW:Ed(this,e);break;case Po.IN_CELL:!function(e,t){const r=t.tagID;yd.has(r)?(e.openElements.hasInTableScope(Ci.TD)||e.openElements.hasInTableScope(Ci.TH))&&(e._closeTableCell(),Ed(e,t)):id(e,t)}(this,e);break;case Po.IN_SELECT:wd(this,e);break;case Po.IN_SELECT_IN_TABLE:!function(e,t){const r=t.tagID;r===Ci.CAPTION||r===Ci.TABLE||r===Ci.TBODY||r===Ci.TFOOT||r===Ci.THEAD||r===Ci.TR||r===Ci.TD||r===Ci.TH?(e.openElements.popUntilTagNamePopped(Ci.SELECT),e._resetInsertionMode(),e._processStartTag(t)):wd(e,t)}(this,e);break;case Po.IN_TEMPLATE:!function(e,t){switch(t.tagID){case Ci.BASE:case Ci.BASEFONT:case Ci.BGSOUND:case Ci.LINK:case Ci.META:case Ci.NOFRAMES:case Ci.SCRIPT:case Ci.STYLE:case Ci.TEMPLATE:case Ci.TITLE:Yo(e,t);break;case Ci.CAPTION:case Ci.COLGROUP:case Ci.TBODY:case Ci.TFOOT:case Ci.THEAD:e.tmplInsertionModeStack[0]=Po.IN_TABLE,e.insertionMode=Po.IN_TABLE,ud(e,t);break;case Ci.COL:e.tmplInsertionModeStack[0]=Po.IN_COLUMN_GROUP,e.insertionMode=Po.IN_COLUMN_GROUP,bd(e,t);break;case Ci.TR:e.tmplInsertionModeStack[0]=Po.IN_TABLE_BODY,e.insertionMode=Po.IN_TABLE_BODY,Rd(e,t);break;case Ci.TD:case Ci.TH:e.tmplInsertionModeStack[0]=Po.IN_ROW,e.insertionMode=Po.IN_ROW,Ed(e,t);break;default:e.tmplInsertionModeStack[0]=Po.IN_BODY,e.insertionMode=Po.IN_BODY,id(e,t)}}(this,e);break;case Po.AFTER_BODY:!function(e,t){t.tagID===Ci.HTML?id(e,t):Cd(e,t)}(this,e);break;case Po.IN_FRAMESET:!function(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.FRAMESET:e._insertElement(t,wi.HTML);break;case Ci.FRAME:e._appendElement(t,wi.HTML),t.ackSelfClosing=!0;break;case Ci.NOFRAMES:Yo(e,t)}}(this,e);break;case Po.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.NOFRAMES:Yo(e,t)}}(this,e);break;case Po.AFTER_AFTER_BODY:!function(e,t){t.tagID===Ci.HTML?id(e,t):kd(e,t)}(this,e);break;case Po.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.NOFRAMES:Yo(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===Ci.P||t.tagID===Ci.BR)return _d(e),void e._endTagOutsideForeignContent(t);for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===wi.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(n);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(r);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Po.INITIAL:zo(this,e);break;case Po.BEFORE_HTML:!function(e,t){const r=t.tagID;r!==Ci.HTML&&r!==Ci.HEAD&&r!==Ci.BODY&&r!==Ci.BR||Vo(e,t)}(this,e);break;case Po.BEFORE_HEAD:!function(e,t){const r=t.tagID;r===Ci.HEAD||r===Ci.BODY||r===Ci.HTML||r===Ci.BR?Ko(e,t):e._err(t,ai.endTagWithoutMatchingOpenElement)}(this,e);break;case Po.IN_HEAD:!function(e,t){switch(t.tagID){case Ci.HEAD:e.openElements.pop(),e.insertionMode=Po.AFTER_HEAD;break;case Ci.BODY:case Ci.BR:case Ci.HTML:Jo(e,t);break;case Ci.TEMPLATE:Xo(e,t);break;default:e._err(t,ai.endTagWithoutMatchingOpenElement)}}(this,e);break;case Po.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Ci.NOSCRIPT:e.openElements.pop(),e.insertionMode=Po.IN_HEAD;break;case Ci.BR:Qo(e,t);break;default:e._err(t,ai.endTagWithoutMatchingOpenElement)}}(this,e);break;case Po.AFTER_HEAD:!function(e,t){switch(t.tagID){case Ci.BODY:case Ci.HTML:case Ci.BR:$o(e,t);break;case Ci.TEMPLATE:Xo(e,t);break;default:e._err(t,ai.endTagWithoutMatchingOpenElement)}}(this,e);break;case Po.IN_BODY:dd(this,e);break;case Po.TEXT:!function(e,t){var r;t.tagID===Ci.SCRIPT&&(null===(r=e.scriptHandler)||void 0===r||r.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case Po.IN_TABLE:pd(this,e);break;case Po.IN_TABLE_TEXT:md(this,e);break;case Po.IN_CAPTION:!function(e,t){const r=t.tagID;switch(r){case Ci.CAPTION:case Ci.TABLE:e.openElements.hasInTableScope(Ci.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Ci.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Po.IN_TABLE,r===Ci.TABLE&&pd(e,t));break;case Ci.BODY:case Ci.COL:case Ci.COLGROUP:case Ci.HTML:case Ci.TBODY:case Ci.TD:case Ci.TFOOT:case Ci.TH:case Ci.THEAD:case Ci.TR:break;default:dd(e,t)}}(this,e);break;case Po.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case Ci.COLGROUP:e.openElements.currentTagId===Ci.COLGROUP&&(e.openElements.pop(),e.insertionMode=Po.IN_TABLE);break;case Ci.TEMPLATE:Xo(e,t);break;case Ci.COL:break;default:vd(e,t)}}(this,e);break;case Po.IN_TABLE_BODY:xd(this,e);break;case Po.IN_ROW:Td(this,e);break;case Po.IN_CELL:!function(e,t){const r=t.tagID;switch(r){case Ci.TD:case Ci.TH:e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Po.IN_ROW);break;case Ci.TABLE:case Ci.TBODY:case Ci.TFOOT:case Ci.THEAD:case Ci.TR:e.openElements.hasInTableScope(r)&&(e._closeTableCell(),Td(e,t));break;case Ci.BODY:case Ci.CAPTION:case Ci.COL:case Ci.COLGROUP:case Ci.HTML:break;default:dd(e,t)}}(this,e);break;case Po.IN_SELECT:Sd(this,e);break;case Po.IN_SELECT_IN_TABLE:!function(e,t){const r=t.tagID;r===Ci.CAPTION||r===Ci.TABLE||r===Ci.TBODY||r===Ci.TFOOT||r===Ci.THEAD||r===Ci.TR||r===Ci.TD||r===Ci.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(Ci.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Sd(e,t)}(this,e);break;case Po.IN_TEMPLATE:!function(e,t){t.tagID===Ci.TEMPLATE&&Xo(e,t)}(this,e);break;case Po.AFTER_BODY:jd(this,e);break;case Po.IN_FRAMESET:!function(e,t){t.tagID!==Ci.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===Ci.FRAMESET||(e.insertionMode=Po.AFTER_FRAMESET))}(this,e);break;case Po.AFTER_FRAMESET:!function(e,t){t.tagID===Ci.HTML&&(e.insertionMode=Po.AFTER_AFTER_FRAMESET)}(this,e);break;case Po.AFTER_AFTER_BODY:kd(this,e)}}onEof(e){switch(this.insertionMode){case Po.INITIAL:zo(this,e);break;case Po.BEFORE_HTML:Vo(this,e);break;case Po.BEFORE_HEAD:Ko(this,e);break;case Po.IN_HEAD:Jo(this,e);break;case Po.IN_HEAD_NO_SCRIPT:Qo(this,e);break;case Po.AFTER_HEAD:$o(this,e);break;case Po.IN_BODY:case Po.IN_TABLE:case Po.IN_CAPTION:case Po.IN_COLUMN_GROUP:case Po.IN_TABLE_BODY:case Po.IN_ROW:case Po.IN_CELL:case Po.IN_SELECT:case Po.IN_SELECT_IN_TABLE:cd(this,e);break;case Po.TEXT:!function(e,t){e._err(t,ai.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case Po.IN_TABLE_TEXT:md(this,e);break;case Po.IN_TEMPLATE:Ad(this,e);break;case Po.AFTER_BODY:case Po.IN_FRAMESET:case Po.AFTER_FRAMESET:case Po.AFTER_AFTER_BODY:case Po.AFTER_AFTER_FRAMESET:Wo(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Ys.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Po.IN_HEAD:case Po.IN_HEAD_NO_SCRIPT:case Po.AFTER_HEAD:case Po.TEXT:case Po.IN_COLUMN_GROUP:case Po.IN_SELECT:case Po.IN_SELECT_IN_TABLE:case Po.IN_FRAMESET:case Po.AFTER_FRAMESET:this._insertCharacters(e);break;case Po.IN_BODY:case Po.IN_CAPTION:case Po.IN_CELL:case Po.IN_TEMPLATE:case Po.AFTER_BODY:case Po.AFTER_AFTER_BODY:case Po.AFTER_AFTER_FRAMESET:ed(this,e);break;case Po.IN_TABLE:case Po.IN_TABLE_BODY:case Po.IN_ROW:ld(this,e);break;case Po.IN_TABLE_TEXT:gd(this,e)}}}function Fo(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):od(e,t),r}function Lo(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const a=e.openElements.items[n];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[n])&&(r=a)}return r||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),r}function Bo(e,t,r){let n=t,a=e.openElements.getCommonAncestor(t);for(let s=0,i=a;i!==r;s++,i=a){a=e.openElements.getCommonAncestor(i);const r=e.activeFormattingElements.getElementEntry(i),o=r&&s>=_o;!r||o?(o&&e.activeFormattingElements.removeEntry(r),e.openElements.remove(i)):(i=Mo(e,r),n===t&&(e.activeFormattingElements.bookmark=r),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(i,n),n=i)}return n}function Mo(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Uo(e,t,r){const n=_i(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(n))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);n===Ci.TEMPLATE&&a===wi.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function Ho(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:a}=r,s=e.treeAdapter.createElement(a.tagName,n,a.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,a),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,s,a.tagID)}function Go(e,t){for(let r=0;r=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],n=e.treeAdapter.getNodeSourceCodeLocation(r);n&&!n.endTag&&e._setEndLocation(r,t)}}}}function zo(e,t){e._err(t,ai.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ai.QUIRKS),e.insertionMode=Po.BEFORE_HTML,e._processToken(t)}function Vo(e,t){e._insertFakeRootElement(),e.insertionMode=Po.BEFORE_HEAD,e._processToken(t)}function Ko(e,t){e._insertFakeElement(ji.HEAD,Ci.HEAD),e.headElement=e.openElements.current,e.insertionMode=Po.IN_HEAD,e._processToken(t)}function Yo(e,t){switch(t.tagID){case Ci.HTML:id(e,t);break;case Ci.BASE:case Ci.BASEFONT:case Ci.BGSOUND:case Ci.LINK:case Ci.META:e._appendElement(t,wi.HTML),t.ackSelfClosing=!0;break;case Ci.TITLE:e._switchToTextParsing(t,Fi.RCDATA);break;case Ci.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Fi.RAWTEXT):(e._insertElement(t,wi.HTML),e.insertionMode=Po.IN_HEAD_NO_SCRIPT);break;case Ci.NOFRAMES:case Ci.STYLE:e._switchToTextParsing(t,Fi.RAWTEXT);break;case Ci.SCRIPT:e._switchToTextParsing(t,Fi.SCRIPT_DATA);break;case Ci.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Po.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Po.IN_TEMPLATE);break;case Ci.HEAD:e._err(t,ai.misplacedStartTagForHeadElement);break;default:Jo(e,t)}}function Xo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Ci.TEMPLATE&&e._err(t,ai.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Ci.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ai.endTagWithoutMatchingOpenElement)}function Jo(e,t){e.openElements.pop(),e.insertionMode=Po.AFTER_HEAD,e._processToken(t)}function Qo(e,t){const r=t.type===ii.EOF?ai.openElementsLeftAfterEof:ai.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=Po.IN_HEAD,e._processToken(t)}function $o(e,t){e._insertFakeElement(ji.BODY,Ci.BODY),e.insertionMode=Po.IN_BODY,Zo(e,t)}function Zo(e,t){switch(t.type){case ii.CHARACTER:td(e,t);break;case ii.WHITESPACE_CHARACTER:ed(e,t);break;case ii.COMMENT:qo(e,t);break;case ii.START_TAG:id(e,t);break;case ii.END_TAG:dd(e,t);break;case ii.EOF:cd(e,t)}}function ed(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function td(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,wi.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nd(e){const t=oi(e,Si.TYPE);return null!=t&&t.toLowerCase()===Co}function ad(e,t){e._switchToTextParsing(t,Fi.RAWTEXT)}function sd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML)}function id(e,t){switch(t.tagID){case Ci.I:case Ci.S:case Ci.B:case Ci.U:case Ci.EM:case Ci.TT:case Ci.BIG:case Ci.CODE:case Ci.FONT:case Ci.SMALL:case Ci.STRIKE:case Ci.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Ci.A:!function(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(ji.A);r&&(Go(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Ci.H1:case Ci.H2:case Ci.H3:case Ci.H4:case Ci.H5:case Ci.H6:!function(e,t){e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),Di(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,wi.HTML)}(e,t);break;case Ci.P:case Ci.DL:case Ci.OL:case Ci.UL:case Ci.DIV:case Ci.DIR:case Ci.NAV:case Ci.MAIN:case Ci.MENU:case Ci.ASIDE:case Ci.CENTER:case Ci.FIGURE:case Ci.FOOTER:case Ci.HEADER:case Ci.HGROUP:case Ci.DIALOG:case Ci.DETAILS:case Ci.ADDRESS:case Ci.ARTICLE:case Ci.SECTION:case Ci.SUMMARY:case Ci.FIELDSET:case Ci.BLOCKQUOTE:case Ci.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._insertElement(t,wi.HTML)}(e,t);break;case Ci.LI:case Ci.DD:case Ci.DT:!function(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const t=e.openElements.tagIDs[n];if(r===Ci.LI&&t===Ci.LI||(r===Ci.DD||r===Ci.DT)&&(t===Ci.DD||t===Ci.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==Ci.ADDRESS&&t!==Ci.DIV&&t!==Ci.P&&e._isSpecialElement(e.openElements.items[n],t))break}e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._insertElement(t,wi.HTML)}(e,t);break;case Ci.BR:case Ci.IMG:case Ci.WBR:case Ci.AREA:case Ci.EMBED:case Ci.KEYGEN:rd(e,t);break;case Ci.HR:!function(e,t){e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._appendElement(t,wi.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case Ci.RB:case Ci.RTC:!function(e,t){e.openElements.hasInScope(Ci.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,wi.HTML)}(e,t);break;case Ci.RT:case Ci.RP:!function(e,t){e.openElements.hasInScope(Ci.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Ci.RTC),e._insertElement(t,wi.HTML)}(e,t);break;case Ci.PRE:case Ci.LISTING:!function(e,t){e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._insertElement(t,wi.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case Ci.XMP:!function(e,t){e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Fi.RAWTEXT)}(e,t);break;case Ci.SVG:!function(e,t){e._reconstructActiveFormattingElements(),So(t),Ao(t),t.selfClosing?e._appendElement(t,wi.SVG):e._insertElement(t,wi.SVG),t.ackSelfClosing=!0}(e,t);break;case Ci.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case Ci.BASE:case Ci.LINK:case Ci.META:case Ci.STYLE:case Ci.TITLE:case Ci.SCRIPT:case Ci.BGSOUND:case Ci.BASEFONT:case Ci.TEMPLATE:Yo(e,t);break;case Ci.BODY:!function(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}(e,t);break;case Ci.FORM:!function(e,t){const r=e.openElements.tmplCount>0;e.formElement&&!r||(e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._insertElement(t,wi.HTML),r||(e.formElement=e.openElements.current))}(e,t);break;case Ci.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Ci.NOBR)&&(Go(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,wi.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Ci.MATH:!function(e,t){e._reconstructActiveFormattingElements(),wo(t),Ao(t),t.selfClosing?e._appendElement(t,wi.MATHML):e._insertElement(t,wi.MATHML),t.ackSelfClosing=!0}(e,t);break;case Ci.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ai.QUIRKS&&e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._insertElement(t,wi.HTML),e.framesetOk=!1,e.insertionMode=Po.IN_TABLE}(e,t);break;case Ci.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,wi.HTML),nd(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case Ci.PARAM:case Ci.TRACK:case Ci.SOURCE:!function(e,t){e._appendElement(t,wi.HTML),t.ackSelfClosing=!0}(e,t);break;case Ci.IMAGE:!function(e,t){t.tagName=ji.IMG,t.tagID=Ci.IMG,rd(e,t)}(e,t);break;case Ci.BUTTON:!function(e,t){e.openElements.hasInScope(Ci.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Ci.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML),e.framesetOk=!1}(e,t);break;case Ci.APPLET:case Ci.OBJECT:case Ci.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case Ci.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Fi.RAWTEXT)}(e,t);break;case Ci.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Po.IN_TABLE||e.insertionMode===Po.IN_CAPTION||e.insertionMode===Po.IN_TABLE_BODY||e.insertionMode===Po.IN_ROW||e.insertionMode===Po.IN_CELL?Po.IN_SELECT_IN_TABLE:Po.IN_SELECT}(e,t);break;case Ci.OPTION:case Ci.OPTGROUP:!function(e,t){e.openElements.currentTagId===Ci.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,wi.HTML)}(e,t);break;case Ci.NOEMBED:ad(e,t);break;case Ci.FRAMESET:!function(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,wi.HTML),e.insertionMode=Po.IN_FRAMESET)}(e,t);break;case Ci.TEXTAREA:!function(e,t){e._insertElement(t,wi.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Fi.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Po.TEXT}(e,t);break;case Ci.NOSCRIPT:e.options.scriptingEnabled?ad(e,t):sd(e,t);break;case Ci.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(Ci.P)&&e._closePElement(),e._insertElement(t,wi.HTML),e.tokenizer.state=Fi.PLAINTEXT}(e,t);break;case Ci.COL:case Ci.TH:case Ci.TD:case Ci.TR:case Ci.HEAD:case Ci.FRAME:case Ci.TBODY:case Ci.TFOOT:case Ci.THEAD:case Ci.CAPTION:case Ci.COLGROUP:break;default:sd(e,t)}}function od(e,t){const r=t.tagName,n=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],s=e.openElements.tagIDs[a];if(n===s&&(n!==Ci.UNKNOWN||e.treeAdapter.getTagName(t)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,s))break}}function dd(e,t){switch(t.tagID){case Ci.A:case Ci.B:case Ci.I:case Ci.S:case Ci.U:case Ci.EM:case Ci.TT:case Ci.BIG:case Ci.CODE:case Ci.FONT:case Ci.NOBR:case Ci.SMALL:case Ci.STRIKE:case Ci.STRONG:Go(e,t);break;case Ci.P:!function(e){e.openElements.hasInButtonScope(Ci.P)||e._insertFakeElement(ji.P,Ci.P),e._closePElement()}(e);break;case Ci.DL:case Ci.UL:case Ci.OL:case Ci.DIR:case Ci.DIV:case Ci.NAV:case Ci.PRE:case Ci.MAIN:case Ci.MENU:case Ci.ASIDE:case Ci.BUTTON:case Ci.CENTER:case Ci.FIGURE:case Ci.FOOTER:case Ci.HEADER:case Ci.HGROUP:case Ci.DIALOG:case Ci.ADDRESS:case Ci.ARTICLE:case Ci.DETAILS:case Ci.SECTION:case Ci.SUMMARY:case Ci.LISTING:case Ci.FIELDSET:case Ci.BLOCKQUOTE:case Ci.FIGCAPTION:!function(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}(e,t);break;case Ci.LI:!function(e){e.openElements.hasInListItemScope(Ci.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Ci.LI),e.openElements.popUntilTagNamePopped(Ci.LI))}(e);break;case Ci.DD:case Ci.DT:!function(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}(e,t);break;case Ci.H1:case Ci.H2:case Ci.H3:case Ci.H4:case Ci.H5:case Ci.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case Ci.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ji.BR,Ci.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case Ci.BODY:!function(e,t){if(e.openElements.hasInScope(Ci.BODY)&&(e.insertionMode=Po.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}(e,t);break;case Ci.HTML:!function(e,t){e.openElements.hasInScope(Ci.BODY)&&(e.insertionMode=Po.AFTER_BODY,jd(e,t))}(e,t);break;case Ci.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(Ci.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Ci.FORM):r&&e.openElements.remove(r))}(e);break;case Ci.APPLET:case Ci.OBJECT:case Ci.MARQUEE:!function(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case Ci.TEMPLATE:Xo(e,t);break;default:od(e,t)}}function cd(e,t){e.tmplInsertionModeStack.length>0?Ad(e,t):Wo(e,t)}function ld(e,t){if(Do.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Po.IN_TABLE_TEXT,t.type){case ii.CHARACTER:hd(e,t);break;case ii.WHITESPACE_CHARACTER:gd(e,t)}else fd(e,t)}function ud(e,t){switch(t.tagID){case Ci.TD:case Ci.TH:case Ci.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ji.TBODY,Ci.TBODY),e.insertionMode=Po.IN_TABLE_BODY,Rd(e,t)}(e,t);break;case Ci.STYLE:case Ci.SCRIPT:case Ci.TEMPLATE:Yo(e,t);break;case Ci.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ji.COLGROUP,Ci.COLGROUP),e.insertionMode=Po.IN_COLUMN_GROUP,bd(e,t)}(e,t);break;case Ci.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,wi.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case Ci.TABLE:!function(e,t){e.openElements.hasInTableScope(Ci.TABLE)&&(e.openElements.popUntilTagNamePopped(Ci.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case Ci.TBODY:case Ci.TFOOT:case Ci.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,wi.HTML),e.insertionMode=Po.IN_TABLE_BODY}(e,t);break;case Ci.INPUT:!function(e,t){nd(t)?e._appendElement(t,wi.HTML):fd(e,t),t.ackSelfClosing=!0}(e,t);break;case Ci.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,wi.HTML),e.insertionMode=Po.IN_CAPTION}(e,t);break;case Ci.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,wi.HTML),e.insertionMode=Po.IN_COLUMN_GROUP}(e,t);break;default:fd(e,t)}}function pd(e,t){switch(t.tagID){case Ci.TABLE:e.openElements.hasInTableScope(Ci.TABLE)&&(e.openElements.popUntilTagNamePopped(Ci.TABLE),e._resetInsertionMode());break;case Ci.TEMPLATE:Xo(e,t);break;case Ci.BODY:case Ci.CAPTION:case Ci.COL:case Ci.COLGROUP:case Ci.HTML:case Ci.TBODY:case Ci.TD:case Ci.TFOOT:case Ci.TH:case Ci.THEAD:case Ci.TR:break;default:fd(e,t)}}function fd(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Zo(e,t),e.fosterParentingEnabled=r}function gd(e,t){e.pendingCharacterTokens.push(t)}function hd(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function md(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0&&e.openElements.currentTagId===Ci.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Ci.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Ci.OPTGROUP&&e.openElements.pop();break;case Ci.OPTION:e.openElements.currentTagId===Ci.OPTION&&e.openElements.pop();break;case Ci.SELECT:e.openElements.hasInSelectScope(Ci.SELECT)&&(e.openElements.popUntilTagNamePopped(Ci.SELECT),e._resetInsertionMode());break;case Ci.TEMPLATE:Xo(e,t)}}function Ad(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Ci.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Wo(e,t)}function jd(e,t){var r;if(t.tagID===Ci.HTML){if(e.fragmentContext||(e.insertionMode=Po.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Ci.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(null===(r=e.treeAdapter.getNodeSourceCodeLocation(n))||void 0===r?void 0:r.endTag)&&e._setEndLocation(n,t)}}else Cd(e,t)}function Cd(e,t){e.insertionMode=Po.IN_BODY,Zo(e,t)}function kd(e,t){e.insertionMode=Po.IN_BODY,Zo(e,t)}function _d(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==wi.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}const Pd=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);String.prototype.codePointAt;function Id(e,t){return function(r){let n,a=0,s="";for(;n=e.exec(r);)a!==n.index&&(s+=r.substring(a,n.index)),s+=t.get(n[0].charCodeAt(0)),a=n.index+1;return s+r.substring(a)}}Id(/[&<>'"]/g,Pd),Id(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Id(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),new Set([ji.AREA,ji.BASE,ji.BASEFONT,ji.BGSOUND,ji.BR,ji.COL,ji.EMBED,ji.FRAME,ji.HR,ji.IMG,ji.INPUT,ji.KEYGEN,ji.LINK,ji.META,ji.PARAM,ji.SOURCE,ji.TRACK,ji.WBR]);const Dd=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Nd={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Od(e,t){const r=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName))}(e),n=Bs("type",{handlers:{root:Ld,element:Bd,text:Md,comment:Gd,doctype:Ud,raw:qd},unknown:Wd}),a={parser:r?new Oo(Nd):Oo.getFragmentParser(void 0,Nd),handle(e){n(e,a)},stitches:!1,options:t||{}};n(e,a),zd(a,K());const s=function(e,t){const r=t||{};return Is({file:r.file||void 0,location:!1,schema:"svg"===r.space?U.YP:U.dy,verbose:r.verbose||!1},e)}(r?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&Nr(s,"comment",(function(e,t,r){const n=e;if(n.value.stitch&&r&&void 0!==t){return r.children[t]=n.value.stitch,t}})),"root"===s.type&&1===s.children.length&&s.children[0].type===e.type?s.children[0]:s}function Fd(e,t){let r=-1;if(e)for(;++r{var t=Xd(e.target);t&&(t.classList.add("active"),y()(t.dataset.code,(function(){setTimeout((()=>{t.classList.remove("active")}),2e3)})))};(0,i.useEffect)((()=>{var r,n;return null==(r=e.current)||r.removeEventListener("click",t,!1),null==(n=e.current)||n.addEventListener("click",t,!1),()=>{var r;null==(r=e.current)||r.removeEventListener("click",t,!1)}}),[e])}var Qd=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],$d=e=>e;const Zd=i.forwardRef(((e,t)=>{var{prefixCls:r="wmde-markdown wmde-markdown-color",className:n,source:d,style:c,disableCopy:l=!1,skipHtml:u=!0,onScroll:p,onMouseOver:f,pluginsFilter:g,wrapperElement:h={},warpperElement:m={},urlTransform:y}=e,b=(0,s.Z)(e,Qd),v=i.useRef(null);(0,i.useImperativeHandle)(t,(()=>(0,a.Z)({},e,{mdp:v})),[v,e]);var R=(r||"")+" "+(n||"");Jd(v);var x=[...b.rehypePlugins||[]],E={allowElement:(e,t,r)=>b.allowElement?b.allowElement(e,t,r):/^[A-Za-z0-9]+$/.test(e.tagName)};u&&x.push(Yd);var T=[...b.remarkPlugins||[],ys],w=(0,a.Z)({},m,h);return(0,o.jsx)("div",(0,a.Z)({ref:v,onScroll:p,onMouseOver:f},w,{className:R,style:c,children:(0,o.jsx)(jn,(0,a.Z)({},E,b,{skipHtml:u,urlTransform:y||$d,rehypePlugins:g?g("rehype",x):x,remarkPlugins:g?g("remark",T):T,children:d||""}))}))})),ec=function(e){if(void 0===e||null===e)return rc;if("string"===typeof e)return function(e){return tc(t);function t(t){return t&&t.type===e}}(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r1?r-1:0),a=1;a":"")+")"})}return l;function l(){let c,l,u,p=[];if((!t||a(i,o,d[d.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[true,e];return[e]}(r(i,d)),false===p[0]))return p;if(i.children&&"skip"!==p[0])for(l=(n?i.children.length:-1)+s,u=d.concat(i);l>-1&&l1?r-1:0),a=1;a]+)>/g,(function(e,t){var r=s[t];return"$"+(Array.isArray(r)?r.join("$"):r)})))}if("function"==typeof a){var i=this;return e[Symbol.replace].call(this,r,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,i)),a.apply(this,e)}))}return e[Symbol.replace].call(this,r,a)},gc.apply(this,arguments)}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hc(e,t)}function mc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var bc=function(e){return function(t){return void 0===t&&(t={}),function(e,t){if(t&&!e.registered(t))throw new Error('The default language "'+t+'" is not registered with refractor.')}(e,t.defaultLanguage),function(e){!function(e,t,r,n){"function"===typeof t&&"function"!==typeof r&&(n=r,r=t,t=null),nc(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)}(e,"element",r)};function r(r,n,a){var s,i;if(a&&"pre"===a.tagName&&"code"===r.tagName){var o=(null==r||null==(s=r.data)?void 0:s.meta)||(null==r||null==(i=r.properties)?void 0:i.metastring)||"";r.properties.className?"boolean"==typeof r.properties.className?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[];var d,c,l=function(e){for(var t,r=yc(e.properties.className);!(t=r()).done;){var n=t.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(r);if(!l&&t.defaultLanguage&&r.properties.className.push("language-"+(l=t.defaultLanguage)),r.properties.className.push("code-highlight"),l)try{var u,p;p=null!=(u=l)&&u.includes("diff-")?l.split("-")[1]:l,d=e.highlight(ac(r),p),a.properties.className=(a.properties.className||[]).concat("language-"+p)}catch(R){if(!t.ignoreMissing||!/Unknown language/.test(R.message))throw R;d=r}else d=r;d.children=(c=1,function e(t){return t.reduce((function(t,r){if("text"===r.type){var n=r.value,a=(n.match(/\n/g)||"").length;if(0===a)r.position={start:{line:c,column:1},end:{line:c,column:1}},t.push(r);else for(var s,i=n.split("\n"),o=yc(i.entries());!(s=o()).done;){var d=s.value,l=d[0],u=d[1];t.push({type:"text",value:l===i.length-1?u:u+"\n",position:{start:{line:c+l,column:1},end:{line:c+l,column:1}}})}return c+=a,t}if(Object.prototype.hasOwnProperty.call(r,"children")){var p=c;return r.children=e(r.children),t.push(r),r.position={start:{line:p,column:1},end:{line:c,column:1}},t}return t.push(r),t}),[])})(d.children),d.position=d.children.length>0?{start:{line:d.children[0].position.start.line,column:0},end:{line:d.children[d.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var f,g=function(e){var t=/{([\d,-]+)}/,r=e.split(",").map((function(e){return e.trim()})).join();if(t.test(r)){var n=t.exec(r)[1],a=uc(n);return function(e){return a.includes(e+1)}}return function(){return!1}}(o),h=function(e){var t=gc(/showLineNumbers=(\d+)/i,{lines:1});if(t.test(e)){var r=t.exec(e);return Number(r.groups.lines)}return 1}(o),m=function(e){for(var t=new Array(e),r=0;r0&&0===i.length)return null}const o={};let d;for(d in t)lc.call(t,d)&&(o[d]="children"===d?i:t[d]);return o}(e)}(d,(function(e){return e.position.start.line<=a+1&&e.position.end.line>=a+1}));s.children=i.children,!o.toLowerCase().includes("showLineNumbers".toLowerCase())&&!t.showLineNumbers||y.some((function(e){return o.toLowerCase().includes(e)}))||(s.properties.line=[(a+h).toString()],s.properties.className.push("line-number")),g(a)&&s.properties.className.push("highlight-line"),("diff"===l||null!=(e=l)&&e.includes("diff-"))&&"-"===ac(s).substring(0,1)?s.properties.className.push("deleted"):("diff"===l||null!=(r=l)&&r.includes("diff-"))&&"+"===ac(s).substring(0,1)&&s.properties.className.push("inserted")},v=yc(m.entries());!(f=v()).done;)b();m.length>0&&""===ac(m[m.length-1]).trim()&&m.pop(),r.children=m}}}},vc=(bc(pc.$),bc(fc.$)),Rc={},xc={};function Ec(e,t){for(var r=t,n=0;n","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),Gc=Mc(Hc,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),qc=Mc(Gc,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has"]}}}),Wc={css1:Uc,css2:Hc,css3:Gc,"selectors-3":Gc,"selectors-4":qc,latest:qc,progressive:Mc(qc,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}})};function zc(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e||"\\"===e||e>="\xa0"}function Vc(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e||e>="\xa0"}function Kc(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var Yc={" ":!0,"\t":!0,"\n":!0,"\r":!0,"\f":!0},Xc={'"':!0,"'":!0},Jc={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0};var Qc="css-selector-parser parse error: ";var $c=function(){return $c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0,T=i.pseudoClasses?[!0,i.pseudoClasses.definitions?Cc(i.pseudoClasses.definitions):Sc,"accept"===i.pseudoClasses.unknown]:[!1,Sc,!1],w=T[0],S=T[1],A=T[2],j=i.pseudoElements?[!0,"singleColon"===i.pseudoElements.notation||"both"===i.pseudoElements.notation,!i.pseudoElements.notation||"doubleColon"===i.pseudoElements.notation||"both"===i.pseudoElements.notation,i.pseudoElements.definitions?Cc(Array.isArray(i.pseudoElements.definitions)?{NoArgument:i.pseudoElements.definitions}:i.pseudoElements.definitions):Sc,"accept"===i.pseudoElements.unknown]:[!1,!1,!1,Sc,!1],C=j[0],k=j[1],_=j[2],P=j[3],I=j[4],D="",N=D.length,O=0,F="",L=function(e){return F===e},B=function(){return L("*")||zc(F)},M=function(e){O=e,F=D.charAt(O)},U=function(){O++,F=D.charAt(O)},H=function(){var e=F;return O++,F=D.charAt(O),e};function G(e){var t=Math.min(N-1,O),r=new Error("".concat(Qc).concat(e," Pos: ").concat(t,"."));throw r.position=t,r.name="ParserError",r}function q(e,t){if(!e)return G(t)}var W=function(){q(O=N},V=function(e){q(O=2&&G("Identifiers cannot start with two hyphens with strict mode on."),Jc[F]&&G("Identifiers cannot start with hyphens followed by digits.");O0)return(t.commaSeparated?I.P:q.P)(e)}}(t.properties[n.property],n);if(!e.value)return void 0!==a;e.value.type;let s=e.value.value;if("i"===e.caseSensitivityModifier&&(s=s.toLowerCase(),a&&(a=a.toLowerCase())),void 0!==a)switch(e.operator){case"=":return s===a;case"$=":return s===a.slice(-s.length);case"*=":return a.includes(s);case"^=":return s===a.slice(0,s.length);case"|=":return s===a||s===a.slice(0,s.length)&&"-"===a.charAt(s.length);case"~=":return s===a||q.Q(a).includes(s)}return!1}const pl=[];function fl(e,t){return(t.properties.className||pl).includes(e.name)}function gl(e,t){return t.properties.id===e.name}function hl(e,t){return e.name===t.tagName}function ml(e,t){return function(r,n){let a=bl(r,"tag");const s=bl(null===n||void 0===n?"*":n,"range"),i=[];let o=-1;for(;++oe<=r;if(0===t)return e=>e===r;if(1===t)return r<0?wl.trueFunc:e=>e>=r;const n=Math.abs(t),a=(r%n+n)%n;return t>1?e=>e>=r&&e%n===a:e=>e<=r&&e%n===a}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=s(),a=i();if(t=El&&e.charCodeAt(t)<=Tl;)n=10*n+(e.charCodeAt(t)-El),t++;return t===r?null:n}function o(){for(;t0},is:Pl,lang:function(e,t,r,n,a){return e.argument,e.argument.type,""!==a.language&&void 0!==a.language&&yl(a.language,(0,I.Q)(e.argument.value)).length>0},"last-child":function(e,t,r,n,a){return Cl(a,e),Boolean(a.elementCount&&a.elementIndex===a.elementCount-1)},"last-of-type":function(e,t,r,n,a){return Cl(a,e),"number"===typeof a.typeIndex&&"number"===typeof a.typeCount&&a.typeIndex===a.typeCount-1},not:function(e,t,r,n,a){return!Pl(e,t,r,n,a)},"nth-child":function(e,t,r,n,a){const s=_l(e);return Cl(a,e),"number"===typeof a.elementIndex&&s(a.elementIndex)},"nth-last-child":function(e,t,r,n,a){const s=_l(e);return Cl(a,e),Boolean("number"===typeof a.elementCount&&"number"===typeof a.elementIndex&&s(a.elementCount-a.elementIndex-1))},"nth-last-of-type":function(e,t,r,n,a){const s=_l(e);return Cl(a,e),"number"===typeof a.typeCount&&"number"===typeof a.typeIndex&&s(a.typeCount-1-a.typeIndex)},"nth-of-type":function(e,t,r,n,a){const s=_l(e);return Cl(a,e),"number"===typeof a.typeIndex&&s(a.typeIndex)},"only-child":function(e,t,r,n,a){return Cl(a,e),1===a.elementCount},"only-of-type":function(e,t,r,n,a){return Cl(a,e),1===a.typeCount},optional:function(e,t){return!Dl(e,t)},"read-only":function(e,t,r,n,a){return!Il(e,t,r,n,a)},"read-write":Il,required:Dl,root:function(e,t,r,n,a){return Boolean((!n||"root"===n.type)&&a.schema&&("html"===a.schema.space||"svg"===a.schema.space)&&("html"===t.tagName||"svg"===t.tagName))},scope:function(e,t,r,n,a){return a.scopeElements.includes(t)}},invalid:function(){},unknown:function(e){throw new Error("Unknown pseudo-selector `"+e.name+"`")}});function Cl(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function kl(e,t){return("button"===t.tagName||"input"===t.tagName||"select"===t.tagName||"textarea"===t.tagName||"optgroup"===t.tagName||"option"===t.tagName||"menuitem"===t.tagName||"fieldset"===t.tagName)&&Rl(t,"disabled")}function _l(e){let t=e._cachedFn;if(!t){const r=e.argument;if("Formula"!==r.type)throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=Al(r.a+"n+"+r.b),e._cachedFn=t}return t}function Pl(e,t,r,n,a){e.argument,e.argument.type;const s={...a,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Ll(s,t),s.results[0]===t}function Il(e,t,r,n,a){return"input"===t.tagName||"textarea"===t.tagName?!Rl(t,"readOnly")&&!Rl(t,"disabled"):Boolean(a.editableOrEditingHost)}function Dl(e,t){return("input"===t.tagName||"textarea"===t.tagName||"select"===t.tagName)&&Rl(t,"required")}function Nl(e,t){const r=e.children;let n=-1;for(;++n0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:Fl}function Ul(e,t){if("element"===t.type){const r=t.tagName.toUpperCase(),n=(e.types.get(r)||0)+1;e.count++,e.types.set(r,n)}}function Hl(e,t,r,n,a,s){let i={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const o=function(e,t){const r=e.schema,n=e.language,a=e.direction,s=e.editableOrEditingHost;let i;if("element"===t.type){const n=t.properties.xmlLang||t.properties.lang,a=t.properties.type||"text",s=ll(t);null!==n&&void 0!==n&&(e.language=String(n)),r&&"html"===r.space?("true"===t.properties.contentEditable&&(e.editableOrEditingHost=!0),"svg"===t.tagName&&(e.schema=U.YP),"rtl"===s?i=s:"ltr"===s||"auto"!==s&&"html"===t.tagName||"auto"!==s&&"input"===t.tagName&&"tel"===a?i="ltr":"auto"!==s&&"bdi"!==t.tagName||("textarea"===t.tagName?i=cl(il(t)):"input"!==t.tagName||"email"!==a&&"search"!==a&&"tel"!==a&&"text"!==a?Nr(t,(function(e){return"text"===e.type?(i=cl(e.value),i?Pr:void 0):e===t||"element"!==e.type||"bdi"!==e.tagName&&"script"!==e.tagName&&"style"!==e.tagName&&"textare"!==e.tagName&&!ll(e)?void 0:Ir})):i=t.properties.value?cl(String(t.properties.value)):"ltr"),i&&(e.direction=i)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return function(){e.schema=r,e.language=n,e.direction=a,e.editableOrEditingHost=s}}(e,r);if("element"===r.type){let o=e.rootQuery.rules;a&&a!==s&&(o=e.rootQuery.rules.filter((e=>void 0===e.combinator||">"===e.combinator&&a===s))),i=function(e,t,r,n,a){const s={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let i=-1;for(;++i"===t.combinator?"directChild":"descendant",t):(e.found=!0,e.results.includes(r)||e.results.push(r))}void 0===o.combinator?Bl(s,"descendant",o):"~"===o.combinator&&Bl(s,"generalSibling",o)}return s}(e,Ml(t,o),r,n,a)}return!("children"in r)||e.shallow||e.one&&e.found||function(e,t,r,n){const a=Ml(t.descendant,t.directChild);let s,i=-1;const o={count:0,types:new Map},d={count:0,types:new Map};for(;++i1&&void 0!==arguments[1]?arguments[1]:"";return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{"text"===t.type?e+=t.value:"element"===t.type&&t.children&&Array.isArray(t.children)&&(e+=ql(t.children))})),e},Wl=e=>{const{selector:t,rewrite:r}=e||{};return e=>{if(r&&"function"===typeof r)if(t&&"string"===typeof t){const n=function(e,t,r){const n=Gl(e,t,r);return Ll(n,t||void 0),n.results}(t,e);n&&n.length>0&&Nr(e,n,((e,t,n)=>{r(e,t,n)}))}else Nr(e,((e,t,n)=>{r(e,t,n)}))}},zl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>1?arguments[1]:void 0;for(;n/,"$2")||""))return;if(r){if(zl(e,n,"pre",r))return;return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}}},Vl=e=>{let{value:t=""}=e;const r=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").match(/([^?=&]+)(=([^&]*))/g)||[]).reduce(((e,t)=>(e[t.slice(0,t.indexOf("="))]=t.slice(t.indexOf("=")+1),e)),{})}(t.replace(/^/,"$1").replace(/^rehype:/,""));return Object.keys(r).forEach((e=>{"true"===r[e]&&(r[e]=!0),"false"===r[e]&&(r[e]=!1),"string"!==typeof r[e]||/^0/.test(r[e])||isNaN(+r[e])||(r[e]=+r[e])})),r},Kl=(e,t,r)=>"string"===r?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:"attr"===r?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},Yl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{properties:t="data",codeBlockParames:r=!0}=e;return e=>{Nr(e,"element",((e,n,a)=>{if(r&&"pre"===e.tagName&&e&&Array.isArray(e.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const r=e.children[0];if(r&&"code"===r.tagName&&"number"===typeof n){const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;for(;t>-1;){if(t--,!e[t])return;if(e[t]&&e[t].value&&""!==e[t].value.replace(/(\n|\s)/g,"")||"text"!==e[t].type){if(!/^rehype:/.test(e[t].value)||"comment"!==e[t].type)return;return e[t]}}}(a.children,n);if(s){const n=Vl(s);Object.keys(n).length>0&&(e.properties={...e.properties,"data-type":"rehyp"},r.properties=Kl(r.properties,n,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(e.tagName)&&a&&Array.isArray(a.children)&&"number"===typeof n){const s=zl(a.children,n,"",r);if(s){const r=Vl(s);Object.keys(r).length>0&&(e.properties=Kl(e.properties,r,t))}}}))}};var Xl=function(e){return void 0===e&&(e={}),e=>{Nr(e,(e=>{"element"===e.type&&"code"===e.tagName&&e.data&&e.data.meta&&(e.properties=(0,a.Z)({},e.properties,{"data-meta":String(e.data.meta)}))}))}},Jl=function(e){return void 0===e&&(e={}),e=>{Nr(e,(e=>{"element"===e.type&&"code"===e.tagName&&e.properties&&e.properties.dataMeta&&(e.data||(e.data={}),e.data.meta=e.properties.dataMeta,delete e.properties.dataMeta)}))}};const Ql=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,$l=Object.hasOwnProperty;function Zl(e){const t="element"===e.type?e.tagName.toLowerCase():"",r=2===t.length&&104===t.charCodeAt(0)?t.charCodeAt(1):0;return r>48&&r<55?r-48:void 0}const eu={},tu=new class{constructor(){this.occurrences,this.reset()}slug(e,t){const r=this;let n=function(e,t){if("string"!==typeof e)return"";t||(e=e.toLowerCase());return e.replace(Ql,"").replace(/ /g,"-")}(e,!0===t);const a=n;for(;$l.call(r.occurrences,n);)r.occurrences[a]++,n=a+"-"+r.occurrences[a];return r.occurrences[n]=0,n}reset(){this.occurrences=Object.create(null)}};const ru=function(e){if(null===e||void 0===e)return au;if("string"===typeof e)return function(e){return nu(t);function t(t){return t.tagName===e}}(e);if("object"===typeof e)return function(e){const t=[];let r=-1;for(;++r0&&void 0!==arguments[0]?arguments[0]:{};const{openDelimiter:t="rehype:ignore:start",closeDelimiter:r="rehype:ignore:end"}=e;return e=>{Nr(e,((e,n,a)=>{if("element"===e.type||"root"===e.type){let n=!1;e.children=e.children.filter((e=>{if("raw"===e.type||"comment"===e.type){let a=(e.value||"").trim();if(a=a.replace(/^/,"$1"),a===t)return n=!0,!1;if(a===r)return n=!1,!1}return!n}))}}))}};var gu={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};var hu=[function(e){const t=(e||eu).prefix||"";return function(e){tu.reset(),Nr(e,"element",(function(e){Zl(e)&&!e.properties.id&&(e.properties.id=t+tu.slug(il(e)))}))}},function(e){const t=e||ou;let r=t.properties;const n=t.headingProperties,a=t.behavior||"prepend",s=t.content,i=t.group,o=ru(t.test);let d;return"after"===a||"before"===a?d=function(e,t,n){if("number"!==typeof t||!n)return;const o=lu(s||iu,e),d=cu(e,pu(r,e),o);let c="before"===a?[d,e]:[e,d];if(i){const t=uu(i,e);t&&!Array.isArray(t)&&"element"===t.type&&(t.children=c,c=[t])}return n.children.splice(t,1,...c),[Ir,t+c.length]}:"wrap"===a?d=function(e){let t=e.children,n=[];"function"===typeof s?(t=[],n=s(e)):s&&(n=du(s));return e.children=[cu(e,pu(r,e),Array.isArray(n)?[...t,...n]:[...t,n])],[Ir]}:(d=function(e){const t=lu(s||iu,e);return e.children["prepend"===a?"unshift":"push"](cu(e,pu(r,e),t)),[Ir]},r||(r={ariaHidden:"true",tabIndex:-1})),function(e){Nr(e,"element",(function(e,t,r){if(Zl(e)&&e.properties.id&&o(e,t,r))return Object.assign(e.properties,pu(n,e)),d(e,t,r)}))}},fu];const mu=i.forwardRef(((e,t)=>{var r,n,s,i=[Xl,Yd,Jl,[vc,{ignoreMissing:!0}],...hu,[Wl,{rewrite:(n=null!=(r=e.disableCopy)&&r,s=e.rehypeRewrite,(e,t,r)=>{if("element"===e.type&&r&&"root"===r.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){var i=e.children&&e.children[0];i&&i.properties&&"true"===i.properties.ariaHidden&&(i.properties=(0,a.Z)({class:"anchor"},i.properties),i.children=[gu])}if("element"===e.type&&"pre"===e.tagName&&!n){var o=ql(e.children);e.children.push((void 0===(d=o)&&(d=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":d},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}))}var d;s&&s(e,null===t?void 0:t,null===r?void 0:r)})}],[Yl,{properties:"attr"}],...e.rehypePlugins||[]];return(0,o.jsx)(Zd,(0,a.Z)({},e,{rehypePlugins:i,ref:t}))}));var yu,bu=r(9258),vu=["components","data","node"],Ru=["data-meta","data-md"],xu=["source","components","data","rehypeRewrite"],Eu=C.Preview,Tu=C.Code,wu=C.Toolbar,Su=(0,bu.ZP)(mu)(yu||(yu=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}(["\n margin: 0 auto;\n box-shadow:\n rgb(8 15 41 / 8%) 0.5rem 0.5rem 2rem 0px,\n rgb(8 15 41 / 8%) 0px 0px 1px 0px;\n border: 1px solid var(--color-border-default, #30363d);\n text-align: left;\n max-width: 56rem;\n overflow: auto;\n padding: 2rem;\n border-radius: 0.55rem;\n"]))),Au=e=>{var t,{components:r,data:n,node:i}=e,d=(0,s.Z)(e,vu),{"data-md":c}=d,l=(0,s.Z)(d,Ru);if(!P(c))return(0,o.jsx)("div",(0,a.Z)({},d));var u=null==i||null==(t=i.position)?void 0:t.start.line,p=_(c)||String(u),f=r[""+p];if(p&&"function"===typeof f){var g=n[p].value||"",{title:h,boreder:m=1,checkered:y=1,code:b=1,toolbar:v=1}=k(c||"");return(0,o.jsxs)(C,{bordered:!!Number(m),disableCheckered:!Number(y),style:{marginBottom:16},children:[(0,o.jsx)(Eu,{children:(0,o.jsx)(f,{})}),!!Number(v)&&(0,o.jsx)(wu,{text:g,visibleButton:!!Number(b),children:h||"Code Example"}),!!Number(b)&&(0,o.jsx)(Tu,{tagName:"pre",style:{marginBottom:0},children:(0,o.jsx)("code",(0,a.Z)({},l))})]})}return(0,o.jsx)("code",(0,a.Z)({},l))};function ju(e){var{components:t,data:r,rehypeRewrite:n}=e,i=(0,s.Z)(e,xu);return(0,o.jsx)(Su,(0,a.Z)({disableCopy:!0,rehypePlugins:[fu,...i.rehypePlugins||[]]},i,{rehypeRewrite:(e,t,r)=>{if("element"===e.type&&"pre"===e.tagName&&/(pre|code)/.test(e.tagName)&&e.children[0]){var a,s,i=e.children[0],o=(null==(a=i.data)?void 0:a.meta)||(null==(s=i.properties)?void 0:s.dataMeta);P(o)&&(e.tagName="div",e.properties||(e.properties={}),e.properties["data-md"]=o,e.properties["data-meta"]="preview")}n&&n(e,t,r)},source:r.source,components:(0,a.Z)({},t,{div:e=>(0,o.jsx)(Au,(0,a.Z)({},e,{components:r.components,data:r.data}))})}))}},4838:(e,t)=>{"use strict";function r(e,t){return(Array.isArray(t)?t:[t]).some((function(t){return"string"===typeof t&&(t=new RegExp(t)),t.test(e||"")}))}},8916:(e,t)=>{"use strict"},7190:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},432:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},i=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,a=t.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!s)return!1;for(n in e);return"undefined"===typeof n||t.call(e,n)},o=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(a)return a(e,r).value}return e[r]};e.exports=function e(){var t,r,n,a,c,l,u=arguments[0],p=1,f=arguments.length,g=!1;for("boolean"===typeof u&&(g=u,u=arguments[1]||{},p=2),(null==u||"object"!==typeof u&&"function"!==typeof u)&&(u={});p{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,d=/^\s+|\s+$/g,c="";function l(e){return e?e.replace(d,c):c}e.exports=function(e,d){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];d=d||{};var u=1,p=1;function f(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function g(){var e={line:u,column:p};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:u,column:p},this.source=d.source}h.prototype.content=e;var m=[];function y(t){var r=new Error(d.source+":"+u+":"+p+": "+t);if(r.reason=t,r.filename=d.source,r.line=u,r.column=p,r.source=e,!d.silent)throw r;m.push(r)}function b(t){var r=t.exec(e);if(r){var n=r[0];return f(n),e=e.slice(n.length),r}}function v(){b(n)}function R(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=g();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;c!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,c===e.charAt(r-1))return y("End of comment missing");var n=e.slice(2,r-2);return p+=2,f(n),e=e.slice(r),p+=2,t({type:"comment",comment:n})}}function E(){var e=g(),r=b(a);if(r){if(x(),!b(s))return y("property missing ':'");var n=b(i),d=e({type:"declaration",property:l(r[0].replace(t,c)),value:n?l(n[0].replace(t,c)):c});return b(o),d}}return v(),function(){var e,t=[];for(R(t);e=E();)!1!==e&&(t.push(e),R(t));return t}()}},1046:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},5318:(e,t)=>{function r(e){let t,r=[];for(let n of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(n))r.push(parseInt(n,10));else if(t=n.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,n,a,s]=t;if(n&&s){n=parseInt(n),s=parseInt(s);const e=n{"use strict";e.exports=function(e){var t=this;this.Compiler=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("toMarkdownExtensions")||[]}))}};var n=r(8397)},9528:e=>{"use strict";e.exports=function(e,t){var r,n,a=0,s=0;if("string"!==typeof t||1!==t.length)throw new Error("Expected character");e=String(e),n=e.indexOf(t),r=n;for(;-1!==n;)a++,n===r?a>s&&(s=a):a=1,r=n+1,n=e.indexOf(t,r);return s}},8397:(e,t,r)=>{e.exports=r(4059)},7282:e=>{e.exports=function e(t,r){var n,a=-1;if(r.extensions)for(;++a{e.exports=function(e,t,r){var i=r.enter("blockquote"),o=a(n(e,r),s);return i(),o};var n=r(5162),a=r(2357);function s(e,t,r){return">"+(r?"":" ")+e}},114:(e,t,r)=>{e.exports=function(e,t,r,a){var s=-1;for(;++s{e.exports=function(e,t,r){var l,u,p,f,g=i(r),h=e.value||"",m="`"===g?"GraveAccent":"Tilde";s(e,r)?(p=r.enter("codeIndented"),l=o(h,c)):(u=n(g,Math.max(a(h,g)+1,3)),p=r.enter("codeFenced"),l=u,e.lang&&(f=r.enter("codeFencedLang"+m),l+=d(r,e.lang,{before:"`",after:" ",encode:["`"]}),f()),e.lang&&e.meta&&(f=r.enter("codeFencedMeta"+m),l+=" "+d(r,e.meta,{before:" ",after:"\n",encode:["`"]}),f()),l+="\n",h&&(l+=h+"\n"),l+=u);return p(),l};var n=r(4400),a=r(9528),s=r(6363),i=r(8827),o=r(2357),d=r(4586);function c(e,t,r){return(r?"":" ")+e}},2654:(e,t,r)=>{e.exports=function(e,t,r){var i=a(r),o='"'===i?"Quote":"Apostrophe",d=r.enter("definition"),c=r.enter("label"),l="["+s(r,n(e),{before:"[",after:"]"})+"]: ";c(),!e.url||/[ \t\r\n]/.test(e.url)?(c=r.enter("destinationLiteral"),l+="<"+s(r,e.url,{before:"<",after:">"})+">"):(c=r.enter("destinationRaw"),l+=s(r,e.url,{before:" ",after:" "}));c(),e.title&&(c=r.enter("title"+o),l+=" "+i+s(r,e.title,{before:i,after:i})+i,c());return d(),l};var n=r(2638),a=r(5661),s=r(4586)},2486:(e,t,r)=>{e.exports=s,s.peek=function(e,t,r){return r.options.emphasis||"*"};var n=r(7166),a=r(7462);function s(e,t,r){var s=n(r),i=r.enter("emphasis"),o=a(e,r,{before:s,after:s});return i(),s+o+s}},6216:(e,t,r)=>{e.exports=function(e,t,r){var i,o,d,c,l=Math.max(Math.min(6,e.depth||1),1);if(a(e,r))return i=r.enter("headingSetext"),o=r.enter("phrasing"),d=s(e,r,{before:"\n",after:"\n"}),o(),i(),d+"\n"+n(1===l?"=":"-",d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf("\n"))+1));c=n("#",l),i=r.enter("headingAtx"),o=r.enter("phrasing"),d=(d=s(e,r,{before:"# ",after:"\n"}))?c+" "+d:c,r.options.closeAtx&&(d+=" "+c);return o(),i(),d};var n=r(4400),a=r(4797),s=r(7462)},2841:e=>{function t(e){return e.value||""}e.exports=t,t.peek=function(){return"<"}},4610:(e,t,r)=>{e.exports=s,s.peek=function(){return"!"};var n=r(2638),a=r(4586);function s(e,t,r){var s,i,o=e.referenceType,d=r.enter("imageReference"),c=r.enter("label"),l=a(r,e.alt,{before:"[",after:"]"}),u="!["+l+"]";return c(),i=r.stack,r.stack=[],c=r.enter("reference"),s=a(r,n(e),{before:"[",after:"]"}),c(),r.stack=i,d(),"full"!==o&&l&&l===s?"shortcut"!==o&&(u+="[]"):u+="["+s+"]",u}},7968:(e,t,r)=>{e.exports=s,s.peek=function(){return"!"};var n=r(5661),a=r(4586);function s(e,t,r){var s=n(r),i='"'===s?"Quote":"Apostrophe",o=r.enter("image"),d=r.enter("label"),c="!["+a(r,e.alt,{before:"[",after:"]"})+"](";return d(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(d=r.enter("destinationLiteral"),c+="<"+a(r,e.url,{before:"<",after:">"})+">"):(d=r.enter("destinationRaw"),c+=a(r,e.url,{before:"(",after:e.title?" ":")"})),d(),e.title&&(d=r.enter("title"+i),c+=" "+s+a(r,e.title,{before:s,after:s})+s,d()),c+=")",o(),c}},875:(e,t,r)=>{t.blockquote=r(5673),t.break=r(114),t.code=r(854),t.definition=r(2654),t.emphasis=r(2486),t.hardBreak=r(114),t.heading=r(6216),t.html=r(2841),t.image=r(7968),t.imageReference=r(4610),t.inlineCode=r(5197),t.link=r(3215),t.linkReference=r(8134),t.list=r(107),t.listItem=r(3805),t.paragraph=r(2183),t.root=r(2580),t.strong=r(580),t.text=r(9329),t.thematicBreak=r(8369)},5197:(e,t,r)=>{e.exports=a,a.peek=function(){return"`"};var n=r(6020);function a(e,t,r){for(var a,s,i,o,d=e.value||"",c="`",l=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(d);)c+="`";for(/[^ \r\n]/.test(d)&&(/[ \r\n`]/.test(d.charAt(0))||/[ \r\n`]/.test(d.charAt(d.length-1)))&&(d=" "+d+" ");++l{e.exports=i,i.peek=function(){return"["};var n=r(2638),a=r(7462),s=r(4586);function i(e,t,r){var i,o,d=e.referenceType,c=r.enter("linkReference"),l=r.enter("label"),u=a(e,r,{before:"[",after:"]"}),p="["+u+"]";return l(),o=r.stack,r.stack=[],l=r.enter("reference"),i=s(r,n(e),{before:"[",after:"]"}),l(),r.stack=o,c(),"full"!==d&&u&&u===i?"shortcut"!==d&&(p+="[]"):p+="["+i+"]",p}},3215:(e,t,r)=>{e.exports=o,o.peek=function(e,t,r){return a(e,r)?"<":"["};var n=r(5661),a=r(2787),s=r(7462),i=r(4586);function o(e,t,r){var o,d,c,l,u=n(r),p='"'===u?"Quote":"Apostrophe";return a(e,r)?(l=r.stack,r.stack=[],o=r.enter("autolink"),c="<"+s(e,r,{before:"<",after:">"})+">",o(),r.stack=l,c):(o=r.enter("link"),d=r.enter("label"),c="["+s(e,r,{before:"[",after:"]"})+"](",d(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(d=r.enter("destinationLiteral"),c+="<"+i(r,e.url,{before:"<",after:">"})+">"):(d=r.enter("destinationRaw"),c+=i(r,e.url,{before:"(",after:e.title?" ":")"})),d(),e.title&&(d=r.enter("title"+p),c+=" "+u+i(r,e.title,{before:u,after:u})+u,d()),c+=")",o(),c)}},3805:(e,t,r)=>{e.exports=function(e,t,r){var d,c,l,u=a(r),p=s(r);t&&t.ordered&&(u=(t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+".");d=u.length+1,("tab"===p||"mixed"===p&&(t&&t.spread||e.spread))&&(d=4*Math.ceil(d/4));return l=r.enter("listItem"),c=o(i(e,r),(function(e,t,r){if(t)return(r?"":n(" ",d))+e;return(r?u:u+n(" ",d-u.length))+e})),l(),c};var n=r(4400),a=r(7697),s=r(5211),i=r(5162),o=r(2357)},107:(e,t,r)=>{e.exports=function(e,t,r){var a=r.enter("list"),s=n(e,r);return a(),s};var n=r(5162)},2183:(e,t,r)=>{e.exports=function(e,t,r){var a=r.enter("paragraph"),s=r.enter("phrasing"),i=n(e,r,{before:"\n",after:"\n"});return s(),a(),i};var n=r(7462)},2580:(e,t,r)=>{e.exports=function(e,t,r){return n(e,r)};var n=r(5162)},580:(e,t,r)=>{e.exports=s,s.peek=function(e,t,r){return r.options.strong||"*"};var n=r(3312),a=r(7462);function s(e,t,r){var s=n(r),i=r.enter("strong"),o=a(e,r,{before:s,after:s});return i(),s+s+o+s+s}},9329:(e,t,r)=>{e.exports=function(e,t,r,a){return n(r,e.value,a)};var n=r(4586)},8369:(e,t,r)=>{e.exports=function(e,t,r){var i=n(s(r)+(r.options.ruleSpaces?" ":""),a(r));return r.options.ruleSpaces?i.slice(0,-1):i};var n=r(4400),a=r(9095),s=r(6899)},4059:(e,t,r)=>{e.exports=function(e,t){var r,u=t||{},p={enter:function(e){return p.stack.push(e),t;function t(){p.stack.pop()}},stack:[],unsafe:[],join:[],handlers:{},options:{}};a(p,{unsafe:o,join:i,handlers:s}),a(p,u),p.options.tightDefinitions&&(p.join=[l].concat(p.join));p.handle=n("type",{invalid:d,unknown:c,handlers:p.handlers}),(r=p.handle(e,null,p,{before:"\n",after:"\n"}))&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n");return r};var n=r(1569),a=r(7282),s=r(875),i=r(9312),o=r(4459);function d(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function c(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function l(e,t){if("definition"===e.type&&e.type===t.type)return 0}},9312:(e,t,r)=>{e.exports=[function(e,t,r,s){if("list"===t.type&&t.type===e.type&&Boolean(e.ordered)===Boolean(t.ordered)||"code"===t.type&&n(t,s)&&("list"===e.type||e.type===t.type&&n(e,s)))return!1;if("boolean"===typeof r.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&a(t,s)))return;return r.spread?1:0}}];var n=r(6363),a=r(4797)},4459:e=>{e.exports=[{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing"},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing"},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*"},{character:"*",inConstruct:"phrasing"},{atBreak:!0,character:"+"},{atBreak:!0,character:"-"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing"},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:["phrasing","label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{before:"[^A-Za-z]",character:"_",inConstruct:"phrasing"},{character:"_",after:"[^A-Za-z]",inConstruct:"phrasing"},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent","phrasing"]},{atBreak:!0,character:"~"}]},2638:(e,t,r)=>{e.exports=function(e){if(e.label||!e.identifier)return e.label||"";return e.identifier.replace(a,"$1").replace(s,i)};var n=r(7849),a=/\\([!-/:-@[-`{-~])/g,s=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i(e,t){return n(t)||e}},7697:e=>{e.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},7166:e=>{e.exports=function(e){var t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}},8827:e=>{e.exports=function(e){var t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}},5211:e=>{e.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},5661:e=>{e.exports=function(e){var t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}},9095:e=>{e.exports=function(e){var t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}},6899:e=>{e.exports=function(e){var t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}},3312:e=>{e.exports=function(e){var t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}},5162:(e,t,r)=>{e.exports=function(e,t){var r,a=e.children||[],s=[],i=-1;for(;++i{e.exports=function(e,t,r){var n,a,s,i=e.children||[],o=[],d=-1,c=r.before;for(;++d0&&("\r"===c||"\n"===c)&&"html"===s.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),c=" "),o.push(t.handle(s,e,t,{before:c,after:n})),c=o[o.length-1].slice(-1);return o.join("")}},6363:e=>{e.exports=function(e,t){return!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value)}},4797:(e,t,r)=>{e.exports=function(e,t){return t.options.setext&&(!e.depth||e.depth<3)&&n(e)};var n=r(9033)},2787:(e,t,r)=>{e.exports=function(e,t){var r=n(e);return!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url)};var n=r(9033)},2357:e=>{e.exports=function(e,r){var n,a=[],s=0,i=0;for(;n=t.exec(e);)o(e.slice(s,n.index)),a.push(n[0]),s=n.index+n[0].length,i++;return o(e.slice(s)),a.join("");function o(e){a.push(r(e,i,!e))}};var t=/\r?\n|\r/g},6020:e=>{e.exports=function(e){var t,r;e._compiled||(t=e.before?"(?:"+e.before+")":"",r=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(r||""),"g"));return e._compiled}},9906:e=>{function t(e,t,r){var n;if(!t)return r;for("string"===typeof t&&(t=[t]),n=-1;++n{e.exports=function(e,t,r){var o,d,c,l,u,p,f,g,h=(r.before||"")+(t||"")+(r.after||""),m=[],y=[],b={},v=-1;for(;++v=g||c+1{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],n=-1;++n{"use strict";var t;e.exports=function(e){var r,n="&"+e+";";if((t=t||document.createElement("i")).innerHTML=n,59===(r=t.textContent).charCodeAt(r.length-1)&&"semi"!==e)return!1;return r!==n&&r}},1569:e=>{"use strict";e.exports=function(e,n){var a=n||{};function s(n){var a=s.invalid,i=s.handlers;return n&&r.call(n,e)&&(a=r.call(i,n[e])?i[n[e]]:s.unknown),(a||t).apply(this,arguments)}return s.handlers=a.handlers||{},s.invalid=a.invalid,s.unknown=a.unknown,s};var t=Function.prototype,r={}.hasOwnProperty},8634:(e,t,r)=>{"use strict";var n=r(282),a=r(1676),s=r(6638);e.exports=n().use(a).use(s).freeze()},6415:e=>{"use strict";e.exports=function(e){if(e)throw e}},3731:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},5715:(e,t,r)=>{"use strict";e.exports=function(e,t,r){"string"!==typeof t&&(r=t,t=void 0);return function(e){var t=e||{},r=function(e,t){var r=-1;for(;++r-1&&(L.call(this,e),B.call(this,e))}function U(){g("atHardBreak",!0)}function H(){var e=this.resume();this.stack[this.stack.length-1].value=e}function G(){var e=this.resume();this.stack[this.stack.length-1].value=e}function q(){var e=this.resume();this.stack[this.stack.length-1].value=e}function W(){var e=this.stack[this.stack.length-1];h("inReference")?(e.type+="Reference",e.referenceType=h("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),g("referenceType")}function z(){var e=this.stack[this.stack.length-1];h("inReference")?(e.type+="Reference",e.referenceType=h("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),g("referenceType")}function V(e){this.stack[this.stack.length-2].identifier=i(this.sliceSerialize(e)).toLowerCase()}function K(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,g("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function Y(){var e=this.resume();this.stack[this.stack.length-1].url=e}function X(){var e=this.resume();this.stack[this.stack.length-1].title=e}function J(){g("inReference")}function Q(){g("referenceType","collapsed")}function $(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase(),g("referenceType","full")}function Z(e){g("characterReferenceType",e.type)}function ee(e){var t,r,n=this.sliceSerialize(e),a=h("characterReferenceType");a?(t=o(n,"characterReferenceMarkerNumeric"===a?10:16),g("characterReferenceType")):t=u(n),(r=this.stack.pop()).value+=t,r.position.end=m(e.end)}function te(e){B.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function re(e){B.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function ne(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function oe(){return{type:"emphasis",children:[]}}function de(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function le(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function fe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ge(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function he(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function be(){return{type:"thematicBreak"}}}(r)(l(d(r).document().write(c()(e,t,!0))))};var n=r(8765),a=r(3667),s=r(8025),i=r(4991),o=r(1744),d=r(4751),c=r(5265),l=r(4811),u=r(4537),p=r(6934);function f(e,t){var r,n;for(r in t)n=s.call(e,r)?e[r]:e[r]={},"canContainEols"===r||"transforms"===r?e[r]=[].concat(n,t[r]):Object.assign(n,t[r])}},5184:(e,t,r)=>{"use strict";e.exports=r(5715)},8765:e=>{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],n=-1;++n{"use strict";var n=r(8254)(/[A-Za-z]/);e.exports=n},6995:(e,t,r)=>{"use strict";var n=r(8254)(/[\dA-Za-z]/);e.exports=n},3290:(e,t,r)=>{"use strict";var n=r(8254)(/[#-'*+\--9=?A-Z^-~]/);e.exports=n},1207:e=>{"use strict";e.exports=function(e){return e<32||127===e}},1091:(e,t,r)=>{"use strict";var n=r(8254)(/\d/);e.exports=n},4900:(e,t,r)=>{"use strict";var n=r(8254)(/[\dA-Fa-f]/);e.exports=n},769:(e,t,r)=>{"use strict";var n=r(8254)(/[!-/:-@[-`{-~]/);e.exports=n},6377:e=>{"use strict";e.exports=function(e){return e<0||32===e}},4392:e=>{"use strict";e.exports=function(e){return e<-2}},9056:e=>{"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},5414:(e,t,r)=>{"use strict";var n=r(5696),a=r(8254)(n);e.exports=a},6548:(e,t,r)=>{"use strict";var n=r(8254)(/\s/);e.exports=n},3667:e=>{"use strict";var t=Object.assign;e.exports=t},9393:e=>{"use strict";var t=String.fromCharCode;e.exports=t},8025:e=>{"use strict";var t={}.hasOwnProperty;e.exports=t},8971:e=>{"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},7322:e=>{"use strict";e.exports=["pre","script","style","textarea"]},7327:e=>{"use strict";var t=[].splice;e.exports=t},5696:e=>{"use strict";e.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},6236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9402),a=r(2463),s=r(9829),i=r(581),o=r(3382),d=r(4671),c=r(601),l=r(1827),u=r(5518),p=r(8194),f=r(462),g=r(1034),h=r(4428),m=r(4945),y=r(9255),b=r(4902),v=r(721),R=r(2836),x=r(1699),E=r(1862),T=r(5861),w={42:x,43:x,45:x,48:x,49:x,50:x,51:x,52:x,53:x,54:x,55:x,56:x,57:x,62:i},S={91:p},A={"-2":l,"-1":l,32:l},j={35:g,42:T,45:[E,T],60:h,61:E,95:T,96:c,126:c},C={38:d,92:o},k={"-5":R,"-4":R,"-3":R,33:b,38:d,42:a,60:[s,m],91:v,92:[f,o],93:y,95:a,96:u},_={null:[a,n.resolver]};t.contentInitial=S,t.disable={null:[]},t.document=w,t.flow=j,t.flowInitial=A,t.insideSpan=_,t.string=C,t.text=k},490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4392),a=r(6231),s=function(e){var t,r=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,r,"linePrefix")}),(function(t){return e.enter("paragraph"),s(t)}));return r;function s(r){var n=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=n),t=n,i(r)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):n(t)?(e.consume(t),e.exit("chunkText"),s):(e.consume(t),i)}};t.tokenize=s},1717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4392),a=r(6231),s=r(6941),i=function(e){var t,r,a,i=this,c=[],l=0,u={tokenize:function(e,n){var a=0;return t={},l;function l(n){return at;)i.containerState=c[s][1],c[s][0].exit.call(i,e);c.length=t}},o={tokenize:function(e,t,r){return a(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},d={tokenize:function(e,t,r){return a(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=i},6604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2747),a=r(6231),s=r(6941),i=function(e){var t=this,r=e.attempt(s,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,i,a(e,e.attempt(this.parser.constructs.flow,i,e.attempt(n,i)),"linePrefix")));return r;function i(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}};t.tokenize=i},9402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3667),a=r(1339),s=d("text"),i=d("string"),o={resolveAll:c()};function d(e){return{tokenize:function(t){var r=this,n=this.parser.constructs[e],a=t.attempt(n,s,i);return s;function s(e){return d(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return d(e)?(t.exit("data"),a(e)):(t.consume(e),o)}function d(e){var t=n[e],a=-1;if(null===e)return!0;if(t)for(;++a{"use strict";var n=r(490),a=r(1717),s=r(6604),i=r(9402),o=r(6369),d=r(7058),c=r(9990),l=r(6236);e.exports=function(e){var t={defined:[],constructs:o([l].concat(c((e||{}).extensions))),content:r(n),document:r(a),flow:r(s),string:r(i.string),text:r(i.text)};return t;function r(e){return function(r){return d(t,e,r)}}}},4811:(e,t,r)=>{"use strict";var n=r(6308);e.exports=function(e){for(;!n(e););return e}},5265:e=>{"use strict";var t=/[\0\t\n\r]/g;e.exports=function(){var e,r=!0,n=1,a="";return function(s,i,o){var d,c,l,u,p,f=[];s=a+s.toString(i),l=0,a="",r&&(65279===s.charCodeAt(0)&&l++,r=void 0);for(;l{"use strict";var n=r(5911),a=r(4485),s=r(1084),i=r(8375),o=r(3173),d=r(1339),c={name:"attention",tokenize:function(e,t){var r,n=s(this.previous);return function(t){return e.enter("attentionSequence"),r=t,a(t)};function a(i){var o,d,c,l;return i===r?(e.consume(i),a):(o=e.exit("attentionSequence"),c=!(d=s(i))||2===d&&n,l=!n||2===n&&d,o._open=42===r?c:c&&(n||!l),o._close=42===r?l:l&&(d||!c),t(i))}},resolveAll:function(e,t){var r,s,c,l,u,p,f,g,h=-1;for(;++h1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:i(d(e[r][1].end),-p),end:d(e[r][1].end)},u={type:p>1?"strongSequence":"emphasisSequence",start:d(e[h][1].start),end:i(d(e[h][1].start),p)},c={type:p>1?"strongText":"emphasisText",start:d(e[r][1].end),end:d(e[h][1].start)},s={type:p>1?"strong":"emphasis",start:d(l.start),end:d(u.end)},e[r][1].end=d(l.start),e[h][1].start=d(u.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=n(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=n(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",c,t]]),f=n(f,o(t.parser.constructs.insideSpan.null,e.slice(r+1,h),t)),f=n(f,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[h][1].end.offset-e[h][1].start.offset?(g=2,f=n(f,[["enter",e[h][1],t],["exit",e[h][1],t]])):g=0,a(e,r-1,h-r+3,f),h=r+f.length-g-2;break}h=-1;for(;++h{"use strict";var n=r(277),a=r(6995),s=r(3290),i=r(1207),o={name:"autolink",tokenize:function(e,t,r){var o=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),d};function d(t){return n(t)?(e.consume(t),c):s(t)?p(t):r(t)}function c(e){return 43===e||45===e||46===e||a(e)?l(e):p(e)}function l(t){return 58===t?(e.consume(t),u):(43===t||45===t||46===t||a(t))&&o++<32?(e.consume(t),l):p(t)}function u(t){return 62===t?(e.exit("autolinkProtocol"),m(t)):32===t||60===t||i(t)?r(t):(e.consume(t),u)}function p(t){return 64===t?(e.consume(t),o=0,f):s(t)?(e.consume(t),p):r(t)}function f(e){return a(e)?g(e):r(e)}function g(t){return 46===t?(e.consume(t),o=0,f):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",m(t)):h(t)}function h(t){return(45===t||a(t))&&o++<63?(e.consume(t),45===t?h:g):r(t)}function m(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};e.exports=o},581:(e,t,r)=>{"use strict";var n=r(9056),a=r(6231),s={name:"blockQuote",tokenize:function(e,t,r){var a=this;return function(t){if(62===t)return a.containerState.open||(e.enter("blockQuote",{_container:!0}),a.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),s;return r(t)};function s(r){return n(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return a(e,e.attempt(s,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=s},3382:(e,t,r)=>{"use strict";var n=r(769),a={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),a};function a(a){return n(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}};e.exports=a},4671:(e,t,r)=>{"use strict";var n=r(4537),a=r(6995),s=r(1091),i=r(4900);function o(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var d=o(n),c={name:"characterReference",tokenize:function(e,t,r){var n,o,c=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),u};function u(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),n=31,o=a,f(t))}function p(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,o=i,f):(e.enter("characterReferenceValue"),n=7,o=s,f(t))}function f(s){var i;return 59===s&&l?(i=e.exit("characterReferenceValue"),o!==a||d.default(c.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):o(s)&&l++{"use strict";var n=r(4392),a=r(6377),s=r(557),i=r(6231),o={name:"codeFenced",tokenize:function(e,t,r){var o,d=this,c={tokenize:function(e,t,r){var a=0;return i(e,s,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function s(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(t)}function d(t){return t===o?(e.consume(t),a++,d):a{"use strict";var n=r(4392),a=r(4485),s=r(557),i=r(6231),o={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(d,a,r);function a(r){return null===r?t(r):n(r)?e.attempt(d,a,t)(r):(e.enter("codeFlowValue"),s(r))}function s(t){return null===t||n(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),s)}},resolve:function(e,t){var r={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return a(e,0,0,[["enter",r,t]]),a(e,e.length,0,[["exit",r,t]]),e}},d={tokenize:function(e,t,r){var a=this;return i(e,(function o(d){if(n(d))return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),i(e,o,"linePrefix",5);return s(a.events,"linePrefix")<4?r(d):t(d)}),"linePrefix",5)},partial:!0};e.exports=o},5518:(e,t,r)=>{"use strict";var n=r(4392),a={name:"codeText",tokenize:function(e,t,r){var a,s,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),i++,o):(e.exit("codeTextSequence"),d(t))}function d(t){return null===t?r(t):96===t?(s=e.enter("codeTextSequence"),a=0,l(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),d):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||n(t)?(e.exit("codeTextData"),d(t)):(e.consume(t),c)}function l(r){return 96===r?(e.consume(r),a++,l):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(s.type="codeTextData",c(r))}},resolve:function(e){var t,r,n=e.length-4,a=3;if(("lineEnding"===e[a][1].type||"space"===e[a][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type))for(t=a;++t{"use strict";var n=r(4392),a=r(557),s=r(6308),i=r(6231),o={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(t)};function a(t){return null===t?s(t):n(t)?e.check(d,i,s)(t):(e.consume(t),a)}function s(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function i(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),a}},resolve:function(e){return s(e),e},interruptible:!0,lazy:!0},d={tokenize:function(e,t,r){var s=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,o,"linePrefix")};function o(i){return null===i||n(i)?r(i):s.parser.constructs.disable.null.indexOf("codeIndented")>-1||a(s.events,"linePrefix")<4?e.interrupt(s.parser.constructs.flow,r,t)(i):t(i)}},partial:!0};e.exports=o},8194:(e,t,r)=>{"use strict";var n=r(4392),a=r(6377),s=r(4991),i=r(4559),o=r(9304),d=r(6231),c=r(9943),l=r(5191),u={name:"definition",tokenize:function(e,t,r){var a,l=this;return function(t){return e.enter("definition"),o.call(l,e,u,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function u(t){return a=s(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),c(e,i(e,e.attempt(p,d(e,f,"whitespace"),d(e,f,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function f(s){return null===s||n(s)?(e.exit("definition"),l.parser.defined.indexOf(a)<0&&l.parser.defined.push(a),t(s)):r(s)}}},p={tokenize:function(e,t,r){return function(t){return a(t)?c(e,s)(t):r(t)};function s(t){return 34===t||39===t||40===t?l(e,d(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||n(e)?t(e):r(e)}},partial:!0};e.exports=u},4559:(e,t,r)=>{"use strict";var n=r(1207),a=r(6377),s=r(4392);e.exports=function(e,t,r,i,o,d,c,l,u){var p=u||1/0,f=0;return function(t){if(60===t)return e.enter(i),e.enter(o),e.enter(d),e.consume(t),e.exit(d),g;if(n(t)||41===t)return r(t);return e.enter(i),e.enter(c),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(t)};function g(r){return 62===r?(e.enter(d),e.consume(r),e.exit(d),e.exit(o),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(l),g(t)):null===t||60===t||s(t)?r(t):(e.consume(t),92===t?m:h)}function m(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function y(s){return 40===s?++f>p?r(s):(e.consume(s),y):41===s?f--?(e.consume(s),y):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(i),t(s)):null===s||a(s)?f?r(s):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(i),t(s)):n(s)?r(s):(e.consume(s),92===s?b:y)}function b(t){return 40===t||41===t||92===t?(e.consume(t),y):y(t)}}},9304:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056);e.exports=function(e,t,r,s,i,o){var d,c=this,l=0;return function(t){return e.enter(s),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(a){return null===a||91===a||93===a&&!d||94===a&&!l&&"_hiddenFootnoteSupport"in c.parser.constructs||l>999?r(a):93===a?(e.exit(o),e.enter(i),e.consume(a),e.exit(i),e.exit(s),t):n(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(a))}function p(t){return null===t||91===t||93===t||n(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),d=d||!a(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,p):p(t)}}},6231:(e,t,r)=>{"use strict";var n=r(9056);e.exports=function(e,t,r,a){var s=a?a-1:1/0,i=0;return function(a){if(n(a))return e.enter(r),o(a);return t(a)};function o(a){return n(a)&&i++{"use strict";var n=r(4392),a=r(6231);e.exports=function(e,t,r,s,i,o){var d;return function(t){return e.enter(s),e.enter(i),e.consume(t),e.exit(i),d=40===t?41:t,c};function c(r){return r===d?(e.enter(i),e.consume(r),e.exit(i),e.exit(s),t):(e.enter(o),l(r))}function l(t){return t===d?(e.exit(o),c(d)):null===t?r(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===d||null===t||n(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?p:u)}function p(t){return t===d||92===t?(e.consume(t),u):u(t)}}},9943:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056),s=r(6231);e.exports=function(e,t){var r;return function i(o){if(n(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,i;if(a(o))return s(e,i,r?"linePrefix":"lineSuffix")(o);return t(o)}}},462:(e,t,r)=>{"use strict";var n=r(4392),a={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),a};function a(a){return n(a)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(a)):r(a)}}};e.exports=a},1034:(e,t,r)=>{"use strict";var n=r(4392),a=r(6377),s=r(9056),i=r(4485),o=r(6231),d={name:"headingAtx",tokenize:function(e,t,r){var i=this,d=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(n){return 35===n&&d++<6?(e.consume(n),c):null===n||a(n)?(e.exit("atxHeadingSequence"),i.interrupt?t(n):l(n)):r(n)}function l(r){return 35===r?(e.enter("atxHeadingSequence"),u(r)):null===r||n(r)?(e.exit("atxHeading"),t(r)):s(r)?o(e,l,"whitespace")(r):(e.enter("atxHeadingText"),p(r))}function u(t){return 35===t?(e.consume(t),u):(e.exit("atxHeadingSequence"),l(t))}function p(t){return null===t||35===t||a(t)?(e.exit("atxHeadingText"),l(t)):(e.consume(t),p)}},resolve:function(e,t){var r,n,a=e.length-2,s=3;"whitespace"===e[s][1].type&&(s+=2);a-2>s&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(s===a-1||a-4>s&&"whitespace"===e[a-2][1].type)&&(a-=s+1===a?2:4);a>s&&(r={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},n={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},i(e,s,a-s+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};e.exports=d},4428:(e,t,r)=>{"use strict";var n=r(277),a=r(6995),s=r(4392),i=r(6377),o=r(9056),d=r(9393),c=r(8971),l=r(7322),u=r(6941),p={name:"htmlFlow",tokenize:function(e,t,r){var u,p,g,h,m,y=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),b};function b(a){return 33===a?(e.consume(a),v):47===a?(e.consume(a),E):63===a?(e.consume(a),u=3,y.interrupt?t:G):n(a)?(e.consume(a),g=d(a),p=!0,T):r(a)}function v(a){return 45===a?(e.consume(a),u=2,R):91===a?(e.consume(a),u=5,g="CDATA[",h=0,x):n(a)?(e.consume(a),u=4,y.interrupt?t:G):r(a)}function R(n){return 45===n?(e.consume(n),y.interrupt?t:G):r(n)}function x(n){return n===g.charCodeAt(h++)?(e.consume(n),h===g.length?y.interrupt?t:O:x):r(n)}function E(t){return n(t)?(e.consume(t),g=d(t),T):r(t)}function T(n){return null===n||47===n||62===n||i(n)?47!==n&&p&&l.indexOf(g.toLowerCase())>-1?(u=1,y.interrupt?t(n):O(n)):c.indexOf(g.toLowerCase())>-1?(u=6,47===n?(e.consume(n),w):y.interrupt?t(n):O(n)):(u=7,y.interrupt?r(n):p?A(n):S(n)):45===n||a(n)?(e.consume(n),g+=d(n),T):r(n)}function w(n){return 62===n?(e.consume(n),y.interrupt?t:O):r(n)}function S(t){return o(t)?(e.consume(t),S):D(t)}function A(t){return 47===t?(e.consume(t),D):58===t||95===t||n(t)?(e.consume(t),j):o(t)?(e.consume(t),A):D(t)}function j(t){return 45===t||46===t||58===t||95===t||a(t)?(e.consume(t),j):C(t)}function C(t){return 61===t?(e.consume(t),k):o(t)?(e.consume(t),C):A(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),m=t,_):o(t)?(e.consume(t),k):(m=void 0,P(t))}function _(t){return t===m?(e.consume(t),I):null===t||s(t)?r(t):(e.consume(t),_)}function P(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||i(t)?C(t):(e.consume(t),P)}function I(e){return 47===e||62===e||o(e)?A(e):r(e)}function D(t){return 62===t?(e.consume(t),N):r(t)}function N(t){return o(t)?(e.consume(t),N):null===t||s(t)?O(t):r(t)}function O(t){return 45===t&&2===u?(e.consume(t),B):60===t&&1===u?(e.consume(t),M):62===t&&4===u?(e.consume(t),q):63===t&&3===u?(e.consume(t),G):93===t&&5===u?(e.consume(t),H):!s(t)||6!==u&&7!==u?null===t||s(t)?F(t):(e.consume(t),O):e.check(f,q,F)(t)}function F(t){return e.exit("htmlFlowData"),L(t)}function L(t){return null===t?W(t):s(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L):(e.enter("htmlFlowData"),O(t))}function B(t){return 45===t?(e.consume(t),G):O(t)}function M(t){return 47===t?(e.consume(t),g="",U):O(t)}function U(t){return 62===t&&l.indexOf(g.toLowerCase())>-1?(e.consume(t),q):n(t)&&g.length<8?(e.consume(t),g+=d(t),U):O(t)}function H(t){return 93===t?(e.consume(t),G):O(t)}function G(t){return 62===t?(e.consume(t),q):O(t)}function q(t){return null===t||s(t)?(e.exit("htmlFlowData"),W(t)):(e.consume(t),q)}function W(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},f={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(u,t,r)}},partial:!0};e.exports=p},4945:(e,t,r)=>{"use strict";var n=r(277),a=r(6995),s=r(4392),i=r(6377),o=r(9056),d=r(6231),c={name:"htmlText",tokenize:function(e,t,r){var c,l,u,p,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),g};function g(t){return 33===t?(e.consume(t),h):47===t?(e.consume(t),C):63===t?(e.consume(t),A):n(t)?(e.consume(t),P):r(t)}function h(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),l="CDATA[",u=0,x):n(t)?(e.consume(t),S):r(t)}function m(t){return 45===t?(e.consume(t),y):r(t)}function y(t){return null===t||62===t?r(t):45===t?(e.consume(t),b):v(t)}function b(e){return null===e||62===e?r(e):v(e)}function v(t){return null===t?r(t):45===t?(e.consume(t),R):s(t)?(p=v,M(t)):(e.consume(t),v)}function R(t){return 45===t?(e.consume(t),H):v(t)}function x(t){return t===l.charCodeAt(u++)?(e.consume(t),u===l.length?E:x):r(t)}function E(t){return null===t?r(t):93===t?(e.consume(t),T):s(t)?(p=E,M(t)):(e.consume(t),E)}function T(t){return 93===t?(e.consume(t),w):E(t)}function w(t){return 62===t?H(t):93===t?(e.consume(t),w):E(t)}function S(t){return null===t||62===t?H(t):s(t)?(p=S,M(t)):(e.consume(t),S)}function A(t){return null===t?r(t):63===t?(e.consume(t),j):s(t)?(p=A,M(t)):(e.consume(t),A)}function j(e){return 62===e?H(e):A(e)}function C(t){return n(t)?(e.consume(t),k):r(t)}function k(t){return 45===t||a(t)?(e.consume(t),k):_(t)}function _(t){return s(t)?(p=_,M(t)):o(t)?(e.consume(t),_):H(t)}function P(t){return 45===t||a(t)?(e.consume(t),P):47===t||62===t||i(t)?I(t):r(t)}function I(t){return 47===t?(e.consume(t),H):58===t||95===t||n(t)?(e.consume(t),D):s(t)?(p=I,M(t)):o(t)?(e.consume(t),I):H(t)}function D(t){return 45===t||46===t||58===t||95===t||a(t)?(e.consume(t),D):N(t)}function N(t){return 61===t?(e.consume(t),O):s(t)?(p=N,M(t)):o(t)?(e.consume(t),N):I(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,F):s(t)?(p=O,M(t)):o(t)?(e.consume(t),O):(e.consume(t),c=void 0,B)}function F(t){return t===c?(e.consume(t),L):null===t?r(t):s(t)?(p=F,M(t)):(e.consume(t),F)}function L(e){return 62===e||47===e||i(e)?I(e):r(e)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||i(t)?I(t):(e.consume(t),B)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d(e,U,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function U(t){return e.enter("htmlTextData"),p(t)}function H(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};e.exports=c},9255:(e,t,r)=>{"use strict";var n=r(6377),a=r(5911),s=r(4485),i=r(4991),o=r(3173),d=r(1339),c=r(4559),l=r(9304),u=r(5191),p=r(9943),f={name:"labelEnd",tokenize:function(e,t,r){var n,a,s=this,o=s.events.length;for(;o--;)if(("labelImage"===s.events[o][1].type||"labelLink"===s.events[o][1].type)&&!s.events[o][1]._balanced){n=s.events[o][1];break}return function(t){if(!n)return r(t);return n._inactive?c(t):(a=s.parser.defined.indexOf(i(s.sliceSerialize({start:n.end,end:s.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),d)};function d(r){return 40===r?e.attempt(g,t,a?t:c)(r):91===r?e.attempt(h,t,a?e.attempt(m,t,c):c)(r):a?t(r):c(r)}function c(e){return n._balanced=!0,r(e)}},resolveTo:function(e,t){var r,n,i,c,l,u,p,f=e.length,g=0;for(;f--;)if(c=e[f][1],l){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(u){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(l=f,"labelLink"!==c.type)){g=2;break}}else"labelEnd"===c.type&&(u=f);return r={type:"labelLink"===e[l][1].type?"link":"image",start:d(e[l][1].start),end:d(e[e.length-1][1].end)},n={type:"label",start:d(e[l][1].start),end:d(e[u][1].end)},i={type:"labelText",start:d(e[l+g+2][1].end),end:d(e[u-2][1].start)},p=a(p=[["enter",r,t],["enter",n,t]],e.slice(l+1,l+g+3)),p=a(p,[["enter",i,t]]),p=a(p,o(t.parser.constructs.insideSpan.null,e.slice(l+g+4,u-3),t)),p=a(p,[["exit",i,t],e[u-2],e[u-1],["exit",n,t]]),p=a(p,e.slice(u+1)),p=a(p,[["exit",r,t]]),s(e,l,e.length,p),e},resolveAll:function(e){var t,r=-1;for(;++r{"use strict";var n={name:"labelStartImage",tokenize:function(e,t,r){var n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),s):r(t)}function s(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:r(9255).resolveAll};e.exports=n},721:(e,t,r)=>{"use strict";var n={name:"labelStartLink",tokenize:function(e,t,r){var n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:r(9255).resolveAll};e.exports=n},2836:(e,t,r)=>{"use strict";var n=r(6231),a={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n(e,t,"linePrefix")}}};e.exports=a},1699:(e,t,r)=>{"use strict";var n=r(1091),a=r(9056),s=r(557),i=r(353),o=r(6231),d=r(6941),c=r(5861),l={name:"list",tokenize:function(e,t,r){var o=this,l=s(o.events,"linePrefix"),p=0;return function(t){var a=o.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!o.containerState.marker||t===o.containerState.marker:n(t)){if(o.containerState.type||(o.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(c,r,g)(t):g(t);if(!o.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return r(t)};function f(t){return n(t)&&++p<10?(e.consume(t),f):(!o.interrupt||p<2)&&(o.containerState.marker?t===o.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),g(t)):r(t)}function g(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||t,e.check(d,o.interrupt?r:h,e.attempt(u,y,m))}function h(e){return o.containerState.initialBlankLine=!0,l++,y(e)}function m(t){return a(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),y):r(t)}function y(r){return o.containerState.size=l+i(o.sliceStream(e.exit("listItemPrefix"))),t(r)}},continuation:{tokenize:function(e,t,r){var n=this;return n.containerState._closeFlow=void 0,e.check(d,(function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,o(e,t,"listItemIndent",n.containerState.size+1)(r)}),(function(r){if(n.containerState.furtherBlankLines||!a(r))return n.containerState.furtherBlankLines=n.containerState.initialBlankLine=void 0,s(r);return n.containerState.furtherBlankLines=n.containerState.initialBlankLine=void 0,e.attempt(p,t,s)(r)}));function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,o(e,e.attempt(l,t,r),"linePrefix",n.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},u={tokenize:function(e,t,r){var n=this;return o(e,(function(e){return a(e)||!s(n.events,"listItemPrefixWhitespace")?r(e):t(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},p={tokenize:function(e,t,r){var n=this;return o(e,(function(e){return s(n.events,"listItemIndent")===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};e.exports=l},6941:(e,t,r)=>{"use strict";var n=r(4392),a=r(6231),s={tokenize:function(e,t,r){return a(e,(function(e){return null===e||n(e)?t(e):r(e)}),"linePrefix")},partial:!0};e.exports=s},1862:(e,t,r)=>{"use strict";var n=r(4392),a=r(1339),s=r(6231),i={name:"setextUnderline",tokenize:function(e,t,r){var a,i,o=this,d=o.events.length;for(;d--;)if("lineEnding"!==o.events[d][1].type&&"linePrefix"!==o.events[d][1].type&&"content"!==o.events[d][1].type){i="paragraph"===o.events[d][1].type;break}return function(t){if(!o.lazy&&(o.interrupt||i))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),a=t,c(t);return r(t)};function c(t){return t===a?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),s(e,l,"lineSuffix")(t))}function l(a){return null===a||n(a)?(e.exit("setextHeadingLine"),t(a)):r(a)}},resolveTo:function(e,t){var r,n,s,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),s||"definition"!==e[o][1].type||(s=o);i={type:"setextHeading",start:a(e[n][1].start),end:a(e[e.length-1][1].end)},e[n][1].type="setextHeadingText",s?(e.splice(n,0,["enter",i,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end=a(e[s][1].end)):e[r][1]=i;return e.push(["exit",i,t]),e}};e.exports=i},5861:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056),s=r(6231),i={name:"thematicBreak",tokenize:function(e,t,r){var i,o=0;return function(t){return e.enter("thematicBreak"),i=t,d(t)};function d(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):a(l)?s(e,d,"whitespace")(l):o<3||null!==l&&!n(l)?r(l):(e.exit("thematicBreak"),t(l))}function c(t){return t===i?(e.consume(t),o++,c):(e.exit("thematicBreakSequence"),d(t))}}};e.exports=i},5911:(e,t,r)=>{"use strict";var n=r(4485);e.exports=function(e,t){return e.length?(n(e,e.length,0,t),e):t}},4485:(e,t,r)=>{"use strict";var n=r(7327);e.exports=function(e,t,r,a){var s,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,a.length<1e4)(s=Array.from(a)).unshift(t,r),n.apply(e,s);else for(r&&n.apply(e,[t,r]);o{"use strict";var n=r(6377),a=r(5414),s=r(6548);e.exports=function(e){return null===e||n(e)||s(e)?1:a(e)?2:void 0}},6369:(e,t,r)=>{"use strict";var n=r(8025),a=r(4485),s=r(9990);function i(e,t){var r,a,i,d;for(r in t)for(d in a=n.call(e,r)?e[r]:e[r]={},i=t[r])a[d]=o(s(i[d]),n.call(a,d)?a[d]:[])}function o(e,t){for(var r=-1,n=[];++r{"use strict";var n=r(3667),a=r(4392),s=r(5911),i=r(4485),o=r(9990),d=r(3173),c=r(6392),l=r(1339),u=r(2569);e.exports=function(e,t,r){var p=r?l(r):{line:1,column:1,offset:0},f={},g=[],h=[],m=[],y={consume:function(e){a(e)?(p.line++,p.column=1,p.offset+=-3===e?2:1,j()):-1!==e&&(p.column++,p.offset++);p._bufferIndex<0?p._index++:(p._bufferIndex++,p._bufferIndex===h[p._index].length&&(p._bufferIndex=-1,p._index++));b.previous=e},enter:function(e,t){var r=t||{};return r.type=e,r.start=x(),b.events.push(["enter",r,b]),m.push(r),r},exit:function(e){var t=m.pop();return t.end=x(),b.events.push(["exit",t,b]),t},attempt:S((function(e,t){A(e,t.from)})),check:S(w),interrupt:S(w,{interrupt:!0}),lazy:S(w,{lazy:!0})},b={previous:null,events:[],parser:e,sliceStream:R,sliceSerialize:function(e){return c(R(e))},now:x,defineSkip:function(e){f[e.line]=e.column,j()},write:function(e){if(h=s(h,e),E(),null!==h[h.length-1])return[];return A(t,0),b.events=d(g,b.events,b),b.events}},v=t.tokenize.call(b,y);return t.resolveAll&&g.push(t),p._index=0,p._bufferIndex=-1,b;function R(e){return u(h,e)}function x(){return l(p)}function E(){for(var e,t;p._index-1)return h();return e.tokenize.call(t?n({},b,t):b,y,g,h)(r)}}function g(t){return e(c,l),a}function h(e){return l.restore(),++d{"use strict";e.exports=function(e){return null===e||void 0===e?[]:"length"in e?e:[e]}},8375:e=>{"use strict";e.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}},4991:e=>{"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},557:(e,t,r)=>{"use strict";var n=r(353);e.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?n(r[2].sliceStream(r[1])):0}},8254:(e,t,r)=>{"use strict";var n=r(9393);e.exports=function(e){return function(t){return e.test(n(t))}}},3173:e=>{"use strict";e.exports=function(e,t,r){for(var n,a=[],s=-1;++s{"use strict";var n=r(9393);e.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535===(65535&r)||65534===(65535&r)||r>1114111?"\ufffd":n(r)}},6392:(e,t,r)=>{"use strict";var n=r(9393);e.exports=function(e){for(var t,r,a,s=-1,i=[];++s{"use strict";var n=r(3667);e.exports=function(e){return n({},e)}},353:e=>{"use strict";e.exports=function(e){for(var t=-1,r=0;++t{"use strict";e.exports=function(e,t){var r,n=t.start._index,a=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;return n===s?r=[e[n].slice(a,i)]:(r=e.slice(n,s),a>-1&&(r[0]=r[0].slice(a)),i>0&&r.push(e[s].slice(0,i))),r}},6308:(e,t,r)=>{"use strict";var n=r(3667),a=r(4485),s=r(1339);function i(e,t){for(var r,n,s,i,o,d,c=e[t][1],l=e[t][2],u=t-1,p=[],f=c._tokenizer||l.parser[c.contentType](c.start),g=f.events,h=[],m={};c;){for(;e[++u][1]!==c;);p.push(u),c._tokenizer||(r=l.sliceStream(c),c.next||r.push(null),n&&f.defineSkip(c.start),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(r),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),n=c,c=c.next}for(c=n,s=g.length;s--;)"enter"===g[s][0]?i=!0:i&&g[s][1].type===g[s-1][1].type&&g[s][1].start.line!==g[s][1].end.line&&(y(g.slice(s+1,o)),c._tokenizer=c.next=void 0,c=c.previous,o=s+1);for(f.events=c._tokenizer=c.next=void 0,y(g.slice(0,o)),s=-1,d=0;++s{"use strict";var t;e.exports=function(e){var r,n="&"+e+";";if((t=t||document.createElement("i")).innerHTML=n,59===(r=t.textContent).charCodeAt(r.length-1)&&"semi"!==e)return!1;return r!==n&&r}},1676:(e,t,r)=>{"use strict";e.exports=function(e){var t=this;this.Parser=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var n=r(5184)},6745:(e,t,r)=>{"use strict";var n=r(4918);e.exports=s,s.wrap=n;var a=[].slice;function s(){var e=[],t={run:function(){var t=-1,r=a.call(arguments,0,-1),s=arguments[arguments.length-1];if("function"!==typeof s)throw new Error("Expected function as last argument, not "+s);(function i(o){var d=e[++t],c=a.call(arguments,0).slice(1),l=r.length,u=-1;if(o)s(o);else{for(;++u{"use strict";var t=[].slice;e.exports=function(e,r){var n;return function(){var r,i=t.call(arguments,0),o=e.length>i.length;o&&i.push(a);try{r=e.apply(null,i)}catch(d){if(o&&n)throw d;return a(d)}o||(r&&"function"===typeof r.then?r.then(s,a):r instanceof Error?a(r):s(r))};function a(){n||(n=!0,r.apply(null,arguments))}function s(e){a(null,e)}}},282:(e,t,r)=>{"use strict";var n=r(6415),a=r(1046),s=r(432),i=r(3731),o=r(6745),d=r(9418);e.exports=function e(){var t,r=[],a=o(),b={},v=-1;return R.data=function(e,r){if("string"===typeof e)return 2===arguments.length?(h("data",t),b[e]=r,R):l.call(b,e)&&b[e]||null;if(e)return h("data",t),b=e,R;return b},R.freeze=x,R.attachers=r,R.use=function(e){var n;if(h("use",t),null===e||void 0===e);else if("function"===typeof e)l.apply(null,arguments);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?d(e):a(e)}n&&(b.settings=s(b.settings||{},n));return R;function a(e){d(e.plugins),e.settings&&(n=s(n||{},e.settings))}function o(e){if("function"===typeof e)l(e);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):a(e)}}function d(e){var t=-1;if(null===e||void 0===e);else{if("object"!==typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t{"use strict";var t={}.hasOwnProperty;function r(e){return e&&"object"===typeof e||(e={}),a(e.line)+":"+a(e.column)}function n(e){return e&&"object"===typeof e||(e={}),r(e.start)+"-"+r(e.end)}function a(e){return e&&"number"===typeof e?e:1}e.exports=function(e){if(!e||"object"!==typeof e)return"";if(t.call(e,"position")||t.call(e,"type"))return n(e.position);if(t.call(e,"start")||t.call(e,"end"))return n(e);if(t.call(e,"line")||t.call(e,"column"))return r(e);return""}},851:(e,t,r)=>{"use strict";var n=r(6934);function a(){}e.exports=i,a.prototype=Error.prototype,i.prototype=new a;var s=i.prototype;function i(e,t,r){var a,s,i;"string"===typeof t&&(r=t,t=null),a=function(e){var t,r=[null,null];"string"===typeof e&&(-1===(t=e.indexOf(":"))?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1)));return r}(r),s=n(t)||"1:1",i={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(i=t,t=t.start):i.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=s,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=i,this.source=a[0],this.ruleId=a[1]}s.file="",s.name="",s.reason="",s.message="",s.stack="",s.fatal=null,s.column=null,s.line=null},9418:(e,t,r)=>{"use strict";e.exports=r(2276)},8884:(e,t,r)=>{"use strict";var n=r(4322),a=r(8833),s=r(1046);e.exports=d;var i={}.hasOwnProperty,o=["history","path","basename","stem","extname","dirname"];function d(e){var t,r;if(e){if("string"===typeof e||s(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof d))return new d(e);for(this.data={},this.messages=[],this.history=[],this.cwd=a.cwd(),r=-1;++r-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+n.sep+"`")}function l(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}d.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(d.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){l(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(d.prototype,"dirname",{get:function(){return"string"===typeof this.path?n.dirname(this.path):void 0},set:function(e){u(this.path,"dirname"),this.path=n.join(e||"",this.basename)}}),Object.defineProperty(d.prototype,"basename",{get:function(){return"string"===typeof this.path?n.basename(this.path):void 0},set:function(e){l(e,"basename"),c(e,"basename"),this.path=n.join(this.dirname||"",e)}}),Object.defineProperty(d.prototype,"extname",{get:function(){return"string"===typeof this.path?n.extname(this.path):void 0},set:function(e){if(c(e,"extname"),u(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=n.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(d.prototype,"stem",{get:function(){return"string"===typeof this.path?n.basename(this.path,this.extname):void 0},set:function(e){l(e,"stem"),c(e,"stem"),this.path=n.join(this.dirname||"",e+(this.extname||""))}})},2276:(e,t,r)=>{"use strict";var n=r(851),a=r(8884);e.exports=a,a.prototype.message=function(e,t,r){var a=new n(e,t,r);this.path&&(a.name=this.path+":"+a.name,a.file=this.path);return a.fatal=!1,this.messages.push(a),a},a.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},a.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},4322:(e,t)=>{"use strict";function r(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var n,a,s,i,o=0,d=-1;if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');if(r(e),n=e.length,void 0===t||!t.length||t.length>e.length){for(;n--;)if(47===e.charCodeAt(n)){if(s){o=n+1;break}}else d<0&&(s=!0,d=n+1);return d<0?"":e.slice(o,d)}if(t===e)return"";a=-1,i=t.length-1;for(;n--;)if(47===e.charCodeAt(n)){if(s){o=n+1;break}}else a<0&&(s=!0,a=n+1),i>-1&&(e.charCodeAt(n)===t.charCodeAt(i--)?i<0&&(d=n):(i=-1,d=a));o===d?d=a:d<0&&(d=e.length);return e.slice(o,d)},t.dirname=function(e){var t,n,a;if(r(e),!e.length)return".";t=-1,a=e.length;for(;--a;)if(47===e.charCodeAt(a)){if(n){t=a;break}}else n||(n=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,n,a,s=-1,i=0,o=-1,d=0;r(e),a=e.length;for(;a--;)if(47!==(n=e.charCodeAt(a)))o<0&&(t=!0,o=a+1),46===n?s<0?s=a:1!==d&&(d=1):s>-1&&(d=-1);else if(t){i=a+1;break}if(s<0||o<0||0===d||1===d&&s===o-1&&s===i+1)return"";return e.slice(s,o)},t.join=function(){var e,t=-1;for(;++t2){if((n=a.lastIndexOf("/"))!==a.length-1){n<0?(a="",s=0):s=(a=a.slice(0,n)).length-1-a.lastIndexOf("/"),i=d,o=0;continue}}else if(a.length){a="",s=0,i=d,o=0;continue}t&&(a=a.length?a+"/..":"..",s=2)}else a.length?a+="/"+e.slice(i+1,d):a=e.slice(i+1,d),s=d-i-1;i=d,o=0}else 46===r&&o>-1?o++:o=-1}return a}(e,!t),n.length||t||(n=".");n.length&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},t.sep="/"},8833:(e,t)=>{"use strict";t.cwd=function(){return"/"}},4400:e=>{"use strict";var t,r="";e.exports=function(e,n){if("string"!==typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var a=e.length*n;if(t!==e||"undefined"===typeof t)t=e,r="";else if(r.length>=a)return r.substr(0,a);for(;a>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,a)}},1752:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(5965));t.default=function(e,t){var r=null;if(!e||"string"!==typeof e)return r;var n=(0,a.default)(e),s="function"===typeof t;return n.forEach((function(e){if("declaration"===e.type){var n=e.property,a=e.value;s?t(n,a,e):a&&((r=r||{})[n]=a)}})),r}},872:function(e,t,r){!function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!==typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var n=Object.freeze({__proto__:null,get DEFAULT_EXTENSIONS(){return Q7},get File(){return gQ},get buildExternalHelpers(){return UQ},get createConfigItem(){return G4},get createConfigItemAsync(){return U4},get createConfigItemSync(){return H4},get getEnv(){return n$},get loadOptions(){return B4},get loadOptionsAsync(){return F4},get loadOptionsSync(){return L4},get loadPartialConfig(){return D4},get loadPartialConfigAsync(){return P4},get loadPartialConfigSync(){return I4},get parse(){return K7},get parseAsync(){return X7},get parseSync(){return Y7},get resolvePlugin(){return ZQ},get resolvePreset(){return e$},get template(){return $U},get tokTypes(){return QB},get transform(){return F7},get transformAsync(){return B7},get transformFile(){return M7},get transformFileAsync(){return H7},get transformFileSync(){return U7},get transformFromAst(){return q7},get transformFromAstAsync(){return z7},get transformFromAstSync(){return W7},get transformSync(){return L7},get traverse(){return cz},get types(){return bx},get version(){return J7}});function a(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,s,i,o=[],d=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);d=!0);}catch(e){c=!0,a=e}finally{try{if(!d&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return o}}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",d=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var s=t&&t.prototype instanceof b?t:b,i=Object.create(s.prototype),o=new P(n||[]);return a(i,"_invoke",{value:j(e,r,o)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",g="suspendedYield",h="executing",m="completed",y={};function b(){}function v(){}function R(){}var x={};l(x,o,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(I([])));T&&T!==r&&n.call(T,o)&&(x=T);var w=R.prototype=b.prototype=Object.create(x);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function r(a,s,i,o){var d=p(e[a],e,s);if("throw"!==d.type){var c=d.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(d.arg)}var s;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return s=s?s.then(a,a):a()}})}function j(t,r,n){var a=f;return function(s,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===s)throw i;return{value:e,done:!0}}for(n.method=s,n.arg=i;;){var o=n.delegate;if(o){var d=C(o,n);if(d){if(d===y)continue;return d}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var c=p(t,r,n);if("normal"===c.type){if(a=n.done?m:g,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function C(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=p(a,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,y;var i=s.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function r(){for(;++a=0;--s){var i=this.tryEntries[s],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var d=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(d&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,r,n,a,s,i){try{var o=e[s](i),d=o.value}catch(bZ){return void r(bZ)}o.done?t(d):Promise.resolve(d).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var s=e.apply(t,r);function o(e){i(s,n,a,o,d,"next",e)}function d(e){i(s,n,a,o,d,"throw",e)}o(void 0)}))}}function d(e,t){for(var r=0;r=0||(a[r]=e[r]);return a}function b(e,t){if(null==e)return{};var r,n,a=y(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e,t){return t||(t=e.slice(0)),e.raw=t,e}function x(e,t){return w(e)||a(e,t)||A(e,t)||k()}function E(e){return T(e)||S(e)||A(e)||C()}function T(e){if(Array.isArray(e))return j(e)}function w(e){if(Array.isArray(e))return e}function S(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(e,t){if(e){if("string"===typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function I(e){var t=P(e,"string");return"symbol"===typeof t?t:String(t)}var D=["Identifier","JSXIdentifier"],N=["MemberExpression"],O=["Identifier"],F=["Statement"],L=["Expression"],B=["Scopable","Pattern"],M=null,U=null,H=["VariableDeclaration"],G=null,q=null,W=null,z=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],V=["RestElement"],K=["RestElement"],Y=["ExistsTypeAnnotation"],X=["NumberLiteralTypeAnnotation"],J=["ForOfStatement"],Q=Object.freeze({__proto__:null,BindingIdentifier:O,BlockScoped:U,ExistentialTypeParam:Y,Expression:L,Flow:z,ForAwaitStatement:J,Generated:q,NumericLiteralTypeAnnotation:X,Pure:W,Referenced:M,ReferencedIdentifier:D,ReferencedMemberExpression:N,RestProperty:V,Scope:B,SpreadProperty:K,Statement:F,User:G,Var:H});function $(e,t){for(var r=0,n=Object.keys(t);ra.length)return!1;for(var i=0,o=s.length-1;i1)for(var r=1;re)return!1;if((r+=t[n+1])>=e)return!0}return!1}function zi(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Ui.test(String.fromCharCode(e)):Wi(e,Gi)))}function Vi(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Hi.test(String.fromCharCode(e)):Wi(e,Gi)||Wi(e,qi))))}function Ki(e){for(var t=!0,r=0;r=48&&e<=57},so={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},io={bin:function(e){return 48===e||49===e},oct:function(e){return e>=48&&e<=55},dec:function(e){return e>=48&&e<=57},hex:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}};function oo(e,t,r,n,a,s){for(var i=r,o=n,d=a,c="",l=null,u=r,p=t.length;;){if(r>=p){s.unterminated(i,o,d),c+=t.slice(u,r);break}var f=t.charCodeAt(r);if(co(e,f,t,r)){c+=t.slice(u,r);break}if(92===f){c+=t.slice(u,r);var g=lo(t,r,n,a,"template"===e,s);null!==g.ch||l?c+=g.ch:l={pos:r,lineStart:n,curLine:a},r=g.pos,n=g.lineStart,a=g.curLine,u=r}else 8232===f||8233===f?(++a,n=++r):10===f||13===f?"template"===e?(c+=t.slice(u,r)+"\n",++r,13===f&&10===t.charCodeAt(r)&&++r,++a,u=n=r):s.unterminated(i,o,d):++r}return{pos:r,str:c,firstInvalidLoc:l,lineStart:n,curLine:a,containsInvalid:!!l}}function co(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function lo(e,t,r,n,a,s){var i=!a;t++;var o=function(e){return{pos:t,ch:e,lineStart:r,curLine:n}},d=e.charCodeAt(t++);switch(d){case 110:return o("\n");case 114:return o("\r");case 120:var c,l=uo(e,t,r,n,2,!1,i,s);return c=l.code,t=l.pos,o(null===c?null:String.fromCharCode(c));case 117:var u,p=fo(e,t,r,n,i,s);return u=p.code,t=p.pos,o(null===u?null:String.fromCodePoint(u));case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(a)return o(null);s.strictNumericEscape(t-1,r,n);default:if(d>=48&&d<=55){var f=t-1,g=e.slice(f,t+2).match(/^[0-7]+/)[0],h=parseInt(g,8);h>255&&(g=g.slice(0,-1),h=parseInt(g,8)),t+=g.length-1;var m=e.charCodeAt(t);if("0"!==g||56===m||57===m){if(a)return o(null);s.strictNumericEscape(f,r,n)}return o(String.fromCharCode(h))}return o(String.fromCharCode(d))}}function uo(e,t,r,n,a,s,i,o){var d,c=t,l=po(e,t,r,n,16,a,s,!1,o,!i);return d=l.n,t=l.pos,null===d&&(i?o.invalidEscapeSequence(c,r,n):t=c-1),{code:d,pos:t}}function po(e,t,r,n,a,s,i,o,d,c){for(var l=t,u=16===a?so.hex:so.decBinOct,p=16===a?io.hex:10===a?io.dec:8===a?io.oct:io.bin,f=!1,g=0,h=0,m=null==s?1/0:s;h=97?y-97+10:y>=65?y-65+10:ao(y)?y-48:1/0)>=a){if(b<=9&&c)return{n:null,pos:t};if(b<=9&&d.invalidDigit(t,r,n,a))b=0;else{if(!i)break;b=0,f=!0}}++t,g=g*a+b}else{var v=e.charCodeAt(t-1),R=e.charCodeAt(t+1);if(o){if(Number.isNaN(R)||!p(R)||u.has(v)||u.has(R)){if(c)return{n:null,pos:t};d.unexpectedNumericSeparator(t,r,n)}}else{if(c)return{n:null,pos:t};d.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===l||null!=s&&t-l!==s||f?{n:null,pos:t}:{n:g,pos:t}}function fo(e,t,r,n,a,s){var i;if(123===e.charCodeAt(t)){var o=uo(e,++t,r,n,e.indexOf("}",t)-t,!0,a,s);if(i=o.code,t=o.pos,++t,null!==i&&i>1114111){if(!a)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else{var d=uo(e,t,r,n,4,!1,a,s);i=d.code,t=d.pos}return{code:i,pos:t}}var go=["consequent","body","alternate"],ho=["body","expressions"],mo=["left","init"],yo=["leadingComments","trailingComments","innerComments"],bo=["||","&&","??"],vo=["++","--"],Ro=[">","<",">=","<="],xo=["==","===","!=","!=="],Eo=[].concat(xo,["in","instanceof"]),To=[].concat(E(Eo),Ro),wo=["-","/","%","*","**","&","|",">>",">>>","<<","^"],So=["+"].concat(wo,E(To),["|>"]),Ao=["=","+="].concat(E(wo.map((function(e){return e+"="}))),E(bo.map((function(e){return e+"="})))),jo=["delete","!"],Co=["+","-","~"],ko=["typeof"],_o=["void","throw"].concat(jo,Co,ko),Po={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},Io=Symbol.for("var used to be block scoped"),Do=Symbol.for("should not be considered a local binding"),No={},Oo={},Fo={},Lo={},Bo={},Mo={},Uo={};function Ho(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function Go(e){return{validate:e}}function qo(e){return"string"===typeof e?$o(e):$o.apply(void 0,E(e))}function Wo(e){return Go(qo(e))}function zo(e){return{validate:e,optional:!0}}function Vo(e){return{validate:qo(e),optional:!0}}function Ko(e){return nd(ed("array"),Jo(e))}function Yo(e){return Ko(qo(e))}function Xo(e){return Go(Yo(e))}function Jo(e){function t(t,r,n){if(Array.isArray(n))for(var a=0;a=2&&"type"in t[0]&&"array"===t[0].type&&!("each"in t[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return n}var ad=["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate"],sd=["default","optional","deprecated","validate"],id={};function od(){for(var e=arguments.length,t=new Array(e),r=0;r0:d&&"object"===typeof d)throw new Error("field defaults can only be primitives or empty arrays currently");n[i]={default:Array.isArray(d)?[]:d,optional:o.optional,deprecated:o.deprecated,validate:o.validate}}for(var c=t.visitor||r.visitor||[],l=t.aliases||r.aliases||[],u=t.builder||r.builder||t.visitor||[],p=0,f=Object.keys(t);p+s+1)throw new TypeError("RestElement must be last element of "+a)}}}),cd("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:$o("Expression"),optional:!0}}}),cd("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:nd(ed("array"),Jo($o("Expression")))}},aliases:["Expression"]}),cd("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:$o("Expression")}}}),cd("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:$o("Expression"),optional:!0},consequent:{validate:nd(ed("array"),Jo($o("Statement")))}}}),cd("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:$o("Expression")},cases:{validate:nd(ed("array"),Jo($o("SwitchCase")))}}}),cd("ThisExpression",{aliases:["Expression"]}),cd("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:$o("Expression")}}}),cd("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:nd($o("BlockStatement"),Object.assign((function(e){if(ki.env.BABEL_TYPES_8_BREAKING&&!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")}),{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:$o("CatchClause")},finalizer:{optional:!0,validate:$o("BlockStatement")}}}),cd("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:$o("Expression")},operator:{validate:Qo.apply(void 0,E(_o))}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),cd("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:ki.env.BABEL_TYPES_8_BREAKING?$o("Identifier","MemberExpression"):$o("Expression")},operator:{validate:Qo.apply(void 0,E(vo))}},visitor:["argument"],aliases:["Expression"]}),cd("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:ed("boolean"),optional:!0},kind:{validate:Qo("var","let","const","using","await using")},declarations:{validate:nd(ed("array"),Jo($o("VariableDeclarator")))}},validate:function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&Li("ForXStatement",e,{left:r})&&1!==r.declarations.length)throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a "+e.type)}}),cd("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!ki.env.BABEL_TYPES_8_BREAKING)return $o("LVal");var e=$o("Identifier","ArrayPattern","ObjectPattern"),t=$o("Identifier");return function(r,n,a){(r.init?e:t)(r,n,a)}}()},definite:{optional:!0,validate:ed("boolean")},init:{optional:!0,validate:$o("Expression")}}}),cd("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:$o("Expression")},body:{validate:$o("Statement")}}}),cd("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:$o("Expression")},body:{validate:$o("Statement")}}}),cd("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{left:{validate:$o("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:$o("Expression")},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0}})}),cd("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{elements:{validate:nd(ed("array"),Jo(Zo("null","PatternLike","LVal")))}})}),cd("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},ld(),ud(),{expression:{validate:ed("boolean")},body:{validate:$o("BlockStatement","Expression")},predicate:{validate:$o("DeclaredPredicate","InferredPredicate"),optional:!0}})}),cd("ClassBody",{visitor:["body"],fields:{body:{validate:nd(ed("array"),Jo($o("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")))}}}),cd("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:$o("Identifier"),optional:!0},typeParameters:{validate:$o("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:$o("ClassBody")},superClass:{optional:!0,validate:$o("Expression")},superTypeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:nd(ed("array"),Jo($o("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},mixins:{validate:$o("InterfaceExtends"),optional:!0}}}),cd("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:$o("Identifier"),optional:!0},typeParameters:{validate:$o("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:$o("ClassBody")},superClass:{optional:!0,validate:$o("Expression")},superTypeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:nd(ed("array"),Jo($o("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},mixins:{validate:$o("InterfaceExtends"),optional:!0},declare:{validate:ed("boolean"),optional:!0},abstract:{validate:ed("boolean"),optional:!0}},validate:function(){var e=$o("Identifier");return function(t,r,n){ki.env.BABEL_TYPES_8_BREAKING&&(Li("ExportDefaultDeclaration",t)||e(n,"id",n.id))}}()}),cd("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:$o("StringLiteral")},exportKind:zo(Qo("type","value")),attributes:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))}}}),cd("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{validate:$o("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression")},exportKind:zo(Qo("value"))}}),cd("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:nd($o("Declaration"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")}),{oneOfNodeTypes:["Declaration"]}),(function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&e.source)throw new TypeError("Cannot export a declaration from a source")}))},attributes:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},specifiers:{default:[],validate:nd(ed("array"),Jo(function(){var e=$o("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=$o("ExportSpecifier");return ki.env.BABEL_TYPES_8_BREAKING?function(r,n,a){(r.source?e:t)(r,n,a)}:e}()))},source:{validate:$o("StringLiteral"),optional:!0},exportKind:zo(Qo("type","value"))}}),cd("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")},exported:{validate:$o("Identifier","StringLiteral")},exportKind:{validate:Qo("type","value"),optional:!0}}}),cd("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!ki.env.BABEL_TYPES_8_BREAKING)return $o("VariableDeclaration","LVal");var e=$o("VariableDeclaration"),t=$o("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return function(r,n,a){Li("VariableDeclaration",a)?e(r,n,a):t(r,n,a)}}()},right:{validate:$o("Expression")},body:{validate:$o("Statement")},await:{default:!1}}}),cd("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{attributes:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},module:{optional:!0,validate:ed("boolean")},phase:{default:null,validate:Qo("source","defer")},specifiers:{validate:nd(ed("array"),Jo($o("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:$o("StringLiteral")},importKind:{validate:Qo("type","typeof","value"),optional:!0}}}),cd("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")}}}),cd("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")}}}),cd("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")},imported:{validate:$o("Identifier","StringLiteral")},importKind:{validate:Qo("type","typeof","value"),optional:!0}}}),cd("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:Qo("source","defer")},source:{validate:$o("Expression")},options:{validate:$o("Expression"),optional:!0}}}),cd("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:nd($o("Identifier"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING){var n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta"}if(!Li("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")}}),{oneOfNodeTypes:["Identifier"]}))},property:{validate:$o("Identifier")}}});var gd=function(){return{abstract:{validate:ed("boolean"),optional:!0},accessibility:{validate:Qo("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:ed("boolean"),optional:!0},key:{validate:nd(function(){var e=$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=$o("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}}},hd=function(){return Object.assign({},ld(),gd(),{params:{validate:nd(ed("array"),Jo($o("Identifier","Pattern","RestElement","TSParameterProperty")))},kind:{validate:Qo("get","set","method","constructor"),default:"method"},access:{validate:nd(ed("string"),Qo("public","private","protected")),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0}})};cd("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},hd(),ud(),{body:{validate:$o("BlockStatement")}})}),cd("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{properties:{validate:nd(ed("array"),Jo($o("RestElement","ObjectProperty")))}})}),cd("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:$o("Expression")}}}),cd("Super",{aliases:["Expression"]}),cd("TaggedTemplateExpression",{visitor:["tag","quasi","typeParameters"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:$o("Expression")},quasi:{validate:$o("TemplateLiteral")},typeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),cd("TemplateElement",{builder:["value","tail"],fields:{value:{validate:nd(td({raw:{validate:ed("string")},cooked:{validate:ed("string"),optional:!0}}),(function(e){var t=e.value.raw,r=!1,n=function(){throw new Error("Internal @babel/types error.")},a=oo("template",t,0,0,0,{unterminated:function(){r=!0},strictNumericEscape:n,invalidEscapeSequence:n,numericSeparatorInEscapeSequence:n,unexpectedNumericSeparator:n,invalidDigit:n,invalidCodePoint:n}),s=a.str,i=a.firstInvalidLoc;if(!r)throw new Error("Invalid raw");e.value.cooked=i?null:s}))},tail:{default:!1}}}),cd("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:nd(ed("array"),Jo($o("TemplateElement")))},expressions:{validate:nd(ed("array"),Jo($o("Expression","TSType")),(function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError("Number of "+e.type+" quasis should be exactly one more than the number of expressions.\nExpected "+(r.length+1)+" quasis but got "+e.quasis.length)}))}}}),cd("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:nd(ed("boolean"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}),{type:"boolean"})),default:!1},argument:{optional:!0,validate:$o("Expression")}}}),cd("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:$o("Expression")}}}),cd("Import",{aliases:["Expression"]}),cd("BigIntLiteral",{builder:["value"],fields:{value:{validate:ed("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),cd("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:$o("Identifier")}}}),cd("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:$o("Expression")},property:{validate:function(){var e=$o("Identifier"),t=$o("Expression"),r=Object.assign((function(r,n,a){(r.computed?t:e)(r,n,a)}),{oneOfNodeTypes:["Expression","Identifier"]});return r}()},computed:{default:!1},optional:{validate:ki.env.BABEL_TYPES_8_BREAKING?nd(ed("boolean"),rd()):ed("boolean")}}}),cd("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:$o("Expression")},arguments:{validate:nd(ed("array"),Jo($o("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:ki.env.BABEL_TYPES_8_BREAKING?nd(ed("boolean"),rd()):ed("boolean")},typeArguments:{validate:$o("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:$o("TSTypeParameterInstantiation"),optional:!0}}}),cd("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},gd(),{value:{validate:$o("Expression"),optional:!0},definite:{validate:ed("boolean"),optional:!0},typeAnnotation:{validate:$o("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},readonly:{validate:ed("boolean"),optional:!0},declare:{validate:ed("boolean"),optional:!0},variance:{validate:$o("Variance"),optional:!0}})}),cd("ClassAccessorProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],fields:Object.assign({},gd(),{key:{validate:nd(function(){var e=$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=$o("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:$o("Expression"),optional:!0},definite:{validate:ed("boolean"),optional:!0},typeAnnotation:{validate:$o("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},readonly:{validate:ed("boolean"),optional:!0},declare:{validate:ed("boolean"),optional:!0},variance:{validate:$o("Variance"),optional:!0}})}),cd("ClassPrivateProperty",{visitor:["key","value","decorators","typeAnnotation"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:$o("PrivateName")},value:{validate:$o("Expression"),optional:!0},typeAnnotation:{validate:$o("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},static:{validate:ed("boolean"),default:!1},readonly:{validate:ed("boolean"),optional:!0},definite:{validate:ed("boolean"),optional:!0},variance:{validate:$o("Variance"),optional:!0}}}),cd("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},hd(),ud(),{kind:{validate:Qo("get","set","method"),default:"method"},key:{validate:$o("PrivateName")},body:{validate:$o("BlockStatement")}})}),cd("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:$o("Identifier")}}}),cd("StaticBlock",{visitor:["body"],fields:{body:{validate:nd(ed("array"),Jo($o("Statement")))}},aliases:["Scopable","BlockParent","FunctionParent"]});var md=od("Flow"),yd=function(e){var t="DeclareClass"===e;md(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends"].concat(E(t?["mixins","implements"]:[]),["body"]),aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),extends:zo(Yo("InterfaceExtends"))},t?{mixins:zo(Yo("InterfaceExtends")),implements:zo(Yo("ClassImplements"))}:{},{body:Wo("ObjectTypeAnnotation")})})};md("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:Wo("FlowType")}}),md("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("boolean"))}}),md("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ClassImplements",{visitor:["id","typeParameters"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterInstantiation")}}),yd("DeclareClass"),md("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),predicate:Vo("DeclaredPredicate")}}),yd("DeclareInterface"),md("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo(["Identifier","StringLiteral"]),body:Wo("BlockStatement"),kind:zo(Qo("CommonJS","ES"))}}),md("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:Wo("TypeAnnotation")}}),md("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),right:Wo("FlowType")}}),md("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),supertype:Vo("FlowType"),impltype:Vo("FlowType")}}),md("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier")}}),md("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:Vo("Flow"),specifiers:zo(Yo(["ExportSpecifier","ExportNamespaceSpecifier"])),source:Vo("StringLiteral"),default:zo(ed("boolean"))}}),md("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:Wo("StringLiteral"),exportKind:zo(Qo("type","value"))}}),md("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:Wo("Flow")}}),md("ExistsTypeAnnotation",{aliases:["FlowType"]}),md("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:Vo("TypeParameterDeclaration"),params:Go(Yo("FunctionTypeParam")),rest:Vo("FunctionTypeParam"),this:Vo("FunctionTypeParam"),returnType:Wo("FlowType")}}),md("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:Vo("Identifier"),typeAnnotation:Wo("FlowType"),optional:zo(ed("boolean"))}}),md("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:Wo(["Identifier","QualifiedTypeIdentifier"]),typeParameters:Vo("TypeParameterInstantiation")}}),md("InferredPredicate",{aliases:["FlowPredicate"]}),md("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:Wo(["Identifier","QualifiedTypeIdentifier"]),typeParameters:Vo("TypeParameterInstantiation")}}),yd("InterfaceDeclaration"),md("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:zo(Yo("InterfaceExtends")),body:Wo("ObjectTypeAnnotation")}}),md("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:Wo("FlowType")}}),md("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("number"))}}),md("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:Go(Yo(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:{validate:Yo("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:Yo("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:Yo("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:ed("boolean"),default:!1},inexact:zo(ed("boolean"))}}),md("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:Wo("Identifier"),value:Wo("FlowType"),optional:Go(ed("boolean")),static:Go(ed("boolean")),method:Go(ed("boolean"))}}),md("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:Wo("FlowType"),static:Go(ed("boolean"))}}),md("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:Vo("Identifier"),key:Wo("FlowType"),value:Wo("FlowType"),static:Go(ed("boolean")),variance:Vo("Variance")}}),md("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:Wo(["Identifier","StringLiteral"]),value:Wo("FlowType"),kind:Go(Qo("init","get","set")),static:Go(ed("boolean")),proto:Go(ed("boolean")),optional:Go(ed("boolean")),variance:Vo("Variance"),method:Go(ed("boolean"))}}),md("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:Wo("FlowType")}}),md("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),supertype:Vo("FlowType"),impltype:Wo("FlowType")}}),md("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:Wo("Identifier"),qualification:Wo(["Identifier","QualifiedTypeIdentifier"])}}),md("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("string"))}}),md("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:Wo("FlowType")}}),md("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),right:Wo("FlowType")}}),md("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:Wo("FlowType")}}),md("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:Wo("Expression"),typeAnnotation:Wo("TypeAnnotation")}}),md("TypeParameter",{visitor:["bound","default","variance"],fields:{name:Go(ed("string")),bound:Vo("TypeAnnotation"),default:Vo("FlowType"),variance:Vo("Variance")}}),md("TypeParameterDeclaration",{visitor:["params"],fields:{params:Go(Yo("TypeParameter"))}}),md("TypeParameterInstantiation",{visitor:["params"],fields:{params:Go(Yo("FlowType"))}}),md("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("Variance",{builder:["kind"],fields:{kind:Go(Qo("minus","plus"))}}),md("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:Wo("Identifier"),body:Wo(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),md("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo("EnumBooleanMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo("EnumNumberMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:Xo("EnumDefaultedMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Wo("Identifier"),init:Wo("BooleanLiteral")}}),md("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Wo("Identifier"),init:Wo("NumericLiteral")}}),md("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Wo("Identifier"),init:Wo("StringLiteral")}}),md("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Wo("Identifier")}}),md("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Wo("FlowType"),indexType:Wo("FlowType")}}),md("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Wo("FlowType"),indexType:Wo("FlowType"),optional:Go(ed("boolean"))}});var bd=od("JSX");bd("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:$o("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:$o("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),bd("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:$o("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),bd("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:$o("JSXOpeningElement")},closingElement:{optional:!0,validate:$o("JSXClosingElement")},children:{validate:nd(ed("array"),Jo($o("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}},{selfClosing:{validate:ed("boolean"),optional:!0}})}),bd("JSXEmptyExpression",{}),bd("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:$o("Expression","JSXEmptyExpression")}}}),bd("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:$o("Expression")}}}),bd("JSXIdentifier",{builder:["name"],fields:{name:{validate:ed("string")}}}),bd("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:$o("JSXMemberExpression","JSXIdentifier")},property:{validate:$o("JSXIdentifier")}}}),bd("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:$o("JSXIdentifier")},name:{validate:$o("JSXIdentifier")}}}),bd("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:$o("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:{validate:nd(ed("array"),Jo($o("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),bd("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:$o("Expression")}}}),bd("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:ed("string")}}}),bd("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:$o("JSXOpeningFragment")},closingFragment:{validate:$o("JSXClosingFragment")},children:{validate:nd(ed("array"),Jo($o("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),bd("JSXOpeningFragment",{aliases:["Immutable"]}),bd("JSXClosingFragment",{aliases:["Immutable"]});for(var vd=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],Rd={Declaration:["Statement"],Pattern:["PatternLike","LVal"]},xd=0,Ed=vd;xd=0)){if(Ft(o))return[o];if(Rs(o))n.set(o.type,o);else if(Dr(o))a.has(o.types)||(t.push.apply(t,E(o.types)),a.add(o.types));else if(rr(o)){var d=hv(o.id);if(r.has(d)){var c,l=r.get(d);l.typeParameters?o.typeParameters&&((c=l.typeParameters.params).push.apply(c,E(o.typeParameters.params)),l.typeParameters.params=mv(l.typeParameters.params)):l=o.typeParameters}else r.set(d,o)}else s.push(o)}}for(var u,p=_(n);!(u=p()).done;){var f=x(u.value,2)[1];s.push(f)}for(var g,h=_(r);!(g=h()).done;){var m=x(g.value,2)[1];s.push(m)}return s}function yv(e){var t=mv(e);return 1===t.length?t[0]:xu(t)}function bv(e){return Te(e)?e.name:e.right.name+"."+bv(e.left)}function vv(e){for(var t=Array.from(e),r=new Map,n=new Map,a=new Set,s=[],i=0;i=0)){if(On(o))return[o];if(_s(o))n.set(o.type,o);else if(ia(o))a.has(o.types)||(t.push.apply(t,E(o.types)),a.add(o.types));else if(Qn(o)&&o.typeParameters){var d=bv(o.typeName);if(r.has(d)){var c,l=r.get(d);l.typeParameters?o.typeParameters&&((c=l.typeParameters.params).push.apply(c,E(o.typeParameters.params)),l.typeParameters.params=vv(l.typeParameters.params)):l=o.typeParameters}else r.set(d,o)}else s.push(o)}}for(var u,p=_(n);!(u=p()).done;){var f=x(u.value,2)[1];s.push(f)}for(var g,h=_(r);!(g=h()).done;){var m=x(g.value,2)[1];s.push(m)}return s}function Rv(e){var t=e.map((function(e){return Da(e)?e.typeAnnotation:e})),r=vv(t);return 1===r.length?r[0]:Kp(r)}function xv(){return Oc("void",hc(0),!0)}var Ev=Function.call.bind(Object.prototype.hasOwnProperty);function Tv(e,t,r,n){return e&&"string"===typeof e.type?Av(e,t,r,n):e}function wv(e,t,r,n){return Array.isArray(e)?e.map((function(e){return Tv(e,t,r,n)})):Tv(e,t,r,n)}function Sv(e,t,r){return void 0===t&&(t=!0),void 0===r&&(r=!1),Av(e,t,r,new Map)}function Av(e,t,r,n){if(void 0===t&&(t=!0),void 0===r&&(r=!1),!e)return e;var a=e.type,s={type:e.type};if(Te(e))s.name=e.name,Ev(e,"optional")&&"boolean"===typeof e.optional&&(s.optional=e.optional),Ev(e,"typeAnnotation")&&(s.typeAnnotation=t?wv(e.typeAnnotation,!0,r,n):e.typeAnnotation);else{if(!Ev(Lo,a))throw new Error('Unknown node type: "'+a+'"');for(var i=0,o=Object.keys(Lo[a]);i=Number.MAX_SAFE_INTEGER?KR.uid=0:KR.uid++};var XR=Function.call.bind(Object.prototype.toString);function JR(e){return"[object RegExp]"===XR(e)}function QR(e){if("object"!==typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function $R(e){if(void 0===e)return uc("undefined");if(!0===e||!1===e)return yc(e);if(null===e)return mc();if("string"===typeof e)return gc(e);var t;if("number"===typeof e)return t=Number.isFinite(e)?hc(Math.abs(e)):Vd("/",Number.isNaN(e)?hc(0):hc(1),hc(0)),(e<0||Object.is(e,-0))&&(t=Oc("-",t)),t;if(JR(e))return bc(e.source,e.toString().match(/\/([a-z]+|)$/)[1]);if(Array.isArray(e))return Wd(e.map($R));if(QR(e)){for(var r=[],n=0,a=Object.keys(e);n=0)return!0}else if(s===e)return!0}return!1}function ox(e){return Xe(e)&&("var"!==e.kind||e[Io])}function dx(e){return xe(e)||at(e)||ox(e)}function cx(e){return!!Oi(e.type,"Immutable")||!!Te(e)&&"undefined"===e.name}function lx(e,t){if("object"!==typeof e||"object"!==typeof t||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=Object.keys(Lo[e.type]||e.type),n=No[e.type],a=0,s=r;a100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(o){var d=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return d*s;case"weeks":case"week":case"w":return d*a;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function o(a){var s=Math.abs(a);return s>=n?Math.round(a/n)+"d":s>=r?Math.round(a/r)+"h":s>=t?Math.round(a/t)+"m":s>=e?Math.round(a/e)+"s":a+"ms"}function d(a){var s=Math.abs(a);return s>=n?c(a,s,n,"day"):s>=r?c(a,s,r,"hour"):s>=t?c(a,s,t,"minute"):s>=e?c(a,s,e,"second"):a+" ms"}function c(e,t,r,n){var a=t>=1.5*r;return Math.round(e/r)+" "+n+(a?"s":"")}return kE=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return i(e);if("number"===r&&isFinite(e))return t.long?d(e):o(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},kE}function NE(e){function t(e){for(var t=0,n=0;n=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function n(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(a=n))})),t.splice(a,0,r)}}function a(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(bZ){}}function s(){var e;try{e=t.storage.getItem("debug")}catch(bZ){}return!e&&"undefined"!==typeof ki&&"env"in ki&&(e=ki.env.DEBUG),e}function i(){try{return localStorage}catch(bZ){}}t.formatArgs=n,t.save=a,t.load=s,t.useColors=r,t.storage=i(),t.destroy=function(){var e=!1;return function(){e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=OE(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(bZ){return"[UnexpectedJSONParseError]: "+bZ.message}}}(IE,IE.exports);var FE=IE.exports,LE=Sv,BE=Xc,ME=Jc,UE=uc,HE=Lc,GE=Bc;function qE(e){if(!e.isExportDeclaration()||e.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(e.isExportDefaultDeclaration()){var t=e.get("declaration"),r=t.isFunctionDeclaration()||t.isClassDeclaration(),n=t.isFunctionExpression()||t.isClassExpression(),a=t.isScope()?t.scope.parent:t.scope,s=t.node.id,i=!1;s?n&&a.hasBinding(s.name)&&(i=!0,s=a.generateUidIdentifier(s.name)):(i=!0,s=a.generateUidIdentifier("default"),(r||n)&&(t.node.id=LE(s)));var o=r?t.node:HE("var",[GE(LE(s),t.node)]),d=BE(null,[ME(LE(s),UE("default"))]);return e.insertAfter(d),e.replaceWith(o),i&&a.registerDeclaration(e),e}if(e.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");var c=e.get("declaration"),l=c.getOuterBindingIdentifiers(),u=Object.keys(l).map((function(e){return ME(UE(e),UE(e))})),p=BE(null,u);return e.insertAfter(p),e.replaceWith(c.node),e}function WE(e){var t=e.context,r=e.node;if(r.computed&&t.maybeQueue(e.get("key")),r.decorators)for(var n,a=_(e.get("decorators"));!(n=a()).done;){var s=n.value;t.maybeQueue(s)}}var zE={FunctionParent:function(e){e.isArrowFunctionExpression()||(e.skip(),e.isMethod()&&WE(e))},Property:function(e){e.isObjectProperty()||(e.skip(),WE(e))}},VE={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||(e.skip(),e.isMethod()&&WE(e))},ObjectProperty:function(e,t){var r,n=e.node,a=e.scope,s=n.key.name;!n.shorthand||s!==t.oldName&&s!==t.newName||a.getBindingIdentifier(s)!==t.binding.identifier||(n.shorthand=!1,null!=(r=n.extra)&&r.shorthand&&(n.extra.shorthand=!1))},"AssignmentExpression|Declaration|VariableDeclarator":function(e,t){if(!e.isVariableDeclaration()){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}}},KE=function(){function e(e,t,r){this.newName=r,this.oldName=t,this.binding=e}var t=e.prototype;return t.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath;if(t.isExportDeclaration()){if(t.isExportDefaultDeclaration()){var r=t.node.declaration;if(ts(r)&&!r.id)return}t.isExportAllDeclaration()||qE(t)}},t.maybeConvertFromClassFunctionDeclaration=function(e){return e},t.maybeConvertFromClassFunctionExpression=function(e){return e},t.rename=function(){var e=this.binding,t=this.oldName,r=this.newName,n=e.scope,a=e.path,s=a.find((function(e){return e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression()}));s&&s.getOuterBindingIdentifiers()[t]===e.identifier&&this.maybeConvertFromExportDeclaration(s),sz(arguments[0]||n.block,lE(VE),n,this,n.path,{discriminant:!0}),arguments[0]||(n.removeOwnBinding(t),n.bindings[r]=e,this.binding.identifier.name=r),s&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},c(e)}(),YE=function(){function e(e){var t=e.identifier,r=e.scope,n=e.path,a=e.kind;this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=t,this.scope=r,this.path=n,this.kind=a,"var"!==a&&"hoisted"!==a||!XE(n)||this.reassign(n),this.clearValue()}var t=e.prototype;return t.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},t.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},t.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},t.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},t.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},t.dereference=function(){this.references--,this.referenced=!!this.references},c(e)}();function XE(e){for(var t=e.parentPath,r=e.key;t;t=(n=t).parentPath,r=n.key,n){var n;if(t.isFunctionParent())return!1;if(t.isWhile()||t.isForXStatement()||t.isForStatement()&&"body"===r)return!0}return!1}var JE,QE,$E={builtin:{Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es2015:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es2017:{Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{AbortController:!1,AbortSignal:!1,addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,"AudioWorkletGlobalScope ":!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,blur:!1,BroadcastChannel:!1,btoa:!1,BudgetService:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ConvolverNode:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSConditionRule:!1,CSSFontFaceRule:!1,CSSGroupingRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,defaultstatus:!1,defaultStatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FontFaceSetLoadEvent:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDeadline:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,isSecureContext:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,matchMedia:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyMessageEvent:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaSettingsRange:!1,MediaSource:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackEvent:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigationPreloadManager:!1,navigator:!1,Navigator:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!0,onabort:!0,onafterprint:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinstallprompt:!0,onbeforeprint:!0,onbeforeunload:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontextmenu:!0,oncuechange:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpageshow:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onsearch:!0,onseeked:!0,onseeking:!0,onselect:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitionend:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,origin:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,Path2D:!1,PaymentAddress:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,PhotoCapabilities:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableStream:!1,registerProcessor:!1,RemotePlayback:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCIceCandidate:!1,RTCIceGatherer:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceEvent:!1,RTCRtpContributingSource:!1,RTCRtpReceiver:!1,RTCRtpSender:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedWorker:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageEvent:!1,StorageManager:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,TaskAttributionTiming:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,WritableStream:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XSLTProcessor:!1},worker:{addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,queueMicrotask:!1,removeEventListener:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,WorkerGlobalScope:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,global:!1,Intl:!1,module:!1,process:!1,queueMicrotask:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1},commonjs:{exports:!0,global:!1,module:!1,require:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fdescribe:!1,fit:!1,it:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{_:!1,$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,console:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,queueMicrotask:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,XMLHttpRequest:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},protractor:{$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1,URL:!1,URLSearchParams:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},devtools:{$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1}};function ZE(){return QE?JE:(QE=1,JE=$E)}function eT(e){return null!=e&&e&&"false"!==e&&"0"!==e}var tT=(eT(ki.env.BABEL_8_BREAKING),ZE()),rT=Do,nT=$d,aT=Sv,sT=rx,iT=uc,oT=re,dT=Ma,cT=ps,lT=rt,uT=at,pT=st,fT=it,gT=ot,hT=xe,mT=Te,yT=lt,bT=ss,vT=os,RT=hs,xT=Ce,ET=Oe,TT=cs,wT=es,ST=_e,AT=vt,jT=Rt,CT=Et,kT=We,_T=Ke,PT=Xe,IT=Fs,DT=Rc,NT=hc,OT=BR,FT=Lc,LT=Bc,BT=bn,MT=vn,UT=Le,HT=En,GT=ht,qT=Nt,WT=gs,zT=xv;function VT(e,t){switch(null==e?void 0:e.type){default:var r;if(yT(e)||WT(e))if((pT(e)||gT(e)||yT(e))&&e.source)VT(e.source,t);else if((gT(e)||yT(e))&&null!=(r=e.specifiers)&&r.length)for(var n,a=_(e.specifiers);!(n=a()).done;)VT(n.value,t);else(fT(e)||gT(e))&&e.declaration&&VT(e.declaration,t);else RT(e)?VT(e.local,t):!bT(e)||xT(e)||ST(e)||CT(e)||t.push(e.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":VT(e.object,t),VT(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":VT(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(var s,i=_(e.properties);!(s=i()).done;)VT(s.value,t);break;case"SpreadElement":case"RestElement":case"UnaryExpression":case"UpdateExpression":VT(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":VT(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield"),VT(e.argument,t);break;case"AwaitExpression":t.push("await"),VT(e.argument,t);break;case"AssignmentExpression":VT(e.left,t);break;case"VariableDeclarator":case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":case"PrivateName":VT(e.id,t);break;case"ParenthesizedExpression":VT(e.expression,t);break;case"MetaProperty":VT(e.meta,t),VT(e.property,t);break;case"JSXElement":VT(e.openingElement,t);break;case"JSXOpeningElement":VT(e.name,t);break;case"JSXFragment":VT(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":VT(e.namespace,t),VT(e.name,t)}}var KT={ForStatement:function(e){var t=e.get("init");if(t.isVar()){var r=e.scope;(r.getFunctionParent()||r.getProgramParent()).registerBinding("var",t)}},Declaration:function(e){e.isBlockScoped()||e.isImportDeclaration()||e.isExportDeclaration()||(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ImportDeclaration:function(e){e.scope.getBlockParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");if(r.isPattern()||r.isIdentifier())t.constantViolations.push(e);else if(r.isVar()){var n=e.scope;(n.getFunctionParent()||n.getProgramParent()).registerBinding("var",r)}},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope;if(!pT(t)){var n=t.declaration;if(uT(n)||hT(n)){var a=n.id;if(!a)return;var s=r.getBinding(a.name);null==s||s.reference(e)}else if(PT(n))for(var i,o=_(n.declarations);!(i=o()).done;)for(var d=i.value,c=0,l=Object.keys(sT(d));c1&&(r+=t),"_"+r},t.generateUidBasedOnNode=function(e,t){var r=[];VT(e,r);var n=r.join("$");return n=n.replace(/^_/,"")||t||"ref",this.generateUid(n.slice(0,20))},t.generateUidIdentifierBasedOnNode=function(e,t){return iT(this.generateUidBasedOnNode(e,t))},t.isStatic=function(e){if(kT(e)||AT(e)||HT(e))return!0;if(mT(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},t.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t?r:(this.push({id:r}),aT(r))},t.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&"local"!==e.kind&&("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&"const"===t))throw this.hub.buildError(n,'Duplicate declaration "'+r+'"',TypeError)},t.rename=function(e,t){var r=this.getBinding(e);r&&(t||(t=this.generateUidIdentifier(e).name),new KE(r,e,t).rename(arguments[2]))},t._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},t.dump=function(){var e="-".repeat(60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r=0,n=Object.keys(t.bindings);r0)&&this.isPure(e.body,t);if(lT(e)){for(var i,o=_(e.body);!(i=o()).done;){var d=i.value;if(!this.isPure(d,t))return!1}return!0}if(dT(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(oT(e)||MT(e)){for(var c,l=_(e.elements);!(c=l()).done;){var u=c.value;if(null!==u&&!this.isPure(u,t))return!1}return!0}if(ET(e)||BT(e)){for(var p,f=_(e.properties);!(p=f()).done;){var g=p.value;if(!this.isPure(g,t))return!1}return!0}if(vT(e))return!(e.computed&&!this.isPure(e.key,t))&&!((null==(a=e.decorators)?void 0:a.length)>0);if(TT(e))return!(e.computed&&!this.isPure(e.key,t))&&!((null==(s=e.decorators)?void 0:s.length)>0)&&!((UT(e)||e.static)&&null!==e.value&&!this.isPure(e.value,t));if(_T(e))return this.isPure(e.argument,t);if(jT(e))return IT(e.tag,"String.raw")&&!this.hasBinding("String",!0)&&this.isPure(e.quasi,t);if(CT(e)){for(var h,m=_(e.expressions);!(h=m()).done;){var y=h.value;if(!this.isPure(y,t))return!1}return!0}return wT(e)},t.setData=function(e,t){return this.data[e]=t},t.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},t.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},t.init=function(){this.inited||(this.inited=!0,this.crawl())},t.crawl=function(){var e=this.path;this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null);var t=this.getProgramParent();if(!t.crawling){var r={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,"Program"!==e.type&&cE(KT)){for(var n,a=_(KT.enter);!(n=a()).done;)n.value.call(r,e,r);var s=KT[e.type];if(s)for(var i,o=_(s.enter);!(i=o()).done;)i.value.call(r,e,r)}e.traverse(KT,r),this.crawling=!1;for(var d,c=_(r.assignments);!(d=c()).done;){for(var l=d.value,u=l.getBindingIdentifiers(),p=0,f=Object.keys(u);p0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[o-2]?2:"="===e[o-1]?1:0,i=new rw(3*o/4-s),n=s>0?o-4:o;var d=0;for(t=0,r=0;t>16&255,i[d++]=a>>8&255,i[d++]=255&a;return 2===s?(a=tw[e.charCodeAt(t)]<<2|tw[e.charCodeAt(t+1)]>>4,i[d++]=255&a):1===s&&(a=tw[e.charCodeAt(t)]<<10|tw[e.charCodeAt(t+1)]<<4|tw[e.charCodeAt(t+2)]>>2,i[d++]=a>>8&255,i[d++]=255&a),i}function iw(e){return ew[e>>18&63]+ew[e>>12&63]+ew[e>>6&63]+ew[63&e]}function ow(e,t,r){for(var n,a=[],s=t;sd?d:o+i));return 1===n?(t=e[r-1],a+=ew[t>>2],a+=ew[t<<4&63],a+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],a+=ew[t>>10],a+=ew[t>>4&63],a+=ew[t<<2&63],a+="="),s.push(a),s.join("")}function cw(e,t,r,n,a){var s,i,o=8*a-n-1,d=(1<>1,l=-7,u=r?a-1:0,p=r?-1:1,f=e[t+u];for(u+=p,s=f&(1<<-l)-1,f>>=-l,l+=o;l>0;s=256*s+e[t+u],u+=p,l-=8);for(i=s&(1<<-l)-1,s>>=-l,l+=n;l>0;i=256*i+e[t+u],u+=p,l-=8);if(0===s)s=1-c;else{if(s===d)return i?NaN:1/0*(f?-1:1);i+=Math.pow(2,n),s-=c}return(f?-1:1)*i*Math.pow(2,s-n)}function lw(e,t,r,n,a,s){var i,o,d,c=8*s-a-1,l=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,g=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-i))<1&&(i--,d*=2),(t+=i+u>=1?p/d:p*Math.pow(2,1-u))*d>=2&&(i++,d/=2),i+u>=l?(o=0,i=l):i+u>=1?(o=(t*d-1)*Math.pow(2,a),i+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[r+f]=255&o,f+=g,o/=256,a-=8);for(i=i<0;e[r+f]=255&i,f+=g,i/=256,c-=8);e[r+f-g]|=128*h}var uw={}.toString,pw=Array.isArray||function(e){return"[object Array]"==uw.call(e)},fw=50;function gw(){return mw.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function hw(e,t){if(gw()=gw())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gw().toString(16)+" bytes");return 0|e}function Aw(e){return!(null==e||!e._isBuffer)}function jw(e,t){if(Aw(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return nS(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return iS(e).length;default:if(n)return nS(e).length;t=(""+t).toLowerCase(),n=!0}}function Cw(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ww(this,t,r);case"utf8":case"utf-8":return Mw(this,t,r);case"ascii":return Gw(this,t,r);case"latin1":case"binary":return qw(this,t,r);case"base64":return Bw(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zw(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function kw(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _w(e,t,r,n,a){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"===typeof t&&(t=mw.from(t,n)),Aw(t))return 0===t.length?-1:Pw(e,t,r,n,a);if("number"===typeof t)return t&=255,mw.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Pw(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function Pw(e,t,r,n,a){var s,i=1,o=e.length,d=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,o/=2,d/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var l=-1;for(s=r;so&&(r=o-d),s=r;s>=0;s--){for(var u=!0,p=0;pa&&(n=a):n=a;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var i=0;i239?4:c>223?3:c>191?2:1;if(a+u<=r)switch(u){case 1:c<128&&(l=c);break;case 2:128===(192&(s=e[a+1]))&&(d=(31&c)<<6|63&s)>127&&(l=d);break;case 3:s=e[a+1],i=e[a+2],128===(192&s)&&128===(192&i)&&(d=(15&c)<<12|(63&s)<<6|63&i)>2047&&(d<55296||d>57343)&&(l=d);break;case 4:s=e[a+1],i=e[a+2],o=e[a+3],128===(192&s)&&128===(192&i)&&128===(192&o)&&(d=(15&c)<<18|(63&s)<<12|(63&i)<<6|63&o)>65535&&d<1114112&&(l=d)}null===l?(l=65533,u=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=u}return Hw(n)}mw.TYPED_ARRAY_SUPPORT=void 0===Us.TYPED_ARRAY_SUPPORT||Us.TYPED_ARRAY_SUPPORT,gw(),mw.poolSize=8192,mw._augment=function(e){return e.__proto__=mw.prototype,e},mw.from=function(e,t,r){return yw(null,e,t,r)},mw.TYPED_ARRAY_SUPPORT&&(mw.prototype.__proto__=Uint8Array.prototype,mw.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&mw[Symbol.species]),mw.alloc=function(e,t,r){return vw(null,e,t,r)},mw.allocUnsafe=function(e){return Rw(null,e)},mw.allocUnsafeSlow=function(e){return Rw(null,e)},mw.isBuffer=cS,mw.compare=function(e,t){if(!Aw(e)||!Aw(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,s=Math.min(r,n);a0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},mw.prototype.compare=function(e,t,r,n,a){if(!Aw(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),o=Math.min(s,i),d=this.slice(n,a),c=e.slice(t,r),l=0;la)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return Iw(this,e,t,r);case"utf8":case"utf-8":return Dw(this,e,t,r);case"ascii":return Nw(this,e,t,r);case"latin1":case"binary":return Ow(this,e,t,r);case"base64":return Fw(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lw(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},mw.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Uw=4096;function Hw(e){var t=e.length;if(t<=Uw)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var a="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function Kw(e,t,r,n,a,s){if(!Aw(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function Yw(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,s=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function Xw(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,s=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function Jw(e,t,r,n,a,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Qw(e,t,r,n,a){return a||Jw(e,t,r,4),lw(e,t,r,n,23,4),r+4}function $w(e,t,r,n,a){return a||Jw(e,t,r,8),lw(e,t,r,n,52,8),r+8}mw.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},mw.prototype.readUInt8=function(e,t){return t||Vw(e,1,this.length),this[e]},mw.prototype.readUInt16LE=function(e,t){return t||Vw(e,2,this.length),this[e]|this[e+1]<<8},mw.prototype.readUInt16BE=function(e,t){return t||Vw(e,2,this.length),this[e]<<8|this[e+1]},mw.prototype.readUInt32LE=function(e,t){return t||Vw(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},mw.prototype.readUInt32BE=function(e,t){return t||Vw(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},mw.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Vw(e,t,this.length);for(var n=this[e],a=1,s=0;++s=(a*=128)&&(n-=Math.pow(2,8*t)),n},mw.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Vw(e,t,this.length);for(var n=t,a=1,s=this[e+--n];n>0&&(a*=256);)s+=this[e+--n]*a;return s>=(a*=128)&&(s-=Math.pow(2,8*t)),s},mw.prototype.readInt8=function(e,t){return t||Vw(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},mw.prototype.readInt16LE=function(e,t){t||Vw(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},mw.prototype.readInt16BE=function(e,t){t||Vw(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},mw.prototype.readInt32LE=function(e,t){return t||Vw(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},mw.prototype.readInt32BE=function(e,t){return t||Vw(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},mw.prototype.readFloatLE=function(e,t){return t||Vw(e,4,this.length),cw(this,e,!0,23,4)},mw.prototype.readFloatBE=function(e,t){return t||Vw(e,4,this.length),cw(this,e,!1,23,4)},mw.prototype.readDoubleLE=function(e,t){return t||Vw(e,8,this.length),cw(this,e,!0,52,8)},mw.prototype.readDoubleBE=function(e,t){return t||Vw(e,8,this.length),cw(this,e,!1,52,8)},mw.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||Kw(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+a]=e/s&255;return t+r},mw.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,1,255,0),mw.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},mw.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,65535,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yw(this,e,t,!0),t+2},mw.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,65535,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yw(this,e,t,!1),t+2},mw.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,4294967295,0),mw.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Xw(this,e,t,!0),t+4},mw.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,4294967295,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Xw(this,e,t,!1),t+4},mw.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);Kw(this,e,t,r,a-1,-a)}var s=0,i=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},mw.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);Kw(this,e,t,r,a-1,-a)}var s=r-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},mw.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,1,127,-128),mw.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},mw.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,32767,-32768),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yw(this,e,t,!0),t+2},mw.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,32767,-32768),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yw(this,e,t,!1),t+2},mw.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,2147483647,-2147483648),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Xw(this,e,t,!0),t+4},mw.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Xw(this,e,t,!1),t+4},mw.prototype.writeFloatLE=function(e,t,r){return Qw(this,e,t,!0,r)},mw.prototype.writeFloatBE=function(e,t,r){return Qw(this,e,t,!1,r)},mw.prototype.writeDoubleLE=function(e,t,r){return $w(this,e,t,!0,r)},mw.prototype.writeDoubleBE=function(e,t,r){return $w(this,e,t,!1,r)},mw.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(s<1e3||!mw.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(s=t;s55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&s.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function aS(e){for(var t=[],r=0;r>8,a=r%256,s.push(a),s.push(n);return s}function iS(e){return sw(eS(e))}function oS(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function dS(e){return e!==e}function cS(e){return null!=e&&(!!e._isBuffer||lS(e)||uS(e))}function lS(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function uS(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&lS(e.slice(0,0))}var pS,fS={exports:{}};function gS(){return pS||(pS=1,function(e,t){!function(e,r){r(t)}(0,(function(e){for(var t=",".charCodeAt(0),r=";".charCodeAt(0),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),s=new Uint8Array(128),i=0;i>>=1,c&&(a=-2147483648|-a),r[n]+=a,t}function p(e,r,n){return!(r>=n)&&e.charCodeAt(r)!==t}function f(e){e.sort(g)}function g(e,t){return e[0]-t[0]}function h(e){for(var n=new Int32Array(5),a=16384,s=a-36,i=new Uint8Array(a),o=i.subarray(0,s),c=0,l="",u=0;u0&&(c===a&&(l+=d.decode(i),c=0),i[c++]=r),0!==p.length){n[0]=0;for(var f=0;fs&&(l+=d.decode(o),i.copyWithin(0,s,c),c-=s),f>0&&(i[c++]=t),c=m(i,c,n,g,0),1!==g.length&&(c=m(i,c,n,g,1),c=m(i,c,n,g,2),c=m(i,c,n,g,3),4!==g.length&&(c=m(i,c,n,g,4)))}}}return l+d.decode(i.subarray(0,c))}function m(e,t,r,n,s){var i=n[s],o=i-r[s];r[s]=i,o=o<0?-o<<1|1:o<<1;do{var d=31&o;(o>>>=5)>0&&(d|=32),e[t++]=a[d]}while(o>0);return t}e.decode=c,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}))}(0,fS.exports)),fS.exports}var hS,mS={exports:{}},yS={exports:{}};function bS(){return hS||(hS=1,function(e,t){!function(e,r){r(t)}(0,(function(e){for(var t=",".charCodeAt(0),r=";".charCodeAt(0),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),s=new Uint8Array(128),i=0;i>>=1,c&&(a=-2147483648|-a),r[n]+=a,t}function p(e,r,n){return!(r>=n)&&e.charCodeAt(r)!==t}function f(e){e.sort(g)}function g(e,t){return e[0]-t[0]}function h(e){for(var n=new Int32Array(5),a=16384,s=a-36,i=new Uint8Array(a),o=i.subarray(0,s),c=0,l="",u=0;u0&&(c===a&&(l+=d.decode(i),c=0),i[c++]=r),0!==p.length){n[0]=0;for(var f=0;fs&&(l+=d.decode(o),i.copyWithin(0,s,c),c-=s),f>0&&(i[c++]=t),c=m(i,c,n,g,0),1!==g.length&&(c=m(i,c,n,g,1),c=m(i,c,n,g,2),c=m(i,c,n,g,3),4!==g.length&&(c=m(i,c,n,g,4)))}}}return l+d.decode(i.subarray(0,c))}function m(e,t,r,n,s){var i=n[s],o=i-r[s];r[s]=i,o=o<0?-o<<1|1:o<<1;do{var d=31&o;(o>>>=5)>0&&(d|=32),e[t++]=a[d]}while(o>0);return t}e.decode=c,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}))}(0,yS.exports)),yS.exports}var vS,RS={exports:{}};function xS(){return vS||(vS=1,e=RS,function(t,r){e.exports=r()}(0,(function(){var e,t=/^[\w+.-]+:\/\//,r=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function a(e){return t.test(e)}function s(e){return e.startsWith("//")}function i(e){return e.startsWith("/")}function o(e){return e.startsWith("file:")}function d(e){return/^[.?#]/.test(e)}function c(e){var t=r.exec(e);return u(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function l(e){var t=n.exec(e),r=t[2];return u("file:","",t[1]||"","",i(r)?r:"/"+r,t[3]||"",t[4]||"")}function u(t,r,n,a,s,i,o){return{scheme:t,user:r,host:n,port:a,path:s,query:i,hash:o,type:e.Absolute}}function p(t){if(s(t)){var r=c("http:"+t);return r.scheme="",r.type=e.SchemeRelative,r}if(i(t)){var n=c("http://foo.com"+t);return n.scheme="",n.host="",n.type=e.AbsolutePath,n}if(o(t))return l(t);if(a(t))return c(t);var d=c("http://foo.com/"+t);return d.scheme="",d.host="",d.type=t?t.startsWith("?")?e.Query:t.startsWith("#")?e.Hash:e.RelativePath:e.Empty,d}function f(e){if(e.endsWith("/.."))return e;var t=e.lastIndexOf("/");return e.slice(0,t+1)}function g(e,t){h(t,t.type),"/"===e.path?e.path=t.path:e.path=f(t.path)+e.path}function h(t,r){for(var n=r<=e.RelativePath,a=t.path.split("/"),s=1,i=0,o=!1,d=1;da&&(a=i)}h(n,a);var o=n.query+n.hash;switch(a){case e.Hash:case e.Query:return o;case e.RelativePath:var c=n.path.slice(1);return c?d(r||t)&&!d(c)?"./"+c+o:c+o:o||".";case e.AbsolutePath:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}return function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"}(e||(e={})),m}))),RS.exports;var e}!function(e,t){!function(e,r){r(t,bS(),xS())}(0,(function(e,t,r){function n(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var a=n(r);function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),a.default(e,t)}function i(e){if(!e)return"";var t=e.lastIndexOf("/");return e.slice(0,t+1)}var o=0,d=1,l=2,u=3,p=4,f=1,g=2;function h(e,t){var r=m(e,0);if(r===e.length)return e;t||(e=e.slice());for(var n=r;n>1),s=e[a][o]-t;if(0===s)return R=!0,a;s<0?r=a+1:n=a-1}return R=!1,r-1}function E(e,t,r){for(var n=r+1;n=0&&e[n][o]===t;r=n--);return r}function w(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function S(e,t,r,n){var a=r.lastKey,s=r.lastNeedle,i=r.lastIndex,d=0,c=e.length-1;if(n===a){if(t===s)return R=-1!==i&&e[i][o]===t,i;t>=s?d=-1===i?0:i:c=i}return r.lastKey=n,r.lastNeedle=t,r.lastIndex=x(e,t,d,c)}function A(e,t){for(var r=t.map(C),n=0;nt;n--)e[n]=e[n-1];e[t]=r}function C(){return{__proto__:null}}var k=function(t,r){var n="string"===typeof t?JSON.parse(t):t;if(!("sections"in n))return new B(n,r);var a=[],s=[],i=[],o=[];_(n,r,a,s,i,o,0,0,1/0,1/0);var d={version:3,file:n.file,names:o,sources:s,sourcesContent:i,mappings:a};return e.presortedDecodedMap(d)};function _(e,t,r,n,a,s,i,o,d,c){for(var l=e.sections,u=0;ug)return;for(var S=D(n,w),A=0===T?f:0,j=v[T],C=0;C=h)return;if(1!==k.length){var N=y+k[d],O=k[l],F=k[u];S.push(4===k.length?[P,N,O,F]:[P,N,O,F,b+k[p]])}else S.push([P])}}}function I(e,t){for(var r=0;r=a.length)return null;var s=a[r],i=G(s,t._decodedMemo,r,n,L);return-1===i?null:s[i]},e.originalPositionFor=function(t,r){var n=r.line,a=r.column,s=r.bias;if(--n<0)throw new Error(N);if(a<0)throw new Error(O);var i=e.decodedMappings(t);if(n>=i.length)return U(null,null,null,null);var o=i[n],c=G(o,t._decodedMemo,n,a,s||L);if(-1===c)return U(null,null,null,null);var f=o[c];if(1===f.length)return U(null,null,null,null);var g=t.names;return U(t.resolvedSources[f[d]],f[l]+1,f[u],5===f.length?g[f[p]]:null)},e.allGeneratedPositionsFor=function(e,t){return r(e,t.source,t.line,t.column,t.bias||F,!0)},e.generatedPositionFor=function(e,t){return r(e,t.source,t.line,t.column,t.bias||L,!1)},e.eachMapping=function(t,r){for(var n=e.decodedMappings(t),a=t.names,s=t.resolvedSources,i=0;i=0&&!(t>=e[n][s]);r=n--);return r}function h(e,t,r){for(var n=e.length;n>t;n--)e[n]=e[n-1];e[t]=r}function m(e){for(var t=e.length,r=t,n=r-1;n>=0&&!(e[n].length>0);r=n,n--);r1?this._indentChar.repeat(t):this._indentChar}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);10!==e?(this._mark(r.line,r.column,r.identifierName,r.identifierNamePos,r.filename),this._position.column+=t):(this._position.line++,this._position.column=0),this._canMarkIdName&&(r.identifierName=void 0,r.identifierNamePos=void 0)},t._append=function(e,t,r){var n=e.length,a=this._position;if(this._last=e.charCodeAt(n-1),++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e,r||this._map){var s=t.column,i=t.identifierName,o=t.identifierNamePos,d=t.filename,c=t.line;null==i&&null==o||!this._canMarkIdName||(t.identifierName=void 0,t.identifierNamePos=void 0);var l=e.indexOf("\n"),u=0;for(0!==l&&this._mark(c,s,i,o,d);-1!==l;)a.line++,a.column=0,(u=l+1)=0&&10===this._queue[r].char;r--)t++;return t===e&&10===this._last?t+1:t},t.endsWithCharAndNewline=function(){var e=this._queue,t=this._queueCursor;if(0!==t){if(10!==e[t-1].char)return;return t>1?e[t-2].char:this._last}},t.hasContent=function(){return 0!==this._queueCursor||!!this._last},t.exactSource=function(e,t){if(this._map){this.source("start",e);var r=e.identifierName,n=this._sourcePosition;r&&(this._canMarkIdName=!1,n.identifierName=r),t(),r&&(this._canMarkIdName=!0,n.identifierName=void 0,n.identifierNamePos=void 0),this.source("end",e)}else t()},t.source=function(e,t){this._map&&this._normalizePosition(e,t,0)},t.sourceWithOffset=function(e,t,r){this._map&&this._normalizePosition(e,t,r)},t.withSource=function(e,t,r){this._map&&this.source(e,t),r()},t._normalizePosition=function(e,t,r){var n=t[e],a=this._sourcePosition;n&&(a.line=n.line,a.column=Math.max(n.column+r,0),a.filename=t.filename)},t.getCurrentColumn=function(){for(var e=this._queue,t=this._queueCursor,r=-1,n=0,a=0;a",0],["&&",1],["|",2],["^",3],["&",4],["==",5],["===",5],["!=",5],["!==",5],["<",6],[">",6],["<=",6],[">=",6],["in",6],["instanceof",6],[">>",7],["<<",7],[">>>",7],["+",8],["-",8],["*",9],["/",9],["%",9],["**",10]]);function nA(e){return"TSAsExpression"===e||"TSSatisfiesExpression"===e||"TSTypeAssertion"===e}var aA=function(e,t){var r=t.type;return("ClassDeclaration"===r||"ClassExpression"===r)&&t.superClass===e},sA=function(e,t){var r=t.type;return("MemberExpression"===r||"OptionalMemberExpression"===r)&&t.object===e||("CallExpression"===r||"OptionalCallExpression"===r||"NewExpression"===r)&&t.callee===e||"TaggedTemplateExpression"===r&&t.tag===e||"TSNonNullExpression"===r};function iA(e,t){return zS(t)}function oA(e,t,r){if(!(r.length<3)){var n=t.type;return"UnionTypeAnnotation"===n||"IntersectionTypeAnnotation"===n||"ArrayTypeAnnotation"===n||"TypeAnnotation"===n&&VS(r[r.length-3])}}function dA(e,t){return sA(e,t)||aA(e,t)}function cA(e,t,r){return _A(r,3)}function lA(e,t,r){return!e.async&&_A(r,1)}function uA(e,t){var r=t.type;if("**"===e.operator&&"BinaryExpression"===r&&"**"===t.operator)return t.left===e;if(aA(e,t))return!0;if(sA(e,t)||"UnaryExpression"===r||"SpreadElement"===r||"AwaitExpression"===r)return!0;if("BinaryExpression"===r||"LogicalExpression"===r){var n=rA.get(t.operator),a=rA.get(e.operator);if(n===a&&t.right===e&&"LogicalExpression"!==r||n>a)return!0}}function pA(e,t){var r=t.type;return"ArrayTypeAnnotation"===r||"NullableTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"UnionTypeAnnotation"===r}function fA(e,t){return QS(t)&&t.objectType===e}function gA(){return!0}function hA(e,t){var r=t.type;return"TSArrayType"===r||"TSOptionalType"===r||"TSIntersectionType"===r||"TSUnionType"===r||"TSRestType"===r}function mA(e,t){var r=t.type;return"TSArrayType"===r||"TSOptionalType"===r}function yA(e,t){var r=t.type;return("CallExpression"===r||"OptionalCallExpression"===r||"NewExpression"===r||"TSInstantiationExpression"===r)&&!!t.typeParameters}function bA(e,t){if("in"===e.operator){var r=t.type;return"VariableDeclarator"===r||"ForStatement"===r||"ForInStatement"===r||"ForOfStatement"===r}return!1}function vA(e,t){var r=t.type;return!("ForStatement"===r||"ThrowStatement"===r||"ReturnStatement"===r||"IfStatement"===r&&t.test===e||"WhileStatement"===r&&t.test===e||"ForInStatement"===r&&t.right===e||"SwitchStatement"===r&&t.discriminant===e||"ExpressionStatement"===r&&t.expression===e)}function RA(e,t){var r=t.type;return"BinaryExpression"===r||"LogicalExpression"===r||"UnaryExpression"===r||"SpreadElement"===r||sA(e,t)||"AwaitExpression"===r&&tA(e)||"ConditionalExpression"===r&&e===t.test||aA(e,t)}function xA(e,t,r){return _A(r,5)}function EA(e,t){return sA(e,t)||KS(t)&&"**"===t.operator&&t.left===e||aA(e,t)}function TA(e,t,r){return _A(r,5)}function wA(e,t){return XS(t)||SA(e,t)}function SA(e,t){var r=t.type;return!!("UnaryExpression"===r||"SpreadElement"===r||"BinaryExpression"===r||"LogicalExpression"===r||"ConditionalExpression"===r&&t.test===e||"AwaitExpression"===r||nA(r))||EA(e,t)}function AA(e,t){return YS(t)&&t.callee===e||$S(t)&&t.object===e}function jA(e,t){return!!ZS(e.left)||SA(e,t)}function CA(e,t){var r=t.type;if(nA(r))return!0;if("LogicalExpression"!==r)return!1;switch(e.operator){case"||":return"??"===t.operator||"&&"===t.operator;case"&&":return"??"===t.operator;case"??":return"??"!==t.operator}}function kA(e,t,r){var n,a=t.type;if(null!=(n=e.extra)&&n.parenthesized&&"AssignmentExpression"===a&&t.left===e){var s=t.right.type;if(("FunctionExpression"===s||"ClassExpression"===s)&&null==t.right.id)return!0}return"let"===e.name?_A(r,$S(t,{object:e,computed:!0})||eA(t,{object:e,computed:!0,optional:!1})?57:32):"async"===e.name&&JS(t)&&e===t.left}function _A(e,t){var r=1&t,n=2&t,a=4&t,s=8&t,i=16&t,o=32&t,d=e.length-1;if(!(d<=0)){for(var c=e[d],l=e[--d];d>=0;){var u=l.type;if(r&&"ExpressionStatement"===u&&l.expression===c||a&&"ExportDefaultDeclaration"===u&&c===l.declaration||n&&"ArrowFunctionExpression"===u&&l.body===c||s&&"ForStatement"===u&&l.init===c||i&&"ForInStatement"===u&&l.left===c||o&&"ForOfStatement"===u&&l.left===c)return!0;if(!(d>0&&(sA(c,l)&&"NewExpression"!==u||"SequenceExpression"===u&&l.expressions[0]===c||"UpdateExpression"===u&&!l.prefix||"ConditionalExpression"===u&&l.test===c||("BinaryExpression"===u||"LogicalExpression"===u)&&l.left===c||"AssignmentExpression"===u&&l.left===c)))return!1;c=l,l=e[--d]}return!1}}var PA=Fo,IA=le,DA=Ie,NA=De;function OA(e){var t=new Map;function r(e,r){var n=t.get(e);t.set(e,n?function(e,t,a){var s;return null!=(s=n(e,t,a))?s:r(e,t,a)}:r)}for(var n=0,a=Object.keys(e);n1}),xj(t))if(Ej(t)){if(t.init===e)return}else if(t.left===e)return;this.semicolon()}function Vj(e){this.print(e.id,e),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init,e))}var Kj=it,Yj=ot;function Xj(e,t){(Kj(t)||Yj(t))&&this._shouldPrintDecoratorsBeforeExport(t)||this.printJoin(e.decorators,e),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function Jj(e){this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.endsWith(10)||this.newline(),this.rightBrace(e))}function Qj(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),e.computed?(this.tokenChar(91),this.print(e.key,e),this.tokenChar(93)):(this._variance(e),this.print(e.key,e)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function $j(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key,e),this.tokenChar(93)):(this._variance(e),this.print(e.key,e)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function Zj(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function eC(e){this._classMethodHead(e),this.space(),this.print(e.body,e)}function tC(e){this._classMethodHead(e),this.space(),this.print(e.body,e)}function rC(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this._methodHead(e)}function nC(e){this.word("static"),this.space(),this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.rightBrace(e))}var aC=Te;function sC(e,t,r){this.print(e.typeParameters,e);var n=gC.call(this,t,r);n&&this.sourceIdentifierName(n.name,n.pos),this.tokenChar(40),this._parameters(e.params,e),this.tokenChar(41);var a="ArrowFunctionExpression"===e.type;this.print(e.returnType,e,a),this._noLineTerminator=a}function iC(e,t){for(var r=e.length,n=0;n"),this.space(),this.print(e.body,e)}function fC(e,t){var r,n;return!!(e.typeParameters||e.returnType||e.predicate||t.typeAnnotation||t.optional||null!=(r=t.leadingComments)&&r.length||null!=(n=t.trailingComments)&&n.length)}function gC(e,t){var r=e;if(!r&&t){var n=t.type;"VariableDeclarator"===n?r=t.id:"AssignmentExpression"===n||"AssignmentPattern"===n?r=t.left:"ObjectProperty"===n||"ClassProperty"===n?t.computed&&"StringLiteral"!==t.key.type||(r=t.key):"ClassPrivateProperty"!==n&&"ClassAccessorProperty"!==n||(r=t.key)}if(r){var a,s,i;if("Identifier"===r.type)a={pos:null==(s=r.loc)?void 0:s.start,name:(null==(i=r.loc)?void 0:i.identifierName)||r.name};else if("PrivateName"===r.type){var o;a={pos:null==(o=r.loc)?void 0:o.start,name:"#"+r.id.name}}else if("StringLiteral"===r.type){var d;a={pos:null==(d=r.loc)?void 0:d.start,name:r.value}}return a}}var hC=at,mC=yn,yC=jt,bC=ut,vC=pt,RC=qa;function xC(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function EC(e){this.print(e.local,e)}function TC(e){this.print(e.exported,e)}function wC(e){"type"===e.exportKind&&(this.word("type"),this.space()),this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function SC(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}var AC,jC,CC=!1;function kC(e){var t=this.format.importAttributesKeyword,r=e.attributes,n=e.assertions;!r||t||CC||(CC=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));var a="assert"===t||!t&&n;this.word(a?"assert":"with"),this.space(),a||"with"===t?(this.tokenChar(123),this.space(),this.printList(r||n,e),this.space(),this.tokenChar(125)):this.printList(r||n,e)}function _C(e){var t,r;this.word("export"),this.space(),"type"===e.exportKind&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e),this.semicolon()}function PC(e,t){hC(t.declaration)&&e._shouldPrintDecoratorsBeforeExport(t)&&e.printJoin(t.declaration.decorators,t)}function IC(e){if(PC(this,e),this.word("export"),this.space(),e.declaration){var t=e.declaration;this.print(t,e),RC(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r,n,a=e.specifiers.slice(0),s=!1;;){var i=a[0];if(!mC(i)&&!yC(i))break;s=!0,this.print(a.shift(),e),a.length&&(this.tokenChar(44),this.space())}(a.length||!a.length&&!s)&&(this.tokenChar(123),a.length&&(this.space(),this.printList(a,e),this.space()),this.tokenChar(125)),e.source&&(this.space(),this.word("from"),this.space(),null!=(r=e.attributes)&&r.length||null!=(n=e.assertions)&&n.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e)),this.semicolon()}}function DC(e){PC(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space();var t=e.declaration;this.print(t,e),RC(t)||this.semicolon()}function NC(e){var t,r;this.word("import"),this.space();var n="type"===e.importKind||"typeof"===e.importKind;n?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());for(var a=e.specifiers.slice(0),s=!!a.length;s;){var i=a[0];if(!bC(i)&&!vC(i))break;this.print(a.shift(),e),a.length&&(this.tokenChar(44),this.space())}a.length?(this.tokenChar(123),this.space(),this.printList(a,e),this.space(),this.tokenChar(125)):n&&!s&&(this.tokenChar(123),this.tokenChar(125)),(s||n)&&(this.space(),this.word("from"),this.space()),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e),this.semicolon()}function OC(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function FC(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local,e)}function LC(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40),this.print(e.source,e),null!=e.options&&(this.tokenChar(44),this.space(),this.print(e.options,e)),this.tokenChar(41)}function BC(){if(jC)return AC;jC=1;var e={},t=e.hasOwnProperty,r=function(e,r){for(var n in e)t.call(e,n)&&r(n,e[n])},n=function(e,t){return t?(r(t,(function(t,r){e[t]=r})),e):e},a=function(e,t){for(var r=e.length,n=-1;++n=55296&&U<=56319&&B>L+1){var H=F.charCodeAt(L+1);if(H>=56320&&H<=57343){var G=(1024*(U-55296)+H-56320+65536).toString(16);w||(G=G.toUpperCase()),x+="\\u{"+G+"}",++L;continue}}}if(!s.escapeEverything){if(y.test(M)){x+=M;continue}if('"'==M){x+=E==M?'\\"':M;continue}if("`"==M){x+=E==M?"\\`":M;continue}if("'"==M){x+=E==M?"\\'":M;continue}}if("\0"!=M||R||m.test(F.charAt(L+1)))if(h.test(M))x+=g[M];else{var q=M.charCodeAt(0);if(s.minimal&&8232!=q&&8233!=q)x+=M;else{var W=q.toString(16);w||(W=W.toUpperCase());var z=W.length>2||R,V="\\"+(z?"u":"x")+("0000"+W).slice(z?-4:-2);x+=V}}else x+="\\0"}return s.wrap&&(x=E+x+E),"`"==E&&(x=x.replace(/\$\{/g,"\\${")),s.isScriptContext?x.replace(/<\/(script|style)/gi,"<\\/$1").replace(//,"$2")||""))return;if(r){if(Fl(e,n,"pre",r))return;return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}}},Ll=e=>{let{value:t=""}=e;const r=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").match(/([^?=&]+)(=([^&]*))/g)||[]).reduce(((e,t)=>(e[t.slice(0,t.indexOf("="))]=t.slice(t.indexOf("=")+1),e)),{})}(t.replace(/^/,"$1").replace(/^rehype:/,""));return Object.keys(r).forEach((e=>{"true"===r[e]&&(r[e]=!0),"false"===r[e]&&(r[e]=!1),"string"!==typeof r[e]||/^0/.test(r[e])||isNaN(+r[e])||(r[e]=+r[e])})),r},Bl=(e,t,r)=>"string"===r?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:"attr"===r?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},Ml=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{properties:t="data",codeBlockParames:r=!0}=e;return e=>{Nr(e,"element",((e,n,a)=>{if(r&&"pre"===e.tagName&&e&&Array.isArray(e.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const r=e.children[0];if(r&&"code"===r.tagName&&"number"===typeof n){const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;for(;t>-1;){if(t--,!e[t])return;if(e[t]&&e[t].value&&""!==e[t].value.replace(/(\n|\s)/g,"")||"text"!==e[t].type){if(!/^rehype:/.test(e[t].value)||"comment"!==e[t].type)return;return e[t]}}}(a.children,n);if(s){const n=Ll(s);Object.keys(n).length>0&&(e.properties={...e.properties,"data-type":"rehyp"},r.properties=Bl(r.properties,n,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(e.tagName)&&a&&Array.isArray(a.children)&&"number"===typeof n){const s=Fl(a.children,n,"",r);if(s){const r=Ll(s);Object.keys(r).length>0&&(e.properties=Bl(e.properties,r,t))}}}))}};var Ul=function(e){return void 0===e&&(e={}),e=>{Nr(e,(e=>{"element"===e.type&&"code"===e.tagName&&e.data&&e.data.meta&&(e.properties=(0,a.Z)({},e.properties,{"data-meta":String(e.data.meta)}))}))}},Hl=function(e){return void 0===e&&(e={}),e=>{Nr(e,(e=>{"element"===e.type&&"code"===e.tagName&&e.properties&&e.properties.dataMeta&&(e.data||(e.data={}),e.data.meta=e.properties.dataMeta,delete e.properties.dataMeta)}))}};const Gl=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,ql=Object.hasOwnProperty;function Wl(e){const t="element"===e.type?e.tagName.toLowerCase():"",r=2===t.length&&104===t.charCodeAt(0)?t.charCodeAt(1):0;return r>48&&r<55?r-48:void 0}const zl={},Vl=new class{constructor(){this.occurrences,this.reset()}slug(e,t){const r=this;let n=function(e,t){if("string"!==typeof e)return"";t||(e=e.toLowerCase());return e.replace(Gl,"").replace(/ /g,"-")}(e,!0===t);const a=n;for(;ql.call(r.occurrences,n);)r.occurrences[a]++,n=a+"-"+r.occurrences[a];return r.occurrences[n]=0,n}reset(){this.occurrences=Object.create(null)}};const Kl=function(e){if(null===e||void 0===e)return Xl;if("string"===typeof e)return function(e){return Yl(t);function t(t){return t.tagName===e}}(e);if("object"===typeof e)return function(e){const t=[];let r=-1;for(;++r0&&void 0!==arguments[0]?arguments[0]:{};const{openDelimiter:t="rehype:ignore:start",closeDelimiter:r="rehype:ignore:end"}=e;return e=>{Nr(e,((e,n,a)=>{if("element"===e.type||"root"===e.type){let n=!1;e.children=e.children.filter((e=>{if("raw"===e.type||"comment"===e.type){let a=(e.value||"").trim();if(a=a.replace(/^/,"$1"),a===t)return n=!0,!1;if(a===r)return n=!1,!1}return!n}))}}))}};var su={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};var iu=[function(e){const t=(e||zl).prefix||"";return function(e){Vl.reset(),Nr(e,"element",(function(e){Wl(e)&&!e.properties.id&&(e.properties.id=t+Vl.slug(ec(e)))}))}},function(e){const t=e||$l;let r=t.properties;const n=t.headingProperties,a=t.behavior||"prepend",s=t.content,i=t.group,o=Kl(t.test);let d;return"after"===a||"before"===a?d=function(e,t,n){if("number"!==typeof t||!n)return;const o=tu(s||Ql,e),d=eu(e,nu(r,e),o);let c="before"===a?[d,e]:[e,d];if(i){const t=ru(i,e);t&&!Array.isArray(t)&&"element"===t.type&&(t.children=c,c=[t])}return n.children.splice(t,1,...c),[Ir,t+c.length]}:"wrap"===a?d=function(e){let t=e.children,n=[];"function"===typeof s?(t=[],n=s(e)):s&&(n=Zl(s));return e.children=[eu(e,nu(r,e),Array.isArray(n)?[...t,...n]:[...t,n])],[Ir]}:(d=function(e){const t=tu(s||Ql,e);return e.children["prepend"===a?"unshift":"push"](eu(e,nu(r,e),t)),[Ir]},r||(r={ariaHidden:"true",tabIndex:-1})),function(e){Nr(e,"element",(function(e,t,r){if(Wl(e)&&e.properties.id&&o(e,t,r))return Object.assign(e.properties,nu(n,e)),d(e,t,r)}))}},au];const ou=i.forwardRef(((e,t)=>{var r,n,s,i=[Ul,Yd,Hl,[fc,{ignoreMissing:!0}],...iu,[Ol,{rewrite:(n=null!=(r=e.disableCopy)&&r,s=e.rehypeRewrite,(e,t,r)=>{if("element"===e.type&&r&&"root"===r.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){var i=e.children&&e.children[0];i&&i.properties&&"true"===i.properties.ariaHidden&&(i.properties=(0,a.Z)({class:"anchor"},i.properties),i.children=[su])}if("element"===e.type&&"pre"===e.tagName&&!n){var o=Nl(e.children);e.children.push((void 0===(d=o)&&(d=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":d},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}))}var d;s&&s(e,null===t?void 0:t,null===r?void 0:r)})}],[Ml,{properties:"attr"}],...e.rehypePlugins||[]];return(0,o.jsx)(Zd,(0,a.Z)({},e,{rehypePlugins:i,ref:t}))}));var du,cu=r(9258),lu=["components","data","node"],uu=["data-meta","data-md"],pu=["source","components","data","rehypeRewrite"],fu=C.Preview,gu=C.Code,hu=C.Toolbar,mu=(0,cu.ZP)(ou)(du||(du=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}(["\n margin: 0 auto;\n box-shadow:\n rgb(8 15 41 / 8%) 0.5rem 0.5rem 2rem 0px,\n rgb(8 15 41 / 8%) 0px 0px 1px 0px;\n border: 1px solid var(--color-border-default, #30363d);\n text-align: left;\n max-width: 56rem;\n overflow: auto;\n padding: 2rem;\n border-radius: 0.55rem;\n"]))),yu=e=>{var t,{components:r,data:n,node:i}=e,d=(0,s.Z)(e,lu),{"data-md":c}=d,l=(0,s.Z)(d,uu);if(!P(c))return(0,o.jsx)("div",(0,a.Z)({},d));var u=null==i||null==(t=i.position)?void 0:t.start.line,p=_(c)||String(u),f=r[""+p];if(p&&"function"===typeof f){var g=n[p].value||"",{title:h,boreder:m=1,checkered:y=1,code:b=1,toolbar:v=1}=k(c||"");return(0,o.jsxs)(C,{bordered:!!Number(m),disableCheckered:!Number(y),style:{marginBottom:16},children:[(0,o.jsx)(fu,{children:(0,o.jsx)(f,{})}),!!Number(v)&&(0,o.jsx)(hu,{text:g,visibleButton:!!Number(b),children:h||"Code Example"}),!!Number(b)&&(0,o.jsx)(gu,{tagName:"pre",style:{marginBottom:0},children:(0,o.jsx)("code",(0,a.Z)({},l))})]})}return(0,o.jsx)("code",(0,a.Z)({},l))};function bu(e){var{components:t,data:r,rehypeRewrite:n}=e,i=(0,s.Z)(e,pu);return(0,o.jsx)(mu,(0,a.Z)({disableCopy:!0,rehypePlugins:[au,...i.rehypePlugins||[]]},i,{rehypeRewrite:(e,t,r)=>{if("element"===e.type&&"pre"===e.tagName&&/(pre|code)/.test(e.tagName)&&e.children[0]){var a,s,i=e.children[0],o=(null==(a=i.data)?void 0:a.meta)||(null==(s=i.properties)?void 0:s.dataMeta);P(o)&&(e.tagName="div",e.properties||(e.properties={}),e.properties["data-md"]=o,e.properties["data-meta"]="preview")}n&&n(e,t,r)},source:r.source,components:(0,a.Z)({},t,{div:e=>(0,o.jsx)(yu,(0,a.Z)({},e,{components:r.components,data:r.data}))})}))}},4838:(e,t)=>{"use strict";function r(e,t){return(Array.isArray(t)?t:[t]).some((function(t){return"string"===typeof t&&(t=new RegExp(t)),t.test(e||"")}))}},8916:(e,t)=>{"use strict"},7190:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},432:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},i=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,a=t.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!s)return!1;for(n in e);return"undefined"===typeof n||t.call(e,n)},o=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(a)return a(e,r).value}return e[r]};e.exports=function e(){var t,r,n,a,c,l,u=arguments[0],p=1,f=arguments.length,g=!1;for("boolean"===typeof u&&(g=u,u=arguments[1]||{},p=2),(null==u||"object"!==typeof u&&"function"!==typeof u)&&(u={});p{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,d=/^\s+|\s+$/g,c="";function l(e){return e?e.replace(d,c):c}e.exports=function(e,d){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];d=d||{};var u=1,p=1;function f(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function g(){var e={line:u,column:p};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:u,column:p},this.source=d.source}h.prototype.content=e;var m=[];function y(t){var r=new Error(d.source+":"+u+":"+p+": "+t);if(r.reason=t,r.filename=d.source,r.line=u,r.column=p,r.source=e,!d.silent)throw r;m.push(r)}function b(t){var r=t.exec(e);if(r){var n=r[0];return f(n),e=e.slice(n.length),r}}function v(){b(n)}function R(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=g();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;c!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,c===e.charAt(r-1))return y("End of comment missing");var n=e.slice(2,r-2);return p+=2,f(n),e=e.slice(r),p+=2,t({type:"comment",comment:n})}}function E(){var e=g(),r=b(a);if(r){if(x(),!b(s))return y("property missing ':'");var n=b(i),d=e({type:"declaration",property:l(r[0].replace(t,c)),value:n?l(n[0].replace(t,c)):c});return b(o),d}}return v(),function(){var e,t=[];for(R(t);e=E();)!1!==e&&(t.push(e),R(t));return t}()}},1046:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},5318:(e,t)=>{function r(e){let t,r=[];for(let n of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(n))r.push(parseInt(n,10));else if(t=n.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,n,a,s]=t;if(n&&s){n=parseInt(n),s=parseInt(s);const e=n{"use strict";e.exports=function(e){var t=this;this.Compiler=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("toMarkdownExtensions")||[]}))}};var n=r(8397)},9528:e=>{"use strict";e.exports=function(e,t){var r,n,a=0,s=0;if("string"!==typeof t||1!==t.length)throw new Error("Expected character");e=String(e),n=e.indexOf(t),r=n;for(;-1!==n;)a++,n===r?a>s&&(s=a):a=1,r=n+1,n=e.indexOf(t,r);return s}},8397:(e,t,r)=>{e.exports=r(4059)},7282:e=>{e.exports=function e(t,r){var n,a=-1;if(r.extensions)for(;++a{e.exports=function(e,t,r){var i=r.enter("blockquote"),o=a(n(e,r),s);return i(),o};var n=r(5162),a=r(2357);function s(e,t,r){return">"+(r?"":" ")+e}},114:(e,t,r)=>{e.exports=function(e,t,r,a){var s=-1;for(;++s{e.exports=function(e,t,r){var l,u,p,f,g=i(r),h=e.value||"",m="`"===g?"GraveAccent":"Tilde";s(e,r)?(p=r.enter("codeIndented"),l=o(h,c)):(u=n(g,Math.max(a(h,g)+1,3)),p=r.enter("codeFenced"),l=u,e.lang&&(f=r.enter("codeFencedLang"+m),l+=d(r,e.lang,{before:"`",after:" ",encode:["`"]}),f()),e.lang&&e.meta&&(f=r.enter("codeFencedMeta"+m),l+=" "+d(r,e.meta,{before:" ",after:"\n",encode:["`"]}),f()),l+="\n",h&&(l+=h+"\n"),l+=u);return p(),l};var n=r(4400),a=r(9528),s=r(6363),i=r(8827),o=r(2357),d=r(4586);function c(e,t,r){return(r?"":" ")+e}},2654:(e,t,r)=>{e.exports=function(e,t,r){var i=a(r),o='"'===i?"Quote":"Apostrophe",d=r.enter("definition"),c=r.enter("label"),l="["+s(r,n(e),{before:"[",after:"]"})+"]: ";c(),!e.url||/[ \t\r\n]/.test(e.url)?(c=r.enter("destinationLiteral"),l+="<"+s(r,e.url,{before:"<",after:">"})+">"):(c=r.enter("destinationRaw"),l+=s(r,e.url,{before:" ",after:" "}));c(),e.title&&(c=r.enter("title"+o),l+=" "+i+s(r,e.title,{before:i,after:i})+i,c());return d(),l};var n=r(2638),a=r(5661),s=r(4586)},2486:(e,t,r)=>{e.exports=s,s.peek=function(e,t,r){return r.options.emphasis||"*"};var n=r(7166),a=r(7462);function s(e,t,r){var s=n(r),i=r.enter("emphasis"),o=a(e,r,{before:s,after:s});return i(),s+o+s}},6216:(e,t,r)=>{e.exports=function(e,t,r){var i,o,d,c,l=Math.max(Math.min(6,e.depth||1),1);if(a(e,r))return i=r.enter("headingSetext"),o=r.enter("phrasing"),d=s(e,r,{before:"\n",after:"\n"}),o(),i(),d+"\n"+n(1===l?"=":"-",d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf("\n"))+1));c=n("#",l),i=r.enter("headingAtx"),o=r.enter("phrasing"),d=(d=s(e,r,{before:"# ",after:"\n"}))?c+" "+d:c,r.options.closeAtx&&(d+=" "+c);return o(),i(),d};var n=r(4400),a=r(4797),s=r(7462)},2841:e=>{function t(e){return e.value||""}e.exports=t,t.peek=function(){return"<"}},4610:(e,t,r)=>{e.exports=s,s.peek=function(){return"!"};var n=r(2638),a=r(4586);function s(e,t,r){var s,i,o=e.referenceType,d=r.enter("imageReference"),c=r.enter("label"),l=a(r,e.alt,{before:"[",after:"]"}),u="!["+l+"]";return c(),i=r.stack,r.stack=[],c=r.enter("reference"),s=a(r,n(e),{before:"[",after:"]"}),c(),r.stack=i,d(),"full"!==o&&l&&l===s?"shortcut"!==o&&(u+="[]"):u+="["+s+"]",u}},7968:(e,t,r)=>{e.exports=s,s.peek=function(){return"!"};var n=r(5661),a=r(4586);function s(e,t,r){var s=n(r),i='"'===s?"Quote":"Apostrophe",o=r.enter("image"),d=r.enter("label"),c="!["+a(r,e.alt,{before:"[",after:"]"})+"](";return d(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(d=r.enter("destinationLiteral"),c+="<"+a(r,e.url,{before:"<",after:">"})+">"):(d=r.enter("destinationRaw"),c+=a(r,e.url,{before:"(",after:e.title?" ":")"})),d(),e.title&&(d=r.enter("title"+i),c+=" "+s+a(r,e.title,{before:s,after:s})+s,d()),c+=")",o(),c}},875:(e,t,r)=>{t.blockquote=r(5673),t.break=r(114),t.code=r(854),t.definition=r(2654),t.emphasis=r(2486),t.hardBreak=r(114),t.heading=r(6216),t.html=r(2841),t.image=r(7968),t.imageReference=r(4610),t.inlineCode=r(5197),t.link=r(3215),t.linkReference=r(8134),t.list=r(107),t.listItem=r(3805),t.paragraph=r(2183),t.root=r(2580),t.strong=r(580),t.text=r(9329),t.thematicBreak=r(8369)},5197:(e,t,r)=>{e.exports=a,a.peek=function(){return"`"};var n=r(6020);function a(e,t,r){for(var a,s,i,o,d=e.value||"",c="`",l=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(d);)c+="`";for(/[^ \r\n]/.test(d)&&(/[ \r\n`]/.test(d.charAt(0))||/[ \r\n`]/.test(d.charAt(d.length-1)))&&(d=" "+d+" ");++l{e.exports=i,i.peek=function(){return"["};var n=r(2638),a=r(7462),s=r(4586);function i(e,t,r){var i,o,d=e.referenceType,c=r.enter("linkReference"),l=r.enter("label"),u=a(e,r,{before:"[",after:"]"}),p="["+u+"]";return l(),o=r.stack,r.stack=[],l=r.enter("reference"),i=s(r,n(e),{before:"[",after:"]"}),l(),r.stack=o,c(),"full"!==d&&u&&u===i?"shortcut"!==d&&(p+="[]"):p+="["+i+"]",p}},3215:(e,t,r)=>{e.exports=o,o.peek=function(e,t,r){return a(e,r)?"<":"["};var n=r(5661),a=r(2787),s=r(7462),i=r(4586);function o(e,t,r){var o,d,c,l,u=n(r),p='"'===u?"Quote":"Apostrophe";return a(e,r)?(l=r.stack,r.stack=[],o=r.enter("autolink"),c="<"+s(e,r,{before:"<",after:">"})+">",o(),r.stack=l,c):(o=r.enter("link"),d=r.enter("label"),c="["+s(e,r,{before:"[",after:"]"})+"](",d(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(d=r.enter("destinationLiteral"),c+="<"+i(r,e.url,{before:"<",after:">"})+">"):(d=r.enter("destinationRaw"),c+=i(r,e.url,{before:"(",after:e.title?" ":")"})),d(),e.title&&(d=r.enter("title"+p),c+=" "+u+i(r,e.title,{before:u,after:u})+u,d()),c+=")",o(),c)}},3805:(e,t,r)=>{e.exports=function(e,t,r){var d,c,l,u=a(r),p=s(r);t&&t.ordered&&(u=(t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+".");d=u.length+1,("tab"===p||"mixed"===p&&(t&&t.spread||e.spread))&&(d=4*Math.ceil(d/4));return l=r.enter("listItem"),c=o(i(e,r),(function(e,t,r){if(t)return(r?"":n(" ",d))+e;return(r?u:u+n(" ",d-u.length))+e})),l(),c};var n=r(4400),a=r(7697),s=r(5211),i=r(5162),o=r(2357)},107:(e,t,r)=>{e.exports=function(e,t,r){var a=r.enter("list"),s=n(e,r);return a(),s};var n=r(5162)},2183:(e,t,r)=>{e.exports=function(e,t,r){var a=r.enter("paragraph"),s=r.enter("phrasing"),i=n(e,r,{before:"\n",after:"\n"});return s(),a(),i};var n=r(7462)},2580:(e,t,r)=>{e.exports=function(e,t,r){return n(e,r)};var n=r(5162)},580:(e,t,r)=>{e.exports=s,s.peek=function(e,t,r){return r.options.strong||"*"};var n=r(3312),a=r(7462);function s(e,t,r){var s=n(r),i=r.enter("strong"),o=a(e,r,{before:s,after:s});return i(),s+s+o+s+s}},9329:(e,t,r)=>{e.exports=function(e,t,r,a){return n(r,e.value,a)};var n=r(4586)},8369:(e,t,r)=>{e.exports=function(e,t,r){var i=n(s(r)+(r.options.ruleSpaces?" ":""),a(r));return r.options.ruleSpaces?i.slice(0,-1):i};var n=r(4400),a=r(9095),s=r(6899)},4059:(e,t,r)=>{e.exports=function(e,t){var r,u=t||{},p={enter:function(e){return p.stack.push(e),t;function t(){p.stack.pop()}},stack:[],unsafe:[],join:[],handlers:{},options:{}};a(p,{unsafe:o,join:i,handlers:s}),a(p,u),p.options.tightDefinitions&&(p.join=[l].concat(p.join));p.handle=n("type",{invalid:d,unknown:c,handlers:p.handlers}),(r=p.handle(e,null,p,{before:"\n",after:"\n"}))&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n");return r};var n=r(1569),a=r(7282),s=r(875),i=r(9312),o=r(4459);function d(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function c(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function l(e,t){if("definition"===e.type&&e.type===t.type)return 0}},9312:(e,t,r)=>{e.exports=[function(e,t,r,s){if("list"===t.type&&t.type===e.type&&Boolean(e.ordered)===Boolean(t.ordered)||"code"===t.type&&n(t,s)&&("list"===e.type||e.type===t.type&&n(e,s)))return!1;if("boolean"===typeof r.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&a(t,s)))return;return r.spread?1:0}}];var n=r(6363),a=r(4797)},4459:e=>{e.exports=[{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing"},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing"},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*"},{character:"*",inConstruct:"phrasing"},{atBreak:!0,character:"+"},{atBreak:!0,character:"-"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing"},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:["phrasing","label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{before:"[^A-Za-z]",character:"_",inConstruct:"phrasing"},{character:"_",after:"[^A-Za-z]",inConstruct:"phrasing"},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent","phrasing"]},{atBreak:!0,character:"~"}]},2638:(e,t,r)=>{e.exports=function(e){if(e.label||!e.identifier)return e.label||"";return e.identifier.replace(a,"$1").replace(s,i)};var n=r(7849),a=/\\([!-/:-@[-`{-~])/g,s=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i(e,t){return n(t)||e}},7697:e=>{e.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},7166:e=>{e.exports=function(e){var t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}},8827:e=>{e.exports=function(e){var t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}},5211:e=>{e.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},5661:e=>{e.exports=function(e){var t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}},9095:e=>{e.exports=function(e){var t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}},6899:e=>{e.exports=function(e){var t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}},3312:e=>{e.exports=function(e){var t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}},5162:(e,t,r)=>{e.exports=function(e,t){var r,a=e.children||[],s=[],i=-1;for(;++i{e.exports=function(e,t,r){var n,a,s,i=e.children||[],o=[],d=-1,c=r.before;for(;++d0&&("\r"===c||"\n"===c)&&"html"===s.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),c=" "),o.push(t.handle(s,e,t,{before:c,after:n})),c=o[o.length-1].slice(-1);return o.join("")}},6363:e=>{e.exports=function(e,t){return!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value)}},4797:(e,t,r)=>{e.exports=function(e,t){return t.options.setext&&(!e.depth||e.depth<3)&&n(e)};var n=r(9033)},2787:(e,t,r)=>{e.exports=function(e,t){var r=n(e);return!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url)};var n=r(9033)},2357:e=>{e.exports=function(e,r){var n,a=[],s=0,i=0;for(;n=t.exec(e);)o(e.slice(s,n.index)),a.push(n[0]),s=n.index+n[0].length,i++;return o(e.slice(s)),a.join("");function o(e){a.push(r(e,i,!e))}};var t=/\r?\n|\r/g},6020:e=>{e.exports=function(e){var t,r;e._compiled||(t=e.before?"(?:"+e.before+")":"",r=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(r||""),"g"));return e._compiled}},9906:e=>{function t(e,t,r){var n;if(!t)return r;for("string"===typeof t&&(t=[t]),n=-1;++n{e.exports=function(e,t,r){var o,d,c,l,u,p,f,g,h=(r.before||"")+(t||"")+(r.after||""),m=[],y=[],b={},v=-1;for(;++v=g||c+1{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],n=-1;++n{"use strict";var t;e.exports=function(e){var r,n="&"+e+";";if((t=t||document.createElement("i")).innerHTML=n,59===(r=t.textContent).charCodeAt(r.length-1)&&"semi"!==e)return!1;return r!==n&&r}},1569:e=>{"use strict";e.exports=function(e,n){var a=n||{};function s(n){var a=s.invalid,i=s.handlers;return n&&r.call(n,e)&&(a=r.call(i,n[e])?i[n[e]]:s.unknown),(a||t).apply(this,arguments)}return s.handlers=a.handlers||{},s.invalid=a.invalid,s.unknown=a.unknown,s};var t=Function.prototype,r={}.hasOwnProperty},8634:(e,t,r)=>{"use strict";var n=r(282),a=r(1676),s=r(6638);e.exports=n().use(a).use(s).freeze()},6415:e=>{"use strict";e.exports=function(e){if(e)throw e}},3731:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},5715:(e,t,r)=>{"use strict";e.exports=function(e,t,r){"string"!==typeof t&&(r=t,t=void 0);return function(e){var t=e||{},r=function(e,t){var r=-1;for(;++r-1&&(L.call(this,e),B.call(this,e))}function U(){g("atHardBreak",!0)}function H(){var e=this.resume();this.stack[this.stack.length-1].value=e}function G(){var e=this.resume();this.stack[this.stack.length-1].value=e}function q(){var e=this.resume();this.stack[this.stack.length-1].value=e}function W(){var e=this.stack[this.stack.length-1];h("inReference")?(e.type+="Reference",e.referenceType=h("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),g("referenceType")}function z(){var e=this.stack[this.stack.length-1];h("inReference")?(e.type+="Reference",e.referenceType=h("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),g("referenceType")}function V(e){this.stack[this.stack.length-2].identifier=i(this.sliceSerialize(e)).toLowerCase()}function K(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,g("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function Y(){var e=this.resume();this.stack[this.stack.length-1].url=e}function X(){var e=this.resume();this.stack[this.stack.length-1].title=e}function J(){g("inReference")}function Q(){g("referenceType","collapsed")}function $(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase(),g("referenceType","full")}function Z(e){g("characterReferenceType",e.type)}function ee(e){var t,r,n=this.sliceSerialize(e),a=h("characterReferenceType");a?(t=o(n,"characterReferenceMarkerNumeric"===a?10:16),g("characterReferenceType")):t=u(n),(r=this.stack.pop()).value+=t,r.position.end=m(e.end)}function te(e){B.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function re(e){B.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function ne(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function oe(){return{type:"emphasis",children:[]}}function de(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function le(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function fe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ge(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function he(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function be(){return{type:"thematicBreak"}}}(r)(l(d(r).document().write(c()(e,t,!0))))};var n=r(8765),a=r(3667),s=r(8025),i=r(4991),o=r(1744),d=r(4751),c=r(5265),l=r(4811),u=r(4537),p=r(6934);function f(e,t){var r,n;for(r in t)n=s.call(e,r)?e[r]:e[r]={},"canContainEols"===r||"transforms"===r?e[r]=[].concat(n,t[r]):Object.assign(n,t[r])}},5184:(e,t,r)=>{"use strict";e.exports=r(5715)},8765:e=>{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],n=-1;++n{"use strict";var n=r(8254)(/[A-Za-z]/);e.exports=n},6995:(e,t,r)=>{"use strict";var n=r(8254)(/[\dA-Za-z]/);e.exports=n},3290:(e,t,r)=>{"use strict";var n=r(8254)(/[#-'*+\--9=?A-Z^-~]/);e.exports=n},1207:e=>{"use strict";e.exports=function(e){return e<32||127===e}},1091:(e,t,r)=>{"use strict";var n=r(8254)(/\d/);e.exports=n},4900:(e,t,r)=>{"use strict";var n=r(8254)(/[\dA-Fa-f]/);e.exports=n},769:(e,t,r)=>{"use strict";var n=r(8254)(/[!-/:-@[-`{-~]/);e.exports=n},6377:e=>{"use strict";e.exports=function(e){return e<0||32===e}},4392:e=>{"use strict";e.exports=function(e){return e<-2}},9056:e=>{"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},5414:(e,t,r)=>{"use strict";var n=r(5696),a=r(8254)(n);e.exports=a},6548:(e,t,r)=>{"use strict";var n=r(8254)(/\s/);e.exports=n},3667:e=>{"use strict";var t=Object.assign;e.exports=t},9393:e=>{"use strict";var t=String.fromCharCode;e.exports=t},8025:e=>{"use strict";var t={}.hasOwnProperty;e.exports=t},8971:e=>{"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},7322:e=>{"use strict";e.exports=["pre","script","style","textarea"]},7327:e=>{"use strict";var t=[].splice;e.exports=t},5696:e=>{"use strict";e.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},6236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9402),a=r(2463),s=r(9829),i=r(581),o=r(3382),d=r(4671),c=r(601),l=r(1827),u=r(5518),p=r(8194),f=r(462),g=r(1034),h=r(4428),m=r(4945),y=r(9255),b=r(4902),v=r(721),R=r(2836),x=r(1699),E=r(1862),T=r(5861),w={42:x,43:x,45:x,48:x,49:x,50:x,51:x,52:x,53:x,54:x,55:x,56:x,57:x,62:i},S={91:p},A={"-2":l,"-1":l,32:l},j={35:g,42:T,45:[E,T],60:h,61:E,95:T,96:c,126:c},C={38:d,92:o},k={"-5":R,"-4":R,"-3":R,33:b,38:d,42:a,60:[s,m],91:v,92:[f,o],93:y,95:a,96:u},_={null:[a,n.resolver]};t.contentInitial=S,t.disable={null:[]},t.document=w,t.flow=j,t.flowInitial=A,t.insideSpan=_,t.string=C,t.text=k},490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4392),a=r(6231),s=function(e){var t,r=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,r,"linePrefix")}),(function(t){return e.enter("paragraph"),s(t)}));return r;function s(r){var n=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=n),t=n,i(r)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):n(t)?(e.consume(t),e.exit("chunkText"),s):(e.consume(t),i)}};t.tokenize=s},1717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4392),a=r(6231),s=r(6941),i=function(e){var t,r,a,i=this,c=[],l=0,u={tokenize:function(e,n){var a=0;return t={},l;function l(n){return at;)i.containerState=c[s][1],c[s][0].exit.call(i,e);c.length=t}},o={tokenize:function(e,t,r){return a(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},d={tokenize:function(e,t,r){return a(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=i},6604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2747),a=r(6231),s=r(6941),i=function(e){var t=this,r=e.attempt(s,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,i,a(e,e.attempt(this.parser.constructs.flow,i,e.attempt(n,i)),"linePrefix")));return r;function i(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}};t.tokenize=i},9402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3667),a=r(1339),s=d("text"),i=d("string"),o={resolveAll:c()};function d(e){return{tokenize:function(t){var r=this,n=this.parser.constructs[e],a=t.attempt(n,s,i);return s;function s(e){return d(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return d(e)?(t.exit("data"),a(e)):(t.consume(e),o)}function d(e){var t=n[e],a=-1;if(null===e)return!0;if(t)for(;++a{"use strict";var n=r(490),a=r(1717),s=r(6604),i=r(9402),o=r(6369),d=r(7058),c=r(9990),l=r(6236);e.exports=function(e){var t={defined:[],constructs:o([l].concat(c((e||{}).extensions))),content:r(n),document:r(a),flow:r(s),string:r(i.string),text:r(i.text)};return t;function r(e){return function(r){return d(t,e,r)}}}},4811:(e,t,r)=>{"use strict";var n=r(6308);e.exports=function(e){for(;!n(e););return e}},5265:e=>{"use strict";var t=/[\0\t\n\r]/g;e.exports=function(){var e,r=!0,n=1,a="";return function(s,i,o){var d,c,l,u,p,f=[];s=a+s.toString(i),l=0,a="",r&&(65279===s.charCodeAt(0)&&l++,r=void 0);for(;l{"use strict";var n=r(5911),a=r(4485),s=r(1084),i=r(8375),o=r(3173),d=r(1339),c={name:"attention",tokenize:function(e,t){var r,n=s(this.previous);return function(t){return e.enter("attentionSequence"),r=t,a(t)};function a(i){var o,d,c,l;return i===r?(e.consume(i),a):(o=e.exit("attentionSequence"),c=!(d=s(i))||2===d&&n,l=!n||2===n&&d,o._open=42===r?c:c&&(n||!l),o._close=42===r?l:l&&(d||!c),t(i))}},resolveAll:function(e,t){var r,s,c,l,u,p,f,g,h=-1;for(;++h1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:i(d(e[r][1].end),-p),end:d(e[r][1].end)},u={type:p>1?"strongSequence":"emphasisSequence",start:d(e[h][1].start),end:i(d(e[h][1].start),p)},c={type:p>1?"strongText":"emphasisText",start:d(e[r][1].end),end:d(e[h][1].start)},s={type:p>1?"strong":"emphasis",start:d(l.start),end:d(u.end)},e[r][1].end=d(l.start),e[h][1].start=d(u.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=n(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=n(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",c,t]]),f=n(f,o(t.parser.constructs.insideSpan.null,e.slice(r+1,h),t)),f=n(f,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[h][1].end.offset-e[h][1].start.offset?(g=2,f=n(f,[["enter",e[h][1],t],["exit",e[h][1],t]])):g=0,a(e,r-1,h-r+3,f),h=r+f.length-g-2;break}h=-1;for(;++h{"use strict";var n=r(277),a=r(6995),s=r(3290),i=r(1207),o={name:"autolink",tokenize:function(e,t,r){var o=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),d};function d(t){return n(t)?(e.consume(t),c):s(t)?p(t):r(t)}function c(e){return 43===e||45===e||46===e||a(e)?l(e):p(e)}function l(t){return 58===t?(e.consume(t),u):(43===t||45===t||46===t||a(t))&&o++<32?(e.consume(t),l):p(t)}function u(t){return 62===t?(e.exit("autolinkProtocol"),m(t)):32===t||60===t||i(t)?r(t):(e.consume(t),u)}function p(t){return 64===t?(e.consume(t),o=0,f):s(t)?(e.consume(t),p):r(t)}function f(e){return a(e)?g(e):r(e)}function g(t){return 46===t?(e.consume(t),o=0,f):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",m(t)):h(t)}function h(t){return(45===t||a(t))&&o++<63?(e.consume(t),45===t?h:g):r(t)}function m(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};e.exports=o},581:(e,t,r)=>{"use strict";var n=r(9056),a=r(6231),s={name:"blockQuote",tokenize:function(e,t,r){var a=this;return function(t){if(62===t)return a.containerState.open||(e.enter("blockQuote",{_container:!0}),a.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),s;return r(t)};function s(r){return n(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return a(e,e.attempt(s,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=s},3382:(e,t,r)=>{"use strict";var n=r(769),a={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),a};function a(a){return n(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}};e.exports=a},4671:(e,t,r)=>{"use strict";var n=r(4537),a=r(6995),s=r(1091),i=r(4900);function o(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var d=o(n),c={name:"characterReference",tokenize:function(e,t,r){var n,o,c=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),u};function u(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),n=31,o=a,f(t))}function p(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,o=i,f):(e.enter("characterReferenceValue"),n=7,o=s,f(t))}function f(s){var i;return 59===s&&l?(i=e.exit("characterReferenceValue"),o!==a||d.default(c.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):o(s)&&l++{"use strict";var n=r(4392),a=r(6377),s=r(557),i=r(6231),o={name:"codeFenced",tokenize:function(e,t,r){var o,d=this,c={tokenize:function(e,t,r){var a=0;return i(e,s,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function s(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(t)}function d(t){return t===o?(e.consume(t),a++,d):a{"use strict";var n=r(4392),a=r(4485),s=r(557),i=r(6231),o={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(d,a,r);function a(r){return null===r?t(r):n(r)?e.attempt(d,a,t)(r):(e.enter("codeFlowValue"),s(r))}function s(t){return null===t||n(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),s)}},resolve:function(e,t){var r={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return a(e,0,0,[["enter",r,t]]),a(e,e.length,0,[["exit",r,t]]),e}},d={tokenize:function(e,t,r){var a=this;return i(e,(function o(d){if(n(d))return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),i(e,o,"linePrefix",5);return s(a.events,"linePrefix")<4?r(d):t(d)}),"linePrefix",5)},partial:!0};e.exports=o},5518:(e,t,r)=>{"use strict";var n=r(4392),a={name:"codeText",tokenize:function(e,t,r){var a,s,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),i++,o):(e.exit("codeTextSequence"),d(t))}function d(t){return null===t?r(t):96===t?(s=e.enter("codeTextSequence"),a=0,l(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),d):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||n(t)?(e.exit("codeTextData"),d(t)):(e.consume(t),c)}function l(r){return 96===r?(e.consume(r),a++,l):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(s.type="codeTextData",c(r))}},resolve:function(e){var t,r,n=e.length-4,a=3;if(("lineEnding"===e[a][1].type||"space"===e[a][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type))for(t=a;++t{"use strict";var n=r(4392),a=r(557),s=r(6308),i=r(6231),o={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(t)};function a(t){return null===t?s(t):n(t)?e.check(d,i,s)(t):(e.consume(t),a)}function s(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function i(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),a}},resolve:function(e){return s(e),e},interruptible:!0,lazy:!0},d={tokenize:function(e,t,r){var s=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,o,"linePrefix")};function o(i){return null===i||n(i)?r(i):s.parser.constructs.disable.null.indexOf("codeIndented")>-1||a(s.events,"linePrefix")<4?e.interrupt(s.parser.constructs.flow,r,t)(i):t(i)}},partial:!0};e.exports=o},8194:(e,t,r)=>{"use strict";var n=r(4392),a=r(6377),s=r(4991),i=r(4559),o=r(9304),d=r(6231),c=r(9943),l=r(5191),u={name:"definition",tokenize:function(e,t,r){var a,l=this;return function(t){return e.enter("definition"),o.call(l,e,u,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function u(t){return a=s(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),c(e,i(e,e.attempt(p,d(e,f,"whitespace"),d(e,f,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function f(s){return null===s||n(s)?(e.exit("definition"),l.parser.defined.indexOf(a)<0&&l.parser.defined.push(a),t(s)):r(s)}}},p={tokenize:function(e,t,r){return function(t){return a(t)?c(e,s)(t):r(t)};function s(t){return 34===t||39===t||40===t?l(e,d(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||n(e)?t(e):r(e)}},partial:!0};e.exports=u},4559:(e,t,r)=>{"use strict";var n=r(1207),a=r(6377),s=r(4392);e.exports=function(e,t,r,i,o,d,c,l,u){var p=u||1/0,f=0;return function(t){if(60===t)return e.enter(i),e.enter(o),e.enter(d),e.consume(t),e.exit(d),g;if(n(t)||41===t)return r(t);return e.enter(i),e.enter(c),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(t)};function g(r){return 62===r?(e.enter(d),e.consume(r),e.exit(d),e.exit(o),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(l),g(t)):null===t||60===t||s(t)?r(t):(e.consume(t),92===t?m:h)}function m(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function y(s){return 40===s?++f>p?r(s):(e.consume(s),y):41===s?f--?(e.consume(s),y):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(i),t(s)):null===s||a(s)?f?r(s):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(i),t(s)):n(s)?r(s):(e.consume(s),92===s?b:y)}function b(t){return 40===t||41===t||92===t?(e.consume(t),y):y(t)}}},9304:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056);e.exports=function(e,t,r,s,i,o){var d,c=this,l=0;return function(t){return e.enter(s),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(a){return null===a||91===a||93===a&&!d||94===a&&!l&&"_hiddenFootnoteSupport"in c.parser.constructs||l>999?r(a):93===a?(e.exit(o),e.enter(i),e.consume(a),e.exit(i),e.exit(s),t):n(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(a))}function p(t){return null===t||91===t||93===t||n(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),d=d||!a(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,p):p(t)}}},6231:(e,t,r)=>{"use strict";var n=r(9056);e.exports=function(e,t,r,a){var s=a?a-1:1/0,i=0;return function(a){if(n(a))return e.enter(r),o(a);return t(a)};function o(a){return n(a)&&i++{"use strict";var n=r(4392),a=r(6231);e.exports=function(e,t,r,s,i,o){var d;return function(t){return e.enter(s),e.enter(i),e.consume(t),e.exit(i),d=40===t?41:t,c};function c(r){return r===d?(e.enter(i),e.consume(r),e.exit(i),e.exit(s),t):(e.enter(o),l(r))}function l(t){return t===d?(e.exit(o),c(d)):null===t?r(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===d||null===t||n(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?p:u)}function p(t){return t===d||92===t?(e.consume(t),u):u(t)}}},9943:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056),s=r(6231);e.exports=function(e,t){var r;return function i(o){if(n(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,i;if(a(o))return s(e,i,r?"linePrefix":"lineSuffix")(o);return t(o)}}},462:(e,t,r)=>{"use strict";var n=r(4392),a={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),a};function a(a){return n(a)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(a)):r(a)}}};e.exports=a},1034:(e,t,r)=>{"use strict";var n=r(4392),a=r(6377),s=r(9056),i=r(4485),o=r(6231),d={name:"headingAtx",tokenize:function(e,t,r){var i=this,d=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(n){return 35===n&&d++<6?(e.consume(n),c):null===n||a(n)?(e.exit("atxHeadingSequence"),i.interrupt?t(n):l(n)):r(n)}function l(r){return 35===r?(e.enter("atxHeadingSequence"),u(r)):null===r||n(r)?(e.exit("atxHeading"),t(r)):s(r)?o(e,l,"whitespace")(r):(e.enter("atxHeadingText"),p(r))}function u(t){return 35===t?(e.consume(t),u):(e.exit("atxHeadingSequence"),l(t))}function p(t){return null===t||35===t||a(t)?(e.exit("atxHeadingText"),l(t)):(e.consume(t),p)}},resolve:function(e,t){var r,n,a=e.length-2,s=3;"whitespace"===e[s][1].type&&(s+=2);a-2>s&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(s===a-1||a-4>s&&"whitespace"===e[a-2][1].type)&&(a-=s+1===a?2:4);a>s&&(r={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},n={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},i(e,s,a-s+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};e.exports=d},4428:(e,t,r)=>{"use strict";var n=r(277),a=r(6995),s=r(4392),i=r(6377),o=r(9056),d=r(9393),c=r(8971),l=r(7322),u=r(6941),p={name:"htmlFlow",tokenize:function(e,t,r){var u,p,g,h,m,y=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),b};function b(a){return 33===a?(e.consume(a),v):47===a?(e.consume(a),E):63===a?(e.consume(a),u=3,y.interrupt?t:G):n(a)?(e.consume(a),g=d(a),p=!0,T):r(a)}function v(a){return 45===a?(e.consume(a),u=2,R):91===a?(e.consume(a),u=5,g="CDATA[",h=0,x):n(a)?(e.consume(a),u=4,y.interrupt?t:G):r(a)}function R(n){return 45===n?(e.consume(n),y.interrupt?t:G):r(n)}function x(n){return n===g.charCodeAt(h++)?(e.consume(n),h===g.length?y.interrupt?t:O:x):r(n)}function E(t){return n(t)?(e.consume(t),g=d(t),T):r(t)}function T(n){return null===n||47===n||62===n||i(n)?47!==n&&p&&l.indexOf(g.toLowerCase())>-1?(u=1,y.interrupt?t(n):O(n)):c.indexOf(g.toLowerCase())>-1?(u=6,47===n?(e.consume(n),w):y.interrupt?t(n):O(n)):(u=7,y.interrupt?r(n):p?A(n):S(n)):45===n||a(n)?(e.consume(n),g+=d(n),T):r(n)}function w(n){return 62===n?(e.consume(n),y.interrupt?t:O):r(n)}function S(t){return o(t)?(e.consume(t),S):D(t)}function A(t){return 47===t?(e.consume(t),D):58===t||95===t||n(t)?(e.consume(t),j):o(t)?(e.consume(t),A):D(t)}function j(t){return 45===t||46===t||58===t||95===t||a(t)?(e.consume(t),j):C(t)}function C(t){return 61===t?(e.consume(t),k):o(t)?(e.consume(t),C):A(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),m=t,_):o(t)?(e.consume(t),k):(m=void 0,P(t))}function _(t){return t===m?(e.consume(t),I):null===t||s(t)?r(t):(e.consume(t),_)}function P(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||i(t)?C(t):(e.consume(t),P)}function I(e){return 47===e||62===e||o(e)?A(e):r(e)}function D(t){return 62===t?(e.consume(t),N):r(t)}function N(t){return o(t)?(e.consume(t),N):null===t||s(t)?O(t):r(t)}function O(t){return 45===t&&2===u?(e.consume(t),B):60===t&&1===u?(e.consume(t),M):62===t&&4===u?(e.consume(t),q):63===t&&3===u?(e.consume(t),G):93===t&&5===u?(e.consume(t),H):!s(t)||6!==u&&7!==u?null===t||s(t)?F(t):(e.consume(t),O):e.check(f,q,F)(t)}function F(t){return e.exit("htmlFlowData"),L(t)}function L(t){return null===t?W(t):s(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L):(e.enter("htmlFlowData"),O(t))}function B(t){return 45===t?(e.consume(t),G):O(t)}function M(t){return 47===t?(e.consume(t),g="",U):O(t)}function U(t){return 62===t&&l.indexOf(g.toLowerCase())>-1?(e.consume(t),q):n(t)&&g.length<8?(e.consume(t),g+=d(t),U):O(t)}function H(t){return 93===t?(e.consume(t),G):O(t)}function G(t){return 62===t?(e.consume(t),q):O(t)}function q(t){return null===t||s(t)?(e.exit("htmlFlowData"),W(t)):(e.consume(t),q)}function W(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},f={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(u,t,r)}},partial:!0};e.exports=p},4945:(e,t,r)=>{"use strict";var n=r(277),a=r(6995),s=r(4392),i=r(6377),o=r(9056),d=r(6231),c={name:"htmlText",tokenize:function(e,t,r){var c,l,u,p,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),g};function g(t){return 33===t?(e.consume(t),h):47===t?(e.consume(t),C):63===t?(e.consume(t),A):n(t)?(e.consume(t),P):r(t)}function h(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),l="CDATA[",u=0,x):n(t)?(e.consume(t),S):r(t)}function m(t){return 45===t?(e.consume(t),y):r(t)}function y(t){return null===t||62===t?r(t):45===t?(e.consume(t),b):v(t)}function b(e){return null===e||62===e?r(e):v(e)}function v(t){return null===t?r(t):45===t?(e.consume(t),R):s(t)?(p=v,M(t)):(e.consume(t),v)}function R(t){return 45===t?(e.consume(t),H):v(t)}function x(t){return t===l.charCodeAt(u++)?(e.consume(t),u===l.length?E:x):r(t)}function E(t){return null===t?r(t):93===t?(e.consume(t),T):s(t)?(p=E,M(t)):(e.consume(t),E)}function T(t){return 93===t?(e.consume(t),w):E(t)}function w(t){return 62===t?H(t):93===t?(e.consume(t),w):E(t)}function S(t){return null===t||62===t?H(t):s(t)?(p=S,M(t)):(e.consume(t),S)}function A(t){return null===t?r(t):63===t?(e.consume(t),j):s(t)?(p=A,M(t)):(e.consume(t),A)}function j(e){return 62===e?H(e):A(e)}function C(t){return n(t)?(e.consume(t),k):r(t)}function k(t){return 45===t||a(t)?(e.consume(t),k):_(t)}function _(t){return s(t)?(p=_,M(t)):o(t)?(e.consume(t),_):H(t)}function P(t){return 45===t||a(t)?(e.consume(t),P):47===t||62===t||i(t)?I(t):r(t)}function I(t){return 47===t?(e.consume(t),H):58===t||95===t||n(t)?(e.consume(t),D):s(t)?(p=I,M(t)):o(t)?(e.consume(t),I):H(t)}function D(t){return 45===t||46===t||58===t||95===t||a(t)?(e.consume(t),D):N(t)}function N(t){return 61===t?(e.consume(t),O):s(t)?(p=N,M(t)):o(t)?(e.consume(t),N):I(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,F):s(t)?(p=O,M(t)):o(t)?(e.consume(t),O):(e.consume(t),c=void 0,B)}function F(t){return t===c?(e.consume(t),L):null===t?r(t):s(t)?(p=F,M(t)):(e.consume(t),F)}function L(e){return 62===e||47===e||i(e)?I(e):r(e)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||i(t)?I(t):(e.consume(t),B)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d(e,U,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function U(t){return e.enter("htmlTextData"),p(t)}function H(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};e.exports=c},9255:(e,t,r)=>{"use strict";var n=r(6377),a=r(5911),s=r(4485),i=r(4991),o=r(3173),d=r(1339),c=r(4559),l=r(9304),u=r(5191),p=r(9943),f={name:"labelEnd",tokenize:function(e,t,r){var n,a,s=this,o=s.events.length;for(;o--;)if(("labelImage"===s.events[o][1].type||"labelLink"===s.events[o][1].type)&&!s.events[o][1]._balanced){n=s.events[o][1];break}return function(t){if(!n)return r(t);return n._inactive?c(t):(a=s.parser.defined.indexOf(i(s.sliceSerialize({start:n.end,end:s.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),d)};function d(r){return 40===r?e.attempt(g,t,a?t:c)(r):91===r?e.attempt(h,t,a?e.attempt(m,t,c):c)(r):a?t(r):c(r)}function c(e){return n._balanced=!0,r(e)}},resolveTo:function(e,t){var r,n,i,c,l,u,p,f=e.length,g=0;for(;f--;)if(c=e[f][1],l){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(u){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(l=f,"labelLink"!==c.type)){g=2;break}}else"labelEnd"===c.type&&(u=f);return r={type:"labelLink"===e[l][1].type?"link":"image",start:d(e[l][1].start),end:d(e[e.length-1][1].end)},n={type:"label",start:d(e[l][1].start),end:d(e[u][1].end)},i={type:"labelText",start:d(e[l+g+2][1].end),end:d(e[u-2][1].start)},p=a(p=[["enter",r,t],["enter",n,t]],e.slice(l+1,l+g+3)),p=a(p,[["enter",i,t]]),p=a(p,o(t.parser.constructs.insideSpan.null,e.slice(l+g+4,u-3),t)),p=a(p,[["exit",i,t],e[u-2],e[u-1],["exit",n,t]]),p=a(p,e.slice(u+1)),p=a(p,[["exit",r,t]]),s(e,l,e.length,p),e},resolveAll:function(e){var t,r=-1;for(;++r{"use strict";var n={name:"labelStartImage",tokenize:function(e,t,r){var n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),s):r(t)}function s(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:r(9255).resolveAll};e.exports=n},721:(e,t,r)=>{"use strict";var n={name:"labelStartLink",tokenize:function(e,t,r){var n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:r(9255).resolveAll};e.exports=n},2836:(e,t,r)=>{"use strict";var n=r(6231),a={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n(e,t,"linePrefix")}}};e.exports=a},1699:(e,t,r)=>{"use strict";var n=r(1091),a=r(9056),s=r(557),i=r(353),o=r(6231),d=r(6941),c=r(5861),l={name:"list",tokenize:function(e,t,r){var o=this,l=s(o.events,"linePrefix"),p=0;return function(t){var a=o.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!o.containerState.marker||t===o.containerState.marker:n(t)){if(o.containerState.type||(o.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(c,r,g)(t):g(t);if(!o.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return r(t)};function f(t){return n(t)&&++p<10?(e.consume(t),f):(!o.interrupt||p<2)&&(o.containerState.marker?t===o.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),g(t)):r(t)}function g(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||t,e.check(d,o.interrupt?r:h,e.attempt(u,y,m))}function h(e){return o.containerState.initialBlankLine=!0,l++,y(e)}function m(t){return a(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),y):r(t)}function y(r){return o.containerState.size=l+i(o.sliceStream(e.exit("listItemPrefix"))),t(r)}},continuation:{tokenize:function(e,t,r){var n=this;return n.containerState._closeFlow=void 0,e.check(d,(function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,o(e,t,"listItemIndent",n.containerState.size+1)(r)}),(function(r){if(n.containerState.furtherBlankLines||!a(r))return n.containerState.furtherBlankLines=n.containerState.initialBlankLine=void 0,s(r);return n.containerState.furtherBlankLines=n.containerState.initialBlankLine=void 0,e.attempt(p,t,s)(r)}));function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,o(e,e.attempt(l,t,r),"linePrefix",n.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},u={tokenize:function(e,t,r){var n=this;return o(e,(function(e){return a(e)||!s(n.events,"listItemPrefixWhitespace")?r(e):t(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},p={tokenize:function(e,t,r){var n=this;return o(e,(function(e){return s(n.events,"listItemIndent")===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};e.exports=l},6941:(e,t,r)=>{"use strict";var n=r(4392),a=r(6231),s={tokenize:function(e,t,r){return a(e,(function(e){return null===e||n(e)?t(e):r(e)}),"linePrefix")},partial:!0};e.exports=s},1862:(e,t,r)=>{"use strict";var n=r(4392),a=r(1339),s=r(6231),i={name:"setextUnderline",tokenize:function(e,t,r){var a,i,o=this,d=o.events.length;for(;d--;)if("lineEnding"!==o.events[d][1].type&&"linePrefix"!==o.events[d][1].type&&"content"!==o.events[d][1].type){i="paragraph"===o.events[d][1].type;break}return function(t){if(!o.lazy&&(o.interrupt||i))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),a=t,c(t);return r(t)};function c(t){return t===a?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),s(e,l,"lineSuffix")(t))}function l(a){return null===a||n(a)?(e.exit("setextHeadingLine"),t(a)):r(a)}},resolveTo:function(e,t){var r,n,s,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),s||"definition"!==e[o][1].type||(s=o);i={type:"setextHeading",start:a(e[n][1].start),end:a(e[e.length-1][1].end)},e[n][1].type="setextHeadingText",s?(e.splice(n,0,["enter",i,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end=a(e[s][1].end)):e[r][1]=i;return e.push(["exit",i,t]),e}};e.exports=i},5861:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056),s=r(6231),i={name:"thematicBreak",tokenize:function(e,t,r){var i,o=0;return function(t){return e.enter("thematicBreak"),i=t,d(t)};function d(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):a(l)?s(e,d,"whitespace")(l):o<3||null!==l&&!n(l)?r(l):(e.exit("thematicBreak"),t(l))}function c(t){return t===i?(e.consume(t),o++,c):(e.exit("thematicBreakSequence"),d(t))}}};e.exports=i},5911:(e,t,r)=>{"use strict";var n=r(4485);e.exports=function(e,t){return e.length?(n(e,e.length,0,t),e):t}},4485:(e,t,r)=>{"use strict";var n=r(7327);e.exports=function(e,t,r,a){var s,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,a.length<1e4)(s=Array.from(a)).unshift(t,r),n.apply(e,s);else for(r&&n.apply(e,[t,r]);o{"use strict";var n=r(6377),a=r(5414),s=r(6548);e.exports=function(e){return null===e||n(e)||s(e)?1:a(e)?2:void 0}},6369:(e,t,r)=>{"use strict";var n=r(8025),a=r(4485),s=r(9990);function i(e,t){var r,a,i,d;for(r in t)for(d in a=n.call(e,r)?e[r]:e[r]={},i=t[r])a[d]=o(s(i[d]),n.call(a,d)?a[d]:[])}function o(e,t){for(var r=-1,n=[];++r{"use strict";var n=r(3667),a=r(4392),s=r(5911),i=r(4485),o=r(9990),d=r(3173),c=r(6392),l=r(1339),u=r(2569);e.exports=function(e,t,r){var p=r?l(r):{line:1,column:1,offset:0},f={},g=[],h=[],m=[],y={consume:function(e){a(e)?(p.line++,p.column=1,p.offset+=-3===e?2:1,j()):-1!==e&&(p.column++,p.offset++);p._bufferIndex<0?p._index++:(p._bufferIndex++,p._bufferIndex===h[p._index].length&&(p._bufferIndex=-1,p._index++));b.previous=e},enter:function(e,t){var r=t||{};return r.type=e,r.start=x(),b.events.push(["enter",r,b]),m.push(r),r},exit:function(e){var t=m.pop();return t.end=x(),b.events.push(["exit",t,b]),t},attempt:S((function(e,t){A(e,t.from)})),check:S(w),interrupt:S(w,{interrupt:!0}),lazy:S(w,{lazy:!0})},b={previous:null,events:[],parser:e,sliceStream:R,sliceSerialize:function(e){return c(R(e))},now:x,defineSkip:function(e){f[e.line]=e.column,j()},write:function(e){if(h=s(h,e),E(),null!==h[h.length-1])return[];return A(t,0),b.events=d(g,b.events,b),b.events}},v=t.tokenize.call(b,y);return t.resolveAll&&g.push(t),p._index=0,p._bufferIndex=-1,b;function R(e){return u(h,e)}function x(){return l(p)}function E(){for(var e,t;p._index-1)return h();return e.tokenize.call(t?n({},b,t):b,y,g,h)(r)}}function g(t){return e(c,l),a}function h(e){return l.restore(),++d{"use strict";e.exports=function(e){return null===e||void 0===e?[]:"length"in e?e:[e]}},8375:e=>{"use strict";e.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}},4991:e=>{"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},557:(e,t,r)=>{"use strict";var n=r(353);e.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?n(r[2].sliceStream(r[1])):0}},8254:(e,t,r)=>{"use strict";var n=r(9393);e.exports=function(e){return function(t){return e.test(n(t))}}},3173:e=>{"use strict";e.exports=function(e,t,r){for(var n,a=[],s=-1;++s{"use strict";var n=r(9393);e.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535===(65535&r)||65534===(65535&r)||r>1114111?"\ufffd":n(r)}},6392:(e,t,r)=>{"use strict";var n=r(9393);e.exports=function(e){for(var t,r,a,s=-1,i=[];++s{"use strict";var n=r(3667);e.exports=function(e){return n({},e)}},353:e=>{"use strict";e.exports=function(e){for(var t=-1,r=0;++t{"use strict";e.exports=function(e,t){var r,n=t.start._index,a=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;return n===s?r=[e[n].slice(a,i)]:(r=e.slice(n,s),a>-1&&(r[0]=r[0].slice(a)),i>0&&r.push(e[s].slice(0,i))),r}},6308:(e,t,r)=>{"use strict";var n=r(3667),a=r(4485),s=r(1339);function i(e,t){for(var r,n,s,i,o,d,c=e[t][1],l=e[t][2],u=t-1,p=[],f=c._tokenizer||l.parser[c.contentType](c.start),g=f.events,h=[],m={};c;){for(;e[++u][1]!==c;);p.push(u),c._tokenizer||(r=l.sliceStream(c),c.next||r.push(null),n&&f.defineSkip(c.start),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(r),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),n=c,c=c.next}for(c=n,s=g.length;s--;)"enter"===g[s][0]?i=!0:i&&g[s][1].type===g[s-1][1].type&&g[s][1].start.line!==g[s][1].end.line&&(y(g.slice(s+1,o)),c._tokenizer=c.next=void 0,c=c.previous,o=s+1);for(f.events=c._tokenizer=c.next=void 0,y(g.slice(0,o)),s=-1,d=0;++s{"use strict";var t;e.exports=function(e){var r,n="&"+e+";";if((t=t||document.createElement("i")).innerHTML=n,59===(r=t.textContent).charCodeAt(r.length-1)&&"semi"!==e)return!1;return r!==n&&r}},1676:(e,t,r)=>{"use strict";e.exports=function(e){var t=this;this.Parser=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var n=r(5184)},6745:(e,t,r)=>{"use strict";var n=r(4918);e.exports=s,s.wrap=n;var a=[].slice;function s(){var e=[],t={run:function(){var t=-1,r=a.call(arguments,0,-1),s=arguments[arguments.length-1];if("function"!==typeof s)throw new Error("Expected function as last argument, not "+s);(function i(o){var d=e[++t],c=a.call(arguments,0).slice(1),l=r.length,u=-1;if(o)s(o);else{for(;++u{"use strict";var t=[].slice;e.exports=function(e,r){var n;return function(){var r,i=t.call(arguments,0),o=e.length>i.length;o&&i.push(a);try{r=e.apply(null,i)}catch(d){if(o&&n)throw d;return a(d)}o||(r&&"function"===typeof r.then?r.then(s,a):r instanceof Error?a(r):s(r))};function a(){n||(n=!0,r.apply(null,arguments))}function s(e){a(null,e)}}},282:(e,t,r)=>{"use strict";var n=r(6415),a=r(1046),s=r(432),i=r(3731),o=r(6745),d=r(9418);e.exports=function e(){var t,r=[],a=o(),b={},v=-1;return R.data=function(e,r){if("string"===typeof e)return 2===arguments.length?(h("data",t),b[e]=r,R):l.call(b,e)&&b[e]||null;if(e)return h("data",t),b=e,R;return b},R.freeze=x,R.attachers=r,R.use=function(e){var n;if(h("use",t),null===e||void 0===e);else if("function"===typeof e)l.apply(null,arguments);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?d(e):a(e)}n&&(b.settings=s(b.settings||{},n));return R;function a(e){d(e.plugins),e.settings&&(n=s(n||{},e.settings))}function o(e){if("function"===typeof e)l(e);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):a(e)}}function d(e){var t=-1;if(null===e||void 0===e);else{if("object"!==typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t{"use strict";var t={}.hasOwnProperty;function r(e){return e&&"object"===typeof e||(e={}),a(e.line)+":"+a(e.column)}function n(e){return e&&"object"===typeof e||(e={}),r(e.start)+"-"+r(e.end)}function a(e){return e&&"number"===typeof e?e:1}e.exports=function(e){if(!e||"object"!==typeof e)return"";if(t.call(e,"position")||t.call(e,"type"))return n(e.position);if(t.call(e,"start")||t.call(e,"end"))return n(e);if(t.call(e,"line")||t.call(e,"column"))return r(e);return""}},851:(e,t,r)=>{"use strict";var n=r(6934);function a(){}e.exports=i,a.prototype=Error.prototype,i.prototype=new a;var s=i.prototype;function i(e,t,r){var a,s,i;"string"===typeof t&&(r=t,t=null),a=function(e){var t,r=[null,null];"string"===typeof e&&(-1===(t=e.indexOf(":"))?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1)));return r}(r),s=n(t)||"1:1",i={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(i=t,t=t.start):i.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=s,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=i,this.source=a[0],this.ruleId=a[1]}s.file="",s.name="",s.reason="",s.message="",s.stack="",s.fatal=null,s.column=null,s.line=null},9418:(e,t,r)=>{"use strict";e.exports=r(2276)},8884:(e,t,r)=>{"use strict";var n=r(4322),a=r(8833),s=r(1046);e.exports=d;var i={}.hasOwnProperty,o=["history","path","basename","stem","extname","dirname"];function d(e){var t,r;if(e){if("string"===typeof e||s(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof d))return new d(e);for(this.data={},this.messages=[],this.history=[],this.cwd=a.cwd(),r=-1;++r-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+n.sep+"`")}function l(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}d.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(d.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){l(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(d.prototype,"dirname",{get:function(){return"string"===typeof this.path?n.dirname(this.path):void 0},set:function(e){u(this.path,"dirname"),this.path=n.join(e||"",this.basename)}}),Object.defineProperty(d.prototype,"basename",{get:function(){return"string"===typeof this.path?n.basename(this.path):void 0},set:function(e){l(e,"basename"),c(e,"basename"),this.path=n.join(this.dirname||"",e)}}),Object.defineProperty(d.prototype,"extname",{get:function(){return"string"===typeof this.path?n.extname(this.path):void 0},set:function(e){if(c(e,"extname"),u(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=n.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(d.prototype,"stem",{get:function(){return"string"===typeof this.path?n.basename(this.path,this.extname):void 0},set:function(e){l(e,"stem"),c(e,"stem"),this.path=n.join(this.dirname||"",e+(this.extname||""))}})},2276:(e,t,r)=>{"use strict";var n=r(851),a=r(8884);e.exports=a,a.prototype.message=function(e,t,r){var a=new n(e,t,r);this.path&&(a.name=this.path+":"+a.name,a.file=this.path);return a.fatal=!1,this.messages.push(a),a},a.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},a.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},4322:(e,t)=>{"use strict";function r(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var n,a,s,i,o=0,d=-1;if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');if(r(e),n=e.length,void 0===t||!t.length||t.length>e.length){for(;n--;)if(47===e.charCodeAt(n)){if(s){o=n+1;break}}else d<0&&(s=!0,d=n+1);return d<0?"":e.slice(o,d)}if(t===e)return"";a=-1,i=t.length-1;for(;n--;)if(47===e.charCodeAt(n)){if(s){o=n+1;break}}else a<0&&(s=!0,a=n+1),i>-1&&(e.charCodeAt(n)===t.charCodeAt(i--)?i<0&&(d=n):(i=-1,d=a));o===d?d=a:d<0&&(d=e.length);return e.slice(o,d)},t.dirname=function(e){var t,n,a;if(r(e),!e.length)return".";t=-1,a=e.length;for(;--a;)if(47===e.charCodeAt(a)){if(n){t=a;break}}else n||(n=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,n,a,s=-1,i=0,o=-1,d=0;r(e),a=e.length;for(;a--;)if(47!==(n=e.charCodeAt(a)))o<0&&(t=!0,o=a+1),46===n?s<0?s=a:1!==d&&(d=1):s>-1&&(d=-1);else if(t){i=a+1;break}if(s<0||o<0||0===d||1===d&&s===o-1&&s===i+1)return"";return e.slice(s,o)},t.join=function(){var e,t=-1;for(;++t2){if((n=a.lastIndexOf("/"))!==a.length-1){n<0?(a="",s=0):s=(a=a.slice(0,n)).length-1-a.lastIndexOf("/"),i=d,o=0;continue}}else if(a.length){a="",s=0,i=d,o=0;continue}t&&(a=a.length?a+"/..":"..",s=2)}else a.length?a+="/"+e.slice(i+1,d):a=e.slice(i+1,d),s=d-i-1;i=d,o=0}else 46===r&&o>-1?o++:o=-1}return a}(e,!t),n.length||t||(n=".");n.length&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},t.sep="/"},8833:(e,t)=>{"use strict";t.cwd=function(){return"/"}},4400:e=>{"use strict";var t,r="";e.exports=function(e,n){if("string"!==typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var a=e.length*n;if(t!==e||"undefined"===typeof t)t=e,r="";else if(r.length>=a)return r.substr(0,a);for(;a>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,a)}},1752:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(5965));t.default=function(e,t){var r=null;if(!e||"string"!==typeof e)return r;var n=(0,a.default)(e),s="function"===typeof t;return n.forEach((function(e){if("declaration"===e.type){var n=e.property,a=e.value;s?t(n,a,e):a&&((r=r||{})[n]=a)}})),r}},872:function(e,t,r){!function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!==typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var n=Object.freeze({__proto__:null,get DEFAULT_EXTENSIONS(){return X7},get File(){return pQ},get buildExternalHelpers(){return BQ},get createConfigItem(){return U4},get createConfigItemAsync(){return B4},get createConfigItemSync(){return M4},get getEnv(){return t$},get loadOptions(){return F4},get loadOptionsAsync(){return N4},get loadOptionsSync(){return O4},get loadPartialConfig(){return P4},get loadPartialConfigAsync(){return k4},get loadPartialConfigSync(){return _4},get parse(){return z7},get parseAsync(){return K7},get parseSync(){return V7},get resolvePlugin(){return QQ},get resolvePreset(){return $Q},get template(){return $U},get tokTypes(){return QB},get transform(){return N7},get transformAsync(){return F7},get transformFile(){return L7},get transformFileAsync(){return M7},get transformFileSync(){return B7},get transformFromAst(){return H7},get transformFromAstAsync(){return q7},get transformFromAstSync(){return G7},get transformSync(){return O7},get traverse(){return cz},get types(){return bx},get version(){return Y7}});function a(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,s,i,o=[],d=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);d=!0);}catch(e){c=!0,a=e}finally{try{if(!d&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return o}}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",d=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var s=t&&t.prototype instanceof b?t:b,i=Object.create(s.prototype),o=new P(n||[]);return a(i,"_invoke",{value:j(e,r,o)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",g="suspendedYield",h="executing",m="completed",y={};function b(){}function v(){}function R(){}var x={};l(x,o,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(I([])));T&&T!==r&&n.call(T,o)&&(x=T);var w=R.prototype=b.prototype=Object.create(x);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function r(a,s,i,o){var d=p(e[a],e,s);if("throw"!==d.type){var c=d.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(d.arg)}var s;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return s=s?s.then(a,a):a()}})}function j(t,r,n){var a=f;return function(s,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===s)throw i;return{value:e,done:!0}}for(n.method=s,n.arg=i;;){var o=n.delegate;if(o){var d=C(o,n);if(d){if(d===y)continue;return d}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var c=p(t,r,n);if("normal"===c.type){if(a=n.done?m:g,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function C(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=p(a,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,y;var i=s.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function r(){for(;++a=0;--s){var i=this.tryEntries[s],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var d=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(d&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function i(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function o(e){var t=i(e,"string");return"symbol"==typeof t?t:String(t)}function d(e,t,r,n,a,s,i){try{var o=e[s](i),d=o.value}catch(mZ){return void r(mZ)}o.done?t(d):Promise.resolve(d).then(n,a)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var s=e.apply(t,r);function i(e){d(s,n,a,i,o,"next",e)}function o(e){d(s,n,a,i,o,"throw",e)}i(void 0)}))}}function l(e,t){for(var r=0;r=0||(a[r]=e[r]);return a}function R(e,t){if(null==e)return{};var r,n,a=v(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return t||(t=e.slice(0)),e.raw=t,e}function T(e,t){return A(e)||a(e,t)||C(e,t)||P()}function w(e){return S(e)||j(e)||C(e)||_()}function S(e){if(Array.isArray(e))return k(e)}function A(e){if(Array.isArray(e))return e}function j(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e,t){if(e){if("string"===typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var D=["Identifier","JSXIdentifier"],N=["MemberExpression"],O=["Identifier"],F=["Statement"],L=["Expression"],B=["Scopable","Pattern"],M=null,U=null,H=["VariableDeclaration"],G=null,q=null,W=null,z=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],V=["RestElement"],K=["RestElement"],Y=["ExistsTypeAnnotation"],X=["NumberLiteralTypeAnnotation"],J=["ForOfStatement"],Q=Object.freeze({__proto__:null,BindingIdentifier:O,BlockScoped:U,ExistentialTypeParam:Y,Expression:L,Flow:z,ForAwaitStatement:J,Generated:q,NumericLiteralTypeAnnotation:X,Pure:W,Referenced:M,ReferencedIdentifier:D,ReferencedMemberExpression:N,RestProperty:V,Scope:B,SpreadProperty:K,Statement:F,User:G,Var:H});function $(e,t){for(var r=0,n=Object.keys(t);ra.length)return!1;for(var i=0,o=s.length-1;i1)for(var r=1;re)return!1;if((r+=t[n+1])>=e)return!0}return!1}function zi(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Ui.test(String.fromCharCode(e)):Wi(e,Gi)))}function Vi(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Hi.test(String.fromCharCode(e)):Wi(e,Gi)||Wi(e,qi))))}function Ki(e){for(var t=!0,r=0;r=48&&e<=57},so={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},io={bin:function(e){return 48===e||49===e},oct:function(e){return e>=48&&e<=55},dec:function(e){return e>=48&&e<=57},hex:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}};function oo(e,t,r,n,a,s){for(var i=r,o=n,d=a,c="",l=null,u=r,p=t.length;;){if(r>=p){s.unterminated(i,o,d),c+=t.slice(u,r);break}var f=t.charCodeAt(r);if(co(e,f,t,r)){c+=t.slice(u,r);break}if(92===f){c+=t.slice(u,r);var g=lo(t,r,n,a,"template"===e,s);null!==g.ch||l?c+=g.ch:l={pos:r,lineStart:n,curLine:a},r=g.pos,n=g.lineStart,a=g.curLine,u=r}else 8232===f||8233===f?(++a,n=++r):10===f||13===f?"template"===e?(c+=t.slice(u,r)+"\n",++r,13===f&&10===t.charCodeAt(r)&&++r,++a,u=n=r):s.unterminated(i,o,d):++r}return{pos:r,str:c,firstInvalidLoc:l,lineStart:n,curLine:a,containsInvalid:!!l}}function co(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function lo(e,t,r,n,a,s){var i=!a;t++;var o=function(e){return{pos:t,ch:e,lineStart:r,curLine:n}},d=e.charCodeAt(t++);switch(d){case 110:return o("\n");case 114:return o("\r");case 120:var c,l=uo(e,t,r,n,2,!1,i,s);return c=l.code,t=l.pos,o(null===c?null:String.fromCharCode(c));case 117:var u,p=fo(e,t,r,n,i,s);return u=p.code,t=p.pos,o(null===u?null:String.fromCodePoint(u));case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(a)return o(null);s.strictNumericEscape(t-1,r,n);default:if(d>=48&&d<=55){var f=t-1,g=e.slice(f,t+2).match(/^[0-7]+/)[0],h=parseInt(g,8);h>255&&(g=g.slice(0,-1),h=parseInt(g,8)),t+=g.length-1;var m=e.charCodeAt(t);if("0"!==g||56===m||57===m){if(a)return o(null);s.strictNumericEscape(f,r,n)}return o(String.fromCharCode(h))}return o(String.fromCharCode(d))}}function uo(e,t,r,n,a,s,i,o){var d,c=t,l=po(e,t,r,n,16,a,s,!1,o,!i);return d=l.n,t=l.pos,null===d&&(i?o.invalidEscapeSequence(c,r,n):t=c-1),{code:d,pos:t}}function po(e,t,r,n,a,s,i,o,d,c){for(var l=t,u=16===a?so.hex:so.decBinOct,p=16===a?io.hex:10===a?io.dec:8===a?io.oct:io.bin,f=!1,g=0,h=0,m=null==s?1/0:s;h=97?y-97+10:y>=65?y-65+10:ao(y)?y-48:1/0)>=a){if(b<=9&&c)return{n:null,pos:t};if(b<=9&&d.invalidDigit(t,r,n,a))b=0;else{if(!i)break;b=0,f=!0}}++t,g=g*a+b}else{var v=e.charCodeAt(t-1),R=e.charCodeAt(t+1);if(o){if(Number.isNaN(R)||!p(R)||u.has(v)||u.has(R)){if(c)return{n:null,pos:t};d.unexpectedNumericSeparator(t,r,n)}}else{if(c)return{n:null,pos:t};d.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===l||null!=s&&t-l!==s||f?{n:null,pos:t}:{n:g,pos:t}}function fo(e,t,r,n,a,s){var i;if(123===e.charCodeAt(t)){var o=uo(e,++t,r,n,e.indexOf("}",t)-t,!0,a,s);if(i=o.code,t=o.pos,++t,null!==i&&i>1114111){if(!a)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else{var d=uo(e,t,r,n,4,!1,a,s);i=d.code,t=d.pos}return{code:i,pos:t}}var go=["consequent","body","alternate"],ho=["body","expressions"],mo=["left","init"],yo=["leadingComments","trailingComments","innerComments"],bo=["||","&&","??"],vo=["++","--"],Ro=[">","<",">=","<="],xo=["==","===","!=","!=="],Eo=[].concat(xo,["in","instanceof"]),To=[].concat(w(Eo),Ro),wo=["-","/","%","*","**","&","|",">>",">>>","<<","^"],So=["+"].concat(wo,w(To),["|>"]),Ao=["=","+="].concat(w(wo.map((function(e){return e+"="}))),w(bo.map((function(e){return e+"="})))),jo=["delete","!"],Co=["+","-","~"],ko=["typeof"],_o=["void","throw"].concat(jo,Co,ko),Po={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},Io=Symbol.for("var used to be block scoped"),Do=Symbol.for("should not be considered a local binding"),No={},Oo={},Fo={},Lo={},Bo={},Mo={},Uo={};function Ho(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function Go(e){return{validate:e}}function qo(e){return"string"===typeof e?$o(e):$o.apply(void 0,w(e))}function Wo(e){return Go(qo(e))}function zo(e){return{validate:e,optional:!0}}function Vo(e){return{validate:qo(e),optional:!0}}function Ko(e){return nd(ed("array"),Jo(e))}function Yo(e){return Ko(qo(e))}function Xo(e){return Go(Yo(e))}function Jo(e){function t(t,r,n){if(Array.isArray(n))for(var a=0;a=2&&"type"in t[0]&&"array"===t[0].type&&!("each"in t[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return n}var ad=["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate"],sd=["default","optional","deprecated","validate"],id={};function od(){for(var e=arguments.length,t=new Array(e),r=0;r0:d&&"object"===typeof d)throw new Error("field defaults can only be primitives or empty arrays currently");n[i]={default:Array.isArray(d)?[]:d,optional:o.optional,deprecated:o.deprecated,validate:o.validate}}for(var c=t.visitor||r.visitor||[],l=t.aliases||r.aliases||[],u=t.builder||r.builder||t.visitor||[],p=0,f=Object.keys(t);p+s+1)throw new TypeError("RestElement must be last element of "+a)}}}),cd("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:$o("Expression"),optional:!0}}}),cd("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:nd(ed("array"),Jo($o("Expression")))}},aliases:["Expression"]}),cd("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:$o("Expression")}}}),cd("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:$o("Expression"),optional:!0},consequent:{validate:nd(ed("array"),Jo($o("Statement")))}}}),cd("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:$o("Expression")},cases:{validate:nd(ed("array"),Jo($o("SwitchCase")))}}}),cd("ThisExpression",{aliases:["Expression"]}),cd("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:$o("Expression")}}}),cd("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:nd($o("BlockStatement"),Object.assign((function(e){if(ki.env.BABEL_TYPES_8_BREAKING&&!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")}),{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:$o("CatchClause")},finalizer:{optional:!0,validate:$o("BlockStatement")}}}),cd("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:$o("Expression")},operator:{validate:Qo.apply(void 0,w(_o))}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),cd("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:ki.env.BABEL_TYPES_8_BREAKING?$o("Identifier","MemberExpression"):$o("Expression")},operator:{validate:Qo.apply(void 0,w(vo))}},visitor:["argument"],aliases:["Expression"]}),cd("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:ed("boolean"),optional:!0},kind:{validate:Qo("var","let","const","using","await using")},declarations:{validate:nd(ed("array"),Jo($o("VariableDeclarator")))}},validate:function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&Li("ForXStatement",e,{left:r})&&1!==r.declarations.length)throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a "+e.type)}}),cd("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!ki.env.BABEL_TYPES_8_BREAKING)return $o("LVal");var e=$o("Identifier","ArrayPattern","ObjectPattern"),t=$o("Identifier");return function(r,n,a){(r.init?e:t)(r,n,a)}}()},definite:{optional:!0,validate:ed("boolean")},init:{optional:!0,validate:$o("Expression")}}}),cd("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:$o("Expression")},body:{validate:$o("Statement")}}}),cd("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:$o("Expression")},body:{validate:$o("Statement")}}}),cd("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{left:{validate:$o("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:$o("Expression")},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0}})}),cd("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{elements:{validate:nd(ed("array"),Jo(Zo("null","PatternLike","LVal")))}})}),cd("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},ld(),ud(),{expression:{validate:ed("boolean")},body:{validate:$o("BlockStatement","Expression")},predicate:{validate:$o("DeclaredPredicate","InferredPredicate"),optional:!0}})}),cd("ClassBody",{visitor:["body"],fields:{body:{validate:nd(ed("array"),Jo($o("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")))}}}),cd("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:$o("Identifier"),optional:!0},typeParameters:{validate:$o("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:$o("ClassBody")},superClass:{optional:!0,validate:$o("Expression")},superTypeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:nd(ed("array"),Jo($o("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},mixins:{validate:$o("InterfaceExtends"),optional:!0}}}),cd("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:$o("Identifier"),optional:!0},typeParameters:{validate:$o("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:$o("ClassBody")},superClass:{optional:!0,validate:$o("Expression")},superTypeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:nd(ed("array"),Jo($o("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},mixins:{validate:$o("InterfaceExtends"),optional:!0},declare:{validate:ed("boolean"),optional:!0},abstract:{validate:ed("boolean"),optional:!0}},validate:function(){var e=$o("Identifier");return function(t,r,n){ki.env.BABEL_TYPES_8_BREAKING&&(Li("ExportDefaultDeclaration",t)||e(n,"id",n.id))}}()}),cd("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:$o("StringLiteral")},exportKind:zo(Qo("type","value")),attributes:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))}}}),cd("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{validate:$o("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression")},exportKind:zo(Qo("value"))}}),cd("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:nd($o("Declaration"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")}),{oneOfNodeTypes:["Declaration"]}),(function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&e.source)throw new TypeError("Cannot export a declaration from a source")}))},attributes:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},specifiers:{default:[],validate:nd(ed("array"),Jo(function(){var e=$o("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=$o("ExportSpecifier");return ki.env.BABEL_TYPES_8_BREAKING?function(r,n,a){(r.source?e:t)(r,n,a)}:e}()))},source:{validate:$o("StringLiteral"),optional:!0},exportKind:zo(Qo("type","value"))}}),cd("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")},exported:{validate:$o("Identifier","StringLiteral")},exportKind:{validate:Qo("type","value"),optional:!0}}}),cd("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!ki.env.BABEL_TYPES_8_BREAKING)return $o("VariableDeclaration","LVal");var e=$o("VariableDeclaration"),t=$o("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return function(r,n,a){Li("VariableDeclaration",a)?e(r,n,a):t(r,n,a)}}()},right:{validate:$o("Expression")},body:{validate:$o("Statement")},await:{default:!1}}}),cd("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{attributes:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo($o("ImportAttribute")))},module:{optional:!0,validate:ed("boolean")},phase:{default:null,validate:Qo("source","defer")},specifiers:{validate:nd(ed("array"),Jo($o("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:$o("StringLiteral")},importKind:{validate:Qo("type","typeof","value"),optional:!0}}}),cd("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")}}}),cd("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")}}}),cd("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:$o("Identifier")},imported:{validate:$o("Identifier","StringLiteral")},importKind:{validate:Qo("type","typeof","value"),optional:!0}}}),cd("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:Qo("source","defer")},source:{validate:$o("Expression")},options:{validate:$o("Expression"),optional:!0}}}),cd("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:nd($o("Identifier"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING){var n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta"}if(!Li("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")}}),{oneOfNodeTypes:["Identifier"]}))},property:{validate:$o("Identifier")}}});var gd=function(){return{abstract:{validate:ed("boolean"),optional:!0},accessibility:{validate:Qo("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:ed("boolean"),optional:!0},key:{validate:nd(function(){var e=$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=$o("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}}},hd=function(){return Object.assign({},ld(),gd(),{params:{validate:nd(ed("array"),Jo($o("Identifier","Pattern","RestElement","TSParameterProperty")))},kind:{validate:Qo("get","set","method","constructor"),default:"method"},access:{validate:nd(ed("string"),Qo("public","private","protected")),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0}})};cd("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},hd(),ud(),{body:{validate:$o("BlockStatement")}})}),cd("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{properties:{validate:nd(ed("array"),Jo($o("RestElement","ObjectProperty")))}})}),cd("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:$o("Expression")}}}),cd("Super",{aliases:["Expression"]}),cd("TaggedTemplateExpression",{visitor:["tag","quasi","typeParameters"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:$o("Expression")},quasi:{validate:$o("TemplateLiteral")},typeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),cd("TemplateElement",{builder:["value","tail"],fields:{value:{validate:nd(td({raw:{validate:ed("string")},cooked:{validate:ed("string"),optional:!0}}),(function(e){var t=e.value.raw,r=!1,n=function(){throw new Error("Internal @babel/types error.")},a=oo("template",t,0,0,0,{unterminated:function(){r=!0},strictNumericEscape:n,invalidEscapeSequence:n,numericSeparatorInEscapeSequence:n,unexpectedNumericSeparator:n,invalidDigit:n,invalidCodePoint:n}),s=a.str,i=a.firstInvalidLoc;if(!r)throw new Error("Invalid raw");e.value.cooked=i?null:s}))},tail:{default:!1}}}),cd("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:nd(ed("array"),Jo($o("TemplateElement")))},expressions:{validate:nd(ed("array"),Jo($o("Expression","TSType")),(function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError("Number of "+e.type+" quasis should be exactly one more than the number of expressions.\nExpected "+(r.length+1)+" quasis but got "+e.quasis.length)}))}}}),cd("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:nd(ed("boolean"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}),{type:"boolean"})),default:!1},argument:{optional:!0,validate:$o("Expression")}}}),cd("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:$o("Expression")}}}),cd("Import",{aliases:["Expression"]}),cd("BigIntLiteral",{builder:["value"],fields:{value:{validate:ed("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),cd("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:$o("Identifier")}}}),cd("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:$o("Expression")},property:{validate:function(){var e=$o("Identifier"),t=$o("Expression"),r=Object.assign((function(r,n,a){(r.computed?t:e)(r,n,a)}),{oneOfNodeTypes:["Expression","Identifier"]});return r}()},computed:{default:!1},optional:{validate:ki.env.BABEL_TYPES_8_BREAKING?nd(ed("boolean"),rd()):ed("boolean")}}}),cd("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:$o("Expression")},arguments:{validate:nd(ed("array"),Jo($o("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:ki.env.BABEL_TYPES_8_BREAKING?nd(ed("boolean"),rd()):ed("boolean")},typeArguments:{validate:$o("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:$o("TSTypeParameterInstantiation"),optional:!0}}}),cd("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},gd(),{value:{validate:$o("Expression"),optional:!0},definite:{validate:ed("boolean"),optional:!0},typeAnnotation:{validate:$o("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},readonly:{validate:ed("boolean"),optional:!0},declare:{validate:ed("boolean"),optional:!0},variance:{validate:$o("Variance"),optional:!0}})}),cd("ClassAccessorProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],fields:Object.assign({},gd(),{key:{validate:nd(function(){var e=$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=$o("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),$o("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:$o("Expression"),optional:!0},definite:{validate:ed("boolean"),optional:!0},typeAnnotation:{validate:$o("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},readonly:{validate:ed("boolean"),optional:!0},declare:{validate:ed("boolean"),optional:!0},variance:{validate:$o("Variance"),optional:!0}})}),cd("ClassPrivateProperty",{visitor:["key","value","decorators","typeAnnotation"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:$o("PrivateName")},value:{validate:$o("Expression"),optional:!0},typeAnnotation:{validate:$o("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo($o("Decorator"))),optional:!0},static:{validate:ed("boolean"),default:!1},readonly:{validate:ed("boolean"),optional:!0},definite:{validate:ed("boolean"),optional:!0},variance:{validate:$o("Variance"),optional:!0}}}),cd("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},hd(),ud(),{kind:{validate:Qo("get","set","method"),default:"method"},key:{validate:$o("PrivateName")},body:{validate:$o("BlockStatement")}})}),cd("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:$o("Identifier")}}}),cd("StaticBlock",{visitor:["body"],fields:{body:{validate:nd(ed("array"),Jo($o("Statement")))}},aliases:["Scopable","BlockParent","FunctionParent"]});var md=od("Flow"),yd=function(e){var t="DeclareClass"===e;md(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends"].concat(w(t?["mixins","implements"]:[]),["body"]),aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),extends:zo(Yo("InterfaceExtends"))},t?{mixins:zo(Yo("InterfaceExtends")),implements:zo(Yo("ClassImplements"))}:{},{body:Wo("ObjectTypeAnnotation")})})};md("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:Wo("FlowType")}}),md("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("boolean"))}}),md("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ClassImplements",{visitor:["id","typeParameters"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterInstantiation")}}),yd("DeclareClass"),md("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),predicate:Vo("DeclaredPredicate")}}),yd("DeclareInterface"),md("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo(["Identifier","StringLiteral"]),body:Wo("BlockStatement"),kind:zo(Qo("CommonJS","ES"))}}),md("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:Wo("TypeAnnotation")}}),md("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),right:Wo("FlowType")}}),md("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),supertype:Vo("FlowType"),impltype:Vo("FlowType")}}),md("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier")}}),md("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:Vo("Flow"),specifiers:zo(Yo(["ExportSpecifier","ExportNamespaceSpecifier"])),source:Vo("StringLiteral"),default:zo(ed("boolean"))}}),md("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:Wo("StringLiteral"),exportKind:zo(Qo("type","value"))}}),md("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:Wo("Flow")}}),md("ExistsTypeAnnotation",{aliases:["FlowType"]}),md("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:Vo("TypeParameterDeclaration"),params:Go(Yo("FunctionTypeParam")),rest:Vo("FunctionTypeParam"),this:Vo("FunctionTypeParam"),returnType:Wo("FlowType")}}),md("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:Vo("Identifier"),typeAnnotation:Wo("FlowType"),optional:zo(ed("boolean"))}}),md("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:Wo(["Identifier","QualifiedTypeIdentifier"]),typeParameters:Vo("TypeParameterInstantiation")}}),md("InferredPredicate",{aliases:["FlowPredicate"]}),md("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:Wo(["Identifier","QualifiedTypeIdentifier"]),typeParameters:Vo("TypeParameterInstantiation")}}),yd("InterfaceDeclaration"),md("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:zo(Yo("InterfaceExtends")),body:Wo("ObjectTypeAnnotation")}}),md("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:Wo("FlowType")}}),md("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("number"))}}),md("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:Go(Yo(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:{validate:Yo("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:Yo("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:Yo("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:ed("boolean"),default:!1},inexact:zo(ed("boolean"))}}),md("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:Wo("Identifier"),value:Wo("FlowType"),optional:Go(ed("boolean")),static:Go(ed("boolean")),method:Go(ed("boolean"))}}),md("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:Wo("FlowType"),static:Go(ed("boolean"))}}),md("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:Vo("Identifier"),key:Wo("FlowType"),value:Wo("FlowType"),static:Go(ed("boolean")),variance:Vo("Variance")}}),md("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:Wo(["Identifier","StringLiteral"]),value:Wo("FlowType"),kind:Go(Qo("init","get","set")),static:Go(ed("boolean")),proto:Go(ed("boolean")),optional:Go(ed("boolean")),variance:Vo("Variance"),method:Go(ed("boolean"))}}),md("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:Wo("FlowType")}}),md("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),supertype:Vo("FlowType"),impltype:Wo("FlowType")}}),md("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:Wo("Identifier"),qualification:Wo(["Identifier","QualifiedTypeIdentifier"])}}),md("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("string"))}}),md("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:Wo("FlowType")}}),md("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Wo("Identifier"),typeParameters:Vo("TypeParameterDeclaration"),right:Wo("FlowType")}}),md("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:Wo("FlowType")}}),md("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:Wo("Expression"),typeAnnotation:Wo("TypeAnnotation")}}),md("TypeParameter",{visitor:["bound","default","variance"],fields:{name:Go(ed("string")),bound:Vo("TypeAnnotation"),default:Vo("FlowType"),variance:Vo("Variance")}}),md("TypeParameterDeclaration",{visitor:["params"],fields:{params:Go(Yo("TypeParameter"))}}),md("TypeParameterInstantiation",{visitor:["params"],fields:{params:Go(Yo("FlowType"))}}),md("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("Variance",{builder:["kind"],fields:{kind:Go(Qo("minus","plus"))}}),md("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:Wo("Identifier"),body:Wo(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),md("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo("EnumBooleanMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo("EnumNumberMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:Xo("EnumDefaultedMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Wo("Identifier"),init:Wo("BooleanLiteral")}}),md("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Wo("Identifier"),init:Wo("NumericLiteral")}}),md("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Wo("Identifier"),init:Wo("StringLiteral")}}),md("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Wo("Identifier")}}),md("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Wo("FlowType"),indexType:Wo("FlowType")}}),md("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Wo("FlowType"),indexType:Wo("FlowType"),optional:Go(ed("boolean"))}});var bd=od("JSX");bd("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:$o("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:$o("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),bd("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:$o("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),bd("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:$o("JSXOpeningElement")},closingElement:{optional:!0,validate:$o("JSXClosingElement")},children:{validate:nd(ed("array"),Jo($o("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}},{selfClosing:{validate:ed("boolean"),optional:!0}})}),bd("JSXEmptyExpression",{}),bd("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:$o("Expression","JSXEmptyExpression")}}}),bd("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:$o("Expression")}}}),bd("JSXIdentifier",{builder:["name"],fields:{name:{validate:ed("string")}}}),bd("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:$o("JSXMemberExpression","JSXIdentifier")},property:{validate:$o("JSXIdentifier")}}}),bd("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:$o("JSXIdentifier")},name:{validate:$o("JSXIdentifier")}}}),bd("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:$o("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:{validate:nd(ed("array"),Jo($o("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:$o("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),bd("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:$o("Expression")}}}),bd("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:ed("string")}}}),bd("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:$o("JSXOpeningFragment")},closingFragment:{validate:$o("JSXClosingFragment")},children:{validate:nd(ed("array"),Jo($o("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),bd("JSXOpeningFragment",{aliases:["Immutable"]}),bd("JSXClosingFragment",{aliases:["Immutable"]});for(var vd=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],Rd={Declaration:["Statement"],Pattern:["PatternLike","LVal"]},xd=0,Ed=vd;xd=0)){if(Ft(o))return[o];if(Rs(o))n.set(o.type,o);else if(Dr(o))a.has(o.types)||(t.push.apply(t,w(o.types)),a.add(o.types));else if(rr(o)){var d=hv(o.id);if(r.has(d)){var c,l=r.get(d);l.typeParameters?o.typeParameters&&((c=l.typeParameters.params).push.apply(c,w(o.typeParameters.params)),l.typeParameters.params=mv(l.typeParameters.params)):l=o.typeParameters}else r.set(d,o)}else s.push(o)}}for(var u,p=I(n);!(u=p()).done;){var f=T(u.value,2)[1];s.push(f)}for(var g,h=I(r);!(g=h()).done;){var m=T(g.value,2)[1];s.push(m)}return s}function yv(e){var t=mv(e);return 1===t.length?t[0]:xu(t)}function bv(e){return Te(e)?e.name:e.right.name+"."+bv(e.left)}function vv(e){for(var t=Array.from(e),r=new Map,n=new Map,a=new Set,s=[],i=0;i=0)){if(On(o))return[o];if(_s(o))n.set(o.type,o);else if(ia(o))a.has(o.types)||(t.push.apply(t,w(o.types)),a.add(o.types));else if(Qn(o)&&o.typeParameters){var d=bv(o.typeName);if(r.has(d)){var c,l=r.get(d);l.typeParameters?o.typeParameters&&((c=l.typeParameters.params).push.apply(c,w(o.typeParameters.params)),l.typeParameters.params=vv(l.typeParameters.params)):l=o.typeParameters}else r.set(d,o)}else s.push(o)}}for(var u,p=I(n);!(u=p()).done;){var f=T(u.value,2)[1];s.push(f)}for(var g,h=I(r);!(g=h()).done;){var m=T(g.value,2)[1];s.push(m)}return s}function Rv(e){var t=e.map((function(e){return Da(e)?e.typeAnnotation:e})),r=vv(t);return 1===r.length?r[0]:Kp(r)}function xv(){return Oc("void",hc(0),!0)}var Ev=Function.call.bind(Object.prototype.hasOwnProperty);function Tv(e,t,r,n){return e&&"string"===typeof e.type?Av(e,t,r,n):e}function wv(e,t,r,n){return Array.isArray(e)?e.map((function(e){return Tv(e,t,r,n)})):Tv(e,t,r,n)}function Sv(e,t,r){return void 0===t&&(t=!0),void 0===r&&(r=!1),Av(e,t,r,new Map)}function Av(e,t,r,n){if(void 0===t&&(t=!0),void 0===r&&(r=!1),!e)return e;var a=e.type,s={type:e.type};if(Te(e))s.name=e.name,Ev(e,"optional")&&"boolean"===typeof e.optional&&(s.optional=e.optional),Ev(e,"typeAnnotation")&&(s.typeAnnotation=t?wv(e.typeAnnotation,!0,r,n):e.typeAnnotation);else{if(!Ev(Lo,a))throw new Error('Unknown node type: "'+a+'"');for(var i=0,o=Object.keys(Lo[a]);i=Number.MAX_SAFE_INTEGER?KR.uid=0:KR.uid++};var XR=Function.call.bind(Object.prototype.toString);function JR(e){return"[object RegExp]"===XR(e)}function QR(e){if("object"!==typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function $R(e){if(void 0===e)return uc("undefined");if(!0===e||!1===e)return yc(e);if(null===e)return mc();if("string"===typeof e)return gc(e);var t;if("number"===typeof e)return t=Number.isFinite(e)?hc(Math.abs(e)):Vd("/",Number.isNaN(e)?hc(0):hc(1),hc(0)),(e<0||Object.is(e,-0))&&(t=Oc("-",t)),t;if(JR(e))return bc(e.source,e.toString().match(/\/([a-z]+|)$/)[1]);if(Array.isArray(e))return Wd(e.map($R));if(QR(e)){for(var r=[],n=0,a=Object.keys(e);n=0)return!0}else if(s===e)return!0}return!1}function ox(e){return Xe(e)&&("var"!==e.kind||e[Io])}function dx(e){return xe(e)||at(e)||ox(e)}function cx(e){return!!Oi(e.type,"Immutable")||!!Te(e)&&"undefined"===e.name}function lx(e,t){if("object"!==typeof e||"object"!==typeof t||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=Object.keys(Lo[e.type]||e.type),n=No[e.type],a=0,s=r;a100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(o){var d=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return d*s;case"weeks":case"week":case"w":return d*a;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function o(a){var s=Math.abs(a);return s>=n?Math.round(a/n)+"d":s>=r?Math.round(a/r)+"h":s>=t?Math.round(a/t)+"m":s>=e?Math.round(a/e)+"s":a+"ms"}function d(a){var s=Math.abs(a);return s>=n?c(a,s,n,"day"):s>=r?c(a,s,r,"hour"):s>=t?c(a,s,t,"minute"):s>=e?c(a,s,e,"second"):a+" ms"}function c(e,t,r,n){var a=t>=1.5*r;return Math.round(e/r)+" "+n+(a?"s":"")}return kE=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return i(e);if("number"===r&&isFinite(e))return t.long?d(e):o(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},kE}function NE(e){function t(e){for(var t=0,n=0;n=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function n(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(a=n))})),t.splice(a,0,r)}}function a(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(mZ){}}function s(){var e;try{e=t.storage.getItem("debug")}catch(mZ){}return!e&&"undefined"!==typeof ki&&"env"in ki&&(e=ki.env.DEBUG),e}function i(){try{return localStorage}catch(mZ){}}t.formatArgs=n,t.save=a,t.load=s,t.useColors=r,t.storage=i(),t.destroy=function(){var e=!1;return function(){e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=OE(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(mZ){return"[UnexpectedJSONParseError]: "+mZ.message}}}(IE,IE.exports);var FE=IE.exports,LE=Sv,BE=Xc,ME=Jc,UE=uc,HE=Lc,GE=Bc;function qE(e){if(!e.isExportDeclaration()||e.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(e.isExportDefaultDeclaration()){var t=e.get("declaration"),r=t.isFunctionDeclaration()||t.isClassDeclaration(),n=t.isFunctionExpression()||t.isClassExpression(),a=t.isScope()?t.scope.parent:t.scope,s=t.node.id,i=!1;s?n&&a.hasBinding(s.name)&&(i=!0,s=a.generateUidIdentifier(s.name)):(i=!0,s=a.generateUidIdentifier("default"),(r||n)&&(t.node.id=LE(s)));var o=r?t.node:HE("var",[GE(LE(s),t.node)]),d=BE(null,[ME(LE(s),UE("default"))]);return e.insertAfter(d),e.replaceWith(o),i&&a.registerDeclaration(e),e}if(e.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");var c=e.get("declaration"),l=c.getOuterBindingIdentifiers(),u=Object.keys(l).map((function(e){return ME(UE(e),UE(e))})),p=BE(null,u);return e.insertAfter(p),e.replaceWith(c.node),e}function WE(e){var t=e.context,r=e.node;if(r.computed&&t.maybeQueue(e.get("key")),r.decorators)for(var n,a=I(e.get("decorators"));!(n=a()).done;){var s=n.value;t.maybeQueue(s)}}var zE={FunctionParent:function(e){e.isArrowFunctionExpression()||(e.skip(),e.isMethod()&&WE(e))},Property:function(e){e.isObjectProperty()||(e.skip(),WE(e))}},VE={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||(e.skip(),e.isMethod()&&WE(e))},ObjectProperty:function(e,t){var r,n=e.node,a=e.scope,s=n.key.name;!n.shorthand||s!==t.oldName&&s!==t.newName||a.getBindingIdentifier(s)!==t.binding.identifier||(n.shorthand=!1,null!=(r=n.extra)&&r.shorthand&&(n.extra.shorthand=!1))},"AssignmentExpression|Declaration|VariableDeclarator":function(e,t){if(!e.isVariableDeclaration()){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}}},KE=function(){function e(e,t,r){this.newName=r,this.oldName=t,this.binding=e}var t=e.prototype;return t.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath;if(t.isExportDeclaration()){if(t.isExportDefaultDeclaration()){var r=t.node.declaration;if(ts(r)&&!r.id)return}t.isExportAllDeclaration()||qE(t)}},t.maybeConvertFromClassFunctionDeclaration=function(e){return e},t.maybeConvertFromClassFunctionExpression=function(e){return e},t.rename=function(){var e=this.binding,t=this.oldName,r=this.newName,n=e.scope,a=e.path,s=a.find((function(e){return e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression()}));s&&s.getOuterBindingIdentifiers()[t]===e.identifier&&this.maybeConvertFromExportDeclaration(s),sz(arguments[0]||n.block,lE(VE),n,this,n.path,{discriminant:!0}),arguments[0]||(n.removeOwnBinding(t),n.bindings[r]=e,this.binding.identifier.name=r),s&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},u(e)}(),YE=function(){function e(e){var t=e.identifier,r=e.scope,n=e.path,a=e.kind;this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=t,this.scope=r,this.path=n,this.kind=a,"var"!==a&&"hoisted"!==a||!XE(n)||this.reassign(n),this.clearValue()}var t=e.prototype;return t.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},t.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},t.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},t.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},t.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},t.dereference=function(){this.references--,this.referenced=!!this.references},u(e)}();function XE(e){for(var t=e.parentPath,r=e.key;t;t=(n=t).parentPath,r=n.key,n){var n;if(t.isFunctionParent())return!1;if(t.isWhile()||t.isForXStatement()||t.isForStatement()&&"body"===r)return!0}return!1}var JE,QE,$E={builtin:{Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es2015:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es2017:{Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{AbortController:!1,AbortSignal:!1,addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,"AudioWorkletGlobalScope ":!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,blur:!1,BroadcastChannel:!1,btoa:!1,BudgetService:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ConvolverNode:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSConditionRule:!1,CSSFontFaceRule:!1,CSSGroupingRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,defaultstatus:!1,defaultStatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FontFaceSetLoadEvent:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDeadline:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,isSecureContext:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,matchMedia:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyMessageEvent:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaSettingsRange:!1,MediaSource:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackEvent:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigationPreloadManager:!1,navigator:!1,Navigator:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!0,onabort:!0,onafterprint:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinstallprompt:!0,onbeforeprint:!0,onbeforeunload:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontextmenu:!0,oncuechange:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpageshow:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onsearch:!0,onseeked:!0,onseeking:!0,onselect:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitionend:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,origin:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,Path2D:!1,PaymentAddress:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,PhotoCapabilities:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableStream:!1,registerProcessor:!1,RemotePlayback:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCIceCandidate:!1,RTCIceGatherer:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceEvent:!1,RTCRtpContributingSource:!1,RTCRtpReceiver:!1,RTCRtpSender:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedWorker:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageEvent:!1,StorageManager:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,TaskAttributionTiming:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,WritableStream:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XSLTProcessor:!1},worker:{addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,queueMicrotask:!1,removeEventListener:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,WorkerGlobalScope:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,global:!1,Intl:!1,module:!1,process:!1,queueMicrotask:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1},commonjs:{exports:!0,global:!1,module:!1,require:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fdescribe:!1,fit:!1,it:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{_:!1,$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,console:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,queueMicrotask:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,XMLHttpRequest:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},protractor:{$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1,URL:!1,URLSearchParams:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},devtools:{$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1}};function ZE(){return QE?JE:(QE=1,JE=$E)}function eT(e){return null!=e&&e&&"false"!==e&&"0"!==e}var tT=(eT(ki.env.BABEL_8_BREAKING),ZE()),rT=Do,nT=$d,aT=Sv,sT=rx,iT=uc,oT=re,dT=Ma,cT=ps,lT=rt,uT=at,pT=st,fT=it,gT=ot,hT=xe,mT=Te,yT=lt,bT=ss,vT=os,RT=hs,xT=Ce,ET=Oe,TT=cs,wT=es,ST=_e,AT=vt,jT=Rt,CT=Et,kT=We,_T=Ke,PT=Xe,IT=Fs,DT=Rc,NT=hc,OT=BR,FT=Lc,LT=Bc,BT=bn,MT=vn,UT=Le,HT=En,GT=ht,qT=Nt,WT=gs,zT=xv;function VT(e,t){switch(null==e?void 0:e.type){default:var r;if(yT(e)||WT(e))if((pT(e)||gT(e)||yT(e))&&e.source)VT(e.source,t);else if((gT(e)||yT(e))&&null!=(r=e.specifiers)&&r.length)for(var n,a=I(e.specifiers);!(n=a()).done;)VT(n.value,t);else(fT(e)||gT(e))&&e.declaration&&VT(e.declaration,t);else RT(e)?VT(e.local,t):!bT(e)||xT(e)||ST(e)||CT(e)||t.push(e.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":VT(e.object,t),VT(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":VT(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(var s,i=I(e.properties);!(s=i()).done;)VT(s.value,t);break;case"SpreadElement":case"RestElement":case"UnaryExpression":case"UpdateExpression":VT(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":VT(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield"),VT(e.argument,t);break;case"AwaitExpression":t.push("await"),VT(e.argument,t);break;case"AssignmentExpression":VT(e.left,t);break;case"VariableDeclarator":case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":case"PrivateName":VT(e.id,t);break;case"ParenthesizedExpression":VT(e.expression,t);break;case"MetaProperty":VT(e.meta,t),VT(e.property,t);break;case"JSXElement":VT(e.openingElement,t);break;case"JSXOpeningElement":VT(e.name,t);break;case"JSXFragment":VT(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":VT(e.namespace,t),VT(e.name,t)}}var KT={ForStatement:function(e){var t=e.get("init");if(t.isVar()){var r=e.scope;(r.getFunctionParent()||r.getProgramParent()).registerBinding("var",t)}},Declaration:function(e){e.isBlockScoped()||e.isImportDeclaration()||e.isExportDeclaration()||(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ImportDeclaration:function(e){e.scope.getBlockParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");if(r.isPattern()||r.isIdentifier())t.constantViolations.push(e);else if(r.isVar()){var n=e.scope;(n.getFunctionParent()||n.getProgramParent()).registerBinding("var",r)}},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope;if(!pT(t)){var n=t.declaration;if(uT(n)||hT(n)){var a=n.id;if(!a)return;var s=r.getBinding(a.name);null==s||s.reference(e)}else if(PT(n))for(var i,o=I(n.declarations);!(i=o()).done;)for(var d=i.value,c=0,l=Object.keys(sT(d));c1&&(r+=t),"_"+r},t.generateUidBasedOnNode=function(e,t){var r=[];VT(e,r);var n=r.join("$");return n=n.replace(/^_/,"")||t||"ref",this.generateUid(n.slice(0,20))},t.generateUidIdentifierBasedOnNode=function(e,t){return iT(this.generateUidBasedOnNode(e,t))},t.isStatic=function(e){if(kT(e)||AT(e)||HT(e))return!0;if(mT(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},t.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t?r:(this.push({id:r}),aT(r))},t.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&"local"!==e.kind&&("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&"const"===t))throw this.hub.buildError(n,'Duplicate declaration "'+r+'"',TypeError)},t.rename=function(e,t){var r=this.getBinding(e);r&&(t||(t=this.generateUidIdentifier(e).name),new KE(r,e,t).rename(arguments[2]))},t._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},t.dump=function(){var e="-".repeat(60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r=0,n=Object.keys(t.bindings);r0)&&this.isPure(e.body,t);if(lT(e)){for(var i,o=I(e.body);!(i=o()).done;){var d=i.value;if(!this.isPure(d,t))return!1}return!0}if(dT(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(oT(e)||MT(e)){for(var c,l=I(e.elements);!(c=l()).done;){var u=c.value;if(null!==u&&!this.isPure(u,t))return!1}return!0}if(ET(e)||BT(e)){for(var p,f=I(e.properties);!(p=f()).done;){var g=p.value;if(!this.isPure(g,t))return!1}return!0}if(vT(e))return!(e.computed&&!this.isPure(e.key,t))&&!((null==(a=e.decorators)?void 0:a.length)>0);if(TT(e))return!(e.computed&&!this.isPure(e.key,t))&&!((null==(s=e.decorators)?void 0:s.length)>0)&&!((UT(e)||e.static)&&null!==e.value&&!this.isPure(e.value,t));if(_T(e))return this.isPure(e.argument,t);if(jT(e))return IT(e.tag,"String.raw")&&!this.hasBinding("String",!0)&&this.isPure(e.quasi,t);if(CT(e)){for(var h,m=I(e.expressions);!(h=m()).done;){var y=h.value;if(!this.isPure(y,t))return!1}return!0}return wT(e)},t.setData=function(e,t){return this.data[e]=t},t.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},t.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},t.init=function(){this.inited||(this.inited=!0,this.crawl())},t.crawl=function(){var e=this.path;this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null);var t=this.getProgramParent();if(!t.crawling){var r={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,"Program"!==e.type&&cE(KT)){for(var n,a=I(KT.enter);!(n=a()).done;)n.value.call(r,e,r);var s=KT[e.type];if(s)for(var i,o=I(s.enter);!(i=o()).done;)i.value.call(r,e,r)}e.traverse(KT,r),this.crawling=!1;for(var d,c=I(r.assignments);!(d=c()).done;){for(var l=d.value,u=l.getBindingIdentifiers(),p=0,f=Object.keys(u);p0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[o-2]?2:"="===e[o-1]?1:0,i=new rw(3*o/4-s),n=s>0?o-4:o;var d=0;for(t=0,r=0;t>16&255,i[d++]=a>>8&255,i[d++]=255&a;return 2===s?(a=tw[e.charCodeAt(t)]<<2|tw[e.charCodeAt(t+1)]>>4,i[d++]=255&a):1===s&&(a=tw[e.charCodeAt(t)]<<10|tw[e.charCodeAt(t+1)]<<4|tw[e.charCodeAt(t+2)]>>2,i[d++]=a>>8&255,i[d++]=255&a),i}function iw(e){return ew[e>>18&63]+ew[e>>12&63]+ew[e>>6&63]+ew[63&e]}function ow(e,t,r){for(var n,a=[],s=t;sd?d:o+i));return 1===n?(t=e[r-1],a+=ew[t>>2],a+=ew[t<<4&63],a+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],a+=ew[t>>10],a+=ew[t>>4&63],a+=ew[t<<2&63],a+="="),s.push(a),s.join("")}function cw(e,t,r,n,a){var s,i,o=8*a-n-1,d=(1<>1,l=-7,u=r?a-1:0,p=r?-1:1,f=e[t+u];for(u+=p,s=f&(1<<-l)-1,f>>=-l,l+=o;l>0;s=256*s+e[t+u],u+=p,l-=8);for(i=s&(1<<-l)-1,s>>=-l,l+=n;l>0;i=256*i+e[t+u],u+=p,l-=8);if(0===s)s=1-c;else{if(s===d)return i?NaN:1/0*(f?-1:1);i+=Math.pow(2,n),s-=c}return(f?-1:1)*i*Math.pow(2,s-n)}function lw(e,t,r,n,a,s){var i,o,d,c=8*s-a-1,l=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,g=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-i))<1&&(i--,d*=2),(t+=i+u>=1?p/d:p*Math.pow(2,1-u))*d>=2&&(i++,d/=2),i+u>=l?(o=0,i=l):i+u>=1?(o=(t*d-1)*Math.pow(2,a),i+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[r+f]=255&o,f+=g,o/=256,a-=8);for(i=i<0;e[r+f]=255&i,f+=g,i/=256,c-=8);e[r+f-g]|=128*h}var uw={}.toString,pw=Array.isArray||function(e){return"[object Array]"==uw.call(e)},fw=50;function gw(){return mw.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function hw(e,t){if(gw()=gw())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gw().toString(16)+" bytes");return 0|e}function Aw(e){return!(null==e||!e._isBuffer)}function jw(e,t){if(Aw(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return nS(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return iS(e).length;default:if(n)return nS(e).length;t=(""+t).toLowerCase(),n=!0}}function Cw(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ww(this,t,r);case"utf8":case"utf-8":return Mw(this,t,r);case"ascii":return Gw(this,t,r);case"latin1":case"binary":return qw(this,t,r);case"base64":return Bw(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zw(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function kw(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _w(e,t,r,n,a){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"===typeof t&&(t=mw.from(t,n)),Aw(t))return 0===t.length?-1:Pw(e,t,r,n,a);if("number"===typeof t)return t&=255,mw.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Pw(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function Pw(e,t,r,n,a){var s,i=1,o=e.length,d=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,o/=2,d/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var l=-1;for(s=r;so&&(r=o-d),s=r;s>=0;s--){for(var u=!0,p=0;pa&&(n=a):n=a;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var i=0;i239?4:c>223?3:c>191?2:1;if(a+u<=r)switch(u){case 1:c<128&&(l=c);break;case 2:128===(192&(s=e[a+1]))&&(d=(31&c)<<6|63&s)>127&&(l=d);break;case 3:s=e[a+1],i=e[a+2],128===(192&s)&&128===(192&i)&&(d=(15&c)<<12|(63&s)<<6|63&i)>2047&&(d<55296||d>57343)&&(l=d);break;case 4:s=e[a+1],i=e[a+2],o=e[a+3],128===(192&s)&&128===(192&i)&&128===(192&o)&&(d=(15&c)<<18|(63&s)<<12|(63&i)<<6|63&o)>65535&&d<1114112&&(l=d)}null===l?(l=65533,u=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=u}return Hw(n)}mw.TYPED_ARRAY_SUPPORT=void 0===Us.TYPED_ARRAY_SUPPORT||Us.TYPED_ARRAY_SUPPORT,gw(),mw.poolSize=8192,mw._augment=function(e){return e.__proto__=mw.prototype,e},mw.from=function(e,t,r){return yw(null,e,t,r)},mw.TYPED_ARRAY_SUPPORT&&(mw.prototype.__proto__=Uint8Array.prototype,mw.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&mw[Symbol.species]),mw.alloc=function(e,t,r){return vw(null,e,t,r)},mw.allocUnsafe=function(e){return Rw(null,e)},mw.allocUnsafeSlow=function(e){return Rw(null,e)},mw.isBuffer=cS,mw.compare=function(e,t){if(!Aw(e)||!Aw(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,s=Math.min(r,n);a0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},mw.prototype.compare=function(e,t,r,n,a){if(!Aw(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),o=Math.min(s,i),d=this.slice(n,a),c=e.slice(t,r),l=0;la)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return Iw(this,e,t,r);case"utf8":case"utf-8":return Dw(this,e,t,r);case"ascii":return Nw(this,e,t,r);case"latin1":case"binary":return Ow(this,e,t,r);case"base64":return Fw(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lw(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},mw.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Uw=4096;function Hw(e){var t=e.length;if(t<=Uw)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var a="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function Kw(e,t,r,n,a,s){if(!Aw(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function Yw(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,s=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function Xw(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,s=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function Jw(e,t,r,n,a,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Qw(e,t,r,n,a){return a||Jw(e,t,r,4),lw(e,t,r,n,23,4),r+4}function $w(e,t,r,n,a){return a||Jw(e,t,r,8),lw(e,t,r,n,52,8),r+8}mw.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},mw.prototype.readUInt8=function(e,t){return t||Vw(e,1,this.length),this[e]},mw.prototype.readUInt16LE=function(e,t){return t||Vw(e,2,this.length),this[e]|this[e+1]<<8},mw.prototype.readUInt16BE=function(e,t){return t||Vw(e,2,this.length),this[e]<<8|this[e+1]},mw.prototype.readUInt32LE=function(e,t){return t||Vw(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},mw.prototype.readUInt32BE=function(e,t){return t||Vw(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},mw.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Vw(e,t,this.length);for(var n=this[e],a=1,s=0;++s=(a*=128)&&(n-=Math.pow(2,8*t)),n},mw.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Vw(e,t,this.length);for(var n=t,a=1,s=this[e+--n];n>0&&(a*=256);)s+=this[e+--n]*a;return s>=(a*=128)&&(s-=Math.pow(2,8*t)),s},mw.prototype.readInt8=function(e,t){return t||Vw(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},mw.prototype.readInt16LE=function(e,t){t||Vw(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},mw.prototype.readInt16BE=function(e,t){t||Vw(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},mw.prototype.readInt32LE=function(e,t){return t||Vw(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},mw.prototype.readInt32BE=function(e,t){return t||Vw(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},mw.prototype.readFloatLE=function(e,t){return t||Vw(e,4,this.length),cw(this,e,!0,23,4)},mw.prototype.readFloatBE=function(e,t){return t||Vw(e,4,this.length),cw(this,e,!1,23,4)},mw.prototype.readDoubleLE=function(e,t){return t||Vw(e,8,this.length),cw(this,e,!0,52,8)},mw.prototype.readDoubleBE=function(e,t){return t||Vw(e,8,this.length),cw(this,e,!1,52,8)},mw.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||Kw(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+a]=e/s&255;return t+r},mw.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,1,255,0),mw.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},mw.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,65535,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yw(this,e,t,!0),t+2},mw.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,65535,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yw(this,e,t,!1),t+2},mw.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,4294967295,0),mw.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Xw(this,e,t,!0),t+4},mw.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,4294967295,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Xw(this,e,t,!1),t+4},mw.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);Kw(this,e,t,r,a-1,-a)}var s=0,i=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},mw.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);Kw(this,e,t,r,a-1,-a)}var s=r-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},mw.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,1,127,-128),mw.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},mw.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,32767,-32768),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yw(this,e,t,!0),t+2},mw.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,2,32767,-32768),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yw(this,e,t,!1),t+2},mw.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,2147483647,-2147483648),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Xw(this,e,t,!0),t+4},mw.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Kw(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Xw(this,e,t,!1),t+4},mw.prototype.writeFloatLE=function(e,t,r){return Qw(this,e,t,!0,r)},mw.prototype.writeFloatBE=function(e,t,r){return Qw(this,e,t,!1,r)},mw.prototype.writeDoubleLE=function(e,t,r){return $w(this,e,t,!0,r)},mw.prototype.writeDoubleBE=function(e,t,r){return $w(this,e,t,!1,r)},mw.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(s<1e3||!mw.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(s=t;s55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&s.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function aS(e){for(var t=[],r=0;r>8,a=r%256,s.push(a),s.push(n);return s}function iS(e){return sw(eS(e))}function oS(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function dS(e){return e!==e}function cS(e){return null!=e&&(!!e._isBuffer||lS(e)||uS(e))}function lS(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function uS(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&lS(e.slice(0,0))}var pS,fS={exports:{}};function gS(){return pS||(pS=1,function(e,t){!function(e,r){r(t)}(0,(function(e){for(var t=",".charCodeAt(0),r=";".charCodeAt(0),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),s=new Uint8Array(128),i=0;i>>=1,c&&(a=-2147483648|-a),r[n]+=a,t}function p(e,r,n){return!(r>=n)&&e.charCodeAt(r)!==t}function f(e){e.sort(g)}function g(e,t){return e[0]-t[0]}function h(e){for(var n=new Int32Array(5),a=16384,s=a-36,i=new Uint8Array(a),o=i.subarray(0,s),c=0,l="",u=0;u0&&(c===a&&(l+=d.decode(i),c=0),i[c++]=r),0!==p.length){n[0]=0;for(var f=0;fs&&(l+=d.decode(o),i.copyWithin(0,s,c),c-=s),f>0&&(i[c++]=t),c=m(i,c,n,g,0),1!==g.length&&(c=m(i,c,n,g,1),c=m(i,c,n,g,2),c=m(i,c,n,g,3),4!==g.length&&(c=m(i,c,n,g,4)))}}}return l+d.decode(i.subarray(0,c))}function m(e,t,r,n,s){var i=n[s],o=i-r[s];r[s]=i,o=o<0?-o<<1|1:o<<1;do{var d=31&o;(o>>>=5)>0&&(d|=32),e[t++]=a[d]}while(o>0);return t}e.decode=c,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}))}(0,fS.exports)),fS.exports}var hS,mS={exports:{}},yS={exports:{}};function bS(){return hS||(hS=1,function(e,t){!function(e,r){r(t)}(0,(function(e){for(var t=",".charCodeAt(0),r=";".charCodeAt(0),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),s=new Uint8Array(128),i=0;i>>=1,c&&(a=-2147483648|-a),r[n]+=a,t}function p(e,r,n){return!(r>=n)&&e.charCodeAt(r)!==t}function f(e){e.sort(g)}function g(e,t){return e[0]-t[0]}function h(e){for(var n=new Int32Array(5),a=16384,s=a-36,i=new Uint8Array(a),o=i.subarray(0,s),c=0,l="",u=0;u0&&(c===a&&(l+=d.decode(i),c=0),i[c++]=r),0!==p.length){n[0]=0;for(var f=0;fs&&(l+=d.decode(o),i.copyWithin(0,s,c),c-=s),f>0&&(i[c++]=t),c=m(i,c,n,g,0),1!==g.length&&(c=m(i,c,n,g,1),c=m(i,c,n,g,2),c=m(i,c,n,g,3),4!==g.length&&(c=m(i,c,n,g,4)))}}}return l+d.decode(i.subarray(0,c))}function m(e,t,r,n,s){var i=n[s],o=i-r[s];r[s]=i,o=o<0?-o<<1|1:o<<1;do{var d=31&o;(o>>>=5)>0&&(d|=32),e[t++]=a[d]}while(o>0);return t}e.decode=c,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}))}(0,yS.exports)),yS.exports}var vS,RS={exports:{}};function xS(){return vS||(vS=1,e=RS,function(t,r){e.exports=r()}(0,(function(){var e,t=/^[\w+.-]+:\/\//,r=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function a(e){return t.test(e)}function s(e){return e.startsWith("//")}function i(e){return e.startsWith("/")}function o(e){return e.startsWith("file:")}function d(e){return/^[.?#]/.test(e)}function c(e){var t=r.exec(e);return u(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function l(e){var t=n.exec(e),r=t[2];return u("file:","",t[1]||"","",i(r)?r:"/"+r,t[3]||"",t[4]||"")}function u(t,r,n,a,s,i,o){return{scheme:t,user:r,host:n,port:a,path:s,query:i,hash:o,type:e.Absolute}}function p(t){if(s(t)){var r=c("http:"+t);return r.scheme="",r.type=e.SchemeRelative,r}if(i(t)){var n=c("http://foo.com"+t);return n.scheme="",n.host="",n.type=e.AbsolutePath,n}if(o(t))return l(t);if(a(t))return c(t);var d=c("http://foo.com/"+t);return d.scheme="",d.host="",d.type=t?t.startsWith("?")?e.Query:t.startsWith("#")?e.Hash:e.RelativePath:e.Empty,d}function f(e){if(e.endsWith("/.."))return e;var t=e.lastIndexOf("/");return e.slice(0,t+1)}function g(e,t){h(t,t.type),"/"===e.path?e.path=t.path:e.path=f(t.path)+e.path}function h(t,r){for(var n=r<=e.RelativePath,a=t.path.split("/"),s=1,i=0,o=!1,d=1;da&&(a=i)}h(n,a);var o=n.query+n.hash;switch(a){case e.Hash:case e.Query:return o;case e.RelativePath:var c=n.path.slice(1);return c?d(r||t)&&!d(c)?"./"+c+o:c+o:o||".";case e.AbsolutePath:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}return function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"}(e||(e={})),m}))),RS.exports;var e}!function(e,t){!function(e,r){r(t,bS(),xS())}(0,(function(e,t,r){function n(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var a=n(r);function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),a.default(e,t)}function i(e){if(!e)return"";var t=e.lastIndexOf("/");return e.slice(0,t+1)}var o=0,d=1,c=2,l=3,p=4,f=1,g=2;function h(e,t){var r=m(e,0);if(r===e.length)return e;t||(e=e.slice());for(var n=r;n>1),s=e[a][o]-t;if(0===s)return R=!0,a;s<0?r=a+1:n=a-1}return R=!1,r-1}function E(e,t,r){for(var n=r+1;n=0&&e[n][o]===t;r=n--);return r}function w(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function S(e,t,r,n){var a=r.lastKey,s=r.lastNeedle,i=r.lastIndex,d=0,c=e.length-1;if(n===a){if(t===s)return R=-1!==i&&e[i][o]===t,i;t>=s?d=-1===i?0:i:c=i}return r.lastKey=n,r.lastNeedle=t,r.lastIndex=x(e,t,d,c)}function A(e,t){for(var r=t.map(C),n=0;nt;n--)e[n]=e[n-1];e[t]=r}function C(){return{__proto__:null}}var k=function(t,r){var n="string"===typeof t?JSON.parse(t):t;if(!("sections"in n))return new B(n,r);var a=[],s=[],i=[],o=[];_(n,r,a,s,i,o,0,0,1/0,1/0);var d={version:3,file:n.file,names:o,sources:s,sourcesContent:i,mappings:a};return e.presortedDecodedMap(d)};function _(e,t,r,n,a,s,i,o,d,c){for(var l=e.sections,u=0;ug)return;for(var S=D(n,w),A=0===T?f:0,j=v[T],C=0;C=h)return;if(1!==k.length){var N=y+k[d],O=k[c],F=k[l];S.push(4===k.length?[P,N,O,F]:[P,N,O,F,b+k[p]])}else S.push([P])}}}function I(e,t){for(var r=0;r=a.length)return null;var s=a[r],i=G(s,t._decodedMemo,r,n,L);return-1===i?null:s[i]},e.originalPositionFor=function(t,r){var n=r.line,a=r.column,s=r.bias;if(--n<0)throw new Error(N);if(a<0)throw new Error(O);var i=e.decodedMappings(t);if(n>=i.length)return U(null,null,null,null);var o=i[n],u=G(o,t._decodedMemo,n,a,s||L);if(-1===u)return U(null,null,null,null);var f=o[u];if(1===f.length)return U(null,null,null,null);var g=t.names;return U(t.resolvedSources[f[d]],f[c]+1,f[l],5===f.length?g[f[p]]:null)},e.allGeneratedPositionsFor=function(e,t){return r(e,t.source,t.line,t.column,t.bias||F,!0)},e.generatedPositionFor=function(e,t){return r(e,t.source,t.line,t.column,t.bias||L,!1)},e.eachMapping=function(t,r){for(var n=e.decodedMappings(t),a=t.names,s=t.resolvedSources,i=0;i=0&&!(t>=e[n][s]);r=n--);return r}function h(e,t,r){for(var n=e.length;n>t;n--)e[n]=e[n-1];e[t]=r}function m(e){for(var t=e.length,r=t,n=r-1;n>=0&&!(e[n].length>0);r=n,n--);r1?this._indentChar.repeat(t):this._indentChar}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);10!==e?(this._mark(r.line,r.column,r.identifierName,r.identifierNamePos,r.filename),this._position.column+=t):(this._position.line++,this._position.column=0),this._canMarkIdName&&(r.identifierName=void 0,r.identifierNamePos=void 0)},t._append=function(e,t,r){var n=e.length,a=this._position;if(this._last=e.charCodeAt(n-1),++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e,r||this._map){var s=t.column,i=t.identifierName,o=t.identifierNamePos,d=t.filename,c=t.line;null==i&&null==o||!this._canMarkIdName||(t.identifierName=void 0,t.identifierNamePos=void 0);var l=e.indexOf("\n"),u=0;for(0!==l&&this._mark(c,s,i,o,d);-1!==l;)a.line++,a.column=0,(u=l+1)=0&&10===this._queue[r].char;r--)t++;return t===e&&10===this._last?t+1:t},t.endsWithCharAndNewline=function(){var e=this._queue,t=this._queueCursor;if(0!==t){if(10!==e[t-1].char)return;return t>1?e[t-2].char:this._last}},t.hasContent=function(){return 0!==this._queueCursor||!!this._last},t.exactSource=function(e,t){if(this._map){this.source("start",e);var r=e.identifierName,n=this._sourcePosition;r&&(this._canMarkIdName=!1,n.identifierName=r),t(),r&&(this._canMarkIdName=!0,n.identifierName=void 0,n.identifierNamePos=void 0),this.source("end",e)}else t()},t.source=function(e,t){this._map&&this._normalizePosition(e,t,0)},t.sourceWithOffset=function(e,t,r){this._map&&this._normalizePosition(e,t,r)},t.withSource=function(e,t,r){this._map&&this.source(e,t),r()},t._normalizePosition=function(e,t,r){var n=t[e],a=this._sourcePosition;n&&(a.line=n.line,a.column=Math.max(n.column+r,0),a.filename=t.filename)},t.getCurrentColumn=function(){for(var e=this._queue,t=this._queueCursor,r=-1,n=0,a=0;a",0],["&&",1],["|",2],["^",3],["&",4],["==",5],["===",5],["!=",5],["!==",5],["<",6],[">",6],["<=",6],[">=",6],["in",6],["instanceof",6],[">>",7],["<<",7],[">>>",7],["+",8],["-",8],["*",9],["/",9],["%",9],["**",10]]);function nA(e){return"TSAsExpression"===e||"TSSatisfiesExpression"===e||"TSTypeAssertion"===e}var aA=function(e,t){var r=t.type;return("ClassDeclaration"===r||"ClassExpression"===r)&&t.superClass===e},sA=function(e,t){var r=t.type;return("MemberExpression"===r||"OptionalMemberExpression"===r)&&t.object===e||("CallExpression"===r||"OptionalCallExpression"===r||"NewExpression"===r)&&t.callee===e||"TaggedTemplateExpression"===r&&t.tag===e||"TSNonNullExpression"===r};function iA(e,t){return zS(t)}function oA(e,t,r){if(!(r.length<3)){var n=t.type;return"UnionTypeAnnotation"===n||"IntersectionTypeAnnotation"===n||"ArrayTypeAnnotation"===n||"TypeAnnotation"===n&&VS(r[r.length-3])}}function dA(e,t){return sA(e,t)||aA(e,t)}function cA(e,t,r){return _A(r,3)}function lA(e,t,r){return!e.async&&_A(r,1)}function uA(e,t){var r=t.type;if("**"===e.operator&&"BinaryExpression"===r&&"**"===t.operator)return t.left===e;if(aA(e,t))return!0;if(sA(e,t)||"UnaryExpression"===r||"SpreadElement"===r||"AwaitExpression"===r)return!0;if("BinaryExpression"===r||"LogicalExpression"===r){var n=rA.get(t.operator),a=rA.get(e.operator);if(n===a&&t.right===e&&"LogicalExpression"!==r||n>a)return!0}}function pA(e,t){var r=t.type;return"ArrayTypeAnnotation"===r||"NullableTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"UnionTypeAnnotation"===r}function fA(e,t){return QS(t)&&t.objectType===e}function gA(){return!0}function hA(e,t){var r=t.type;return"TSArrayType"===r||"TSOptionalType"===r||"TSIntersectionType"===r||"TSUnionType"===r||"TSRestType"===r}function mA(e,t){var r=t.type;return"TSArrayType"===r||"TSOptionalType"===r}function yA(e,t){var r=t.type;return("CallExpression"===r||"OptionalCallExpression"===r||"NewExpression"===r||"TSInstantiationExpression"===r)&&!!t.typeParameters}function bA(e,t){if("in"===e.operator){var r=t.type;return"VariableDeclarator"===r||"ForStatement"===r||"ForInStatement"===r||"ForOfStatement"===r}return!1}function vA(e,t){var r=t.type;return!("ForStatement"===r||"ThrowStatement"===r||"ReturnStatement"===r||"IfStatement"===r&&t.test===e||"WhileStatement"===r&&t.test===e||"ForInStatement"===r&&t.right===e||"SwitchStatement"===r&&t.discriminant===e||"ExpressionStatement"===r&&t.expression===e)}function RA(e,t){var r=t.type;return"BinaryExpression"===r||"LogicalExpression"===r||"UnaryExpression"===r||"SpreadElement"===r||sA(e,t)||"AwaitExpression"===r&&tA(e)||"ConditionalExpression"===r&&e===t.test||aA(e,t)}function xA(e,t,r){return _A(r,5)}function EA(e,t){return sA(e,t)||KS(t)&&"**"===t.operator&&t.left===e||aA(e,t)}function TA(e,t,r){return _A(r,5)}function wA(e,t){return XS(t)||SA(e,t)}function SA(e,t){var r=t.type;return!!("UnaryExpression"===r||"SpreadElement"===r||"BinaryExpression"===r||"LogicalExpression"===r||"ConditionalExpression"===r&&t.test===e||"AwaitExpression"===r||nA(r))||EA(e,t)}function AA(e,t){return YS(t)&&t.callee===e||$S(t)&&t.object===e}function jA(e,t){return!!ZS(e.left)||SA(e,t)}function CA(e,t){var r=t.type;if(nA(r))return!0;if("LogicalExpression"!==r)return!1;switch(e.operator){case"||":return"??"===t.operator||"&&"===t.operator;case"&&":return"??"===t.operator;case"??":return"??"!==t.operator}}function kA(e,t,r){var n,a=t.type;if(null!=(n=e.extra)&&n.parenthesized&&"AssignmentExpression"===a&&t.left===e){var s=t.right.type;if(("FunctionExpression"===s||"ClassExpression"===s)&&null==t.right.id)return!0}return"let"===e.name?_A(r,$S(t,{object:e,computed:!0})||eA(t,{object:e,computed:!0,optional:!1})?57:32):"async"===e.name&&JS(t)&&e===t.left}function _A(e,t){var r=1&t,n=2&t,a=4&t,s=8&t,i=16&t,o=32&t,d=e.length-1;if(!(d<=0)){for(var c=e[d],l=e[--d];d>=0;){var u=l.type;if(r&&"ExpressionStatement"===u&&l.expression===c||a&&"ExportDefaultDeclaration"===u&&c===l.declaration||n&&"ArrowFunctionExpression"===u&&l.body===c||s&&"ForStatement"===u&&l.init===c||i&&"ForInStatement"===u&&l.left===c||o&&"ForOfStatement"===u&&l.left===c)return!0;if(!(d>0&&(sA(c,l)&&"NewExpression"!==u||"SequenceExpression"===u&&l.expressions[0]===c||"UpdateExpression"===u&&!l.prefix||"ConditionalExpression"===u&&l.test===c||("BinaryExpression"===u||"LogicalExpression"===u)&&l.left===c||"AssignmentExpression"===u&&l.left===c)))return!1;c=l,l=e[--d]}return!1}}var PA=Fo,IA=le,DA=Ie,NA=De;function OA(e){var t=new Map;function r(e,r){var n=t.get(e);t.set(e,n?function(e,t,a){var s;return null!=(s=n(e,t,a))?s:r(e,t,a)}:r)}for(var n=0,a=Object.keys(e);n1}),xj(t))if(Ej(t)){if(t.init===e)return}else if(t.left===e)return;this.semicolon()}function Vj(e){this.print(e.id,e),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init,e))}var Kj=it,Yj=ot;function Xj(e,t){(Kj(t)||Yj(t))&&this._shouldPrintDecoratorsBeforeExport(t)||this.printJoin(e.decorators,e),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function Jj(e){this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.endsWith(10)||this.newline(),this.rightBrace(e))}function Qj(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),e.computed?(this.tokenChar(91),this.print(e.key,e),this.tokenChar(93)):(this._variance(e),this.print(e.key,e)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function $j(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key,e),this.tokenChar(93)):(this._variance(e),this.print(e.key,e)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function Zj(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function eC(e){this._classMethodHead(e),this.space(),this.print(e.body,e)}function tC(e){this._classMethodHead(e),this.space(),this.print(e.body,e)}function rC(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this._methodHead(e)}function nC(e){this.word("static"),this.space(),this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.rightBrace(e))}var aC=Te;function sC(e,t,r){this.print(e.typeParameters,e);var n=gC.call(this,t,r);n&&this.sourceIdentifierName(n.name,n.pos),this.tokenChar(40),this._parameters(e.params,e),this.tokenChar(41);var a="ArrowFunctionExpression"===e.type;this.print(e.returnType,e,a),this._noLineTerminator=a}function iC(e,t){for(var r=e.length,n=0;n"),this.space(),this.print(e.body,e)}function fC(e,t){var r,n;return!!(e.typeParameters||e.returnType||e.predicate||t.typeAnnotation||t.optional||null!=(r=t.leadingComments)&&r.length||null!=(n=t.trailingComments)&&n.length)}function gC(e,t){var r=e;if(!r&&t){var n=t.type;"VariableDeclarator"===n?r=t.id:"AssignmentExpression"===n||"AssignmentPattern"===n?r=t.left:"ObjectProperty"===n||"ClassProperty"===n?t.computed&&"StringLiteral"!==t.key.type||(r=t.key):"ClassPrivateProperty"!==n&&"ClassAccessorProperty"!==n||(r=t.key)}if(r){var a,s,i;if("Identifier"===r.type)a={pos:null==(s=r.loc)?void 0:s.start,name:(null==(i=r.loc)?void 0:i.identifierName)||r.name};else if("PrivateName"===r.type){var o;a={pos:null==(o=r.loc)?void 0:o.start,name:"#"+r.id.name}}else if("StringLiteral"===r.type){var d;a={pos:null==(d=r.loc)?void 0:d.start,name:r.value}}return a}}var hC=at,mC=yn,yC=jt,bC=ut,vC=pt,RC=qa;function xC(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function EC(e){this.print(e.local,e)}function TC(e){this.print(e.exported,e)}function wC(e){"type"===e.exportKind&&(this.word("type"),this.space()),this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function SC(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}var AC,jC,CC=!1;function kC(e){var t=this.format.importAttributesKeyword,r=e.attributes,n=e.assertions;!r||t||CC||(CC=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));var a="assert"===t||!t&&n;this.word(a?"assert":"with"),this.space(),a||"with"===t?(this.tokenChar(123),this.space(),this.printList(r||n,e),this.space(),this.tokenChar(125)):this.printList(r||n,e)}function _C(e){var t,r;this.word("export"),this.space(),"type"===e.exportKind&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e),this.semicolon()}function PC(e,t){hC(t.declaration)&&e._shouldPrintDecoratorsBeforeExport(t)&&e.printJoin(t.declaration.decorators,t)}function IC(e){if(PC(this,e),this.word("export"),this.space(),e.declaration){var t=e.declaration;this.print(t,e),RC(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r,n,a=e.specifiers.slice(0),s=!1;;){var i=a[0];if(!mC(i)&&!yC(i))break;s=!0,this.print(a.shift(),e),a.length&&(this.tokenChar(44),this.space())}(a.length||!a.length&&!s)&&(this.tokenChar(123),a.length&&(this.space(),this.printList(a,e),this.space()),this.tokenChar(125)),e.source&&(this.space(),this.word("from"),this.space(),null!=(r=e.attributes)&&r.length||null!=(n=e.assertions)&&n.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e)),this.semicolon()}}function DC(e){PC(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space();var t=e.declaration;this.print(t,e),RC(t)||this.semicolon()}function NC(e){var t,r;this.word("import"),this.space();var n="type"===e.importKind||"typeof"===e.importKind;n?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());for(var a=e.specifiers.slice(0),s=!!a.length;s;){var i=a[0];if(!bC(i)&&!vC(i))break;this.print(a.shift(),e),a.length&&(this.tokenChar(44),this.space())}a.length?(this.tokenChar(123),this.space(),this.printList(a,e),this.space(),this.tokenChar(125)):n&&!s&&(this.tokenChar(123),this.tokenChar(125)),(s||n)&&(this.space(),this.word("from"),this.space()),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e),this.semicolon()}function OC(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function FC(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local,e)}function LC(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40),this.print(e.source,e),null!=e.options&&(this.tokenChar(44),this.space(),this.print(e.options,e)),this.tokenChar(41)}function BC(){if(jC)return AC;jC=1;var e={},t=e.hasOwnProperty,r=function(e,r){for(var n in e)t.call(e,n)&&r(n,e[n])},n=function(e,t){return t?(r(t,(function(t,r){e[t]=r})),e):e},a=function(e,t){for(var r=e.length,n=-1;++n=55296&&U<=56319&&B>L+1){var H=F.charCodeAt(L+1);if(H>=56320&&H<=57343){var G=(1024*(U-55296)+H-56320+65536).toString(16);w||(G=G.toUpperCase()),x+="\\u{"+G+"}",++L;continue}}}if(!s.escapeEverything){if(y.test(M)){x+=M;continue}if('"'==M){x+=E==M?'\\"':M;continue}if("`"==M){x+=E==M?"\\`":M;continue}if("'"==M){x+=E==M?"\\'":M;continue}}if("\0"!=M||R||m.test(F.charAt(L+1)))if(h.test(M))x+=g[M];else{var q=M.charCodeAt(0);if(s.minimal&&8232!=q&&8233!=q)x+=M;else{var W=q.toString(16);w||(W=W.toUpperCase());var z=W.length>2||R,V="\\"+(z?"u":"x")+("0000"+W).slice(z?-4:-2);x+=V}}else x+="\\0"}return s.wrap&&(x=E+x+E),"`"==E&&(x=x.replace(/\$\{/g,"\\${")),s.isScriptContext?x.replace(/<\/(script|style)/gi,"<\\/$1").replace(/\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n closingTag = true\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n marker = 3\n // To do:\n // tokenizer.concrete = true\n // To do: use `markdown-rs` style interrupt.\n // While we’re in an instruction instead of a declaration, we’re on a `?`\n // right now, so we do need to search for `>`, similar to declarations.\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer = String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n marker = 2\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n marker = 5\n index = 0\n return cdataOpenInside\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n marker = 4\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside\n }\n return nok(code)\n }\n\n /**\n * After ` | &<]]>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n if (index === value.length) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation\n }\n return cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer = String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * In tag name.\n *\n * ```markdown\n * > | \n * ^^\n * > | \n * ^^\n * ```\n *\n * @type {State}\n */\n function tagName(code) {\n if (\n code === null ||\n code === 47 ||\n code === 62 ||\n markdownLineEndingOrSpace(code)\n ) {\n const slash = code === 47\n const name = buffer.toLowerCase()\n if (!slash && !closingTag && htmlRawNames.includes(name)) {\n marker = 1\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code)\n }\n if (htmlBlockNames.includes(buffer.toLowerCase())) {\n marker = 6\n if (slash) {\n effects.consume(code)\n return basicSelfClosing\n }\n\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code)\n }\n marker = 7\n // Do not support complete HTML when interrupting.\n return self.interrupt && !self.parser.lazy[self.now().line]\n ? nok(code)\n : closingTag\n ? completeClosingTagAfter(code)\n : completeAttributeNameBefore(code)\n }\n\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n buffer += String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * After closing slash of a basic tag name.\n *\n * ```markdown\n * > |
\n * ^\n * ```\n *\n * @type {State}\n */\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code)\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation\n }\n return nok(code)\n }\n\n /**\n * After closing slash of a complete tag name.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeClosingTagAfter\n }\n return completeEnd(code)\n }\n\n /**\n * At an attribute name.\n *\n * At first, this state is used after a complete tag name, after whitespace,\n * where it expects optional attributes or the end of the tag.\n * It is also reused after attributes, when expecting more optional\n * attributes.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code)\n return completeEnd\n }\n\n // ASCII alphanumerical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return completeAttributeName\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameBefore\n }\n return completeEnd(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeName(code) {\n // ASCII alphanumerical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return completeAttributeName\n }\n return completeAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, at an optional initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameAfter\n }\n return completeAttributeNameBefore(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n markerB = code\n return completeAttributeValueQuoted\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n return completeAttributeValueUnquoted(code)\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuoted(code) {\n if (code === markerB) {\n effects.consume(code)\n markerB = null\n return completeAttributeValueQuotedAfter\n }\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n effects.consume(code)\n return completeAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 47 ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96 ||\n markdownLineEndingOrSpace(code)\n ) {\n return completeAttributeNameAfter(code)\n }\n effects.consume(code)\n return completeAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the\n * end of the tag.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a complete tag where only an `>` is allowed.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code)\n return completeAfter\n }\n return nok(code)\n }\n\n /**\n * After `>` in a complete tag.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return continuation(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAfter\n }\n return nok(code)\n }\n\n /**\n * In continuation of any HTML kind.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuation(code) {\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationCommentInside\n }\n if (code === 60 && marker === 1) {\n effects.consume(code)\n return continuationRawTagOpen\n }\n if (code === 62 && marker === 4) {\n effects.consume(code)\n return continuationClose\n }\n if (code === 63 && marker === 3) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n if (code === 93 && marker === 5) {\n effects.consume(code)\n return continuationCdataInside\n }\n if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {\n effects.exit('htmlFlowData')\n return effects.check(\n blankLineBefore,\n continuationAfter,\n continuationStart\n )(code)\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationStart(code)\n }\n effects.consume(code)\n return continuation\n }\n\n /**\n * In continuation, at eol.\n *\n * ```markdown\n * > | \n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStart(code) {\n return effects.check(\n nonLazyContinuationStart,\n continuationStartNonLazy,\n continuationAfter\n )(code)\n }\n\n /**\n * In continuation, at eol, before non-lazy content.\n *\n * ```markdown\n * > | \n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStartNonLazy(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return continuationBefore\n }\n\n /**\n * In continuation, before non-lazy content.\n *\n * ```markdown\n * | \n * > | asd\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return continuationStart(code)\n }\n effects.enter('htmlFlowData')\n return continuation(code)\n }\n\n /**\n * In comment continuation, after one `-`, expecting another.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after `<`, at `/`.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase()\n if (htmlRawNames.includes(name)) {\n effects.consume(code)\n return continuationClose\n }\n return continuation(code)\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationAfter(code)\n }\n effects.consume(code)\n return continuationClose\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit('htmlFlow')\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return after\n }\n return nok(code)\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n}\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n }\n let initialPrefix = 0\n let sizeOpen = 0\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code)\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1]\n initialPrefix =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n marker = code\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++\n effects.consume(code)\n return sequenceOpen\n }\n if (sizeOpen < 3) {\n return nok(code)\n }\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, infoBefore, 'whitespace')(code)\n : infoBefore(code)\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return self.interrupt\n ? ok(code)\n : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return infoBefore(code)\n }\n if (markdownSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, metaBefore, 'whitespace')(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return info\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code)\n }\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return infoBefore(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return meta\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code)\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return contentStart\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code)\n ? factorySpace(\n effects,\n beforeContentChunk,\n 'linePrefix',\n initialPrefix + 1\n )(code)\n : beforeContentChunk(code)\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFlowValue')\n return contentChunk(code)\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return beforeContentChunk(code)\n }\n effects.consume(code)\n return contentChunk\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0\n return startBefore\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return start\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter('codeFencedFence')\n return markdownSpace(code)\n ? factorySpace(\n effects,\n beforeSequenceClose,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : beforeSequenceClose(code)\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter('codeFencedFenceSequence')\n return sequenceClose(code)\n }\n return nok(code)\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++\n effects.consume(code)\n return sequenceClose\n }\n if (size >= sizeOpen) {\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)\n : sequenceCloseAfter(code)\n }\n return nok(code)\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this\n return start\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code)\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this\n let size = 0\n /** @type {number} */\n let max\n /** @type {(code: Code) => boolean} */\n let test\n return start\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterReference')\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n return open\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter('characterReferenceMarkerHexadecimal')\n effects.consume(code)\n effects.exit('characterReferenceMarkerHexadecimal')\n effects.enter('characterReferenceValue')\n max = 6\n test = asciiHexDigit\n return value\n }\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit('characterReferenceValue')\n if (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {asciiPunctuation} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return inside\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter('characterEscapeValue')\n effects.consume(code)\n effects.exit('characterEscapeValue')\n effects.exit('characterEscape')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\n /** @type {State} */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, ok, 'linePrefix')\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n}\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n}\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n}\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1\n while (++index < events.length) {\n const token = events[index][1]\n if (\n token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd'\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n return events\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n let token\n /** @type {number | undefined} */\n let open\n /** @type {number | undefined} */\n let close\n /** @type {Array} */\n let media\n\n // Find an opening.\n while (index--) {\n token = events[index][1]\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n const group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n const label = {\n type: 'label',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n }\n const text = {\n type: 'labelText',\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ]\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3))\n\n // Text open.\n media = push(media, [['enter', text, context]])\n\n // Always populated by defaults.\n\n // Between.\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n )\n\n // Text close, marker close, label close.\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ])\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1))\n\n // Media close.\n media = push(media, [['exit', group, context]])\n splice(events, open, events.length, media)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n let labelStart\n /** @type {boolean} */\n let defined\n\n // Find an opening.\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n return start\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code)\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code)\n }\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n )\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return after\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n labelEndOk,\n defined ? labelEndOk : labelEndNok\n )(code)\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(\n referenceFullConstruct,\n labelEndOk,\n defined ? referenceNotFull : labelEndNok\n )(code)\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code)\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(\n referenceCollapsedConstruct,\n labelEndOk,\n labelEndNok\n )(code)\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code)\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return resourceBefore\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceOpen)(code)\n : resourceOpen(code)\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code)\n }\n return factoryDestination(\n effects,\n resourceDestinationAfter,\n resourceDestinationMissing,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 32\n )(code)\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceBetween)(code)\n : resourceEnd(code)\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code)\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n resourceTitleAfter,\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n return resourceEnd(code)\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceEnd)(code)\n : resourceEnd(code)\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this\n return referenceFull\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(\n self,\n effects,\n referenceFullAfter,\n referenceFullMissing,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return referenceCollapsedOpen\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelImage')\n effects.enter('labelImageMarker')\n effects.consume(code)\n effects.exit('labelImageMarker')\n return open\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelImage')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {push, splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\n// eslint-disable-next-line complexity\nfunction resolveAllAttention(events, context) {\n let index = -1\n /** @type {number} */\n let open\n /** @type {Token} */\n let group\n /** @type {Token} */\n let text\n /** @type {Token} */\n let openingSequence\n /** @type {Token} */\n let closingSequence\n /** @type {number} */\n let use\n /** @type {Array} */\n let nextEvents\n /** @type {number} */\n let offset\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n }\n\n // Number of markers to use from the sequence.\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\n nextEvents = []\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n }\n\n // Opening.\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ])\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n )\n\n // Closing.\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ])\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = push(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null\n const previous = this.previous\n const before = classifyCharacter(previous)\n\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code\n effects.enter('attentionSequence')\n return inside(code)\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n const token = effects.exit('attentionSequence')\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code)\n\n // Always populated by defaults.\n\n const open =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !before || (before === 2 && after) || attentionMarkers.includes(previous)\n token._open = Boolean(marker === 42 ? open : open && (before || !close))\n token._close = Boolean(marker === 42 ? close : close && (after || !open))\n return ok(code)\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * @param {number} offset\n * @returns {undefined}\n */\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0\n return start\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('autolink')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.enter('autolinkProtocol')\n return open\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n return emailAtext(code)\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1\n return schemeInsideOrEmailAtext(code)\n }\n return emailAtext(code)\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n size = 0\n return urlInside\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n size = 0\n return emailAtext(code)\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n effects.consume(code)\n return urlInside\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n return emailAtSignOrDot\n }\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n return nok(code)\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | ab\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n return emailValue(code)\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel\n effects.consume(code)\n return next\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable | undefined} */\n let marker\n /** @type {number} */\n let index\n /** @type {State} */\n let returnState\n return start\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n index = 0\n return cdataOpenInside\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n return nok(code)\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return nok(code)\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n if (markdownLineEnding(code)) {\n returnState = comment\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return comment\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return comment(code)\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62\n ? end(code)\n : code === 45\n ? commentClose(code)\n : comment(code)\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n return index === value.length ? cdata : cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n if (markdownLineEnding(code)) {\n returnState = cdata\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return cdata\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n if (markdownLineEnding(code)) {\n returnState = declaration\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return declaration\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n if (markdownLineEnding(code)) {\n returnState = instruction\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return instruction\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n return tagCloseBetween(code)\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n return end(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n return end(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n return tagOpenAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n return tagOpenBetween(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueQuotedAfter\n }\n if (code === null) {\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code)\n effects.exit('htmlTextData')\n effects.exit('htmlText')\n return ok\n }\n return nok(code)\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineEndingAfter\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code)\n ? factorySpace(\n effects,\n lineEndingAfterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : lineEndingAfterPrefix(code)\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelLink')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelLink')\n return after\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.consume(code)\n return after\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\n}\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4\n let headEnterIndex = 3\n /** @type {number} */\n let index\n /** @type {number | undefined} */\n let enter\n\n // If we start and end with an EOL or a space.\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[headEnterIndex][1].type = 'codeTextPadding'\n events[tailExitIndex][1].type = 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1\n tailExitIndex++\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n tailExitIndex -= index - enter - 2\n index = enter + 2\n }\n enter = undefined\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this\n let sizeOpen = 0\n /** @type {number} */\n let size\n /** @type {Token} */\n let token\n return start\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n effects.exit('codeTextSequence')\n return between(code)\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return between\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return sequenceClose(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return between\n }\n\n // Data.\n effects.enter('codeTextData')\n return data(code)\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return between(code)\n }\n effects.consume(code)\n return data\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return sequenceClose\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n }\n\n // More or less accents: mark as data.\n token.type = 'codeTextData'\n return data(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} from 'micromark-core-commonmark'\nimport {resolver as resolveText} from './initialize/text.js'\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n}\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n}\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n}\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n}\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n}\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n}\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n}\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n}\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\n */\nexport function preprocess() {\n let column = 1\n let buffer = ''\n /** @type {boolean | undefined} */\n let start = true\n /** @type {boolean | undefined} */\n let atCarriageReturn\n return preprocessor\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n /** @type {Array} */\n const chunks = []\n /** @type {RegExpMatchArray | null} */\n let match\n /** @type {number} */\n let next\n /** @type {number} */\n let startPosition\n /** @type {number} */\n let endPosition\n /** @type {Code} */\n let code\n value =\n buffer +\n (typeof value === 'string'\n ? value.toString()\n : new TextDecoder(encoding || undefined).decode(value))\n startPosition = 0\n buffer = ''\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n start = undefined\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition =\n match && match.index !== undefined ? match.index : value.length\n code = value.charCodeAt(endPosition)\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3)\n atCarriageReturn = undefined\n } else {\n if (atCarriageReturn) {\n chunks.push(-5)\n atCarriageReturn = undefined\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n switch (code) {\n case 0: {\n chunks.push(65533)\n column++\n break\n }\n case 9: {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n while (column++ < next) chunks.push(-1)\n break\n }\n case 10: {\n chunks.push(-4)\n column = 1\n break\n }\n default: {\n atCarriageReturn = true\n column = 1\n }\n }\n }\n startPosition = endPosition + 1\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n return chunks\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base);\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 || code === 11 || code > 13 && code < 32 ||\n // Control character (DEL) of C0, and C1 controls.\n code > 126 && code < 160 ||\n // Lone high surrogates and low surrogates.\n code > 55_295 && code < 57_344 ||\n // Noncharacters.\n code > 64_975 && code < 65_008 || /* eslint-disable no-bitwise */\n (code & 65_535) === 65_535 || (code & 65_535) === 65_534 || /* eslint-enable no-bitwise */\n // Out of range\n code > 1_114_111) {\n return \"\\uFFFD\";\n }\n return String.fromCodePoint(code);\n}","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @param {string} $2\n * @returns {string}\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1\n }\n\n // Reference.\n const head = $2.charCodeAt(0)\n if (head === 35) {\n const head = $2.charCodeAt(1)\n const hex = head === 120 || head === 88\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)\n }\n return decodeNamedCharacterReference($2) || $0\n}\n","/**\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').Html} Html\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n *\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | null | undefined | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {undefined | void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {undefined}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {undefined}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(this: CompileContext) => undefined} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Nodes, token: Token, onError?: OnEnterError) => undefined} enter\n * Enter a node.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => undefined} exit\n * Exit a node.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n * @property {CompileData} data\n * Info passed around; key/value store.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\n */\n\nimport {toString} from 'mdast-util-to-string'\nimport {parse, postprocess, preprocess} from 'micromark'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {decodeString} from 'micromark-util-decode-string'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {stringifyPosition} from 'unist-util-stringify-position'\nconst own = {}.hasOwnProperty\n\n/**\n * Turn markdown into a syntax tree.\n *\n * @overload\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @overload\n * @param {Value} value\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @param {Value} value\n * Markdown to parse.\n * @param {Encoding | Options | null | undefined} [encoding]\n * Character encoding for when `value` is `Buffer`.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {Root}\n * mdast tree.\n */\nexport function fromMarkdown(value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n return compiler(options)(\n postprocess(\n parse(options).document().write(preprocess()(value, encoding, true))\n )\n )\n}\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n }\n configure(config, (options || {}).mdastExtensions || [])\n\n /** @type {CompileData} */\n const data = {}\n return compile\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n }\n /** @type {Omit} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n data\n }\n /** @type {Array} */\n const listStack = []\n let index = -1\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n const tail = listStack.pop()\n index = prepareList(events, tail, index)\n }\n }\n }\n index = -1\n while (++index < events.length) {\n const handler = config[events[index][0]]\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n Object.assign(\n {\n sliceSerialize: events[index][2].sliceSerialize\n },\n context\n ),\n events[index][1]\n )\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1]\n const handler = tail[1] || defaultOnError\n handler.call(context, undefined, tail[0])\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length > 0\n ? events[0][1].start\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n ),\n end: point(\n events.length > 0\n ? events[events.length - 2][1].end\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n )\n }\n\n // Call transforms.\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n return tree\n }\n\n /**\n * @param {Array} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1\n let containerBalance = -1\n let listSpread = false\n /** @type {Token | undefined} */\n let listItem\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number | undefined} */\n let firstBlankLineIndex\n /** @type {boolean | undefined} */\n let atMarker\n while (++index <= length) {\n const event = events[index]\n switch (event[1].type) {\n case 'listUnordered':\n case 'listOrdered':\n case 'blockQuote': {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n atMarker = undefined\n break\n }\n case 'lineEndingBlank': {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n atMarker = undefined\n }\n break\n }\n case 'linePrefix':\n case 'listItemValue':\n case 'listItemMarker':\n case 'listItemPrefix':\n case 'listItemPrefixWhitespace': {\n // Empty.\n\n break\n }\n default: {\n atMarker = undefined\n }\n }\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n let tailIndex = index\n lineIndex = undefined\n while (tailIndex--) {\n const tailEvent = events[tailIndex]\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = Object.assign(\n {},\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])\n index++\n length++\n }\n\n // Create a new list item.\n if (event[1].type === 'listItemPrefix') {\n /** @type {Token} */\n const item = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n }\n listItem = item\n events.splice(index, 0, ['enter', item, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n events[start][1]._spread = listSpread\n return length\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Nodes} create\n * Create a node.\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @returns {undefined}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n })\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Nodes} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {undefined}\n * Nothing.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1]\n /** @type {Array} */\n const siblings = parent.children\n siblings.push(node)\n this.stack.push(node)\n this.tokenStack.push([token, errorHandler])\n node.position = {\n start: point(token.start),\n // @ts-expect-error: `end` will be patched later.\n end: undefined\n }\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {undefined}\n * Nothing.\n */\n function exit(token, onExitError) {\n const node = this.stack.pop()\n const open = this.tokenStack.pop()\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({\n start: token.start,\n end: token.end\n }) +\n '): it’s not open'\n )\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0])\n } else {\n const handler = open[1] || defaultOnError\n handler.call(this, token, open[0])\n }\n }\n node.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @returns {string}\n */\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n this.data.expectingFirstListItemValue = true\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (this.data.expectingFirstListItemValue) {\n const ancestor = this.stack[this.stack.length - 2]\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)\n this.data.expectingFirstListItemValue = undefined\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.lang = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.meta = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (this.data.flowCodeInside) return\n this.buffer()\n this.data.flowCodeInside = true\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n this.data.flowCodeInside = undefined\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1]\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length\n node.depth = depth\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n this.data.setextHeadingSlurpLineEnding = true\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1]\n node.depth = this.sliceSerialize(token).codePointAt(0) === 61 ? 1 : 2\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n this.data.setextHeadingSlurpLineEnding = undefined\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1]\n /** @type {Array} */\n const siblings = node.children\n let tail = siblings[siblings.length - 1]\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n tail.position = {\n start: point(token.start),\n // @ts-expect-error: we’ll add `end` later.\n end: undefined\n }\n siblings.push(tail)\n }\n this.stack.push(tail)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1]\n // If we’re at a hard break, include the line ending in there.\n if (this.data.atHardBreak) {\n const tail = context.children[context.children.length - 1]\n tail.position.end = point(token.end)\n this.data.atHardBreak = undefined\n return\n }\n if (\n !this.data.setextHeadingSlurpLineEnding &&\n config.canContainEols.includes(context.type)\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n this.data.atHardBreak = true\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n this.data.referenceType = undefined\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n this.data.referenceType = undefined\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token)\n const ancestor = this.stack[this.stack.length - 2]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string)\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1]\n const value = this.resume()\n const node = this.stack[this.stack.length - 1]\n // Assume a reference.\n this.data.inReference = true\n if (node.type === 'link') {\n /** @type {Array} */\n const children = fragment.children\n node.children = children\n } else {\n node.alt = value\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n this.data.inReference = undefined\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n this.data.referenceType = 'collapsed'\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n this.data.referenceType = 'full'\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n this.data.characterReferenceType = token.type\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token)\n const type = this.data.characterReferenceType\n /** @type {string} */\n let value\n if (type) {\n value = decodeNumericCharacterReference(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n this.data.characterReferenceType = undefined\n } else {\n const result = decodeNamedCharacterReference(data)\n value = result\n }\n const tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = this.sliceSerialize(token)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n }\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n }\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n }\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n }\n }\n\n /** @returns {Heading} */\n function heading() {\n return {\n type: 'heading',\n // @ts-expect-error `depth` will be set later.\n depth: 0,\n children: []\n }\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n }\n }\n\n /** @returns {Html} */\n function html() {\n return {\n type: 'html',\n value: ''\n }\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n }\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n }\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n }\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n }\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n }\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Array | Extension>} extensions\n * @returns {undefined}\n */\nfunction configure(combined, extensions) {\n let index = -1\n while (++index < extensions.length) {\n const value = extensions[index]\n if (Array.isArray(value)) {\n configure(combined, value)\n } else {\n extension(combined, value)\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {undefined}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key\n for (key in extension) {\n if (own.call(extension, key)) {\n switch (key) {\n case 'canContainEols': {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n break\n }\n case 'transforms': {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n break\n }\n case 'enter':\n case 'exit': {\n const right = extension[key]\n if (right) {\n Object.assign(combined[key], right)\n }\n break\n }\n // No default\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error(\n 'Cannot close `' +\n left.type +\n '` (' +\n stringifyPosition({\n start: left.start,\n end: left.end\n }) +\n '): a different token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is open'\n )\n } else {\n throw new Error(\n 'Cannot close document, a token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is still open'\n )\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n */\n\nimport {combineExtensions} from 'micromark-util-combine-extensions'\nimport {content} from './initialize/content.js'\nimport {document} from './initialize/document.js'\nimport {flow} from './initialize/flow.js'\nimport {string, text} from './initialize/text.js'\nimport {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\n */\n function create(initial) {\n return creator\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from)\n }\n }\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions\n * @typedef {import('unified').Parser} Parser\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {Omit} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @param {Readonly | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkParse(options) {\n /** @type {Processor} */\n // @ts-expect-error: TS in JSDoc generates wrong types if `this` is typed regularly.\n const self = this\n\n self.parser = parser\n\n /**\n * @type {Parser}\n */\n function parser(doc) {\n return fromMarkdown(doc, {\n ...self.data('settings'),\n ...options,\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('micromarkExtensions') || [],\n mdastExtensions: self.data('fromMarkdownExtensions') || []\n })\n }\n}\n","export const VOID = -1;\nexport const PRIMITIVE = 0;\nexport const ARRAY = 1;\nexport const OBJECT = 2;\nexport const DATE = 3;\nexport const REGEXP = 4;\nexport const MAP = 5;\nexport const SET = 6;\nexport const ERROR = 7;\nexport const BIGINT = 8;\n// export const SYMBOL = 9;\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst env = typeof self === 'object' ? self : globalThis;\n\nconst deserializer = ($, _) => {\n const as = (out, index) => {\n $.set(index, out);\n return out;\n };\n\n const unpair = index => {\n if ($.has(index))\n return $.get(index);\n\n const [type, value] = _[index];\n switch (type) {\n case PRIMITIVE:\n case VOID:\n return as(value, index);\n case ARRAY: {\n const arr = as([], index);\n for (const index of value)\n arr.push(unpair(index));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index);\n for (const [key, index] of value)\n object[unpair(key)] = unpair(index);\n return object;\n }\n case DATE:\n return as(new Date(value), index);\n case REGEXP: {\n const {source, flags} = value;\n return as(new RegExp(source, flags), index);\n }\n case MAP: {\n const map = as(new Map, index);\n for (const [key, index] of value)\n map.set(unpair(key), unpair(index));\n return map;\n }\n case SET: {\n const set = as(new Set, index);\n for (const index of value)\n set.add(unpair(index));\n return set;\n }\n case ERROR: {\n const {name, message} = value;\n return as(new env[name](message), index);\n }\n case BIGINT:\n return as(BigInt(value), index);\n case 'BigInt':\n return as(Object(BigInt(value)), index);\n }\n return as(new env[type](value), index);\n };\n\n return unpair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns a deserialized value from a serialized array of Records.\n * @param {Record[]} serialized a previously serialized value.\n * @returns {any}\n */\nexport const deserialize = serialized => deserializer(new Map, serialized)(0);\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst EMPTY = '';\n\nconst {toString} = {};\nconst {keys} = Object;\n\nconst typeOf = value => {\n const type = typeof value;\n if (type !== 'object' || !value)\n return [PRIMITIVE, type];\n\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case 'Array':\n return [ARRAY, EMPTY];\n case 'Object':\n return [OBJECT, EMPTY];\n case 'Date':\n return [DATE, EMPTY];\n case 'RegExp':\n return [REGEXP, EMPTY];\n case 'Map':\n return [MAP, EMPTY];\n case 'Set':\n return [SET, EMPTY];\n }\n\n if (asString.includes('Array'))\n return [ARRAY, asString];\n\n if (asString.includes('Error'))\n return [ERROR, asString];\n\n return [OBJECT, asString];\n};\n\nconst shouldSkip = ([TYPE, type]) => (\n TYPE === PRIMITIVE &&\n (type === 'function' || type === 'symbol')\n);\n\nconst serializer = (strict, json, $, _) => {\n\n const as = (out, value) => {\n const index = _.push(out) - 1;\n $.set(value, index);\n return index;\n };\n\n const pair = value => {\n if ($.has(value))\n return $.get(value);\n\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case 'bigint':\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case 'function':\n case 'symbol':\n if (strict)\n throw new TypeError('unable to serialize ' + type);\n entry = null;\n break;\n case 'undefined':\n return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type)\n return as([type, [...value]], value);\n \n const arr = [];\n const index = as([TYPE, arr], value);\n for (const entry of value)\n arr.push(pair(entry));\n return index;\n }\n case OBJECT: {\n if (type) {\n switch (type) {\n case 'BigInt':\n return as([type, value.toString()], value);\n case 'Boolean':\n case 'Number':\n case 'String':\n return as([type, value.valueOf()], value);\n }\n }\n\n if (json && ('toJSON' in value))\n return pair(value.toJSON());\n\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const key of keys(value)) {\n if (strict || !shouldSkip(typeOf(value[key])))\n entries.push([pair(key), pair(value[key])]);\n }\n return index;\n }\n case DATE:\n return as([TYPE, value.toISOString()], value);\n case REGEXP: {\n const {source, flags} = value;\n return as([TYPE, {source, flags}], value);\n }\n case MAP: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const [key, entry] of value) {\n if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))\n entries.push([pair(key), pair(entry)]);\n }\n return index;\n }\n case SET: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const entry of value) {\n if (strict || !shouldSkip(typeOf(entry)))\n entries.push(pair(entry));\n }\n return index;\n }\n }\n\n const {message} = value;\n return as([TYPE, {name: type, message}], value);\n };\n\n return pair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} value a serializable value.\n * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n * if `true`, will not throw errors on incompatible types, and behave more\n * like JSON stringify would behave. Symbol and Function will be discarded.\n * @returns {Record[]}\n */\n export const serialize = (value, {json, lossy} = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, new Map, _)(value), _;\n};\n","import {deserialize} from './deserialize.js';\nimport {serialize} from './serialize.js';\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} any a serializable value.\n * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n * a transfer option (ignored when polyfilled) and/or non standard fields that\n * fallback to the polyfill if present.\n * @returns {Record[]}\n */\nexport default typeof structuredClone === \"function\" ?\n /* c8 ignore start */\n (any, options) => (\n options && ('json' in options || 'lossy' in options) ?\n deserialize(serialize(any, options)) : structuredClone(any)\n ) :\n (any, options) => deserialize(serialize(any, options));\n /* c8 ignore stop */\n\nexport {deserialize, serialize};\n","import {asciiAlphanumeric} from 'micromark-util-character'\nimport {encode} from 'micromark-util-encode'\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | null | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''))\n if (!protocol) {\n return value\n }\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\n return value\n }\n return ''\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array} */\n const result = []\n let index = -1\n let start = 0\n let skip = 0\n while (++index < value.length) {\n const code = value.charCodeAt(index)\n /** @type {string} */\n let replace = ''\n\n // A correct percent encoded value.\n if (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\n skip = 2\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code)\n }\n }\n // Astral.\n else if (code > 55_295 && code < 57_344) {\n const next = value.charCodeAt(index + 1)\n\n // A correct surrogate pair.\n if (code < 56_320 && next > 56_319 && next < 57_344) {\n replace = String.fromCharCode(code, next)\n skip = 1\n }\n // Lone surrogate.\n else {\n replace = '\\uFFFD'\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code)\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace))\n start = index + skip + 1\n replace = ''\n }\n if (skip) {\n index += skip\n skip = 0\n }\n }\n return result.join('') + value.slice(start)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @callback FootnoteBackContentTemplate\n * Generate content for the backreference dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {Array | ElementContent | string}\n * Content for the backreference when linking back from definitions to their\n * reference.\n *\n * @callback FootnoteBackLabelTemplate\n * Generate a back label dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Back label to use when linking back from definitions to their reference.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate the default content that GitHub uses on backreferences.\n *\n * @param {number} _\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {Array}\n * Content.\n */\nexport function defaultFootnoteBackContent(_, rereferenceIndex) {\n /** @type {Array} */\n const result = [{type: 'text', value: '↩'}]\n\n if (rereferenceIndex > 1) {\n result.push({\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [{type: 'text', value: String(rereferenceIndex)}]\n })\n }\n\n return result\n}\n\n/**\n * Generate the default label that GitHub uses on backreferences.\n *\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Label.\n */\nexport function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n return (\n 'Back to reference ' +\n (referenceIndex + 1) +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n )\n}\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\n// eslint-disable-next-line complexity\nexport function footer(state) {\n const clobberPrefix =\n typeof state.options.clobberPrefix === 'string'\n ? state.options.clobberPrefix\n : 'user-content-'\n const footnoteBackContent =\n state.options.footnoteBackContent || defaultFootnoteBackContent\n const footnoteBackLabel =\n state.options.footnoteBackLabel || defaultFootnoteBackLabel\n const footnoteLabel = state.options.footnoteLabel || 'Footnotes'\n const footnoteLabelTagName = state.options.footnoteLabelTagName || 'h2'\n const footnoteLabelProperties = state.options.footnoteLabelProperties || {\n className: ['sr-only']\n }\n /** @type {Array} */\n const listItems = []\n let referenceIndex = -1\n\n while (++referenceIndex < state.footnoteOrder.length) {\n const def = state.footnoteById.get(state.footnoteOrder[referenceIndex])\n\n if (!def) {\n continue\n }\n\n const content = state.all(def)\n const id = String(def.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let rereferenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n const counts = state.footnoteCounts.get(id)\n\n // eslint-disable-next-line no-unmodified-loop-condition\n while (counts !== undefined && ++rereferenceIndex <= counts) {\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n let children =\n typeof footnoteBackContent === 'string'\n ? footnoteBackContent\n : footnoteBackContent(referenceIndex, rereferenceIndex)\n\n if (typeof children === 'string') {\n children = {type: 'text', value: children}\n }\n\n backReferences.push({\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n clobberPrefix +\n 'fnref-' +\n safeId +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : ''),\n dataFootnoteBackref: '',\n ariaLabel:\n typeof footnoteBackLabel === 'string'\n ? footnoteBackLabel\n : footnoteBackLabel(referenceIndex, rereferenceIndex),\n className: ['data-footnote-backref']\n },\n children: Array.isArray(children) ? children : [children]\n })\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(def, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: footnoteLabelTagName,\n properties: {\n ...structuredClone(footnoteLabelProperties),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is a node.\n * @param {unknown} this\n * The given context.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n *\n * @typedef {Record | Node} Props\n * Object to check for equivalence.\n *\n * Note: `Node` is included as it is common but is not indexable.\n *\n * @typedef {Array | Props | TestFunction | string | null | undefined} Test\n * Check for an arbitrary node.\n *\n * @callback TestFunction\n * Check if a node passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | undefined | void}\n * Whether this node passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param {unknown} node\n * Thing to check, typically `Node`.\n * @param {Test} test\n * A check for a specific node.\n * @param {number | null | undefined} index\n * The node’s position in its parent.\n * @param {Parent | null | undefined} parent\n * The node’s parent.\n * @param {unknown} context\n * Context object (`this`) to pass to `test` functions.\n * @returns {boolean}\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((node?: null | undefined) => false) &\n * ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return looksLikeANode(node)\n ? check.call(context, node, index, parent)\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param {Test} test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns {Check}\n * An assertion.\n */\nexport const convert =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return ok\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test) ? anyFactory(test) : propsFactory(test)\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {Check}\n */\nfunction propsFactory(check) {\n const checkAsRecord = /** @type {Record} */ (check)\n\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n const nodeAsRecord = /** @type {Record} */ (\n /** @type {unknown} */ (node)\n )\n\n /** @type {string} */\n let key\n\n for (key in check) {\n if (nodeAsRecord[key] !== checkAsRecord[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeANode(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\nfunction ok() {\n return true\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction looksLikeANode(value) {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","/**\n * @typedef {import('unist').Node} UnistNode\n * @typedef {import('unist').Parent} UnistParent\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends Array\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {InternalAncestor, Child>} Ancestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {'skip' | boolean} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [VisitedParents=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor, Check>, Ancestor, Check>>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n * @template {UnistNode} [Tree=UnistNode]\n * Tree type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from 'unist-util-visit-parents/do-not-use-color'\n\n/** @type {Readonly} */\nconst empty = []\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} test\n * `unist-util-is`-compatible test\n * @param {Visitor | boolean | null | undefined} [visitor]\n * Handle each node.\n * @param {boolean | null | undefined} [reverse]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visitParents(tree, test, visitor, reverse) {\n /** @type {Test} */\n let check\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n } else {\n // @ts-expect-error visitor given, so `test` isn’t a visitor.\n check = test\n }\n\n const is = convert(check)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {UnistNode} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n const value = /** @type {Record} */ (\n node && typeof node === 'object' ? node : {}\n )\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {Readonly} */\n let result = empty\n /** @type {Readonly} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || undefined)) {\n // @ts-expect-error: `visitor` is now a visitor.\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n if ('children' in node && node.children) {\n const nodeAsParent = /** @type {UnistParent} */ (node)\n\n if (nodeAsParent.children && result[0] !== SKIP) {\n offset = (reverse ? nodeAsParent.children.length : -1) + step\n grandparents = parents.concat(nodeAsParent)\n\n while (offset > -1 && offset < nodeAsParent.children.length) {\n const child = nodeAsParent.children[offset]\n\n subresult = factory(child, offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n }\n\n return result\n }\n }\n}\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {Readonly}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return value === null || value === undefined ? empty : [value]\n}\n","/**\n * @typedef {import('unist').Node} UnistNode\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n// To do: use types from `unist-util-visit-parents` when it’s released.\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends Array\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends UnistNode ? number | undefined : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [Ancestor=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor>} BuildVisitorFromMatch\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Visited\n * Node type.\n * @template {UnistParent} Ancestor\n * Parent type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromMatch<\n * Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromDescendants<\n * InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} [Tree=UnistNode]\n * Node type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} testOrVisitor\n * `unist-util-is`-compatible test (optional, omit to pass a visitor).\n * @param {Visitor | boolean | null | undefined} [visitorOrReverse]\n * Handle each node (when test is omitted, pass `reverse`).\n * @param {boolean | null | undefined} [maybeReverse=false]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {\n /** @type {boolean | null | undefined} */\n let reverse\n /** @type {Test} */\n let test\n /** @type {Visitor} */\n let visitor\n\n if (\n typeof testOrVisitor === 'function' &&\n typeof visitorOrReverse !== 'function'\n ) {\n test = undefined\n visitor = testOrVisitor\n reverse = visitorOrReverse\n } else {\n // @ts-expect-error: assume the overload with test was given.\n test = testOrVisitor\n // @ts-expect-error: assume the overload with test was given.\n visitor = visitorOrReverse\n reverse = maybeReverse\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {UnistNode} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n const index = parent ? parent.children.indexOf(node) : undefined\n return visitor(node, index, parent)\n }\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Reference} Reference\n *\n * @typedef {import('./state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {Extract} node\n * Reference node (image, link).\n * @returns {Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return [{type: 'text', value: '![' + node.alt + suffix}]\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === null || spread === undefined\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n *\n * @satisfies {import('../state.js').Handlers}\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n // @ts-expect-error: root is different, but hard to type.\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n /** @type {Properties} */\n const properties = {}\n\n if (node.lang) {\n properties.className = ['language-' + node.lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {FootnoteReference} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnoteReference(state, node) {\n  const clobberPrefix =\n    typeof state.options.clobberPrefix === 'string'\n      ? state.options.clobberPrefix\n      : 'user-content-'\n  const id = String(node.identifier).toUpperCase()\n  const safeId = normalizeUri(id.toLowerCase())\n  const index = state.footnoteOrder.indexOf(id)\n  /** @type {number} */\n  let counter\n\n  let reuseCounter = state.footnoteCounts.get(id)\n\n  if (reuseCounter === undefined) {\n    reuseCounter = 0\n    state.footnoteOrder.push(id)\n    counter = state.footnoteOrder.length\n  } else {\n    counter = index + 1\n  }\n\n  reuseCounter += 1\n  state.footnoteCounts.set(id, reuseCounter)\n\n  /** @type {Element} */\n  const link = {\n    type: 'element',\n    tagName: 'a',\n    properties: {\n      href: '#' + clobberPrefix + 'fn-' + safeId,\n      id:\n        clobberPrefix +\n        'fnref-' +\n        safeId +\n        (reuseCounter > 1 ? '-' + reuseCounter : ''),\n      dataFootnoteRef: true,\n      ariaDescribedBy: ['footnote-label']\n    },\n    children: [{type: 'text', value: String(counter)}]\n  }\n  state.patch(node, link)\n\n  /** @type {Element} */\n  const sup = {\n    type: 'element',\n    tagName: 'sup',\n    properties: {},\n    children: [link]\n  }\n  state.patch(node, sup)\n  return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Html} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Element | Raw | undefined}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.options.allowDangerousHtml) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const def = state.definitionById.get(id)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(def.url || ''), alt: node.alt}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const def = state.definitionById.get(id)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(def.url || '')}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Parents} HastParents\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastParents}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointEnd, pointStart} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start && end) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  // To do: option to use `style`?\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(cell, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastElement | HastText}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').RootContent} HastRootContent\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('mdast').Parents} MdastParents\n *\n * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate\n * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate\n */\n\n/**\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | undefined} parent\n *   Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n *   hast node.\n *\n * @typedef {Partial>} Handlers\n *   Handle nodes.\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree (default:\n *   `false`).\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` property on footnotes to prevent them from\n *   *clobbering* (default: `'user-content-'`).\n *\n *   Pass `''` for trusted markdown and when you are careful with\n *   polyfilling.\n *   You could pass a different prefix.\n *\n *   DOM clobbering is this:\n *\n *   ```html\n *   

\n * \n * ```\n *\n * The above example shows that elements are made available by browsers, by\n * their ID, on the `window` object.\n * This is a security risk because you might be expecting some other variable\n * at that place.\n * It can also break polyfills.\n * Using a prefix solves these problems.\n * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]\n * Content of the backreference back to references (default: `defaultFootnoteBackContent`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackContent(_, rereferenceIndex) {\n * const result = [{type: 'text', value: '↩'}]\n *\n * if (rereferenceIndex > 1) {\n * result.push({\n * type: 'element',\n * tagName: 'sup',\n * properties: {},\n * children: [{type: 'text', value: String(rereferenceIndex)}]\n * })\n * }\n *\n * return result\n * }\n * ```\n *\n * This content is used in the `a` element of each backreference (the `↩`\n * links).\n * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]\n * Label to describe the backreference back to references (default:\n * `defaultFootnoteBackLabel`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n * return (\n * 'Back to reference ' +\n * (referenceIndex + 1) +\n * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n * )\n * }\n * ```\n *\n * Change it when the markdown is not in English.\n *\n * This label is used in the `ariaLabel` property on each backreference\n * (the `↩` links).\n * It affects users of assistive technology.\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Textual label to use for the footnotes section (default: `'Footnotes'`).\n *\n * Change it when the markdown is not in English.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (default: `{className:\n * ['sr-only']}`).\n *\n * Change it to show the label and add other properties.\n *\n * This label is typically hidden visually (assuming an `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass an empty string.\n * You can also add different properties.\n *\n * > 👉 **Note**: `id: 'footnote-label'` is always added, because footnote\n * > calls use it with `aria-describedby` to provide an accessible label.\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * HTML tag name to use for the footnote label element (default: `'h2'`).\n *\n * Change it to match your document structure.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes (optional).\n * @property {Array | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed)\n * (optional).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes (optional).\n *\n * @typedef State\n * Info passed around.\n * @property {(node: MdastNodes) => Array} all\n * Transform the children of an mdast parent to hast.\n * @property {(from: MdastNodes, to: Type) => HastElement | Type} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {Map} definitionById\n * Definitions by their identifier.\n * @property {Map} footnoteById\n * Footnote definitions by their identifier.\n * @property {Map} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Array} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array | HastElementContent | undefined} one\n * Transform an mdast node to hast.\n * @property {Options} options\n * Configuration.\n * @property {(from: MdastNodes, node: HastNodes) => undefined} patch\n * Copy a node’s positional info.\n * @property {(nodes: Array, loose?: boolean | undefined) => Array} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {visit} from 'unist-util-visit'\nimport {position} from 'unist-util-position'\nimport {handlers as defaultHandlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || emptyOptions\n /** @type {Map} */\n const definitionById = new Map()\n /** @type {Map} */\n const footnoteById = new Map()\n /** @type {Map} */\n const footnoteCounts = new Map()\n /** @type {Handlers} */\n // @ts-expect-error: the root handler returns a root.\n // Hard to type.\n const handlers = {...defaultHandlers, ...settings.handlers}\n\n /** @type {State} */\n const state = {\n all,\n applyData,\n definitionById,\n footnoteById,\n footnoteCounts,\n footnoteOrder: [],\n handlers,\n one,\n options: settings,\n patch,\n wrap\n }\n\n visit(tree, function (node) {\n if (node.type === 'definition' || node.type === 'footnoteDefinition') {\n const map = node.type === 'definition' ? definitionById : footnoteById\n const id = String(node.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: .\n if (!map.has(id)) {\n // @ts-expect-error: node type matches map.\n map.set(id, node)\n }\n }\n })\n\n return state\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | undefined} [parent]\n * Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n * Resulting hast node.\n */\n function one(node, parent) {\n const type = node.type\n const handle = state.handlers[type]\n\n if (own.call(state.handlers, type) && handle) {\n return handle(state, node, parent)\n }\n\n if (state.options.passThrough && state.options.passThrough.includes(type)) {\n if ('children' in node) {\n const {children, ...shallow} = node\n const result = structuredClone(shallow)\n // @ts-expect-error: TS doesn’t understand…\n result.children = state.all(node)\n // @ts-expect-error: TS doesn’t understand…\n return result\n }\n\n // @ts-expect-error: it’s custom.\n return structuredClone(node)\n }\n\n const unknown = state.options.unknownHandler || defaultUnknownHandler\n\n return unknown(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array}\n * Resulting hast nodes.\n */\n function all(parent) {\n /** @type {Array} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = state.one(nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = trimMarkdownSpaceStart(result.value)\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = trimMarkdownSpaceStart(head.value)\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {HastElement | Type}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {HastElement | Type} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent of `hName` is to create an element, but likely also to keep\n // the content around (otherwise: pass `hChildren`).\n else {\n /** @type {Array} */\n // @ts-expect-error: assume no doctypes in `root`.\n const children = 'children' in result ? result.children : [result]\n result = {type: 'element', tagName: hName, properties: {}, children}\n }\n }\n\n if (result.type === 'element' && hProperties) {\n Object.assign(result.properties, structuredClone(hProperties))\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastElement | HastText}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastElement | HastText} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: state.all(node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastRootContent} Type\n * Node type.\n * @param {Array} nodes\n * List of nodes to wrap.\n * @param {boolean | undefined} [loose=false]\n * Whether to add line endings at start and end (default: `false`).\n * @returns {Array}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n\n/**\n * Trim spaces and tabs at the start of `value`.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Result.\n */\nfunction trimMarkdownSpaceStart(value) {\n let index = 0\n let code = value.charCodeAt(index)\n\n while (code === 9 || code === 32) {\n index++\n code = value.charCodeAt(index)\n }\n\n return value.slice(index)\n}\n","/**\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('./state.js').Options} Options\n */\n\nimport {ok as assert} from 'devlop'\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * * `hast-util-to-html` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful\n * if you completely trust authors\n * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only\n * way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {HastNodes}\n * hast tree.\n */\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, undefined)\n const foot = footer(state)\n /** @type {HastNodes} */\n const result = Array.isArray(node)\n ? {type: 'root', children: node}\n : node || {type: 'root', children: []}\n\n if (foot) {\n // If there’s a footer, there were definitions, meaning block\n // content.\n // So `result` is a parent node.\n assert('children' in result)\n result.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n return result\n}\n","// Include `data` fields in mdast and `raw` nodes in hast.\n/// \n\n/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('mdast-util-to-hast').Options} Options\n * @typedef {import('unified').Processor} Processor\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @callback TransformBridge\n * Bridge-mode.\n *\n * Runs the destination with the new hast tree.\n * Discards result.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {Promise}\n * Nothing.\n *\n * @callback TransformMutate\n * Mutate-mode.\n *\n * Further transformers run on the hast tree.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {HastRoot}\n * Tree (hast).\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n/**\n * Turn markdown into HTML.\n *\n * ##### Notes\n *\n * ###### Signature\n *\n * * if a processor is given, runs the (rehype) plugins used on it with a\n * hast tree, then discards the result (*bridge mode*)\n * * otherwise, returns a hast tree, the plugins used after `remarkRehype`\n * are rehype plugins (*mutate mode*)\n *\n * > 👉 **Note**: It’s highly unlikely that you want to pass a `processor`.\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most plugins ignore `raw` nodes but two notable ones don’t:\n *\n * * `rehype-stringify` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful if\n * you completely trust authors\n * * `rehype-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only way\n * to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `remark-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * *Example: headings (DOM clobbering)* in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @overload\n * @param {Processor} processor\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformBridge}\n *\n * @overload\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformMutate}\n *\n * @param {Readonly | Processor | null | undefined} [destination]\n * Processor or configuration (optional).\n * @param {Readonly | null | undefined} [options]\n * When a processor was given, configuration (optional).\n * @returns {TransformBridge | TransformMutate}\n * Transform.\n */\nexport default function remarkRehype(destination, options) {\n if (destination && 'run' in destination) {\n /**\n * @type {TransformBridge}\n */\n return async function (tree, file) {\n // Cast because root in -> root out.\n const hastTree = /** @type {HastRoot} */ (toHast(tree, options))\n await destination.run(hastTree, file)\n }\n }\n\n /**\n * @type {TransformMutate}\n */\n return function (tree) {\n // Cast because root in -> root out.\n return /** @type {HastRoot} */ (toHast(tree, options || destination))\n }\n}\n","/**\n * Throw a given error.\n *\n * @param {Error|null|undefined} [error]\n * Maybe error.\n * @returns {asserts error is null|undefined}\n */\nexport function bail(error) {\n if (error) {\n throw error\n }\n}\n","export default function isPlainObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);\n}\n","/**\n * @typedef {(error?: Error|null|undefined, ...output: Array) => void} Callback\n * @typedef {(...input: Array) => any} Middleware\n *\n * @typedef {(...input: Array) => void} Run\n * Call all middleware.\n * @typedef {(fn: Middleware) => Pipeline} Use\n * Add `fn` (middleware) to the list.\n * @typedef {{run: Run, use: Use}} Pipeline\n * Middleware.\n */\n\n/**\n * Create new middleware.\n *\n * @returns {Pipeline}\n */\nexport function trough() {\n /** @type {Array} */\n const fns = []\n /** @type {Pipeline} */\n const pipeline = {run, use}\n\n return pipeline\n\n /** @type {Run} */\n function run(...values) {\n let middlewareIndex = -1\n /** @type {Callback} */\n const callback = values.pop()\n\n if (typeof callback !== 'function') {\n throw new TypeError('Expected function as last argument, not ' + callback)\n }\n\n next(null, ...values)\n\n /**\n * Run the next `fn`, or we’re done.\n *\n * @param {Error|null|undefined} error\n * @param {Array} output\n */\n function next(error, ...output) {\n const fn = fns[++middlewareIndex]\n let index = -1\n\n if (error) {\n callback(error)\n return\n }\n\n // Copy non-nullish input into values.\n while (++index < values.length) {\n if (output[index] === null || output[index] === undefined) {\n output[index] = values[index]\n }\n }\n\n // Save the newly created `output` for the next call.\n values = output\n\n // Next or done.\n if (fn) {\n wrap(fn, next)(...output)\n } else {\n callback(null, ...output)\n }\n }\n }\n\n /** @type {Use} */\n function use(middelware) {\n if (typeof middelware !== 'function') {\n throw new TypeError(\n 'Expected `middelware` to be a function, not ' + middelware\n )\n }\n\n fns.push(middelware)\n return pipeline\n }\n}\n\n/**\n * Wrap `middleware`.\n * Can be sync or async; return a promise, receive a callback, or return new\n * values and errors.\n *\n * @param {Middleware} middleware\n * @param {Callback} callback\n */\nexport function wrap(middleware, callback) {\n /** @type {boolean} */\n let called\n\n return wrapped\n\n /**\n * Call `middleware`.\n * @this {any}\n * @param {Array} parameters\n * @returns {void}\n */\n function wrapped(...parameters) {\n const fnExpectsCallback = middleware.length > parameters.length\n /** @type {any} */\n let result\n\n if (fnExpectsCallback) {\n parameters.push(done)\n }\n\n try {\n result = middleware.apply(this, parameters)\n } catch (error) {\n const exception = /** @type {Error} */ (error)\n\n // Well, this is quite the pickle.\n // `middleware` received a callback and called it synchronously, but that\n // threw an error.\n // The only thing left to do is to throw the thing instead.\n if (fnExpectsCallback && called) {\n throw exception\n }\n\n return done(exception)\n }\n\n if (!fnExpectsCallback) {\n if (result instanceof Promise) {\n result.then(then, done)\n } else if (result instanceof Error) {\n done(result)\n } else {\n then(result)\n }\n }\n }\n\n /**\n * Call `callback`, only once.\n * @type {Callback}\n */\n function done(error, ...output) {\n if (!called) {\n called = true\n callback(error, ...output)\n }\n }\n\n /**\n * Call `done` with one value.\n *\n * @param {any} [value]\n */\n function then(value) {\n done(null, value)\n }\n}\n","// A derivative work based on:\n// .\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// 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, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// .\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport const path = {basename, dirname, extname, join, sep: '/'}\n\n/* eslint-disable max-depth, complexity */\n\n/**\n * Get the basename from a path.\n *\n * @param {string} path\n * File path.\n * @param {string | null | undefined} [ext]\n * Extension to strip.\n * @returns {string}\n * Stem or basename.\n */\nfunction basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n let start = 0\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let seenNonSlash\n\n if (ext === undefined || ext.length === 0 || ext.length > path.length) {\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true\n end = index + 1\n }\n }\n\n return end < 0 ? '' : path.slice(start, end)\n }\n\n if (ext === path) {\n return ''\n }\n\n let firstNonSlashEnd = -1\n let extIndex = ext.length - 1\n\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true\n firstNonSlashEnd = index + 1\n }\n\n if (extIndex > -1) {\n // Try to match the explicit extension.\n if (path.codePointAt(index) === ext.codePointAt(extIndex--)) {\n if (extIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIndex = -1\n end = firstNonSlashEnd\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd\n } else if (end < 0) {\n end = path.length\n }\n\n return path.slice(start, end)\n}\n\n/**\n * Get the dirname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\nfunction dirname(path) {\n assertPath(path)\n\n if (path.length === 0) {\n return '.'\n }\n\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n if (unmatchedSlash) {\n end = index\n break\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true\n }\n }\n\n return end < 0\n ? path.codePointAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.codePointAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\n/**\n * Get an extname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * Extname.\n */\nfunction extname(path) {\n assertPath(path)\n\n let index = path.length\n\n let end = -1\n let startPart = 0\n let startDot = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n let preDotState = 0\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n while (index--) {\n const code = path.codePointAt(index)\n\n if (code === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1\n break\n }\n\n continue\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true\n end = index + 1\n }\n\n if (code === 46 /* `.` */) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index\n } else if (preDotState !== 1) {\n preDotState = 1\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1\n }\n }\n\n if (\n startDot < 0 ||\n end < 0 ||\n // We saw a non-dot character immediately before the dot.\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly `..`.\n (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n ) {\n return ''\n }\n\n return path.slice(startDot, end)\n}\n\n/**\n * Join segments from a path.\n *\n * @param {Array} segments\n * Path segments.\n * @returns {string}\n * File path.\n */\nfunction join(...segments) {\n let index = -1\n /** @type {string | undefined} */\n let joined\n\n while (++index < segments.length) {\n assertPath(segments[index])\n\n if (segments[index]) {\n joined =\n joined === undefined ? segments[index] : joined + '/' + segments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n/**\n * Normalize a basic file path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n assertPath(path)\n\n const absolute = path.codePointAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n let value = normalizeString(path, !absolute)\n\n if (value.length === 0 && !absolute) {\n value = '.'\n }\n\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n/**\n * Resolve `.` and `..` elements in a path with directory names.\n *\n * @param {string} path\n * File path.\n * @param {boolean} allowAboveRoot\n * Whether `..` can move above root.\n * @returns {string}\n * File path.\n */\nfunction normalizeString(path, allowAboveRoot) {\n let result = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let index = -1\n /** @type {number | undefined} */\n let code\n /** @type {number} */\n let lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.codePointAt(index)\n } else if (code === 47 /* `/` */) {\n break\n } else {\n code = 47 /* `/` */\n }\n\n if (code === 47 /* `/` */) {\n if (lastSlash === index - 1 || dots === 1) {\n // Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (\n result.length < 2 ||\n lastSegmentLength !== 2 ||\n result.codePointAt(result.length - 1) !== 46 /* `.` */ ||\n result.codePointAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = ''\n lastSegmentLength = 0\n } else {\n result = result.slice(0, lastSlashIndex)\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/')\n }\n\n lastSlash = index\n dots = 0\n continue\n }\n } else if (result.length > 0) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length > 0 ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length > 0) {\n result += '/' + path.slice(lastSlash + 1, index)\n } else {\n result = path.slice(lastSlash + 1, index)\n }\n\n lastSegmentLength = index - lastSlash - 1\n }\n\n lastSlash = index\n dots = 0\n } else if (code === 46 /* `.` */ && dots > -1) {\n dots++\n } else {\n dots = -1\n }\n }\n\n return result\n}\n\n/**\n * Make sure `path` is a string.\n *\n * @param {string} path\n * File path.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError(\n 'Path must be a string. Received ' + JSON.stringify(path)\n )\n }\n}\n\n/* eslint-enable max-depth, complexity */\n","// Somewhat based on:\n// .\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexport const proc = {cwd}\n\nfunction cwd() {\n return '/'\n}\n","/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * We check for auth attribute to distinguish legacy url instance with\n * WHATWG URL instance.\n *\n * @param {unknown} fileUrlOrPath\n * File path or URL.\n * @returns {fileUrlOrPath is URL}\n * Whether it’s a URL.\n */\n// From: \nexport function isUrl(fileUrlOrPath) {\n return Boolean(\n fileUrlOrPath !== null &&\n typeof fileUrlOrPath === 'object' &&\n 'href' in fileUrlOrPath &&\n fileUrlOrPath.href &&\n 'protocol' in fileUrlOrPath &&\n fileUrlOrPath.protocol &&\n // @ts-expect-error: indexing is fine.\n fileUrlOrPath.auth === undefined\n )\n}\n","import {isUrl} from './minurl.shared.js'\n\nexport {isUrl} from './minurl.shared.js'\n\n// See: \n\n/**\n * @param {URL | string} path\n * File URL.\n * @returns {string}\n * File URL.\n */\nexport function urlToPath(path) {\n if (typeof path === 'string') {\n path = new URL(path)\n } else if (!isUrl(path)) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'The \"path\" argument must be of type string or an instance of URL. Received `' +\n path +\n '`'\n )\n error.code = 'ERR_INVALID_ARG_TYPE'\n throw error\n }\n\n if (path.protocol !== 'file:') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError('The URL must be of scheme file')\n error.code = 'ERR_INVALID_URL_SCHEME'\n throw error\n }\n\n return getPathFromURLPosix(path)\n}\n\n/**\n * Get a path from a POSIX URL.\n *\n * @param {URL} url\n * URL.\n * @returns {string}\n * File path.\n */\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL host must be \"localhost\" or empty on darwin'\n )\n error.code = 'ERR_INVALID_FILE_URL_HOST'\n throw error\n }\n\n const pathname = url.pathname\n let index = -1\n\n while (++index < pathname.length) {\n if (\n pathname.codePointAt(index) === 37 /* `%` */ &&\n pathname.codePointAt(index + 1) === 50 /* `2` */\n ) {\n const third = pathname.codePointAt(index + 2)\n if (third === 70 /* `F` */ || third === 102 /* `f` */) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL path must not include encoded / characters'\n )\n error.code = 'ERR_INVALID_FILE_URL_PATH'\n throw error\n }\n }\n }\n\n return decodeURIComponent(pathname)\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n * @typedef {import('vfile-message').Options} MessageOptions\n * @typedef {import('../index.js').Data} Data\n * @typedef {import('../index.js').Value} Value\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n *\n * @typedef {Options | URL | VFile | Value} Compatible\n * Things that can be passed to the constructor.\n *\n * @typedef VFileCoreOptions\n * Set multiple values.\n * @property {string | null | undefined} [basename]\n * Set `basename` (name).\n * @property {string | null | undefined} [cwd]\n * Set `cwd` (working directory).\n * @property {Data | null | undefined} [data]\n * Set `data` (associated info).\n * @property {string | null | undefined} [dirname]\n * Set `dirname` (path w/o basename).\n * @property {string | null | undefined} [extname]\n * Set `extname` (extension with dot).\n * @property {Array | null | undefined} [history]\n * Set `history` (paths the file moved between).\n * @property {URL | string | null | undefined} [path]\n * Set `path` (current path).\n * @property {string | null | undefined} [stem]\n * Set `stem` (name without extension).\n * @property {Value | null | undefined} [value]\n * Set `value` (the contents of the file).\n *\n * @typedef Map\n * Raw source map.\n *\n * See:\n * .\n * @property {number} version\n * Which version of the source map spec this map is following.\n * @property {Array} sources\n * An array of URLs to the original source files.\n * @property {Array} names\n * An array of identifiers which can be referenced by individual mappings.\n * @property {string | undefined} [sourceRoot]\n * The URL root from which all sources are relative.\n * @property {Array | undefined} [sourcesContent]\n * An array of contents of the original source files.\n * @property {string} mappings\n * A string of base64 VLQs which contain the actual mappings.\n * @property {string} file\n * The generated file this source map is associated with.\n *\n * @typedef {Record & VFileCoreOptions} Options\n * Configuration.\n *\n * A bunch of keys that will be shallow copied over to the new file.\n *\n * @typedef {Record} ReporterSettings\n * Configuration for reporters.\n */\n\n/**\n * @template [Settings=ReporterSettings]\n * Options type.\n * @callback Reporter\n * Type for a reporter.\n * @param {Array} files\n * Files to report.\n * @param {Settings} options\n * Configuration.\n * @returns {string}\n * Report.\n */\n\nimport {VFileMessage} from 'vfile-message'\nimport {path} from 'vfile/do-not-use-conditional-minpath'\nimport {proc} from 'vfile/do-not-use-conditional-minproc'\nimport {urlToPath, isUrl} from 'vfile/do-not-use-conditional-minurl'\n\n/**\n * Order of setting (least specific to most), we need this because otherwise\n * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n * stem can be set.\n */\nconst order = /** @type {const} */ ([\n 'history',\n 'path',\n 'basename',\n 'stem',\n 'extname',\n 'dirname'\n])\n\nexport class VFile {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options\n\n if (!value) {\n options = {}\n } else if (isUrl(value)) {\n options = {path: value}\n } else if (typeof value === 'string' || isUint8Array(value)) {\n options = {value}\n } else {\n options = value\n }\n\n /* eslint-disable no-unused-expressions */\n\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n this.cwd = proc.cwd()\n\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {}\n\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array}\n */\n this.messages = []\n\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value\n\n // The below are non-standard, they are “well-known”.\n // As in, used in several tools.\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map\n\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result\n\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored\n /* eslint-enable no-unused-expressions */\n\n // Set path related properties in the correct order.\n let index = -1\n\n while (++index < order.length) {\n const prop = order[index]\n\n // Note: we specifically use `in` instead of `hasOwnProperty` to accept\n // `vfile`s too.\n if (\n prop in options &&\n options[prop] !== undefined &&\n options[prop] !== null\n ) {\n // @ts-expect-error: TS doesn’t understand basic reality.\n this[prop] = prop === 'history' ? [...options[prop]] : options[prop]\n }\n }\n\n /** @type {string} */\n let prop\n\n // Set non-path related properties.\n for (prop in options) {\n // @ts-expect-error: fine to set other things.\n if (!order.includes(prop)) {\n // @ts-expect-error: fine to set other things.\n this[prop] = options[prop]\n }\n }\n }\n\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === 'string' ? path.basename(this.path) : undefined\n }\n\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = path.join(this.dirname || '', basename)\n }\n\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === 'string' ? path.dirname(this.path) : undefined\n }\n\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname) {\n assertPath(this.basename, 'dirname')\n this.path = path.join(dirname || '', this.basename)\n }\n\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === 'string' ? path.extname(this.path) : undefined\n }\n\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.dirname, 'extname')\n\n if (extname) {\n if (extname.codePointAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.includes('.', 1)) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = path.join(this.dirname, this.stem + (extname || ''))\n }\n\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1]\n }\n\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) {\n path = urlToPath(path)\n }\n\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n }\n\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === 'string'\n ? path.basename(this.path, this.extname)\n : undefined\n }\n\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = path.join(this.dirname || '', stem + (this.extname || ''))\n }\n\n // Normal prototypal methods.\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = true\n\n throw message\n }\n\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = undefined\n\n return message\n }\n\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(\n // @ts-expect-error: the overloads are fine.\n causeOrReason,\n optionsOrParentOrPlace,\n origin\n )\n\n if (this.path) {\n message.name = this.path + ':' + message.name\n message.file = this.path\n }\n\n message.fatal = false\n\n this.messages.push(message)\n\n return message\n }\n\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > .\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === undefined) {\n return ''\n }\n\n if (typeof this.value === 'string') {\n return this.value\n }\n\n const decoder = new TextDecoder(encoding || undefined)\n return decoder.decode(this.value)\n }\n}\n\n/**\n * Assert that `part` is not a path (as in, does not contain `path.sep`).\n *\n * @param {string | null | undefined} part\n * File path part.\n * @param {string} name\n * Part name.\n * @returns {undefined}\n * Nothing.\n */\nfunction assertPart(part, name) {\n if (part && part.includes(path.sep)) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + path.sep + '`'\n )\n }\n}\n\n/**\n * Assert that `part` is not empty.\n *\n * @param {string | undefined} part\n * Thing.\n * @param {string} name\n * Part name.\n * @returns {asserts part is string}\n * Nothing.\n */\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n/**\n * Assert `path` exists.\n *\n * @param {string | undefined} path\n * Path.\n * @param {string} name\n * Dependency name.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","export const CallableInstance =\n /**\n * @type {new , Result>(property: string | symbol) => (...parameters: Parameters) => Result}\n */\n (\n /** @type {unknown} */\n (\n /**\n * @this {Function}\n * @param {string | symbol} property\n * @returns {(...parameters: Array) => unknown}\n */\n function (property) {\n const self = this\n const constr = self.constructor\n const proto = /** @type {Record} */ (\n // Prototypes do exist.\n // type-coverage:ignore-next-line\n constr.prototype\n )\n const func = proto[property]\n /** @type {(...parameters: Array) => unknown} */\n const apply = function () {\n return func.apply(apply, arguments)\n }\n\n Object.setPrototypeOf(apply, proto)\n\n const names = Object.getOwnPropertyNames(func)\n\n for (const p of names) {\n const descriptor = Object.getOwnPropertyDescriptor(func, p)\n if (descriptor) Object.defineProperty(apply, p, descriptor)\n }\n\n return apply\n }\n )\n )\n","/**\n * @typedef {import('trough').Pipeline} Pipeline\n *\n * @typedef {import('unist').Node} Node\n *\n * @typedef {import('vfile').Compatible} Compatible\n * @typedef {import('vfile').Value} Value\n *\n * @typedef {import('../index.js').CompileResultMap} CompileResultMap\n * @typedef {import('../index.js').Data} Data\n * @typedef {import('../index.js').Settings} Settings\n */\n\n/**\n * @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults\n * Acceptable results from compilers.\n *\n * To register custom results, add them to\n * {@link CompileResultMap `CompileResultMap`}.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the compiler receives (default: `Node`).\n * @template {CompileResults} [Result=CompileResults]\n * The thing that the compiler yields (default: `CompileResults`).\n * @callback Compiler\n * A **compiler** handles the compiling of a syntax tree to something else\n * (in most cases, text) (TypeScript type).\n *\n * It is used in the stringify phase and called with a {@link Node `Node`}\n * and {@link VFile `VFile`} representation of the document to compile.\n * It should return the textual representation of the given tree (typically\n * `string`).\n *\n * > 👉 **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@link CompileResultMap `CompileResultMap`}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n * @param {Tree} tree\n * Tree to compile.\n * @param {VFile} file\n * File associated with `tree`.\n * @returns {Result}\n * New content: compiled text (`string` or `Uint8Array`, for `file.value`) or\n * something else (for `file.result`).\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the parser yields (default: `Node`)\n * @callback Parser\n * A **parser** handles the parsing of text to a syntax tree.\n *\n * It is used in the parse phase and is called with a `string` and\n * {@link VFile `VFile`} of the document to parse.\n * It must return the syntax tree representation of the given file\n * ({@link Node `Node`}).\n * @param {string} document\n * Document to parse.\n * @param {VFile} file\n * File associated with `document`.\n * @returns {Tree}\n * Node representing the given file.\n */\n\n/**\n * @typedef {(\n * Plugin, any, any> |\n * PluginTuple, any, any> |\n * Preset\n * )} Pluggable\n * Union of the different ways to add plugins and settings.\n */\n\n/**\n * @typedef {Array} PluggableList\n * List of plugins and presets.\n */\n\n// Note: we can’t use `callback` yet as it messes up `this`:\n// .\n/**\n * @template {Array} [PluginParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=Node]\n * Value that is expected as input (default: `Node`).\n *\n * * If the plugin returns a {@link Transformer `Transformer`}, this\n * should be the node it expects.\n * * If the plugin sets a {@link Parser `Parser`}, this should be\n * `string`.\n * * If the plugin sets a {@link Compiler `Compiler`}, this should be the\n * node it expects.\n * @template [Output=Input]\n * Value that is yielded as output (default: `Input`).\n *\n * * If the plugin returns a {@link Transformer `Transformer`}, this\n * should be the node that that yields.\n * * If the plugin sets a {@link Parser `Parser`}, this should be the\n * node that it yields.\n * * If the plugin sets a {@link Compiler `Compiler`}, this should be\n * result it yields.\n * @typedef {(\n * (this: Processor, ...parameters: PluginParameters) =>\n * Input extends string ? // Parser.\n * Output extends Node | undefined ? undefined | void : never :\n * Output extends CompileResults ? // Compiler.\n * Input extends Node | undefined ? undefined | void : never :\n * Transformer<\n * Input extends Node ? Input : Node,\n * Output extends Node ? Output : Node\n * > | undefined | void\n * )} Plugin\n * Single plugin.\n *\n * Plugins configure the processors they are applied on in the following\n * ways:\n *\n * * they change the processor, such as the parser, the compiler, or by\n * configuring data\n * * they specify how to handle trees and files\n *\n * In practice, they are functions that can receive options and configure the\n * processor (`this`).\n *\n * > 👉 **Note**: plugins are called when the processor is *frozen*, not when\n * > they are applied.\n */\n\n/**\n * Tuple of a plugin and its configuration.\n *\n * The first item is a plugin, the rest are its parameters.\n *\n * @template {Array} [TupleParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=undefined]\n * Value that is expected as input (optional).\n *\n * * If the plugin returns a {@link Transformer `Transformer`}, this\n * should be the node it expects.\n * * If the plugin sets a {@link Parser `Parser`}, this should be\n * `string`.\n * * If the plugin sets a {@link Compiler `Compiler`}, this should be the\n * node it expects.\n * @template [Output=undefined] (optional).\n * Value that is yielded as output.\n *\n * * If the plugin returns a {@link Transformer `Transformer`}, this\n * should be the node that that yields.\n * * If the plugin sets a {@link Parser `Parser`}, this should be the\n * node that it yields.\n * * If the plugin sets a {@link Compiler `Compiler`}, this should be\n * result it yields.\n * @typedef {(\n * [\n * plugin: Plugin,\n * ...parameters: TupleParameters\n * ]\n * )} PluginTuple\n */\n\n/**\n * @typedef Preset\n * Sharable configuration.\n *\n * They can contain plugins and settings.\n * @property {PluggableList | undefined} [plugins]\n * List of plugins and presets (optional).\n * @property {Settings | undefined} [settings]\n * Shared settings for parsers and compilers (optional).\n */\n\n/**\n * @template {VFile} [File=VFile]\n * The file that the callback receives (default: `VFile`).\n * @callback ProcessCallback\n * Callback called when the process is done.\n *\n * Called with either an error or a result.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {File | undefined} [file]\n * Processed file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The tree that the callback receives (default: `Node`).\n * @callback RunCallback\n * Callback called when transformers are done.\n *\n * Called with either an error or results.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {Tree | undefined} [tree]\n * Transformed tree (optional).\n * @param {VFile | undefined} [file]\n * File (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Output=Node]\n * Node type that the transformer yields (default: `Node`).\n * @callback TransformCallback\n * Callback passed to transforms.\n *\n * If the signature of a `transformer` accepts a third argument, the\n * transformer may perform asynchronous operations, and must call it.\n * @param {Error | undefined} [error]\n * Fatal error to stop the process (optional).\n * @param {Output | undefined} [tree]\n * New, changed, tree (optional).\n * @param {VFile | undefined} [file]\n * New, changed, file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Input=Node]\n * Node type that the transformer expects (default: `Node`).\n * @template {Node} [Output=Input]\n * Node type that the transformer yields (default: `Input`).\n * @callback Transformer\n * Transformers handle syntax trees and files.\n *\n * They are functions that are called each time a syntax tree and file are\n * passed through the run phase.\n * When an error occurs in them (either because it’s thrown, returned,\n * rejected, or passed to `next`), the process stops.\n *\n * The run phase is handled by [`trough`][trough], see its documentation for\n * the exact semantics of these functions.\n *\n * > 👉 **Note**: you should likely ignore `next`: don’t accept it.\n * > it supports callback-style async work.\n * > But promises are likely easier to reason about.\n *\n * [trough]: https://github.com/wooorm/trough#function-fninput-next\n * @param {Input} tree\n * Tree to handle.\n * @param {VFile} file\n * File to handle.\n * @param {TransformCallback} next\n * Callback.\n * @returns {(\n * Promise |\n * Promise | // For some reason this is needed separately.\n * Output |\n * Error |\n * undefined |\n * void\n * )}\n * If you accept `next`, nothing.\n * Otherwise:\n *\n * * `Error` — fatal error to stop the process\n * * `Promise` or `undefined` — the next transformer keeps using\n * same tree\n * * `Promise` or `Node` — new, changed, tree\n */\n\n/**\n * @template {Node | undefined} ParseTree\n * Output of `parse`.\n * @template {Node | undefined} HeadTree\n * Input for `run`.\n * @template {Node | undefined} TailTree\n * Output for `run`.\n * @template {Node | undefined} CompileTree\n * Input of `stringify`.\n * @template {CompileResults | undefined} CompileResult\n * Output of `stringify`.\n * @template {Node | string | undefined} Input\n * Input of plugin.\n * @template Output\n * Output of plugin (optional).\n * @typedef {(\n * Input extends string\n * ? Output extends Node | undefined\n * ? // Parser.\n * Processor<\n * Output extends undefined ? ParseTree : Output,\n * HeadTree,\n * TailTree,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor\n * : Output extends CompileResults\n * ? Input extends Node | undefined\n * ? // Compiler.\n * Processor<\n * ParseTree,\n * HeadTree,\n * TailTree,\n * Input extends undefined ? CompileTree : Input,\n * Output extends undefined ? CompileResult : Output\n * >\n * : // Unknown.\n * Processor\n * : Input extends Node | undefined\n * ? Output extends Node | undefined\n * ? // Transform.\n * Processor<\n * ParseTree,\n * HeadTree extends undefined ? Input : HeadTree,\n * Output extends undefined ? TailTree : Output,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor\n * : // Unknown.\n * Processor\n * )} UsePlugin\n * Create a processor based on the input/output of a {@link Plugin plugin}.\n */\n\n/**\n * @template {CompileResults | undefined} Result\n * Node type that the transformer yields.\n * @typedef {(\n * Result extends Value | undefined ?\n * VFile :\n * VFile & {result: Result}\n * )} VFileWithOutput\n * Type to generate a {@link VFile `VFile`} corresponding to a compiler result.\n *\n * If a result that is not acceptable on a `VFile` is used, that will\n * be stored on the `result` field of {@link VFile `VFile`}.\n */\n\nimport {bail} from 'bail'\nimport extend from 'extend'\nimport {ok as assert} from 'devlop'\nimport isPlainObj from 'is-plain-obj'\nimport {trough} from 'trough'\nimport {VFile} from 'vfile'\nimport {CallableInstance} from './callable-instance.js'\n\n// To do: next major: drop `Compiler`, `Parser`: prefer lowercase.\n\n// To do: we could start yielding `never` in TS when a parser is missing and\n// `parse` is called.\n// Currently, we allow directly setting `processor.parser`, which is untyped.\n\nconst own = {}.hasOwnProperty\n\n/**\n * @template {Node | undefined} [ParseTree=undefined]\n * Output of `parse` (optional).\n * @template {Node | undefined} [HeadTree=undefined]\n * Input for `run` (optional).\n * @template {Node | undefined} [TailTree=undefined]\n * Output for `run` (optional).\n * @template {Node | undefined} [CompileTree=undefined]\n * Input of `stringify` (optional).\n * @template {CompileResults | undefined} [CompileResult=undefined]\n * Output of `stringify` (optional).\n * @extends {CallableInstance<[], Processor>}\n */\nexport class Processor extends CallableInstance {\n /**\n * Create a processor.\n */\n constructor() {\n // If `Processor()` is called (w/o new), `copy` is called instead.\n super('copy')\n\n /**\n * Compiler to use (deprecated).\n *\n * @deprecated\n * Use `compiler` instead.\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.Compiler = undefined\n\n /**\n * Parser to use (deprecated).\n *\n * @deprecated\n * Use `parser` instead.\n * @type {(\n * Parser |\n * undefined\n * )}\n */\n this.Parser = undefined\n\n // Note: the following fields are considered private.\n // However, they are needed for tests, and TSC generates an untyped\n // `private freezeIndex` field for, which trips `type-coverage` up.\n // Instead, we use `@deprecated` to visualize that they shouldn’t be used.\n /**\n * Internal list of configured plugins.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Array>>}\n */\n this.attachers = []\n\n /**\n * Compiler to use.\n *\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.compiler = undefined\n\n /**\n * Internal state to track where we are while freezing.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {number}\n */\n this.freezeIndex = -1\n\n /**\n * Internal state to track whether we’re frozen.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {boolean | undefined}\n */\n this.frozen = undefined\n\n /**\n * Internal state.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Data}\n */\n this.namespace = {}\n\n /**\n * Parser to use.\n *\n * @type {(\n * Parser |\n * undefined\n * )}\n */\n this.parser = undefined\n\n /**\n * Internal list of configured transformers.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Pipeline}\n */\n this.transformers = trough()\n }\n\n /**\n * Copy a processor.\n *\n * @deprecated\n * This is a private internal method and should not be used.\n * @returns {Processor}\n * New *unfrozen* processor ({@link Processor `Processor`}) that is\n * configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\n copy() {\n // Cast as the type parameters will be the same after attaching.\n const destination =\n /** @type {Processor} */ (\n new Processor()\n )\n let index = -1\n\n while (++index < this.attachers.length) {\n const attacher = this.attachers[index]\n destination.use(...attacher)\n }\n\n destination.data(extend(true, {}, this.namespace))\n\n return destination\n }\n\n /**\n * Configure the processor with info available to all plugins.\n * Information is stored in an object.\n *\n * Typically, options can be given to a specific plugin, but sometimes it\n * makes sense to have information shared with several plugins.\n * For example, a list of HTML elements that are self-closing, which is\n * needed during all phases.\n *\n * > 👉 **Note**: setting information cannot occur on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * > 👉 **Note**: to register custom data in TypeScript, augment the\n * > {@link Data `Data`} interface.\n *\n * @example\n * This example show how to get and set info:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * const processor = unified().data('alpha', 'bravo')\n *\n * processor.data('alpha') // => 'bravo'\n *\n * processor.data() // => {alpha: 'bravo'}\n *\n * processor.data({charlie: 'delta'})\n *\n * processor.data() // => {charlie: 'delta'}\n * ```\n *\n * @template {keyof Data} Key\n *\n * @overload\n * @returns {Data}\n *\n * @overload\n * @param {Data} dataset\n * @returns {Processor}\n *\n * @overload\n * @param {Key} key\n * @returns {Data[Key]}\n *\n * @overload\n * @param {Key} key\n * @param {Data[Key]} value\n * @returns {Processor}\n *\n * @param {Data | Key} [key]\n * Key to get or set, or entire dataset to set, or nothing to get the\n * entire dataset (optional).\n * @param {Data[Key]} [value]\n * Value to set (optional).\n * @returns {unknown}\n * The current processor when setting, the value at `key` when getting, or\n * the entire dataset when getting without key.\n */\n data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', this.frozen)\n this.namespace[key] = value\n return this\n }\n\n // Get `key`.\n return (own.call(this.namespace, key) && this.namespace[key]) || undefined\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', this.frozen)\n this.namespace = key\n return this\n }\n\n // Get space.\n return this.namespace\n }\n\n /**\n * Freeze a processor.\n *\n * Frozen processors are meant to be extended and not to be configured\n * directly.\n *\n * When a processor is frozen it cannot be unfrozen.\n * New processors working the same way can be created by calling the\n * processor.\n *\n * It’s possible to freeze processors explicitly by calling `.freeze()`.\n * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,\n * `.stringify()`, `.process()`, or `.processSync()` are called.\n *\n * @returns {Processor}\n * The current processor.\n */\n freeze() {\n if (this.frozen) {\n return this\n }\n\n // Cast so that we can type plugins easier.\n // Plugins are supposed to be usable on different processors, not just on\n // this exact processor.\n const self = /** @type {Processor} */ (/** @type {unknown} */ (this))\n\n while (++this.freezeIndex < this.attachers.length) {\n const [attacher, ...options] = this.attachers[this.freezeIndex]\n\n if (options[0] === false) {\n continue\n }\n\n if (options[0] === true) {\n options[0] = undefined\n }\n\n const transformer = attacher.call(self, ...options)\n\n if (typeof transformer === 'function') {\n this.transformers.use(transformer)\n }\n }\n\n this.frozen = true\n this.freezeIndex = Number.POSITIVE_INFINITY\n\n return this\n }\n\n /**\n * Parse text to a syntax tree.\n *\n * > 👉 **Note**: `parse` freezes the processor if not already *frozen*.\n *\n * > 👉 **Note**: `parse` performs the parse phase, not the run phase or other\n * > phases.\n *\n * @param {Compatible | undefined} [file]\n * file to parse (optional); typically `string` or `VFile`; any value\n * accepted as `x` in `new VFile(x)`.\n * @returns {ParseTree extends undefined ? Node : ParseTree}\n * Syntax tree representing `file`.\n */\n parse(file) {\n this.freeze()\n const realFile = vfile(file)\n const parser = this.parser || this.Parser\n assertParser('parse', parser)\n return parser(String(realFile), realFile)\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * > 👉 **Note**: `process` freezes the processor if not already *frozen*.\n *\n * > 👉 **Note**: `process` performs the parse, run, and stringify phases.\n *\n * @overload\n * @param {Compatible | undefined} file\n * @param {ProcessCallback>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise>}\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`]; any value accepted as\n * `x` in `new VFile(x)`.\n * @param {ProcessCallback> | undefined} [done]\n * Callback (optional).\n * @returns {Promise | undefined}\n * Nothing if `done` is given.\n * Otherwise a promise, rejected with a fatal error or resolved with the\n * processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > 👉 **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@link CompileResultMap `CompileResultMap`}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n process(file, done) {\n const self = this\n\n this.freeze()\n assertParser('process', this.parser || this.Parser)\n assertCompiler('process', this.compiler || this.Compiler)\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {((file: VFileWithOutput) => undefined | void) | undefined} resolve\n * @param {(error: Error | undefined) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n const realFile = vfile(file)\n // Assume `ParseTree` (the result of the parser) matches `HeadTree` (the\n // input of the first transform).\n const parseTree =\n /** @type {HeadTree extends undefined ? Node : HeadTree} */ (\n /** @type {unknown} */ (self.parse(realFile))\n )\n\n self.run(parseTree, realFile, function (error, tree, file) {\n if (error || !tree || !file) {\n return realDone(error)\n }\n\n // Assume `TailTree` (the output of the last transform) matches\n // `CompileTree` (the input of the compiler).\n const compileTree =\n /** @type {CompileTree extends undefined ? Node : CompileTree} */ (\n /** @type {unknown} */ (tree)\n )\n\n const compileResult = self.stringify(compileTree, file)\n\n if (looksLikeAValue(compileResult)) {\n file.value = compileResult\n } else {\n file.result = compileResult\n }\n\n realDone(error, /** @type {VFileWithOutput} */ (file))\n })\n\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput | undefined} [file]\n * @returns {undefined}\n */\n function realDone(error, file) {\n if (error || !file) {\n reject(error)\n } else if (resolve) {\n resolve(file)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, file)\n }\n }\n }\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > 👉 **Note**: `processSync` freezes the processor if not already *frozen*.\n *\n * > 👉 **Note**: `processSync` performs the parse, run, and stringify phases.\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`; any value accepted as\n * `x` in `new VFile(x)`.\n * @returns {VFileWithOutput}\n * The processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > 👉 **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@link CompileResultMap `CompileResultMap`}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n processSync(file) {\n /** @type {boolean} */\n let complete = false\n /** @type {VFileWithOutput | undefined} */\n let result\n\n this.freeze()\n assertParser('processSync', this.parser || this.Parser)\n assertCompiler('processSync', this.compiler || this.Compiler)\n\n this.process(file, realDone)\n assertDone('processSync', 'process', complete)\n assert(result, 'we either bailed on an error or have a tree')\n\n return result\n\n /**\n * @type {ProcessCallback>}\n */\n function realDone(error, file) {\n complete = true\n bail(error)\n result = file\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * > 👉 **Note**: `run` freezes the processor if not already *frozen*.\n *\n * > 👉 **Note**: `run` performs the run phase, not other phases.\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {RunCallback} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback} [done]\n * Callback (optional).\n * @returns {Promise | undefined}\n * Nothing if `done` is given.\n * Otherwise, a promise rejected with a fatal error or resolved with the\n * transformed tree.\n */\n run(tree, file, done) {\n assertNode(tree)\n this.freeze()\n\n const transformers = this.transformers\n\n if (!done && typeof file === 'function') {\n done = file\n file = undefined\n }\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {(\n * ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |\n * undefined\n * )} resolve\n * @param {(error: Error) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n assert(\n typeof file !== 'function',\n '`file` can’t be a `done` anymore, we checked'\n )\n const realFile = vfile(file)\n transformers.run(tree, realFile, realDone)\n\n /**\n * @param {Error | undefined} error\n * @param {Node} outputTree\n * @param {VFile} file\n * @returns {undefined}\n */\n function realDone(error, outputTree, file) {\n const resultingTree =\n /** @type {TailTree extends undefined ? Node : TailTree} */ (\n outputTree || tree\n )\n\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(resultingTree)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, resultingTree, file)\n }\n }\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > 👉 **Note**: `runSync` freezes the processor if not already *frozen*.\n *\n * > 👉 **Note**: `runSync` performs the run phase, not other phases.\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {TailTree extends undefined ? Node : TailTree}\n * Transformed tree.\n */\n runSync(tree, file) {\n /** @type {boolean} */\n let complete = false\n /** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */\n let result\n\n this.run(tree, file, realDone)\n\n assertDone('runSync', 'run', complete)\n assert(result, 'we either bailed on an error or have a tree')\n return result\n\n /**\n * @type {RunCallback}\n */\n function realDone(error, tree) {\n bail(error)\n result = tree\n complete = true\n }\n }\n\n /**\n * Compile a syntax tree.\n *\n * > 👉 **Note**: `stringify` freezes the processor if not already *frozen*.\n *\n * > 👉 **Note**: `stringify` performs the stringify phase, not the run phase\n * > or other phases.\n *\n * @param {CompileTree extends undefined ? Node : CompileTree} tree\n * Tree to compile.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {CompileResult extends undefined ? Value : CompileResult}\n * Textual representation of the tree (see note).\n *\n * > 👉 **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@link CompileResultMap `CompileResultMap`}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n stringify(tree, file) {\n this.freeze()\n const realFile = vfile(file)\n const compiler = this.compiler || this.Compiler\n assertCompiler('stringify', compiler)\n assertNode(tree)\n\n return compiler(tree, realFile)\n }\n\n /**\n * Configure the processor to use a plugin, a list of usable values, or a\n * preset.\n *\n * If the processor is already using a plugin, the previous plugin\n * configuration is changed based on the options that are passed in.\n * In other words, the plugin is not added a second time.\n *\n * > 👉 **Note**: `use` cannot be called on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * @example\n * There are many ways to pass plugins to `.use()`.\n * This example gives an overview:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * unified()\n * // Plugin with options:\n * .use(pluginA, {x: true, y: true})\n * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):\n * .use(pluginA, {y: false, z: true})\n * // Plugins:\n * .use([pluginB, pluginC])\n * // Two plugins, the second with options:\n * .use([pluginD, [pluginE, {}]])\n * // Preset with plugins and settings:\n * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})\n * // Settings only:\n * .use({settings: {position: false}})\n * ```\n *\n * @template {Array} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor}\n *\n * @overload\n * @param {Plugin} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin}\n *\n * @param {PluggableList | Plugin | Preset | null | undefined} value\n * Usable value.\n * @param {...unknown} parameters\n * Parameters, when a plugin is given as a usable value.\n * @returns {Processor}\n * Current processor.\n */\n use(value, ...parameters) {\n const attachers = this.attachers\n const namespace = this.namespace\n\n assertUnfrozen('use', this.frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin(value, parameters)\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n\n return this\n\n /**\n * @param {Pluggable} value\n * @returns {undefined}\n */\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value, [])\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n const [plugin, ...parameters] =\n /** @type {PluginTuple>} */ (value)\n addPlugin(plugin, parameters)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n }\n\n /**\n * @param {Preset} result\n * @returns {undefined}\n */\n function addPreset(result) {\n if (!('plugins' in result) && !('settings' in result)) {\n throw new Error(\n 'Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither'\n )\n }\n\n addList(result.plugins)\n\n if (result.settings) {\n namespace.settings = extend(true, namespace.settings, result.settings)\n }\n }\n\n /**\n * @param {PluggableList | null | undefined} plugins\n * @returns {undefined}\n */\n function addList(plugins) {\n let index = -1\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (Array.isArray(plugins)) {\n while (++index < plugins.length) {\n const thing = plugins[index]\n add(thing)\n }\n } else {\n throw new TypeError('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n /**\n * @param {Plugin} plugin\n * @param {Array} parameters\n * @returns {undefined}\n */\n function addPlugin(plugin, parameters) {\n let index = -1\n let entryIndex = -1\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n entryIndex = index\n break\n }\n }\n\n if (entryIndex === -1) {\n attachers.push([plugin, ...parameters])\n }\n // Only set if there was at least a `primary` value, otherwise we’d change\n // `arguments.length`.\n else if (parameters.length > 0) {\n let [primary, ...rest] = parameters\n const currentPrimary = attachers[entryIndex][1]\n if (isPlainObj(currentPrimary) && isPlainObj(primary)) {\n primary = extend(true, currentPrimary, primary)\n }\n\n attachers[entryIndex] = [plugin, primary, ...rest]\n }\n }\n }\n}\n\n// Note: this returns a *callable* instance.\n// That’s why it’s documented as a function.\n/**\n * Create a new processor.\n *\n * @example\n * This example shows how a new processor can be created (from `remark`) and linked\n * to **stdin**(4) and **stdout**(4).\n *\n * ```js\n * import process from 'node:process'\n * import concatStream from 'concat-stream'\n * import {remark} from 'remark'\n *\n * process.stdin.pipe(\n * concatStream(function (buf) {\n * process.stdout.write(String(remark().processSync(buf)))\n * })\n * )\n * ```\n *\n * @returns\n * New *unfrozen* processor (`processor`).\n *\n * This processor is configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\nexport const unified = new Processor().freeze()\n\n/**\n * Assert a parser is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Parser}\n */\nfunction assertParser(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `parser`')\n }\n}\n\n/**\n * Assert a compiler is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Compiler}\n */\nfunction assertCompiler(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `compiler`')\n }\n}\n\n/**\n * Assert the processor is not frozen.\n *\n * @param {string} name\n * @param {unknown} frozen\n * @returns {asserts frozen is false}\n */\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot call `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n/**\n * Assert `node` is a unist node.\n *\n * @param {unknown} node\n * @returns {asserts node is Node}\n */\nfunction assertNode(node) {\n // `isPlainObj` unfortunately uses `any` instead of `unknown`.\n // type-coverage:ignore-next-line\n if (!isPlainObj(node) || typeof node.type !== 'string') {\n throw new TypeError('Expected node, got `' + node + '`')\n // Fine.\n }\n}\n\n/**\n * Assert that `complete` is `true`.\n *\n * @param {string} name\n * @param {string} asyncName\n * @param {unknown} complete\n * @returns {asserts complete is true}\n */\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {VFile}\n */\nfunction vfile(value) {\n return looksLikeAVFile(value) ? value : new VFile(value)\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {value is VFile}\n */\nfunction looksLikeAVFile(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'message' in value &&\n 'messages' in value\n )\n}\n\n/**\n * @param {unknown} [value]\n * @returns {value is Value}\n */\nfunction looksLikeAValue(value) {\n return typeof value === 'string' || isUint8Array(value)\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","// Register `Raw` in tree:\n/// \n\n/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-to-jsx-runtime').Components} JsxRuntimeComponents\n * @typedef {import('remark-rehype').Options} RemarkRehypeOptions\n * @typedef {import('unist-util-visit').BuildVisitor} Visitor\n * @typedef {import('unified').PluggableList} PluggableList\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n *\n * @typedef {Partial} Components\n * Map tag names to components.\n *\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n *\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {string | null | undefined} [className]\n * Wrap in a `div` with this class name.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n *\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\n// @ts-expect-error: untyped.\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * @param {Readonly} options\n * Props.\n * @returns {JSX.Element}\n * React element.\n */\nexport function Markdown(options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const children = options.children || ''\n const className = options.className\n const components = options.components\n const disallowedElements = options.disallowedElements\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n const mdastTree = processor.parse(file)\n /** @type {Nodes} */\n let hastTree = processor.runSync(mdastTree, file)\n\n // Wrap in `div` if there’s a class name.\n if (className) {\n hastTree = {\n type: 'element',\n tagName: 'div',\n properties: {className},\n // Assume no doctypes.\n children: /** @type {Array} */ (\n hastTree.type === 'root' ? hastTree.children : [hastTree]\n )\n }\n }\n\n visit(hastTree, transform)\n\n return toJsxRuntime(hastTree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {Visitor} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // \n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","/**\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Text} Text\n * @typedef {import('unist-util-visit-parents').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * @typedef RegExpMatchObject\n * Info on the match.\n * @property {number} index\n * The index of the search at which the result was found.\n * @property {string} input\n * A copy of the search string in the text node.\n * @property {[...Array, Text]} stack\n * All ancestors of the text node, where the last node is the text itself.\n *\n * @typedef {RegExp | string} Find\n * Pattern to find.\n *\n * Strings are escaped and then turned into global expressions.\n *\n * @typedef {Array} FindAndReplaceList\n * Several find and replaces, in array form.\n *\n * @typedef {[Find, Replace?]} FindAndReplaceTuple\n * Find and replace in tuple form.\n *\n * @typedef {ReplaceFunction | string | null | undefined} Replace\n * Thing to replace with.\n *\n * @callback ReplaceFunction\n * Callback called when a search matches.\n * @param {...any} parameters\n * The parameters are the result of corresponding search expression:\n *\n * * `value` (`string`) — whole match\n * * `...capture` (`Array`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array | PhrasingContent | string | false | null | undefined}\n * Thing to replace with.\n *\n * * when `null`, `undefined`, `''`, remove the match\n * * …or when `false`, do not replace at all\n * * …or when `string`, replace with a text node of that value\n * * …or when `Node` or `Array`, replace with those nodes\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n *\n * @typedef {Array} Pairs\n * All find and replaced.\n *\n * @typedef Options\n * Configuration.\n * @property {Test | null | undefined} [ignore]\n * Test for which nodes to ignore (optional).\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\n/**\n * Find patterns in a tree and replace them.\n *\n * The algorithm searches the tree in *preorder* for complete values in `Text`\n * nodes.\n * Partial matches are not supported.\n *\n * @param {Nodes} tree\n * Tree to change.\n * @param {FindAndReplaceList | FindAndReplaceTuple} list\n * Patterns to find.\n * @param {Options | null | undefined} [options]\n * Configuration (when `find` is not `Find`).\n * @returns {undefined}\n * Nothing.\n */\nexport function findAndReplace(tree, list, options) {\n const settings = options || {}\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(list)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n /** @type {import('unist-util-visit-parents').BuildVisitor} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parents | undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = parents[index]\n /** @type {Array | undefined} */\n const siblings = grandparent ? grandparent.children : undefined\n\n if (\n ignored(\n parent,\n siblings ? siblings.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, parents)\n }\n }\n\n /**\n * Handle a text node which is not in an ignored parent.\n *\n * @param {Text} node\n * Text node.\n * @param {Array} parents\n * Parents.\n * @returns {VisitorResult}\n * Result.\n */\n function handler(node, parents) {\n const parent = parents[parents.length - 1]\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n /** @type {Array} */\n const siblings = parent.children\n const index = siblings.indexOf(node)\n let change = false\n /** @type {Array} */\n let nodes = []\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n const position = match.index\n /** @type {RegExpMatchObject} */\n const matchObject = {\n index: match.index,\n input: match.input,\n stack: [...parents, node]\n }\n let value = replace(...match, matchObject)\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n // It wasn’t a match after all.\n if (value === false) {\n // False acts as if there was no match.\n // So we need to reset `lastIndex`, which currently being at the end of\n // the current match, to the beginning.\n find.lastIndex = position + 1\n } else {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n change = true\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (change) {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n } else {\n nodes = [node]\n }\n\n return index + nodes.length\n }\n}\n\n/**\n * Turn a tuple or a list of tuples into pairs.\n *\n * @param {FindAndReplaceList | FindAndReplaceTuple} tupleOrList\n * Schema.\n * @returns {Pairs}\n * Clean pairs.\n */\nfunction toPairs(tupleOrList) {\n /** @type {Pairs} */\n const result = []\n\n if (!Array.isArray(tupleOrList)) {\n throw new TypeError('Expected find and replace tuple or list of tuples')\n }\n\n /** @type {FindAndReplaceList} */\n // @ts-expect-error: correct.\n const list =\n !tupleOrList[0] || Array.isArray(tupleOrList[0])\n ? tupleOrList\n : [tupleOrList]\n\n let index = -1\n\n while (++index < list.length) {\n const tuple = list[index]\n result.push([toExpression(tuple[0]), toFunction(tuple[1])])\n }\n\n return result\n}\n\n/**\n * Turn a find into an expression.\n *\n * @param {Find} find\n * Find.\n * @returns {RegExp}\n * Expression.\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * Turn a replace into a function.\n *\n * @param {Replace} replace\n * Replace.\n * @returns {ReplaceFunction}\n * Function.\n */\nfunction toFunction(replace) {\n return typeof replace === 'function'\n ? replace\n : function () {\n return replace\n }\n}\n","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","/**\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-from-markdown').Transform} FromMarkdownTransform\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n *\n * @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject\n * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction\n */\n\nimport {ccount} from 'ccount'\nimport {ok as assert} from 'devlop'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralFromMarkdown() {\n return {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralToMarkdown() {\n return {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: ':',\n before: '[ps]',\n after: '\\\\/',\n inConstruct,\n notInConstruct\n }\n ]\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'link')\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/g, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Array | Link | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n (!email || code !== 47)\n )\n}\n","/**\n * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Map} Map\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\nimport {ok as assert} from 'devlop'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n\nfootnoteReference.peek = footnoteReferencePeek\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteDefinition: enterFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteCallString: enterFootnoteCallString\n },\n exit: {\n gfmFootnoteDefinition: exitFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteCallString: exitFootnoteCallString\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown() {\n return {\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],\n handlers: {footnoteDefinition, footnoteReference}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinitionLabelString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteDefinition')\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCallString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCallString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteReference')\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\nfunction footnoteReference(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteReference')\n const subexit = state.enter('reference')\n value += tracker.move(\n state.safe(state.associationId(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\nfunction footnoteDefinition(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteDefinition')\n const subexit = state.enter('label')\n value += tracker.move(\n state.safe(state.associationId(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n value += tracker.move(\n ']:' + (node.children && node.children.length > 0 ? ' ' : '')\n )\n tracker.shift(4)\n value += tracker.move(\n state.indentLines(state.containerFlow(node, tracker.current()), map)\n )\n exit()\n\n return value\n}\n\n/** @type {Map} */\nfunction map(line, index, blank) {\n if (index === 0) {\n return line\n }\n\n return (blank ? '' : ' ') + line\n}\n","/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: \n *\n * @type {Array}\n */\nconst constructsWithoutStrikethrough = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\nhandleDelete.peek = peekDelete\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughFromMarkdown() {\n return {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughToMarkdown() {\n return {\n unsafe: [\n {\n character: '~',\n inConstruct: 'phrasing',\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {delete: handleDelete}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, state, info) {\n const tracker = state.createTracker(info)\n const exit = state.enter('strikethrough')\n let value = tracker.move('~~')\n value += state.containerPhrasing(node, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n","/**\n * @typedef Options\n * Configuration (optional).\n * @property {string|null|ReadonlyArray} [align]\n * One style for all columns, or styles for their respective columns.\n * Each style is either `'l'` (left), `'r'` (right), or `'c'` (center).\n * Other values are treated as `''`, which doesn’t place the colon in the\n * alignment row but does align left.\n * *Only the lowercased first character is used, so `Right` is fine.*\n * @property {boolean} [padding=true]\n * Whether to add a space of padding between delimiters and cells.\n *\n * When `true`, there is padding:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there is no padding:\n *\n * ```markdown\n * |Alpha|B |\n * |-----|-----|\n * |C |Delta|\n * ```\n * @property {boolean} [delimiterStart=true]\n * Whether to begin each row with the delimiter.\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are starting delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no starting delimiters:\n *\n * ```markdown\n * Alpha | B |\n * ----- | ----- |\n * C | Delta |\n * ```\n * @property {boolean} [delimiterEnd=true]\n * Whether to end each row with the delimiter.\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are ending delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no ending delimiters:\n *\n * ```markdown\n * | Alpha | B\n * | ----- | -----\n * | C | Delta\n * ```\n * @property {boolean} [alignDelimiters=true]\n * Whether to align the delimiters.\n * By default, they are aligned:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * Pass `false` to make them staggered:\n *\n * ```markdown\n * | Alpha | B |\n * | - | - |\n * | C | Delta |\n * ```\n * @property {(value: string) => number} [stringLength]\n * Function to detect the length of table cell content.\n * This is used when aligning the delimiters (`|`) between table cells.\n * Full-width characters and emoji mess up delimiter alignment when viewing\n * the markdown source.\n * To fix this, you can pass this function, which receives the cell content\n * and returns its “visible” size.\n * Note that what is and isn’t visible depends on where the text is displayed.\n *\n * Without such a function, the following:\n *\n * ```js\n * markdownTable([\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ])\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | - | - |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n *\n * With [`string-width`](https://github.com/sindresorhus/string-width):\n *\n * ```js\n * import stringWidth from 'string-width'\n *\n * markdownTable(\n * [\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ],\n * {stringLength: stringWidth}\n * )\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | ----- | ------- |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n */\n\n/**\n * @typedef {Options} MarkdownTableOptions\n * @todo\n * Remove next major.\n */\n\n/**\n * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..\n *\n * @param {ReadonlyArray>} table\n * Table data (matrix of strings).\n * @param {Options} [options]\n * Configuration (optional).\n * @returns {string}\n */\nexport function markdownTable(table, options = {}) {\n const align = (options.align || []).concat()\n const stringLength = options.stringLength || defaultStringLength\n /** @type {Array} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array>} Cells per row. */\n const cellMatrix = []\n /** @type {Array>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array} */\n const longestCellByColumn = []\n let mostCellsPerRow = 0\n let rowIndex = -1\n\n // This is a superfluous loop if we don’t align delimiters, but otherwise we’d\n // do superfluous work when aligning, so optimize for aligning.\n while (++rowIndex < table.length) {\n /** @type {Array} */\n const row = []\n /** @type {Array} */\n const sizes = []\n let columnIndex = -1\n\n if (table[rowIndex].length > mostCellsPerRow) {\n mostCellsPerRow = table[rowIndex].length\n }\n\n while (++columnIndex < table[rowIndex].length) {\n const cell = serialize(table[rowIndex][columnIndex])\n\n if (options.alignDelimiters !== false) {\n const size = stringLength(cell)\n sizes[columnIndex] = size\n\n if (\n longestCellByColumn[columnIndex] === undefined ||\n size > longestCellByColumn[columnIndex]\n ) {\n longestCellByColumn[columnIndex] = size\n }\n }\n\n row.push(cell)\n }\n\n cellMatrix[rowIndex] = row\n sizeMatrix[rowIndex] = sizes\n }\n\n // Figure out which alignments to use.\n let columnIndex = -1\n\n if (typeof align === 'object' && 'length' in align) {\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = toAlignment(align[columnIndex])\n }\n } else {\n const code = toAlignment(align)\n\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = code\n }\n }\n\n // Inject the alignment row.\n columnIndex = -1\n /** @type {Array} */\n const row = []\n /** @type {Array} */\n const sizes = []\n\n while (++columnIndex < mostCellsPerRow) {\n const code = alignments[columnIndex]\n let before = ''\n let after = ''\n\n if (code === 99 /* `c` */) {\n before = ':'\n after = ':'\n } else if (code === 108 /* `l` */) {\n before = ':'\n } else if (code === 114 /* `r` */) {\n after = ':'\n }\n\n // There *must* be at least one hyphen-minus in each alignment cell.\n let size =\n options.alignDelimiters === false\n ? 1\n : Math.max(\n 1,\n longestCellByColumn[columnIndex] - before.length - after.length\n )\n\n const cell = before + '-'.repeat(size) + after\n\n if (options.alignDelimiters !== false) {\n size = before.length + size + after.length\n\n if (size > longestCellByColumn[columnIndex]) {\n longestCellByColumn[columnIndex] = size\n }\n\n sizes[columnIndex] = size\n }\n\n row[columnIndex] = cell\n }\n\n // Inject the alignment row.\n cellMatrix.splice(1, 0, row)\n sizeMatrix.splice(1, 0, sizes)\n\n rowIndex = -1\n /** @type {Array} */\n const lines = []\n\n while (++rowIndex < cellMatrix.length) {\n const row = cellMatrix[rowIndex]\n const sizes = sizeMatrix[rowIndex]\n columnIndex = -1\n /** @type {Array} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (options.alignDelimiters !== false) {\n const size =\n longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)\n const code = alignments[columnIndex]\n\n if (code === 114 /* `r` */) {\n before = ' '.repeat(size)\n } else if (code === 99 /* `c` */) {\n if (size % 2) {\n before = ' '.repeat(size / 2 + 0.5)\n after = ' '.repeat(size / 2 - 0.5)\n } else {\n before = ' '.repeat(size / 2)\n after = before\n }\n } else {\n after = ' '.repeat(size)\n }\n }\n\n if (options.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n options.padding !== false &&\n // Don’t add the opening space if we’re not aligning and the cell is\n // empty: there will be a closing space.\n !(options.alignDelimiters === false && cell === '') &&\n (options.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (options.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (options.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (options.padding !== false) {\n line.push(' ')\n }\n\n if (\n options.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n options.delimiterEnd === false\n ? line.join('').replace(/ +$/, '')\n : line.join('')\n )\n }\n\n return lines.join('\\n')\n}\n\n/**\n * @param {string|null|undefined} [value]\n * @returns {string}\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string} value\n * @returns {number}\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * @param {string|null|undefined} value\n * @returns {number}\n */\nfunction toAlignment(value) {\n const code = typeof value === 'string' ? value.codePointAt(0) : 0\n\n return code === 67 /* `C` */ || code === 99 /* `c` */\n ? 99 /* `c` */\n : code === 76 /* `L` */ || code === 108 /* `l` */\n ? 108 /* `l` */\n : code === 82 /* `R` */ || code === 114 /* `r` */\n ? 114 /* `r` */\n : 0\n}\n","/**\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {Blockquote} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function blockquote(node, _, state, info) {\n const exit = state.enter('blockquote')\n const tracker = state.createTracker(info)\n tracker.move('> ')\n tracker.shift(2)\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return '>' + (blank ? '' : ' ') + line\n}\n","/**\n * @typedef {import('../types.js').ConstructName} ConstructName\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Array} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n","/**\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {patternInScope} from '../util/pattern-in-scope.js'\n\n/**\n * @param {Break} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function hardBreak(_, _1, state, info) {\n let index = -1\n\n while (++index < state.unsafe.length) {\n // If we can’t put eols in this construct (setext headings, tables), use a\n // space instead.\n if (\n state.unsafe[index].character === '\\n' &&\n patternInScope(state.stack, state.unsafe[index])\n ) {\n return /[ \\t]/.test(info.before) ? '' : ' '\n }\n }\n\n return '\\\\\\n'\n}\n","/**\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\n */\n\nimport {longestStreak} from 'longest-streak'\nimport {formatCodeAsIndented} from '../util/format-code-as-indented.js'\nimport {checkFence} from '../util/check-fence.js'\n\n/**\n * @param {Code} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function code(node, _, state, info) {\n const marker = checkFence(state)\n const raw = node.value || ''\n const suffix = marker === '`' ? 'GraveAccent' : 'Tilde'\n\n if (formatCodeAsIndented(node, state)) {\n const exit = state.enter('codeIndented')\n const value = state.indentLines(raw, map)\n exit()\n return value\n }\n\n const tracker = state.createTracker(info)\n const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3))\n const exit = state.enter('codeFenced')\n let value = tracker.move(sequence)\n\n if (node.lang) {\n const subexit = state.enter(`codeFencedLang${suffix}`)\n value += tracker.move(\n state.safe(node.lang, {\n before: value,\n after: ' ',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n if (node.lang && node.meta) {\n const subexit = state.enter(`codeFencedMeta${suffix}`)\n value += tracker.move(' ')\n value += tracker.move(\n state.safe(node.meta, {\n before: value,\n after: '\\n',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n value += tracker.move('\\n')\n\n if (raw) {\n value += tracker.move(raw + '\\n')\n }\n\n value += tracker.move(sequence)\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return (blank ? '' : ' ') + line\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkQuote(state) {\n const marker = state.options.quote || '\"'\n\n if (marker !== '\"' && marker !== \"'\") {\n throw new Error(\n 'Cannot serialize title with `' +\n marker +\n '` for `options.quote`, expected `\"`, or `\\'`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkEmphasis} from '../util/check-emphasis.js'\n\nemphasis.peek = emphasisPeek\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\n/**\n * @param {Emphasis} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function emphasis(node, _, state, info) {\n const marker = checkEmphasis(state)\n const exit = state.enter('emphasis')\n const tracker = state.createTracker(info)\n let value = tracker.move(marker)\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: marker,\n ...tracker.current()\n })\n )\n value += tracker.move(marker)\n exit()\n return value\n}\n\n/**\n * @param {Emphasis} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction emphasisPeek(_, _1, state) {\n return state.options.emphasis || '*'\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkEmphasis(state) {\n const marker = state.options.emphasis || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize emphasis with `' +\n marker +\n '` for `options.emphasis`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('mdast').Html} Html\n */\n\nhtml.peek = htmlPeek\n\n/**\n * @param {Html} node\n * @returns {string}\n */\nexport function html(node) {\n return node.value || ''\n}\n\n/**\n * @returns {string}\n */\nfunction htmlPeek() {\n return '<'\n}\n","/**\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\nimage.peek = imagePeek\n\n/**\n * @param {Image} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function image(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('image')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n value += tracker.move(\n state.safe(node.alt, {before: value, after: ']', ...tracker.current()})\n )\n value += tracker.move('](')\n\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n exit()\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imagePeek() {\n return '!'\n}\n","/**\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimageReference.peek = imageReferencePeek\n\n/**\n * @param {ImageReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function imageReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('imageReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n const alt = state.safe(node.alt, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(alt + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !alt || alt !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imageReferencePeek() {\n return '!'\n}\n","/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').State} State\n */\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @param {InlineCode} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nexport function inlineCode(node, _, state) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n const expression = state.compilePattern(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @returns {string}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n","/**\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../types.js').State} State\n */\n\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Link} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatLinkAsAutolink(node, state) {\n const raw = toString(node)\n\n return Boolean(\n !state.options.resourceLink &&\n // If there’s a url…\n node.url &&\n // And there’s a no title…\n !node.title &&\n // And the content of `node` is a single text node…\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'text' &&\n // And if the url is the same as the content…\n (raw === node.url || 'mailto:' + raw === node.url) &&\n // And that starts w/ a protocol…\n /^[a-z][a-z+.-]+:/i.test(node.url) &&\n // And that doesn’t contain ASCII control codes (character escapes and\n // references don’t work), space, or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n","/**\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Exit} Exit\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkQuote} from '../util/check-quote.js'\nimport {formatLinkAsAutolink} from '../util/format-link-as-autolink.js'\n\nlink.peek = linkPeek\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function link(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const tracker = state.createTracker(info)\n /** @type {Exit} */\n let exit\n /** @type {Exit} */\n let subexit\n\n if (formatLinkAsAutolink(node, state)) {\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n exit = state.enter('autolink')\n let value = tracker.move('<')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '>',\n ...tracker.current()\n })\n )\n value += tracker.move('>')\n exit()\n state.stack = stack\n return value\n }\n\n exit = state.enter('link')\n subexit = state.enter('label')\n let value = tracker.move('[')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '](',\n ...tracker.current()\n })\n )\n value += tracker.move('](')\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n\n exit()\n return value\n}\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nfunction linkPeek(node, _, state) {\n return formatLinkAsAutolink(node, state) ? '<' : '['\n}\n","/**\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nlinkReference.peek = linkReferencePeek\n\n/**\n * @param {LinkReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function linkReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('linkReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n const text = state.containerPhrasing(node, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(text + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !text || text !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction linkReferencePeek() {\n return '['\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkBullet(state) {\n const marker = state.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkRule(state) {\n const marker = state.options.rule || '*'\n\n if (marker !== '*' && marker !== '-' && marker !== '_') {\n throw new Error(\n 'Cannot serialize rules with `' +\n marker +\n '` for `options.rule`, expected `*`, `-`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n */\n\nimport {convert} from 'unist-util-is'\n\n/**\n * Check if the given value is *phrasing content*.\n *\n * > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @returns\n * Whether `value` is phrasing content.\n */\n\nexport const phrasing =\n /** @type {(node?: unknown) => node is PhrasingContent} */\n (\n convert([\n 'break',\n 'delete',\n 'emphasis',\n 'footnote',\n 'footnoteReference',\n 'image',\n 'imageReference',\n 'inlineCode',\n 'link',\n 'linkReference',\n 'strong',\n 'text'\n ])\n )\n","/**\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkStrong} from '../util/check-strong.js'\n\nstrong.peek = strongPeek\n\n// To do: there are cases where emphasis cannot “form” depending on the\n// previous or next character of sequences.\n// There’s no way around that though, except for injecting zero-width stuff.\n// Do we need to safeguard against that?\n/**\n * @param {Strong} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function strong(node, _, state, info) {\n const marker = checkStrong(state)\n const exit = state.enter('strong')\n const tracker = state.createTracker(info)\n let value = tracker.move(marker + marker)\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: marker,\n ...tracker.current()\n })\n )\n value += tracker.move(marker + marker)\n exit()\n return value\n}\n\n/**\n * @param {Strong} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction strongPeek(_, _1, state) {\n return state.options.strong || '*'\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkStrong(state) {\n const marker = state.options.strong || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize strong with `' +\n marker +\n '` for `options.strong`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {definition} from './definition.js'\nimport {emphasis} from './emphasis.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {image} from './image.js'\nimport {imageReference} from './image-reference.js'\nimport {inlineCode} from './inline-code.js'\nimport {link} from './link.js'\nimport {linkReference} from './link-reference.js'\nimport {list} from './list.js'\nimport {listItem} from './list-item.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default (CommonMark) handlers.\n */\nexport const handle = {\n blockquote,\n break: hardBreak,\n code,\n definition,\n emphasis,\n hardBreak,\n heading,\n html,\n image,\n imageReference,\n inlineCode,\n link,\n linkReference,\n list,\n listItem,\n paragraph,\n root,\n strong,\n text,\n thematicBreak\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkFence(state) {\n const marker = state.options.fence || '`'\n\n if (marker !== '`' && marker !== '~') {\n throw new Error(\n 'Cannot serialize code with `' +\n marker +\n '` for `options.fence`, expected `` ` `` or `~`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {Code} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatCodeAsIndented(node, state) {\n return Boolean(\n state.options.fences === false &&\n node.value &&\n // If there’s no info…\n !node.lang &&\n // And there’s a non-whitespace character…\n /[^ \\r\\n]/.test(node.value) &&\n // And the value doesn’t start or end in a blank…\n !/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(node.value)\n )\n}\n","/**\n * Get the count of the longest repeating streak of `substring` in `value`.\n *\n * @param {string} value\n * Content to search in.\n * @param {string} substring\n * Substring to look for, typically one character.\n * @returns {number}\n * Count of most frequent adjacent `substring`s in `value`.\n */\nexport function longestStreak(value, substring) {\n const source = String(value)\n let index = source.indexOf(substring)\n let expected = index\n let count = 0\n let max = 0\n\n if (typeof substring !== 'string') {\n throw new TypeError('Expected substring')\n }\n\n while (index !== -1) {\n if (index === expected) {\n if (++count > max) {\n max = count\n }\n } else {\n count = 1\n }\n\n expected = index + substring.length\n index = source.indexOf(substring, expected)\n }\n\n return max\n}\n","/**\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\n/**\n * @param {Definition} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function definition(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('definition')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n value += tracker.move(\n state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n )\n value += tracker.move(']: ')\n\n subexit()\n\n if (\n // If there’s no url, or…\n !node.url ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : '\\n',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n exit()\n\n return value\n}\n","/**\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {formatHeadingAsSetext} from '../util/format-heading-as-setext.js'\n\n/**\n * @param {Heading} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function heading(node, _, state, info) {\n const rank = Math.max(Math.min(6, node.depth || 1), 1)\n const tracker = state.createTracker(info)\n\n if (formatHeadingAsSetext(node, state)) {\n const exit = state.enter('headingSetext')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...tracker.current(),\n before: '\\n',\n after: '\\n'\n })\n subexit()\n exit()\n\n return (\n value +\n '\\n' +\n (rank === 1 ? '=' : '-').repeat(\n // The whole size…\n value.length -\n // Minus the position of the character after the last EOL (or\n // 0 if there is none)…\n (Math.max(value.lastIndexOf('\\r'), value.lastIndexOf('\\n')) + 1)\n )\n )\n }\n\n const sequence = '#'.repeat(rank)\n const exit = state.enter('headingAtx')\n const subexit = state.enter('phrasing')\n\n // Note: for proper tracking, we should reset the output positions when there\n // is no content returned, because then the space is not output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n tracker.move(sequence + ' ')\n\n let value = state.containerPhrasing(node, {\n before: '# ',\n after: '\\n',\n ...tracker.current()\n })\n\n if (/^[\\t ]/.test(value)) {\n // To do: what effect has the character reference on tracking?\n value =\n '&#x' +\n value.charCodeAt(0).toString(16).toUpperCase() +\n ';' +\n value.slice(1)\n }\n\n value = value ? sequence + ' ' + value : sequence\n\n if (state.options.closeAtx) {\n value += ' ' + sequence\n }\n\n subexit()\n exit()\n\n return value\n}\n","/**\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../types.js').State} State\n */\n\nimport {EXIT, visit} from 'unist-util-visit'\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Heading} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatHeadingAsSetext(node, state) {\n let literalWithBreak = false\n\n // Look for literals with a line break.\n // Note that this also\n visit(node, function (node) {\n if (\n ('value' in node && /\\r?\\n|\\r/.test(node.value)) ||\n node.type === 'break'\n ) {\n literalWithBreak = true\n return EXIT\n }\n })\n\n return Boolean(\n (!node.depth || node.depth < 3) &&\n toString(node) &&\n (state.options.setext || literalWithBreak)\n )\n}\n","/**\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkBulletOther} from '../util/check-bullet-other.js'\nimport {checkBulletOrdered} from '../util/check-bullet-ordered.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {List} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function list(node, parent, state, info) {\n const exit = state.enter('list')\n const bulletCurrent = state.bulletCurrent\n /** @type {string} */\n let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state)\n /** @type {string} */\n const bulletOther = node.ordered\n ? bullet === '.'\n ? ')'\n : '.'\n : checkBulletOther(state)\n let useDifferentMarker =\n parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false\n\n if (!node.ordered) {\n const firstListItem = node.children ? node.children[0] : undefined\n\n // If there’s an empty first list item directly in two list items,\n // we have to use a different bullet:\n //\n // ```markdown\n // * - *\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (\n // Bullet could be used as a thematic break marker:\n (bullet === '*' || bullet === '-') &&\n // Empty first list item:\n firstListItem &&\n (!firstListItem.children || !firstListItem.children[0]) &&\n // Directly in two other list items:\n state.stack[state.stack.length - 1] === 'list' &&\n state.stack[state.stack.length - 2] === 'listItem' &&\n state.stack[state.stack.length - 3] === 'list' &&\n state.stack[state.stack.length - 4] === 'listItem' &&\n // That are each the first child.\n state.indexStack[state.indexStack.length - 1] === 0 &&\n state.indexStack[state.indexStack.length - 2] === 0 &&\n state.indexStack[state.indexStack.length - 3] === 0\n ) {\n useDifferentMarker = true\n }\n\n // If there’s a thematic break at the start of the first list item,\n // we have to use a different bullet:\n //\n // ```markdown\n // * ---\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (checkRule(state) === bullet && firstListItem) {\n let index = -1\n\n while (++index < node.children.length) {\n const item = node.children[index]\n\n if (\n item &&\n item.type === 'listItem' &&\n item.children &&\n item.children[0] &&\n item.children[0].type === 'thematicBreak'\n ) {\n useDifferentMarker = true\n break\n }\n }\n }\n }\n\n if (useDifferentMarker) {\n bullet = bulletOther\n }\n\n state.bulletCurrent = bullet\n const value = state.containerFlow(node, info)\n state.bulletLastUsed = bullet\n state.bulletCurrent = bulletCurrent\n exit()\n return value\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkBulletOrdered(state) {\n const marker = state.options.bulletOrdered || '.'\n\n if (marker !== '.' && marker !== ')') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bulletOrdered`, expected `.` or `)`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkBullet} from './check-bullet.js'\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkBulletOther(state) {\n const bullet = checkBullet(state)\n const bulletOther = state.options.bulletOther\n\n if (!bulletOther) {\n return bullet === '*' ? '-' : '*'\n }\n\n if (bulletOther !== '*' && bulletOther !== '+' && bulletOther !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n bulletOther +\n '` for `options.bulletOther`, expected `*`, `+`, or `-`'\n )\n }\n\n if (bulletOther === bullet) {\n throw new Error(\n 'Expected `bullet` (`' +\n bullet +\n '`) and `bulletOther` (`' +\n bulletOther +\n '`) to be different'\n )\n }\n\n return bulletOther\n}\n","/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\n\n/**\n * @param {ListItem} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function listItem(node, parent, state, info) {\n const listItemIndent = checkListItemIndent(state)\n let bullet = state.bulletCurrent || checkBullet(state)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (state.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = state.createTracker(info)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = state.enter('listItem')\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkListItemIndent(state) {\n const style = state.options.listItemIndent || 'one'\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n","/**\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {Paragraph} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function paragraph(node, _, state, info) {\n const exit = state.enter('paragraph')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, info)\n subexit()\n exit()\n return value\n}\n","/**\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\nimport {phrasing} from 'mdast-util-phrasing'\n\n/**\n * @param {Root} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function root(node, _, state, info) {\n // Note: `html` nodes are ambiguous.\n const hasPhrasing = node.children.some(function (d) {\n return phrasing(d)\n })\n const fn = hasPhrasing ? state.containerPhrasing : state.containerFlow\n return fn.call(state, node, info)\n}\n","/**\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').Text} Text\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {Text} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function text(node, _, state, info) {\n return state.safe(node.value, info)\n}\n","/**\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../types.js').State} State\n */\n\nimport {checkRuleRepetition} from '../util/check-rule-repetition.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {ThematicBreak} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nexport function thematicBreak(_, _1, state) {\n const value = (\n checkRule(state) + (state.options.ruleSpaces ? ' ' : '')\n ).repeat(checkRuleRepetition(state))\n\n return state.options.ruleSpaces ? value.slice(0, -1) : value\n}\n","/**\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkRuleRepetition(state) {\n const repetition = state.options.ruleRepetition || 3\n\n if (repetition < 3) {\n throw new Error(\n 'Cannot serialize rules with repetition `' +\n repetition +\n '` for `options.ruleRepetition`, expected `3` or more'\n )\n }\n\n return repetition\n}\n","/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').TableRow} TableRow\n *\n * @typedef {import('markdown-table').Options} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').State} State\n * @typedef {import('mdast-util-to-markdown').Info} Info\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells (default:\n * `true`).\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters (default: `true`).\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells (optional).\n */\n\nimport {ok as assert} from 'devlop'\nimport {markdownTable} from 'markdown-table'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM tables in\n * markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n */\nexport function gfmTableFromMarkdown() {\n return {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n const align = token._align\n assert(align, 'expected `_align` on table')\n this.enter(\n {\n type: 'table',\n align: align.map(function (d) {\n return d === 'none' ? null : d\n }),\n children: []\n },\n token\n )\n this.data.inTable = true\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.data.inTable = undefined\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.data.inTable) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'inlineCode')\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // \n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n inlineCode: inlineCodeWithTable,\n table: handleTable,\n tableCell: handleTableCell,\n tableRow: handleTableRow\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, state, info) {\n return serializeData(handleTableAsData(node, state, info), node.align)\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, state, info) {\n const row = handleTableRowAsData(node, state, info)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, state, info) {\n const exit = state.enter('tableCell')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...info,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array>} matrix\n * @param {Array | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array>} */\n const result = []\n const subexit = state.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(children[index], state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableRowAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array} */\n const result = []\n const subexit = state.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(children[index], node, state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, state) {\n let value = defaultHandlers.inlineCode(node, parent, state)\n\n if (state.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n","/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {ok as assert} from 'devlop'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM task\n * list items in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemFromMarkdown() {\n return {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM task list\n * items in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemToMarkdown() {\n return {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCheck(token) {\n // We’re always in a paragraph, in a list item.\n const node = this.stack[this.stack.length - 2]\n assert(node.type === 'listItem')\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = this.stack[this.stack.length - 2]\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean'\n ) {\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'paragraph')\n const head = node.children[0]\n\n if (head && head.type === 'text') {\n const siblings = parent.children\n let index = -1\n /** @type {Paragraph | undefined} */\n let firstParaghraph\n\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, state, info) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = state.createTracker(info)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = defaultHandlers.listItem(node, parent, state, {\n ...info,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiControl,\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\nconst wwwPrefix = {\n tokenize: tokenizeWwwPrefix,\n partial: true\n}\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n}\nconst path = {\n tokenize: tokenizePath,\n partial: true\n}\nconst trail = {\n tokenize: tokenizeTrail,\n partial: true\n}\nconst emailDomainDotTrail = {\n tokenize: tokenizeEmailDomainDotTrail,\n partial: true\n}\nconst wwwAutolink = {\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n}\nconst protocolAutolink = {\n tokenize: tokenizeProtocolAutolink,\n previous: previousProtocol\n}\nconst emailAutolink = {\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n}\n\n/** @type {ConstructRecord} */\nconst text = {}\n\n/**\n * Create an extension for `micromark` to support GitHub autolink literal\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * autolink literal syntax.\n */\nexport function gfmAutolinkLiteral() {\n return {\n text\n }\n}\n\n/** @type {Code} */\nlet code = 48\n\n// Add alphanumerics.\nwhile (code < 123) {\n text[code] = emailAutolink\n code++\n if (code === 58) code = 65\n else if (code === 91) code = 97\n}\ntext[43] = emailAutolink\ntext[45] = emailAutolink\ntext[46] = emailAutolink\ntext[95] = emailAutolink\ntext[72] = [emailAutolink, protocolAutolink]\ntext[104] = [emailAutolink, protocolAutolink]\ntext[87] = [emailAutolink, wwwAutolink]\ntext[119] = [emailAutolink, wwwAutolink]\n\n// To do: perform email autolink literals on events, afterwards.\n// That’s where `markdown-rs` and `cmark-gfm` perform it.\n// It should look for `@`, then for atext backwards, and then for a label\n// forwards.\n// To do: `mailto:`, `xmpp:` protocol as prefix.\n\n/**\n * Email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this\n /** @type {boolean | undefined} */\n let dot\n /** @type {boolean} */\n let data\n return start\n\n /**\n * Start of email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (\n !gfmAtext(code) ||\n !previousEmail.call(self, self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkEmail')\n return atext(code)\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code)\n return atext\n }\n if (code === 64) {\n effects.consume(code)\n return emailDomain\n }\n return nok(code)\n }\n\n /**\n * In email domain.\n *\n * The reference code is a bit overly complex as it handles the `@`, of which\n * there may be just one.\n * Source: \n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomain(code) {\n // Dot followed by alphanumerical (not `-` or `_`).\n if (code === 46) {\n return effects.check(\n emailDomainDotTrail,\n emailDomainAfter,\n emailDomainDot\n )(code)\n }\n\n // Alphanumerical, `-`, and `_`.\n if (code === 45 || code === 95 || asciiAlphanumeric(code)) {\n data = true\n effects.consume(code)\n return emailDomain\n }\n\n // To do: `/` if xmpp.\n\n // Note: normally we’d truncate trailing punctuation from the link.\n // However, email autolink literals cannot contain any of those markers,\n // except for `.`, but that can only occur if it isn’t trailing.\n // So we can ignore truncating!\n return emailDomainAfter(code)\n }\n\n /**\n * In email domain, on dot that is not a trail.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainDot(code) {\n effects.consume(code)\n dot = true\n return emailDomain\n }\n\n /**\n * After email domain.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainAfter(code) {\n // Domain must not be empty, must include a dot, and must end in alphabetical.\n // Source: .\n if (data && dot && asciiAlpha(self.previous)) {\n effects.exit('literalAutolinkEmail')\n effects.exit('literalAutolink')\n return ok(code)\n }\n return nok(code)\n }\n}\n\n/**\n * `www` autolink literal.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this\n return wwwStart\n\n /**\n * Start of www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwStart(code) {\n if (\n (code !== 87 && code !== 119) ||\n !previousWww.call(self, self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkWww')\n // Note: we *check*, so we can discard the `www.` we parsed.\n // If it worked, we consider it as a part of the domain.\n return effects.check(\n wwwPrefix,\n effects.attempt(domain, effects.attempt(path, wwwAfter), nok),\n nok\n )(code)\n }\n\n /**\n * After a www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwAfter(code) {\n effects.exit('literalAutolinkWww')\n effects.exit('literalAutolink')\n return ok(code)\n }\n}\n\n/**\n * Protocol autolink literal.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeProtocolAutolink(effects, ok, nok) {\n const self = this\n let buffer = ''\n let seen = false\n return protocolStart\n\n /**\n * Start of protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolStart(code) {\n if (\n (code === 72 || code === 104) &&\n previousProtocol.call(self, self.previous) &&\n !previousUnbalanced(self.events)\n ) {\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkHttp')\n buffer += String.fromCodePoint(code)\n effects.consume(code)\n return protocolPrefixInside\n }\n return nok(code)\n }\n\n /**\n * In protocol.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^^^^\n * ```\n *\n * @type {State}\n */\n function protocolPrefixInside(code) {\n // `5` is size of `https`\n if (asciiAlpha(code) && buffer.length < 5) {\n // @ts-expect-error: definitely number.\n buffer += String.fromCodePoint(code)\n effects.consume(code)\n return protocolPrefixInside\n }\n if (code === 58) {\n const protocol = buffer.toLowerCase()\n if (protocol === 'http' || protocol === 'https') {\n effects.consume(code)\n return protocolSlashesInside\n }\n }\n return nok(code)\n }\n\n /**\n * In slashes.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^\n * ```\n *\n * @type {State}\n */\n function protocolSlashesInside(code) {\n if (code === 47) {\n effects.consume(code)\n if (seen) {\n return afterProtocol\n }\n seen = true\n return protocolSlashesInside\n }\n return nok(code)\n }\n\n /**\n * After protocol, before domain.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function afterProtocol(code) {\n // To do: this is different from `markdown-rs`:\n // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182\n return code === null ||\n asciiControl(code) ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)\n ? nok(code)\n : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code)\n }\n\n /**\n * After a protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolAfter(code) {\n effects.exit('literalAutolinkHttp')\n effects.exit('literalAutolink')\n return ok(code)\n }\n}\n\n/**\n * `www` prefix.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwPrefix(effects, ok, nok) {\n let size = 0\n return wwwPrefixInside\n\n /**\n * In www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixInside(code) {\n if ((code === 87 || code === 119) && size < 3) {\n size++\n effects.consume(code)\n return wwwPrefixInside\n }\n if (code === 46 && size === 3) {\n effects.consume(code)\n return wwwPrefixAfter\n }\n return nok(code)\n }\n\n /**\n * After www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixAfter(code) {\n // If there is *anything*, we can link.\n return code === null ? nok(code) : ok(code)\n }\n}\n\n/**\n * Domain.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean | undefined} */\n let underscoreInLastSegment\n /** @type {boolean | undefined} */\n let underscoreInLastLastSegment\n /** @type {boolean | undefined} */\n let seen\n return domainInside\n\n /**\n * In domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^^^^^^^^^^\n * ```\n *\n * @type {State}\n */\n function domainInside(code) {\n // Check whether this marker, which is a trailing punctuation\n // marker, optionally followed by more trailing markers, and then\n // followed by an end.\n if (code === 46 || code === 95) {\n return effects.check(trail, domainAfter, domainAtPunctuation)(code)\n }\n\n // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n // Source: .\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code) ||\n (code !== 45 && unicodePunctuation(code))\n ) {\n return domainAfter(code)\n }\n seen = true\n effects.consume(code)\n return domainInside\n }\n\n /**\n * In domain, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function domainAtPunctuation(code) {\n // There is an underscore in the last segment of the domain\n if (code === 95) {\n underscoreInLastSegment = true\n }\n // Otherwise, it’s a `.`: save the last segment underscore in the\n // penultimate segment slot.\n else {\n underscoreInLastLastSegment = underscoreInLastSegment\n underscoreInLastSegment = undefined\n }\n effects.consume(code)\n return domainInside\n }\n\n /**\n * After domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^\n * ```\n *\n * @type {State} */\n function domainAfter(code) {\n // Note: that’s GH says a dot is needed, but it’s not true:\n // \n if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n return nok(code)\n }\n return ok(code)\n }\n}\n\n/**\n * Path.\n *\n * ```markdown\n * > | a https://example.org/stuff b\n * ^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePath(effects, ok) {\n let sizeOpen = 0\n let sizeClose = 0\n return pathInside\n\n /**\n * In path.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^\n * ```\n *\n * @type {State}\n */\n function pathInside(code) {\n if (code === 40) {\n sizeOpen++\n effects.consume(code)\n return pathInside\n }\n\n // To do: `markdown-rs` also needs this.\n // If this is a paren, and there are less closings than openings,\n // we don’t check for a trail.\n if (code === 41 && sizeClose < sizeOpen) {\n return pathAtPunctuation(code)\n }\n\n // Check whether this trailing punctuation marker is optionally\n // followed by more trailing markers, and then followed\n // by an end.\n if (\n code === 33 ||\n code === 34 ||\n code === 38 ||\n code === 39 ||\n code === 41 ||\n code === 42 ||\n code === 44 ||\n code === 46 ||\n code === 58 ||\n code === 59 ||\n code === 60 ||\n code === 63 ||\n code === 93 ||\n code === 95 ||\n code === 126\n ) {\n return effects.check(trail, ok, pathAtPunctuation)(code)\n }\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return ok(code)\n }\n effects.consume(code)\n return pathInside\n }\n\n /**\n * In path, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com/a\"b\n * ^\n * ```\n *\n * @type {State}\n */\n function pathAtPunctuation(code) {\n // Count closing parens.\n if (code === 41) {\n sizeClose++\n }\n effects.consume(code)\n return pathInside\n }\n}\n\n/**\n * Trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the entire trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | https://example.com\").\n * ^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTrail(effects, ok, nok) {\n return trail\n\n /**\n * In trail of domain or path.\n *\n * ```markdown\n * > | https://example.com\").\n * ^\n * ```\n *\n * @type {State}\n */\n function trail(code) {\n // Regular trailing punctuation.\n if (\n code === 33 ||\n code === 34 ||\n code === 39 ||\n code === 41 ||\n code === 42 ||\n code === 44 ||\n code === 46 ||\n code === 58 ||\n code === 59 ||\n code === 63 ||\n code === 95 ||\n code === 126\n ) {\n effects.consume(code)\n return trail\n }\n\n // `&` followed by one or more alphabeticals and then a `;`, is\n // as a whole considered as trailing punctuation.\n // In all other cases, it is considered as continuation of the URL.\n if (code === 38) {\n effects.consume(code)\n return trailCharRefStart\n }\n\n // Needed because we allow literals after `[`, as we fix:\n // .\n // Check that it is not followed by `(` or `[`.\n if (code === 93) {\n effects.consume(code)\n return trailBracketAfter\n }\n if (\n // `<` is an end.\n code === 60 ||\n // So is whitespace.\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return ok(code)\n }\n return nok(code)\n }\n\n /**\n * In trail, after `]`.\n *\n * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.\n * > See end of for more.\n *\n * ```markdown\n * > | https://example.com](\n * ^\n * ```\n *\n * @type {State}\n */\n function trailBracketAfter(code) {\n // Whitespace or something that could start a resource or reference is the end.\n // Switch back to trail otherwise.\n if (\n code === null ||\n code === 40 ||\n code === 91 ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return ok(code)\n }\n return trail(code)\n }\n\n /**\n * In character-reference like trail, after `&`.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharRefStart(code) {\n // When non-alpha, it’s not a trail.\n return asciiAlpha(code) ? trailCharRefInside(code) : nok(code)\n }\n\n /**\n * In character-reference like trail.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharRefInside(code) {\n // Switch back to trail if this is well-formed.\n if (code === 59) {\n effects.consume(code)\n return trail\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return trailCharRefInside\n }\n\n // It’s not a trail.\n return nok(code)\n }\n}\n\n/**\n * Dot in email domain trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | contact@example.org.\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailDomainDotTrail(effects, ok, nok) {\n return start\n\n /**\n * Dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Must be dot.\n effects.consume(code)\n return after\n }\n\n /**\n * After dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Not a trail if alphanumeric.\n return asciiAlphanumeric(code) ? nok(code) : ok(code)\n }\n}\n\n/**\n * See:\n * .\n *\n * @type {Previous}\n */\nfunction previousWww(code) {\n return (\n code === null ||\n code === 40 ||\n code === 42 ||\n code === 95 ||\n code === 91 ||\n code === 93 ||\n code === 126 ||\n markdownLineEndingOrSpace(code)\n )\n}\n\n/**\n * See:\n * .\n *\n * @type {Previous}\n */\nfunction previousProtocol(code) {\n return !asciiAlpha(code)\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previousEmail(code) {\n // Do not allow a slash “inside” atext.\n // The reference code is a bit weird, but that’s what it results in.\n // Source: .\n // Other than slash, every preceding character is allowed.\n return !(code === 47 || gfmAtext(code))\n}\n\n/**\n * @param {Code} code\n * @returns {boolean}\n */\nfunction gfmAtext(code) {\n return (\n code === 43 ||\n code === 45 ||\n code === 46 ||\n code === 95 ||\n asciiAlphanumeric(code)\n )\n}\n\n/**\n * @param {Array} events\n * @returns {boolean}\n */\nfunction previousUnbalanced(events) {\n let index = events.length\n let result = false\n while (index--) {\n const token = events[index][1]\n if (\n (token.type === 'labelLink' || token.type === 'labelImage') &&\n !token._balanced\n ) {\n result = true\n break\n }\n\n // If we’ve seen this token, and it was marked as not having any unbalanced\n // bracket before it, we can exit.\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false\n break\n }\n }\n if (events.length > 0 && !result) {\n // Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true\n }\n return result\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {blankLine} from 'micromark-core-commonmark'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nconst indent = {\n tokenize: tokenizeIndent,\n partial: true\n}\n\n// To do: micromark should support a `_hiddenGfmFootnoteSupport`, which only\n// affects label start (image).\n// That will let us drop `tokenizePotentialGfmFootnote*`.\n// It currently has a `_hiddenFootnoteSupport`, which affects that and more.\n// That can be removed when `micromark-extension-footnote` is archived.\n\n/**\n * Create an extension for `micromark` to enable GFM footnote syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to\n * enable GFM footnote syntax.\n */\nexport function gfmFootnote() {\n /** @type {Extension} */\n return {\n document: {\n [91]: {\n tokenize: tokenizeDefinitionStart,\n continuation: {\n tokenize: tokenizeDefinitionContinuation\n },\n exit: gfmFootnoteDefinitionEnd\n }\n },\n text: {\n [91]: {\n tokenize: tokenizeGfmFootnoteCall\n },\n [93]: {\n add: 'after',\n tokenize: tokenizePotentialGfmFootnoteCall,\n resolveTo: resolveToPotentialGfmFootnoteCall\n }\n }\n }\n}\n\n// To do: remove after micromark update.\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePotentialGfmFootnoteCall(effects, ok, nok) {\n const self = this\n let index = self.events.length\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n /** @type {Token} */\n let labelStart\n\n // Find an opening.\n while (index--) {\n const token = self.events[index][1]\n if (token.type === 'labelImage') {\n labelStart = token\n break\n }\n\n // Exit if we’ve walked far enough.\n if (\n token.type === 'gfmFootnoteCall' ||\n token.type === 'labelLink' ||\n token.type === 'label' ||\n token.type === 'image' ||\n token.type === 'link'\n ) {\n break\n }\n }\n return start\n\n /**\n * @type {State}\n */\n function start(code) {\n if (!labelStart || !labelStart._balanced) {\n return nok(code)\n }\n const id = normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {\n return nok(code)\n }\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n return ok(code)\n }\n}\n\n// To do: remove after micromark update.\n/** @type {Resolver} */\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n let index = events.length\n /** @type {Token | undefined} */\n let labelStart\n\n // Find an opening.\n while (index--) {\n if (\n events[index][1].type === 'labelImage' &&\n events[index][0] === 'enter'\n ) {\n labelStart = events[index][1]\n break\n }\n }\n // Change the `labelImageMarker` to a `data`.\n events[index + 1][1].type = 'data'\n events[index + 3][1].type = 'gfmFootnoteCallLabelMarker'\n\n // The whole (without `!`):\n /** @type {Token} */\n const call = {\n type: 'gfmFootnoteCall',\n start: Object.assign({}, events[index + 3][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n // The `^` marker\n /** @type {Token} */\n const marker = {\n type: 'gfmFootnoteCallMarker',\n start: Object.assign({}, events[index + 3][1].end),\n end: Object.assign({}, events[index + 3][1].end)\n }\n // Increment the end 1 character.\n marker.end.column++\n marker.end.offset++\n marker.end._bufferIndex++\n /** @type {Token} */\n const string = {\n type: 'gfmFootnoteCallString',\n start: Object.assign({}, marker.end),\n end: Object.assign({}, events[events.length - 1][1].start)\n }\n /** @type {Token} */\n const chunk = {\n type: 'chunkString',\n contentType: 'string',\n start: Object.assign({}, string.start),\n end: Object.assign({}, string.end)\n }\n\n /** @type {Array} */\n const replacement = [\n // Take the `labelImageMarker` (now `data`, the `!`)\n events[index + 1],\n events[index + 2],\n ['enter', call, context],\n // The `[`\n events[index + 3],\n events[index + 4],\n // The `^`.\n ['enter', marker, context],\n ['exit', marker, context],\n // Everything in between.\n ['enter', string, context],\n ['enter', chunk, context],\n ['exit', chunk, context],\n ['exit', string, context],\n // The ending (`]`, properly parsed and labelled).\n events[events.length - 2],\n events[events.length - 1],\n ['exit', call, context]\n ]\n events.splice(index, events.length - index + 1, ...replacement)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeGfmFootnoteCall(effects, ok, nok) {\n const self = this\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n let size = 0\n /** @type {boolean} */\n let data\n\n // Note: the implementation of `markdown-rs` is different, because it houses\n // core *and* extensions in one project.\n // Therefore, it can include footnote logic inside `label-end`.\n // We can’t do that, but luckily, we can parse footnotes in a simpler way than\n // needed for labels.\n return start\n\n /**\n * Start of footnote label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteCall')\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n return callStart\n }\n\n /**\n * After `[`, at `^`.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callStart(code) {\n if (code !== 94) return nok(code)\n effects.enter('gfmFootnoteCallMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallMarker')\n effects.enter('gfmFootnoteCallString')\n effects.enter('chunkString').contentType = 'string'\n return callData\n }\n\n /**\n * In label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callData(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n (code === 93 && !data) ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null ||\n code === 91 ||\n markdownLineEndingOrSpace(code)\n ) {\n return nok(code)\n }\n if (code === 93) {\n effects.exit('chunkString')\n const token = effects.exit('gfmFootnoteCallString')\n if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {\n return nok(code)\n }\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n effects.exit('gfmFootnoteCall')\n return ok\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true\n }\n size++\n effects.consume(code)\n return code === 92 ? callEscape : callData\n }\n\n /**\n * On character after escape.\n *\n * ```markdown\n * > | a [^b\\c] d\n * ^\n * ```\n *\n * @type {State}\n */\n function callEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return callData\n }\n return callData(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionStart(effects, ok, nok) {\n const self = this\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n /** @type {string} */\n let identifier\n let size = 0\n /** @type {boolean | undefined} */\n let data\n return start\n\n /**\n * Start of GFM footnote definition.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteDefinition')._container = true\n effects.enter('gfmFootnoteDefinitionLabel')\n effects.enter('gfmFootnoteDefinitionLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionLabelMarker')\n return labelAtMarker\n }\n\n /**\n * In label, at caret.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAtMarker(code) {\n if (code === 94) {\n effects.enter('gfmFootnoteDefinitionMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionMarker')\n effects.enter('gfmFootnoteDefinitionLabelString')\n effects.enter('chunkString').contentType = 'string'\n return labelInside\n }\n return nok(code)\n }\n\n /**\n * In label.\n *\n * > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote\n * > definition labels.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n (code === 93 && !data) ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null ||\n code === 91 ||\n markdownLineEndingOrSpace(code)\n ) {\n return nok(code)\n }\n if (code === 93) {\n effects.exit('chunkString')\n const token = effects.exit('gfmFootnoteDefinitionLabelString')\n identifier = normalizeIdentifier(self.sliceSerialize(token))\n effects.enter('gfmFootnoteDefinitionLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionLabelMarker')\n effects.exit('gfmFootnoteDefinitionLabel')\n return labelAfter\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true\n }\n size++\n effects.consume(code)\n return code === 92 ? labelEscape : labelInside\n }\n\n /**\n * After `\\`, at a special character.\n *\n * > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:\n * > \n *\n * ```markdown\n * > | [^a\\*b]: c\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return labelInside\n }\n return labelInside(code)\n }\n\n /**\n * After definition label.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker')\n if (!defined.includes(identifier)) {\n defined.push(identifier)\n }\n\n // Any whitespace after the marker is eaten, forming indented code\n // is not possible.\n // No space is also fine, just like a block quote marker.\n return factorySpace(\n effects,\n whitespaceAfter,\n 'gfmFootnoteDefinitionWhitespace'\n )\n }\n return nok(code)\n }\n\n /**\n * After definition prefix.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function whitespaceAfter(code) {\n // `markdown-rs` has a wrapping token for the prefix that is closed here.\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionContinuation(effects, ok, nok) {\n /// Start of footnote definition continuation.\n ///\n /// ```markdown\n /// | [^a]: b\n /// > | c\n /// ^\n /// ```\n //\n // Either a blank line, which is okay, or an indented thing.\n return effects.check(blankLine, ok, effects.attempt(indent, ok, nok))\n}\n\n/** @type {Exiter} */\nfunction gfmFootnoteDefinitionEnd(effects) {\n effects.exit('gfmFootnoteDefinition')\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'gfmFootnoteDefinitionIndent',\n 4 + 1\n )\n\n /**\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'gfmFootnoteDefinitionIndent' &&\n tail[2].sliceSerialize(tail[1], true).length === 4\n ? ok(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [singleTilde=true]\n * Whether to support strikethrough with a single tilde (default: `true`).\n *\n * Single tildes work on github.com, but are technically prohibited by the\n * GFM spec.\n */\n\nimport {splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/**\n * Create an extension for `micromark` to enable GFM strikethrough syntax.\n *\n * @param {Options | null | undefined} [options={}]\n * Configuration.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM strikethrough syntax.\n */\nexport function gfmStrikethrough(options) {\n const options_ = options || {}\n let single = options_.singleTilde\n const tokenizer = {\n tokenize: tokenizeStrikethrough,\n resolveAll: resolveAllStrikethrough\n }\n if (single === null || single === undefined) {\n single = true\n }\n return {\n text: {\n [126]: tokenizer\n },\n insideSpan: {\n null: [tokenizer]\n },\n attentionMarkers: {\n null: [126]\n }\n }\n\n /**\n * Take events and resolve strikethrough.\n *\n * @type {Resolver}\n */\n function resolveAllStrikethrough(events, context) {\n let index = -1\n\n // Walk through all events.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'strikethroughSequenceTemporary' &&\n events[index][1]._close\n ) {\n let open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'strikethroughSequenceTemporary' &&\n events[open][1]._open &&\n // If the sizes are the same:\n events[index][1].end.offset - events[index][1].start.offset ===\n events[open][1].end.offset - events[open][1].start.offset\n ) {\n events[index][1].type = 'strikethroughSequence'\n events[open][1].type = 'strikethroughSequence'\n\n /** @type {Token} */\n const strikethrough = {\n type: 'strikethrough',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[index][1].end)\n }\n\n /** @type {Token} */\n const text = {\n type: 'strikethroughText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n\n // Opening.\n /** @type {Array} */\n const nextEvents = [\n ['enter', strikethrough, context],\n ['enter', events[open][1], context],\n ['exit', events[open][1], context],\n ['enter', text, context]\n ]\n const insideSpan = context.parser.constructs.insideSpan.null\n if (insideSpan) {\n // Between.\n splice(\n nextEvents,\n nextEvents.length,\n 0,\n resolveAll(insideSpan, events.slice(open + 1, index), context)\n )\n }\n\n // Closing.\n splice(nextEvents, nextEvents.length, 0, [\n ['exit', text, context],\n ['enter', events[index][1], context],\n ['exit', events[index][1], context],\n ['exit', strikethrough, context]\n ])\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - 2\n break\n }\n }\n }\n }\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'strikethroughSequenceTemporary') {\n events[index][1].type = 'data'\n }\n }\n return events\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeStrikethrough(effects, ok, nok) {\n const previous = this.previous\n const events = this.events\n let size = 0\n return start\n\n /** @type {State} */\n function start(code) {\n if (\n previous === 126 &&\n events[events.length - 1][1].type !== 'characterEscape'\n ) {\n return nok(code)\n }\n effects.enter('strikethroughSequenceTemporary')\n return more(code)\n }\n\n /** @type {State} */\n function more(code) {\n const before = classifyCharacter(previous)\n if (code === 126) {\n // If this is the third marker, exit.\n if (size > 1) return nok(code)\n effects.consume(code)\n size++\n return more\n }\n if (size < 2 && !single) return nok(code)\n const token = effects.exit('strikethroughSequenceTemporary')\n const after = classifyCharacter(code)\n token._open = !after || (after === 2 && Boolean(before))\n token._close = !before || (before === 2 && Boolean(after))\n return ok(code)\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\n// Port of `edit_map.rs` from `markdown-rs`.\n// This should move to `markdown-js` later.\n\n// Deal with several changes in events, batching them together.\n//\n// Preferably, changes should be kept to a minimum.\n// Sometimes, it’s needed to change the list of events, because parsing can be\n// messy, and it helps to expose a cleaner interface of events to the compiler\n// and other users.\n// It can also help to merge many adjacent similar events.\n// And, in other cases, it’s needed to parse subcontent: pass some events\n// through another tokenizer and inject the result.\n\n/**\n * @typedef {[number, number, Array]} Change\n * @typedef {[number, number, number]} Jump\n */\n\n/**\n * Tracks a bunch of edits.\n */\nexport class EditMap {\n /**\n * Create a new edit map.\n */\n constructor() {\n /**\n * Record of changes.\n *\n * @type {Array}\n */\n this.map = []\n }\n\n /**\n * Create an edit: a remove and/or add at a certain place.\n *\n * @param {number} index\n * @param {number} remove\n * @param {Array} add\n * @returns {undefined}\n */\n add(index, remove, add) {\n addImpl(this, index, remove, add)\n }\n\n // To do: add this when moving to `micromark`.\n // /**\n // * Create an edit: but insert `add` before existing additions.\n // *\n // * @param {number} index\n // * @param {number} remove\n // * @param {Array} add\n // * @returns {undefined}\n // */\n // addBefore(index, remove, add) {\n // addImpl(this, index, remove, add, true)\n // }\n\n /**\n * Done, change the events.\n *\n * @param {Array} events\n * @returns {undefined}\n */\n consume(events) {\n this.map.sort(function (a, b) {\n return a[0] - b[0]\n })\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (this.map.length === 0) {\n return\n }\n\n // To do: if links are added in events, like they are in `markdown-rs`,\n // this is needed.\n // // Calculate jumps: where items in the current list move to.\n // /** @type {Array} */\n // const jumps = []\n // let index = 0\n // let addAcc = 0\n // let removeAcc = 0\n // while (index < this.map.length) {\n // const [at, remove, add] = this.map[index]\n // removeAcc += remove\n // addAcc += add.length\n // jumps.push([at, removeAcc, addAcc])\n // index += 1\n // }\n //\n // . shiftLinks(events, jumps)\n\n let index = this.map.length\n /** @type {Array>} */\n const vecs = []\n while (index > 0) {\n index -= 1\n vecs.push(\n events.slice(this.map[index][0] + this.map[index][1]),\n this.map[index][2]\n )\n\n // Truncate rest.\n events.length = this.map[index][0]\n }\n vecs.push([...events])\n events.length = 0\n let slice = vecs.pop()\n while (slice) {\n events.push(...slice)\n slice = vecs.pop()\n }\n\n // Truncate everything.\n this.map.length = 0\n }\n}\n\n/**\n * Create an edit.\n *\n * @param {EditMap} editMap\n * @param {number} at\n * @param {number} remove\n * @param {Array} add\n * @returns {undefined}\n */\nfunction addImpl(editMap, at, remove, add) {\n let index = 0\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (remove === 0 && add.length === 0) {\n return\n }\n while (index < editMap.map.length) {\n if (editMap.map[index][0] === at) {\n editMap.map[index][1] += remove\n\n // To do: before not used by tables, use when moving to micromark.\n // if (before) {\n // add.push(...editMap.map[index][2])\n // editMap.map[index][2] = add\n // } else {\n editMap.map[index][2].push(...add)\n // }\n\n return\n }\n index += 1\n }\n editMap.map.push([at, remove, add])\n}\n\n// /**\n// * Shift `previous` and `next` links according to `jumps`.\n// *\n// * This fixes links in case there are events removed or added between them.\n// *\n// * @param {Array} events\n// * @param {Array} jumps\n// */\n// function shiftLinks(events, jumps) {\n// let jumpIndex = 0\n// let index = 0\n// let add = 0\n// let rm = 0\n\n// while (index < events.length) {\n// const rmCurr = rm\n\n// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {\n// add = jumps[jumpIndex][2]\n// rm = jumps[jumpIndex][1]\n// jumpIndex += 1\n// }\n\n// // Ignore items that will be removed.\n// if (rm > rmCurr) {\n// index += rm - rmCurr\n// } else {\n// // ?\n// // if let Some(link) = &events[index].link {\n// // if let Some(next) = link.next {\n// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);\n// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {\n// // add = jumps[jumpIndex].2;\n// // rm = jumps[jumpIndex].1;\n// // jumpIndex += 1;\n// // }\n// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);\n// // index = next;\n// // continue;\n// // }\n// // }\n// index += 1\n// }\n// }\n// }\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\n/**\n * @typedef {'center' | 'left' | 'none' | 'right'} Align\n */\n\n/**\n * Figure out the alignment of a GFM table.\n *\n * @param {Readonly>} events\n * List of events.\n * @param {number} index\n * Table enter event.\n * @returns {Array}\n * List of aligns.\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false\n /** @type {Array} */\n const align = []\n while (index < events.length) {\n const event = events[index]\n if (inDelimiterRow) {\n if (event[0] === 'enter') {\n // Start of alignment value: set a new column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n if (event[1].type === 'tableContent') {\n align.push(\n events[index + 1][1].type === 'tableDelimiterMarker'\n ? 'left'\n : 'none'\n )\n }\n }\n // Exits:\n // End of alignment value: change the column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n else if (event[1].type === 'tableContent') {\n if (events[index - 1][1].type === 'tableDelimiterMarker') {\n const alignIndex = align.length - 1\n align[alignIndex] = align[alignIndex] === 'left' ? 'center' : 'right'\n }\n }\n // Done!\n else if (event[1].type === 'tableDelimiterRow') {\n break\n }\n } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') {\n inDelimiterRow = true\n }\n index += 1\n }\n return align\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef {[number, number, number, number]} Range\n * Cell info.\n *\n * @typedef {0 | 1 | 2 | 3} RowKind\n * Where we are: `1` for head row, `2` for delimiter row, `3` for body row.\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {EditMap} from './edit-map.js'\nimport {gfmTableAlign} from './infer.js'\n\n/**\n * Create an HTML extension for `micromark` to support GitHub tables syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * table syntax.\n */\nexport function gfmTable() {\n return {\n flow: {\n null: {\n tokenize: tokenizeTable,\n resolveAll: resolveTable\n }\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTable(effects, ok, nok) {\n const self = this\n let size = 0\n let sizeB = 0\n /** @type {boolean | undefined} */\n let seen\n return start\n\n /**\n * Start of a GFM table.\n *\n * If there is a valid table row or table head before, then we try to parse\n * another row.\n * Otherwise, we try to parse a head.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * > | | b |\n * ^\n * ```\n * @type {State}\n */\n function start(code) {\n let index = self.events.length - 1\n while (index > -1) {\n const type = self.events[index][1].type\n if (\n type === 'lineEnding' ||\n // Note: markdown-rs uses `whitespace` instead of `linePrefix`\n type === 'linePrefix'\n )\n index--\n else break\n }\n const tail = index > -1 ? self.events[index][1].type : null\n const next =\n tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore\n\n // Don’t allow lazy body rows.\n if (next === bodyRowStart && self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n return next(code)\n }\n\n /**\n * Before table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBefore(code) {\n effects.enter('tableHead')\n effects.enter('tableRow')\n return headRowStart(code)\n }\n\n /**\n * Before table head row, after whitespace.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowStart(code) {\n if (code === 124) {\n return headRowBreak(code)\n }\n\n // To do: micromark-js should let us parse our own whitespace in extensions,\n // like `markdown-rs`:\n //\n // ```js\n // // 4+ spaces.\n // if (markdownSpace(code)) {\n // return nok(code)\n // }\n // ```\n\n seen = true\n // Count the first character, that isn’t a pipe, double.\n sizeB += 1\n return headRowBreak(code)\n }\n\n /**\n * At break in table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * ^\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBreak(code) {\n if (code === null) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n // If anything other than one pipe (ignoring whitespace) was used, it’s fine.\n if (sizeB > 1) {\n sizeB = 0\n // To do: check if this works.\n // Feel free to interrupt:\n self.interrupt = true\n effects.exit('tableRow')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return headDelimiterStart\n }\n\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n if (markdownSpace(code)) {\n // To do: check if this is fine.\n // effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)\n // State::Retry(space_or_tab(tokenizer))\n return factorySpace(effects, headRowBreak, 'whitespace')(code)\n }\n sizeB += 1\n if (seen) {\n seen = false\n // Header cell count.\n size += 1\n }\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n // Whether a delimiter was seen.\n seen = true\n return headRowBreak\n }\n\n // Anything else is cell data.\n effects.enter('data')\n return headRowData(code)\n }\n\n /**\n * In table head row data.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('data')\n return headRowBreak(code)\n }\n effects.consume(code)\n return code === 92 ? headRowEscape : headRowData\n }\n\n /**\n * In table head row escape.\n *\n * ```markdown\n * > | | a\\-b |\n * ^\n * | | ---- |\n * | | c |\n * ```\n *\n * @type {State}\n */\n function headRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return headRowData\n }\n return headRowData(code)\n }\n\n /**\n * Before delimiter row.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterStart(code) {\n // Reset `interrupt`.\n self.interrupt = false\n\n // Note: in `markdown-rs`, we need to handle piercing here too.\n if (self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n effects.enter('tableDelimiterRow')\n // Track if we’ve seen a `:` or `|`.\n seen = false\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n headDelimiterBefore,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n return headDelimiterBefore(code)\n }\n\n /**\n * Before delimiter row, after optional whitespace.\n *\n * Reused when a `|` is found later, to parse another cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterBefore(code) {\n if (code === 45 || code === 58) {\n return headDelimiterValueBefore(code)\n }\n if (code === 124) {\n seen = true\n // If we start with a pipe, we open a cell marker.\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return headDelimiterCellBefore\n }\n\n // More whitespace / empty row not allowed at start.\n return headDelimiterNok(code)\n }\n\n /**\n * After `|`, before delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellBefore(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterValueBefore, 'whitespace')(code)\n }\n return headDelimiterValueBefore(code)\n }\n\n /**\n * Before delimiter cell value.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterValueBefore(code) {\n // Align: left.\n if (code === 58) {\n sizeB += 1\n seen = true\n effects.enter('tableDelimiterMarker')\n effects.consume(code)\n effects.exit('tableDelimiterMarker')\n return headDelimiterLeftAlignmentAfter\n }\n\n // Align: none.\n if (code === 45) {\n sizeB += 1\n // To do: seems weird that this *isn’t* left aligned, but that state is used?\n return headDelimiterLeftAlignmentAfter(code)\n }\n if (code === null || markdownLineEnding(code)) {\n return headDelimiterCellAfter(code)\n }\n return headDelimiterNok(code)\n }\n\n /**\n * After delimiter cell left alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | :- |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterLeftAlignmentAfter(code) {\n if (code === 45) {\n effects.enter('tableDelimiterFiller')\n return headDelimiterFiller(code)\n }\n\n // Anything else is not ok after the left-align colon.\n return headDelimiterNok(code)\n }\n\n /**\n * In delimiter cell filler.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterFiller(code) {\n if (code === 45) {\n effects.consume(code)\n return headDelimiterFiller\n }\n\n // Align is `center` if it was `left`, `right` otherwise.\n if (code === 58) {\n seen = true\n effects.exit('tableDelimiterFiller')\n effects.enter('tableDelimiterMarker')\n effects.consume(code)\n effects.exit('tableDelimiterMarker')\n return headDelimiterRightAlignmentAfter\n }\n effects.exit('tableDelimiterFiller')\n return headDelimiterRightAlignmentAfter(code)\n }\n\n /**\n * After delimiter cell right alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterRightAlignmentAfter(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterCellAfter, 'whitespace')(code)\n }\n return headDelimiterCellAfter(code)\n }\n\n /**\n * After delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellAfter(code) {\n if (code === 124) {\n return headDelimiterBefore(code)\n }\n if (code === null || markdownLineEnding(code)) {\n // Exit when:\n // * there was no `:` or `|` at all (it’s a thematic break or setext\n // underline instead)\n // * the header cell count is not the delimiter cell count\n if (!seen || size !== sizeB) {\n return headDelimiterNok(code)\n }\n\n // Note: in markdown-rs`, a reset is needed here.\n effects.exit('tableDelimiterRow')\n effects.exit('tableHead')\n // To do: in `markdown-rs`, resolvers need to be registered manually.\n // effects.register_resolver(ResolveName::GfmTable)\n return ok(code)\n }\n return headDelimiterNok(code)\n }\n\n /**\n * In delimiter row, at a disallowed byte.\n *\n * ```markdown\n * | | a |\n * > | | x |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterNok(code) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n\n /**\n * Before table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowStart(code) {\n // Note: in `markdown-rs` we need to manually take care of a prefix,\n // but in `micromark-js` that is done for us, so if we’re here, we’re\n // never at whitespace.\n effects.enter('tableRow')\n return bodyRowBreak(code)\n }\n\n /**\n * At break in table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ^\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowBreak(code) {\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return bodyRowBreak\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('tableRow')\n return ok(code)\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, bodyRowBreak, 'whitespace')(code)\n }\n\n // Anything else is cell content.\n effects.enter('data')\n return bodyRowData(code)\n }\n\n /**\n * In table body row data.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('data')\n return bodyRowBreak(code)\n }\n effects.consume(code)\n return code === 92 ? bodyRowEscape : bodyRowData\n }\n\n /**\n * In table body row escape.\n *\n * ```markdown\n * | | a |\n * | | ---- |\n * > | | b\\-c |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return bodyRowData\n }\n return bodyRowData(code)\n }\n}\n\n/** @type {Resolver} */\n\nfunction resolveTable(events, context) {\n let index = -1\n let inFirstCellAwaitingPipe = true\n /** @type {RowKind} */\n let rowKind = 0\n /** @type {Range} */\n let lastCell = [0, 0, 0, 0]\n /** @type {Range} */\n let cell = [0, 0, 0, 0]\n let afterHeadAwaitingFirstBodyRow = false\n let lastTableEnd = 0\n /** @type {Token | undefined} */\n let currentTable\n /** @type {Token | undefined} */\n let currentBody\n /** @type {Token | undefined} */\n let currentCell\n const map = new EditMap()\n while (++index < events.length) {\n const event = events[index]\n const token = event[1]\n if (event[0] === 'enter') {\n // Start of head.\n if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = false\n\n // Inject previous (body end and) table end.\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)\n currentBody = undefined\n lastTableEnd = 0\n }\n\n // Inject table start.\n currentTable = {\n type: 'table',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n }\n map.add(index, 0, [['enter', currentTable, context]])\n } else if (\n token.type === 'tableRow' ||\n token.type === 'tableDelimiterRow'\n ) {\n inFirstCellAwaitingPipe = true\n currentCell = undefined\n lastCell = [0, 0, 0, 0]\n cell = [0, index + 1, 0, 0]\n\n // Inject table body start.\n if (afterHeadAwaitingFirstBodyRow) {\n afterHeadAwaitingFirstBodyRow = false\n currentBody = {\n type: 'tableBody',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n }\n map.add(index, 0, [['enter', currentBody, context]])\n }\n rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1\n }\n // Cell data.\n else if (\n rowKind &&\n (token.type === 'data' ||\n token.type === 'tableDelimiterMarker' ||\n token.type === 'tableDelimiterFiller')\n ) {\n inFirstCellAwaitingPipe = false\n\n // First value in cell.\n if (cell[2] === 0) {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n undefined,\n currentCell\n )\n lastCell = [0, 0, 0, 0]\n }\n cell[2] = index\n }\n } else if (token.type === 'tableCellDivider') {\n if (inFirstCellAwaitingPipe) {\n inFirstCellAwaitingPipe = false\n } else {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n undefined,\n currentCell\n )\n }\n lastCell = cell\n cell = [lastCell[1], index, 0, 0]\n }\n }\n }\n // Exit events.\n else if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = true\n lastTableEnd = index\n } else if (\n token.type === 'tableRow' ||\n token.type === 'tableDelimiterRow'\n ) {\n lastTableEnd = index\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n index,\n currentCell\n )\n } else if (cell[1] !== 0) {\n currentCell = flushCell(map, context, cell, rowKind, index, currentCell)\n }\n rowKind = 0\n } else if (\n rowKind &&\n (token.type === 'data' ||\n token.type === 'tableDelimiterMarker' ||\n token.type === 'tableDelimiterFiller')\n ) {\n cell[3] = index\n }\n }\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)\n }\n map.consume(context.events)\n\n // To do: move this into `html`, when events are exposed there.\n // That’s what `markdown-rs` does.\n // That needs updates to `mdast-util-gfm-table`.\n index = -1\n while (++index < context.events.length) {\n const event = context.events[index]\n if (event[0] === 'enter' && event[1].type === 'table') {\n event[1]._align = gfmTableAlign(context.events, index)\n }\n }\n return events\n}\n\n/**\n * Generate a cell.\n *\n * @param {EditMap} map\n * @param {Readonly} context\n * @param {Readonly} range\n * @param {RowKind} rowKind\n * @param {number | undefined} rowEnd\n * @param {Token | undefined} previousCell\n * @returns {Token | undefined}\n */\n// eslint-disable-next-line max-params\nfunction flushCell(map, context, range, rowKind, rowEnd, previousCell) {\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'\n const groupName =\n rowKind === 1\n ? 'tableHeader'\n : rowKind === 2\n ? 'tableDelimiter'\n : 'tableData'\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'\n const valueName = 'tableContent'\n\n // Insert an exit for the previous cell, if there is one.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[0] !== 0) {\n previousCell.end = Object.assign({}, getPoint(context.events, range[0]))\n map.add(range[0], 0, [['exit', previousCell, context]])\n }\n\n // Insert enter of this cell.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^^^^-- this cell\n // ```\n const now = getPoint(context.events, range[1])\n previousCell = {\n type: groupName,\n start: Object.assign({}, now),\n // Note: correct end is set later.\n end: Object.assign({}, now)\n }\n map.add(range[1], 0, [['enter', previousCell, context]])\n\n // Insert text start at first data start and end at last data end, and\n // remove events between.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[2] !== 0) {\n const relatedStart = getPoint(context.events, range[2])\n const relatedEnd = getPoint(context.events, range[3])\n /** @type {Token} */\n const valueToken = {\n type: valueName,\n start: Object.assign({}, relatedStart),\n end: Object.assign({}, relatedEnd)\n }\n map.add(range[2], 0, [['enter', valueToken, context]])\n if (rowKind !== 2) {\n // Fix positional info on remaining events\n const start = context.events[range[2]]\n const end = context.events[range[3]]\n start[1].end = Object.assign({}, end[1].end)\n start[1].type = 'chunkText'\n start[1].contentType = 'text'\n\n // Remove if needed.\n if (range[3] > range[2] + 1) {\n const a = range[2] + 1\n const b = range[3] - range[2] - 1\n map.add(a, b, [])\n }\n }\n map.add(range[3] + 1, 0, [['exit', valueToken, context]])\n }\n\n // Insert an exit for the last cell, if at the row end.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^^^-- this cell (the last one contains two “between” parts)\n // ```\n if (rowEnd !== undefined) {\n previousCell.end = Object.assign({}, getPoint(context.events, rowEnd))\n map.add(rowEnd, 0, [['exit', previousCell, context]])\n previousCell = undefined\n }\n return previousCell\n}\n\n/**\n * Generate table end (and table body end).\n *\n * @param {Readonly} map\n * @param {Readonly} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array} */\n const exits = []\n const related = getPoint(context.events, index)\n if (tableBody) {\n tableBody.end = Object.assign({}, related)\n exits.push(['exit', tableBody, context])\n }\n table.end = Object.assign({}, related)\n exits.push(['exit', table, context])\n map.add(index + 1, 0, exits)\n}\n\n/**\n * @param {Readonly>} events\n * @param {number} index\n * @returns {Readonly}\n */\nfunction getPoint(events, index) {\n const event = events[index]\n const side = event[0] === 'enter' ? 'start' : 'end'\n return event[1][side]\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nconst tasklistCheck = {\n tokenize: tokenizeTasklistCheck\n}\n\n/**\n * Create an HTML extension for `micromark` to support GFM task list items\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM task list items when serializing to HTML.\n */\nexport function gfmTaskListItem() {\n return {\n text: {\n [91]: tasklistCheck\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTasklistCheck(effects, ok, nok) {\n const self = this\n return open\n\n /**\n * At start of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (\n // Exit if there’s stuff before.\n self.previous !== null ||\n // Exit if not in the first content that is the first child of a list\n // item.\n !self._gfmTasklistFirstContentOfListItem\n ) {\n return nok(code)\n }\n effects.enter('taskListCheck')\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n return inside\n }\n\n /**\n * In task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // Currently we match how GH works in files.\n // To match how GH works in comments, use `markdownSpace` (`[\\t ]`) instead\n // of `markdownLineEndingOrSpace` (`[\\t\\n\\r ]`).\n if (markdownLineEndingOrSpace(code)) {\n effects.enter('taskListCheckValueUnchecked')\n effects.consume(code)\n effects.exit('taskListCheckValueUnchecked')\n return close\n }\n if (code === 88 || code === 120) {\n effects.enter('taskListCheckValueChecked')\n effects.consume(code)\n effects.exit('taskListCheckValueChecked')\n return close\n }\n return nok(code)\n }\n\n /**\n * At close of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function close(code) {\n if (code === 93) {\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n effects.exit('taskListCheck')\n return after\n }\n return nok(code)\n }\n\n /**\n * @type {State}\n */\n function after(code) {\n // EOL in paragraph means there must be something else after it.\n if (markdownLineEnding(code)) {\n return ok(code)\n }\n\n // Space or tab?\n // Check what comes after.\n if (markdownSpace(code)) {\n return effects.check(\n {\n tokenize: spaceThenNonSpace\n },\n ok,\n nok\n )(code)\n }\n\n // EOF, or non-whitespace, both wrong.\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction spaceThenNonSpace(effects, ok, nok) {\n return factorySpace(effects, after, 'whitespace')\n\n /**\n * After whitespace, after task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // EOF means there was nothing, so bad.\n // EOL means there’s content after it, so good.\n // Impossible to have more spaces.\n // Anything else is good.\n return code === null ? nok(code) : ok(code)\n }\n}\n","/// \n/// \n\n/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-gfm').Options} MdastOptions\n * @typedef {import('micromark-extension-gfm').Options} MicromarkOptions\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {MicromarkOptions & MdastOptions} Options\n * Configuration.\n */\n\nimport {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'\nimport {gfm} from 'micromark-extension-gfm'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Add support GFM (autolink literals, footnotes, strikethrough, tables,\n * tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkGfm(options) {\n // @ts-expect-error: TS is wrong about `this`.\n // eslint-disable-next-line unicorn/no-this-assignment\n const self = /** @type {Processor} */ (this)\n const settings = options || emptyOptions\n const data = self.data()\n\n const micromarkExtensions =\n data.micromarkExtensions || (data.micromarkExtensions = [])\n const fromMarkdownExtensions =\n data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])\n const toMarkdownExtensions =\n data.toMarkdownExtensions || (data.toMarkdownExtensions = [])\n\n micromarkExtensions.push(gfm(settings))\n fromMarkdownExtensions.push(gfmFromMarkdown())\n toMarkdownExtensions.push(gfmToMarkdown(settings))\n}\n","/**\n * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions\n * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\nimport {\n combineExtensions,\n combineHtmlExtensions\n} from 'micromark-util-combine-extensions'\nimport {\n gfmAutolinkLiteral,\n gfmAutolinkLiteralHtml\n} from 'micromark-extension-gfm-autolink-literal'\nimport {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'\nimport {\n gfmStrikethrough,\n gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\nimport {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'\nimport {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'\nimport {\n gfmTaskListItem,\n gfmTaskListItemHtml\n} from 'micromark-extension-gfm-task-list-item'\n\n/**\n * Create an extension for `micromark` to enable GFM syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-strikethrough`.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * syntax.\n */\nexport function gfm(options) {\n return combineExtensions([\n gfmAutolinkLiteral(),\n gfmFootnote(),\n gfmStrikethrough(options),\n gfmTable(),\n gfmTaskListItem()\n ])\n}\n\n/**\n * Create an extension for `micromark` to support GFM when serializing to HTML.\n *\n * @param {HtmlOptions | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-footnote`.\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM when serializing to HTML.\n */\nexport function gfmHtml(options) {\n return combineHtmlExtensions([\n gfmAutolinkLiteralHtml(),\n gfmFootnoteHtml(options),\n gfmStrikethroughHtml(),\n gfmTableHtml(),\n gfmTagfilterHtml(),\n gfmTaskListItemHtml()\n ])\n}\n","/**\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * @typedef {import('mdast-util-gfm-table').Options} Options\n * Configuration.\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @returns {Array}\n * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown(),\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown(),\n gfmTableFromMarkdown(),\n gfmTaskListItemFromMarkdown()\n ]\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown(),\n gfmFootnoteToMarkdown(),\n gfmStrikethroughToMarkdown(),\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown()\n ]\n }\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n */\n\n/**\n * @template {string} SimpleSelector\n * Selector type.\n * @template {string} DefaultTagName\n * Default tag name.\n * @typedef {(\n * SimpleSelector extends ''\n * ? DefaultTagName\n * : SimpleSelector extends `${infer TagName}.${infer Rest}`\n * ? ExtractTagName\n * : SimpleSelector extends `${infer TagName}#${infer Rest}`\n * ? ExtractTagName\n * : SimpleSelector extends string\n * ? SimpleSelector\n * : DefaultTagName\n * )} ExtractTagName\n * Extract tag name from a simple selector.\n */\n\nconst search = /[#.]/g\n\n/**\n * Create a hast element from a simple CSS selector.\n *\n * @template {string} Selector\n * Type of selector.\n * @template {string} [DefaultTagName='div']\n * Type of default tag name (default: `'div'`).\n * @param {Selector | null | undefined} [selector]\n * Simple CSS selector (optional).\n *\n * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).\n * Multiple classes are allowed.\n * Uses the last ID if multiple IDs are found.\n * @param {DefaultTagName | null | undefined} [defaultTagName='div']\n * Tag name to use if `selector` does not specify one (default: `'div'`).\n * @returns {Element & {tagName: ExtractTagName}}\n * Built element.\n */\nexport function parseSelector(selector, defaultTagName) {\n const value = selector || ''\n /** @type {Properties} */\n const props = {}\n let start = 0\n /** @type {string | undefined} */\n let previous\n /** @type {string | undefined} */\n let tagName\n\n while (start < value.length) {\n search.lastIndex = start\n const match = search.exec(value)\n const subvalue = value.slice(start, match ? match.index : value.length)\n\n if (subvalue) {\n if (!previous) {\n tagName = subvalue\n } else if (previous === '#') {\n props.id = subvalue\n } else if (Array.isArray(props.className)) {\n props.className.push(subvalue)\n } else {\n props.className = [subvalue]\n }\n\n start += subvalue.length\n }\n\n if (match) {\n previous = match[0]\n start++\n }\n }\n\n return {\n type: 'element',\n // @ts-expect-error: tag name is parsed.\n tagName: tagName || defaultTagName || 'div',\n properties: props,\n children: []\n }\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').RootContent} RootContent\n *\n * @typedef {import('property-information').Info} Info\n * @typedef {import('property-information').Schema} Schema\n */\n\n/**\n * @typedef {Element | Root} Result\n * Result from a `h` (or `s`) call.\n *\n * @typedef {number | string} StyleValue\n * Value for a CSS style field.\n * @typedef {Record} Style\n * Supported value of a `style` prop.\n * @typedef {boolean | number | string | null | undefined} PrimitiveValue\n * Primitive property value.\n * @typedef {Array} ArrayValue\n * List of property values for space- or comma separated values (such as `className`).\n * @typedef {ArrayValue | PrimitiveValue} PropertyValue\n * Primitive value or list value.\n * @typedef {{[property: string]: PropertyValue | Style}} Properties\n * Acceptable value for element properties.\n *\n * @typedef {number | string | null | undefined} PrimitiveChild\n * Primitive children, either ignored (nullish), or turned into text nodes.\n * @typedef {Array} ArrayChild\n * List of children.\n * @typedef {Array} ArrayChildNested\n * List of children (deep).\n * @typedef {ArrayChild | Nodes | PrimitiveChild} Child\n * Acceptable child value.\n */\n\nimport {parse as commas} from 'comma-separated-tokens'\nimport {parseSelector} from 'hast-util-parse-selector'\nimport {find, normalize} from 'property-information'\nimport {parse as spaces} from 'space-separated-tokens'\n\nconst buttonTypes = new Set(['button', 'menu', 'reset', 'submit'])\n\nconst own = {}.hasOwnProperty\n\n/**\n * @param {Schema} schema\n * Schema to use.\n * @param {string} defaultTagName\n * Default tag name.\n * @param {Array | undefined} [caseSensitive]\n * Case-sensitive tag names (default: `undefined`).\n * @returns\n * `h`.\n */\nexport function createH(schema, defaultTagName, caseSensitive) {\n const adjust = caseSensitive && createAdjustMap(caseSensitive)\n\n /**\n * Hyperscript compatible DSL for creating virtual hast trees.\n *\n * @overload\n * @param {null | undefined} [selector]\n * @param {...Child} children\n * @returns {Root}\n *\n * @overload\n * @param {string} selector\n * @param {Properties} properties\n * @param {...Child} children\n * @returns {Element}\n *\n * @overload\n * @param {string} selector\n * @param {...Child} children\n * @returns {Element}\n *\n * @param {string | null | undefined} [selector]\n * Selector.\n * @param {Child | Properties | null | undefined} [properties]\n * Properties (or first child) (default: `undefined`).\n * @param {...Child} children\n * Children.\n * @returns {Result}\n * Result.\n */\n function h(selector, properties, ...children) {\n let index = -1\n /** @type {Result} */\n let node\n\n if (selector === undefined || selector === null) {\n node = {type: 'root', children: []}\n // Properties are not supported for roots.\n const child = /** @type {Child} */ (properties)\n children.unshift(child)\n } else {\n node = parseSelector(selector, defaultTagName)\n // Normalize the name.\n node.tagName = node.tagName.toLowerCase()\n if (adjust && own.call(adjust, node.tagName)) {\n node.tagName = adjust[node.tagName]\n }\n\n // Handle props.\n if (isProperties(properties, node.tagName)) {\n /** @type {string} */\n let key\n\n for (key in properties) {\n if (own.call(properties, key)) {\n addProperty(schema, node.properties, key, properties[key])\n }\n }\n } else {\n children.unshift(properties)\n }\n }\n\n // Handle children.\n while (++index < children.length) {\n addChild(node.children, children[index])\n }\n\n if (node.type === 'element' && node.tagName === 'template') {\n node.content = {type: 'root', children: node.children}\n node.children = []\n }\n\n return node\n }\n\n return h\n}\n\n/**\n * Check if something is properties or a child.\n *\n * @param {Child | Properties} value\n * Value to check.\n * @param {string} name\n * Tag name.\n * @returns {value is Properties}\n * Whether `value` is a properties object.\n */\nfunction isProperties(value, name) {\n if (\n value === null ||\n value === undefined ||\n typeof value !== 'object' ||\n Array.isArray(value)\n ) {\n return false\n }\n\n if (name === 'input' || !value.type || typeof value.type !== 'string') {\n return true\n }\n\n if ('children' in value && Array.isArray(value.children)) {\n return false\n }\n\n if (name === 'button') {\n return buttonTypes.has(value.type.toLowerCase())\n }\n\n return !('value' in value)\n}\n\n/**\n * @param {Schema} schema\n * Schema.\n * @param {Properties} properties\n * Properties object.\n * @param {string} key\n * Property name.\n * @param {PropertyValue | Style} value\n * Property value.\n * @returns {undefined}\n * Nothing.\n */\nfunction addProperty(schema, properties, key, value) {\n const info = find(schema, key)\n let index = -1\n /** @type {PropertyValue} */\n let result\n\n // Ignore nullish and NaN values.\n if (value === undefined || value === null) return\n\n if (typeof value === 'number') {\n // Ignore NaN.\n if (Number.isNaN(value)) return\n\n result = value\n }\n // Booleans.\n else if (typeof value === 'boolean') {\n result = value\n }\n // Handle list values.\n else if (typeof value === 'string') {\n if (info.spaceSeparated) {\n result = spaces(value)\n } else if (info.commaSeparated) {\n result = commas(value)\n } else if (info.commaOrSpaceSeparated) {\n result = spaces(commas(value).join(' '))\n } else {\n result = parsePrimitive(info, info.property, value)\n }\n } else if (Array.isArray(value)) {\n result = value.concat()\n } else {\n result = info.property === 'style' ? style(value) : String(value)\n }\n\n if (Array.isArray(result)) {\n /** @type {Array} */\n const finalResult = []\n\n while (++index < result.length) {\n // Assume no booleans in array.\n const value = /** @type {number | string} */ (\n parsePrimitive(info, info.property, result[index])\n )\n finalResult[index] = value\n }\n\n result = finalResult\n }\n\n // Class names (which can be added both on the `selector` and here).\n if (info.property === 'className' && Array.isArray(properties.className)) {\n // Assume no booleans in `className`.\n const value = /** @type {number | string} */ (result)\n result = properties.className.concat(value)\n }\n\n properties[info.property] = result\n}\n\n/**\n * @param {Array} nodes\n * Children.\n * @param {Child} value\n * Child.\n * @returns {undefined}\n * Nothing.\n */\nfunction addChild(nodes, value) {\n let index = -1\n\n if (value === undefined || value === null) {\n // Empty.\n } else if (typeof value === 'string' || typeof value === 'number') {\n nodes.push({type: 'text', value: String(value)})\n } else if (Array.isArray(value)) {\n while (++index < value.length) {\n addChild(nodes, value[index])\n }\n } else if (typeof value === 'object' && 'type' in value) {\n if (value.type === 'root') {\n addChild(nodes, value.children)\n } else {\n nodes.push(value)\n }\n } else {\n throw new Error('Expected node, nodes, or string, got `' + value + '`')\n }\n}\n\n/**\n * Parse a single primitives.\n *\n * @param {Info} info\n * Property information.\n * @param {string} name\n * Property name.\n * @param {PrimitiveValue} value\n * Property value.\n * @returns {PrimitiveValue}\n * Property value.\n */\nfunction parsePrimitive(info, name, value) {\n if (typeof value === 'string') {\n if (info.number && value && !Number.isNaN(Number(value))) {\n return Number(value)\n }\n\n if (\n (info.boolean || info.overloadedBoolean) &&\n (value === '' || normalize(value) === normalize(name))\n ) {\n return true\n }\n }\n\n return value\n}\n\n/**\n * Serialize a `style` object as a string.\n *\n * @param {Style} value\n * Style object.\n * @returns {string}\n * CSS string.\n */\nfunction style(value) {\n /** @type {Array} */\n const result = []\n /** @type {string} */\n let key\n\n for (key in value) {\n if (own.call(value, key)) {\n result.push([key, value[key]].join(': '))\n }\n }\n\n return result.join('; ')\n}\n\n/**\n * Create a map to adjust casing.\n *\n * @param {Array} values\n * List of properly cased keys.\n * @returns {Record}\n * Map of lowercase keys to uppercase keys.\n */\nfunction createAdjustMap(values) {\n /** @type {Record} */\n const result = {}\n let index = -1\n\n while (++index < values.length) {\n result[values[index].toLowerCase()] = values[index]\n }\n\n return result\n}\n","export const svgCaseSensitiveTagNames = [\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'solidColor',\n 'textArea',\n 'textPath'\n]\n","/**\n * @typedef {import('./create-h.js').Child} Child\n * Acceptable child value.\n * @typedef {import('./create-h.js').Properties} Properties\n * Acceptable value for element properties.\n * @typedef {import('./create-h.js').Result} Result\n * Result from a `h` (or `s`) call.\n */\n\n// Register the JSX namespace on `h`.\n/**\n * @typedef {import('./jsx-classic.js').Element} h.JSX.Element\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} h.JSX.ElementChildrenAttribute\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} h.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} h.JSX.IntrinsicElements\n */\n\n// Register the JSX namespace on `s`.\n/**\n * @typedef {import('./jsx-classic.js').Element} s.JSX.Element\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} s.JSX.ElementChildrenAttribute\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} s.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} s.JSX.IntrinsicElements\n */\n\nimport {html, svg} from 'property-information'\nimport {createH} from './create-h.js'\nimport {svgCaseSensitiveTagNames} from './svg-case-sensitive-tag-names.js'\n\n// Note: this explicit type is needed, otherwise TS creates broken types.\n/** @type {ReturnType} */\nexport const h = createH(html, 'div')\n\n// Note: this explicit type is needed, otherwise TS creates broken types.\n/** @type {ReturnType} */\nexport const s = createH(svg, 'g', svgCaseSensitiveTagNames)\n","/**\n * @typedef {import('vfile').VFile} VFile\n * @typedef {import('vfile').Value} Value\n * @typedef {import('unist').Point} UnistPoint\n */\n\n/**\n *\n * @typedef PointLike\n * unist point, allowed as input.\n * @property {number | null | undefined} [line]\n * Line.\n * @property {number | null | undefined} [column]\n * Column.\n * @property {number | null | undefined} [offset]\n * Offset.\n *\n * @callback ToPoint\n * Get the line/column based `Point` for `offset` in the bound indices.\n *\n * Returns `undefined` when given out of bounds input.\n *\n * Also implemented in Rust in [`wooorm/markdown-rs`][markdown-rs].\n *\n * [markdown-rs]: https://github.com/wooorm/markdown-rs/blob/main/src/util/location.rs\n * @param {number | null | undefined} [offset]\n * Something that should be an `offset.\n * @returns {UnistPoint | undefined}\n * Point, if `offset` is valid and in-bounds input.\n *\n * @callback ToOffset\n * Get the `offset` from a line/column based `Point` in the bound indices.\n * @param {PointLike | null | undefined} [point]\n * Something that should be a `point.\n * @returns {number | undefined}\n * Offset (`number`) or `undefined` for invalid or out of bounds input.\n *\n * @typedef Location\n * Accessors for index.\n * @property {ToPoint} toPoint\n * Get the line/column based `Point` for `offset` in the bound indices.\n * @property {ToOffset} toOffset\n * Get the `offset` from a line/column based `Point` in the bound indices.\n */\n\nconst search = /\\r?\\n|\\r/g\n\n/**\n * Create an index of the given document to translate between line/column and\n * offset based positional info.\n *\n * Also implemented in Rust in [`wooorm/markdown-rs`][markdown-rs].\n *\n * [markdown-rs]: https://github.com/wooorm/markdown-rs/blob/main/src/util/location.rs\n *\n * @param {VFile | Value} file\n * File to index.\n * @returns {Location}\n * Accessors for index.\n */\nexport function location(file) {\n const value = String(file)\n /**\n * List, where each index is a line number (0-based), and each value is the\n * byte index *after* where the line ends.\n *\n * @type {Array}\n */\n const indices = []\n\n search.lastIndex = 0\n\n while (search.test(value)) {\n indices.push(search.lastIndex)\n }\n\n indices.push(value.length + 1)\n\n return {toPoint, toOffset}\n\n /** @type {ToPoint} */\n function toPoint(offset) {\n let index = -1\n\n if (\n typeof offset === 'number' &&\n offset > -1 &&\n offset < indices[indices.length - 1]\n ) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (index > 0 ? indices[index - 1] : 0) + 1,\n offset\n }\n }\n }\n }\n }\n\n /** @type {ToOffset} */\n function toOffset(point) {\n const line = point && point.line\n const column = point && point.column\n\n if (\n typeof line === 'number' &&\n typeof column === 'number' &&\n !Number.isNaN(line) &&\n !Number.isNaN(column) &&\n line - 1 in indices\n ) {\n const offset = (indices[line - 2] || 0) + column - 1 || 0\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n return offset\n }\n }\n }\n}\n","/**\n * Map of web namespaces.\n *\n * @type {Record}\n */\nexport const webNamespaces = {\n html: 'http://www.w3.org/1999/xhtml',\n mathml: 'http://www.w3.org/1998/Math/MathML',\n svg: 'http://www.w3.org/2000/svg',\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace',\n xmlns: 'http://www.w3.org/2000/xmlns/'\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementData} ElementData\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').RootContent} RootContent\n *\n * @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap\n * @typedef {import('parse5').Token.ElementLocation} P5ElementLocation\n * @typedef {import('parse5').Token.Location} P5Location\n *\n * @typedef {import('property-information').Schema} Schema\n *\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n *\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @typedef {DefaultTreeAdapterMap['document']} P5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} P5DocumentFragment\n * @typedef {DefaultTreeAdapterMap['documentType']} P5DocumentType\n * @typedef {DefaultTreeAdapterMap['commentNode']} P5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} P5Text\n * @typedef {DefaultTreeAdapterMap['element']} P5Element\n * @typedef {DefaultTreeAdapterMap['node']} P5Node\n * @typedef {DefaultTreeAdapterMap['template']} P5Template\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in (default: `'html'`).\n *\n * When an `` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n * @property {VFile | null | undefined} [file]\n * File used to add positional info to nodes (optional).\n *\n * If given, the file should represent the original HTML source.\n * @property {boolean | null | undefined} [verbose=false]\n * Whether to add extra positional info about starting tags, closing tags,\n * and attributes to elements (default: `false`).\n *\n * > 👉 **Note**: only used when `file` is given.\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean} location\n * Whether location info was found.\n * @property {Schema} schema\n * Current schema.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n */\n\nimport {ok as assert} from 'devlop'\nimport {h, s} from 'hastscript'\nimport {find, html, svg} from 'property-information'\nimport {location} from 'vfile-location'\nimport {webNamespaces} from 'web-namespaces'\n\nconst own = {}.hasOwnProperty\n/** @type {unknown} */\n// type-coverage:ignore-next-line\nconst proto = Object.prototype\n\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {P5Node} tree\n * `parse5` tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Nodes}\n * hast tree.\n */\nexport function fromParse5(tree, options) {\n const settings = options || {}\n\n return one(\n {\n file: settings.file || undefined,\n location: false,\n schema: settings.space === 'svg' ? svg : html,\n verbose: settings.verbose || false\n },\n tree\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} node\n * p5 node.\n * @returns {Nodes}\n * hast node.\n */\nfunction one(state, node) {\n /** @type {Nodes} */\n let result\n\n switch (node.nodeName) {\n case '#comment': {\n const reference = /** @type {P5Comment} */ (node)\n result = {type: 'comment', value: reference.data}\n patch(state, reference, result)\n return result\n }\n\n case '#document':\n case '#document-fragment': {\n const reference = /** @type {P5Document | P5DocumentFragment} */ (node)\n const quirksMode =\n 'mode' in reference\n ? reference.mode === 'quirks' || reference.mode === 'limited-quirks'\n : false\n\n result = {\n type: 'root',\n children: all(state, node.childNodes),\n data: {quirksMode}\n }\n\n if (state.file && state.location) {\n const doc = String(state.file)\n const loc = location(doc)\n const start = loc.toPoint(0)\n const end = loc.toPoint(doc.length)\n // Always defined as we give valid input.\n assert(start, 'expected `start`')\n assert(end, 'expected `end`')\n result.position = {start, end}\n }\n\n return result\n }\n\n case '#documentType': {\n const reference = /** @type {P5DocumentType} */ (node)\n result = {type: 'doctype'}\n patch(state, reference, result)\n return result\n }\n\n case '#text': {\n const reference = /** @type {P5Text} */ (node)\n result = {type: 'text', value: reference.value}\n patch(state, reference, result)\n return result\n }\n\n // Element.\n default: {\n const reference = /** @type {P5Element} */ (node)\n result = element(state, reference)\n return result\n }\n }\n}\n\n/**\n * Transform children.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Array} nodes\n * Nodes.\n * @returns {Array}\n * hast nodes.\n */\nfunction all(state, nodes) {\n let index = -1\n /** @type {Array} */\n const results = []\n\n while (++index < nodes.length) {\n // Assume no roots in `nodes`.\n const result = /** @type {RootContent} */ (one(state, nodes[index]))\n results.push(result)\n }\n\n return results\n}\n\n/**\n * Transform an element.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Element} node\n * `parse5` node to transform.\n * @returns {Element}\n * hast node.\n */\nfunction element(state, node) {\n const schema = state.schema\n\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html\n\n // Props.\n let index = -1\n /** @type {Record} */\n const props = {}\n\n while (++index < node.attrs.length) {\n const attribute = node.attrs[index]\n const name =\n (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n if (!own.call(proto, name)) {\n props[name] = attribute.value\n }\n }\n\n // Build.\n const fn = state.schema.space === 'svg' ? s : h\n const result = fn(node.tagName, props, all(state, node.childNodes))\n patch(state, node, result)\n\n // Switch content.\n if (result.tagName === 'template') {\n const reference = /** @type {P5Template} */ (node)\n const pos = reference.sourceCodeLocation\n const startTag = pos && pos.startTag && position(pos.startTag)\n const endTag = pos && pos.endTag && position(pos.endTag)\n\n // Root in, root out.\n const content = /** @type {Root} */ (one(state, reference.content))\n\n if (startTag && endTag && state.file) {\n content.position = {start: startTag.end, end: endTag.start}\n }\n\n result.content = content\n }\n\n state.schema = schema\n\n return result\n}\n\n/**\n * Patch positional info from `from` onto `to`.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} from\n * p5 node.\n * @param {Nodes} to\n * hast node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(state, from, to) {\n if ('sourceCodeLocation' in from && from.sourceCodeLocation && state.file) {\n const position = createLocation(state, to, from.sourceCodeLocation)\n\n if (position) {\n state.location = true\n to.position = position\n }\n }\n}\n\n/**\n * Create clean positional information.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Nodes} node\n * hast node.\n * @param {P5ElementLocation} location\n * p5 location info.\n * @returns {Position | undefined}\n * Position, or nothing.\n */\nfunction createLocation(state, node, location) {\n const result = position(location)\n\n if (node.type === 'element') {\n const tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: .\n if (\n result &&\n !location.endTag &&\n tail &&\n tail.position &&\n tail.position.end\n ) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (state.verbose) {\n /** @type {Record} */\n const props = {}\n /** @type {string} */\n let key\n\n if (location.attrs) {\n for (key in location.attrs) {\n if (own.call(location.attrs, key)) {\n props[find(state.schema, key).property] = position(\n location.attrs[key]\n )\n }\n }\n }\n\n assert(location.startTag, 'a start tag should exist')\n const opening = position(location.startTag)\n const closing = location.endTag ? position(location.endTag) : undefined\n /** @type {ElementData['position']} */\n const data = {opening}\n if (closing) data.closing = closing\n data.properties = props\n\n node.data = {position: data}\n }\n }\n\n return result\n}\n\n/**\n * Turn a p5 location into a position.\n *\n * @param {P5Location} loc\n * Location.\n * @returns {Position | undefined}\n * Position or nothing.\n */\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n\n // @ts-expect-error: we do use `undefined` for points if one or the other\n // exists.\n return start || end ? {start, end} : undefined\n}\n\n/**\n * Filter out invalid points.\n *\n * @param {Point} point\n * Point with potentially `undefined` values.\n * @returns {Point | undefined}\n * Point or nothing.\n */\nfunction point(point) {\n return point.line && point.column ? point : undefined\n}\n","/**\n * @callback Handler\n * Handle a value, with a certain ID field set to a certain value.\n * The ID field is passed to `zwitch`, and it’s value is this function’s\n * place on the `handlers` record.\n * @param {...any} parameters\n * Arbitrary parameters passed to the zwitch.\n * The first will be an object with a certain ID field set to a certain value.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback UnknownHandler\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @param {unknown} value\n * An object with a certain ID field set to an unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback InvalidHandler\n * Handle values that do not have a certain ID field.\n * @param {unknown} value\n * Any unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {void|null|undefined|never}\n * This should crash or return nothing.\n */\n\n/**\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record} [Handlers=Record]\n * @typedef Options\n * Configuration (required).\n * @property {Invalid} [invalid]\n * Handler to use for invalid values.\n * @property {Unknown} [unknown]\n * Handler to use for unknown values.\n * @property {Handlers} [handlers]\n * Handlers to use.\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Handle values based on a field.\n *\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record} [Handlers=Record]\n * @param {string} key\n * Field to switch on.\n * @param {Options} [options]\n * Configuration (required).\n * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters): ReturnType, (...parameters: Parameters): ReturnType}}\n */\nexport function zwitch(key, options) {\n const settings = options || {}\n\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one.invalid\n const handlers = one.handlers\n\n if (value && own.call(value, key)) {\n // @ts-expect-error Indexable.\n const id = String(value[key])\n // @ts-expect-error Indexable.\n fn = own.call(handlers, id) ? handlers[id] : one.unknown\n }\n\n if (fn) {\n return fn.call(this, value, ...parameters)\n }\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n // @ts-expect-error: matches!\n return one\n}\n","/**\n * @typedef {import('hast').Comment} Comment\n * @typedef {import('hast').Doctype} Doctype\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').RootContent} RootContent\n * @typedef {import('hast').Text} Text\n *\n * @typedef {import('parse5').DefaultTreeAdapterMap['document']} Parse5Document\n * @typedef {import('parse5').DefaultTreeAdapterMap['documentFragment']} Parse5Fragment\n * @typedef {import('parse5').DefaultTreeAdapterMap['element']} Parse5Element\n * @typedef {import('parse5').DefaultTreeAdapterMap['node']} Parse5Nodes\n * @typedef {import('parse5').DefaultTreeAdapterMap['documentType']} Parse5Doctype\n * @typedef {import('parse5').DefaultTreeAdapterMap['commentNode']} Parse5Comment\n * @typedef {import('parse5').DefaultTreeAdapterMap['textNode']} Parse5Text\n * @typedef {import('parse5').DefaultTreeAdapterMap['parentNode']} Parse5Parent\n * @typedef {import('parse5').Token.Attribute} Parse5Attribute\n *\n * @typedef {import('property-information').Schema} Schema\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in (default: `'html'`).\n *\n * When an `` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n *\n * @typedef {Exclude} Parse5Content\n *\n * @typedef {'html' | 'svg'} Space\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {find, html, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {webNamespaces} from 'web-namespaces'\nimport {zwitch} from 'zwitch'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\nconst own = {}.hasOwnProperty\n\nconst one = zwitch('type', {handlers: {root, element, text, comment, doctype}})\n\n/**\n * Transform a hast tree to a `parse5` AST.\n *\n * @param {Nodes} tree\n * Tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Parse5Nodes}\n * `parse5` node.\n */\nexport function toParse5(tree, options) {\n const settings = options || emptyOptions\n const space = settings.space\n return one(tree, space === 'svg' ? svg : html)\n}\n\n/**\n * @param {Root} node\n * Node (hast) to transform.\n * @param {Schema} schema\n * Current schema.\n * @returns {Parse5Document}\n * Parse5 node.\n */\nfunction root(node, schema) {\n /** @type {Parse5Document} */\n const result = {\n nodeName: '#document',\n // @ts-expect-error: `parse5` uses enums, which are actually strings.\n mode: (node.data || {}).quirksMode ? 'quirks' : 'no-quirks',\n childNodes: []\n }\n result.childNodes = all(node.children, result, schema)\n patch(node, result)\n return result\n}\n\n/**\n * @param {Root} node\n * Node (hast) to transform.\n * @param {Schema} schema\n * Current schema.\n * @returns {Parse5Fragment}\n * Parse5 node.\n */\nfunction fragment(node, schema) {\n /** @type {Parse5Fragment} */\n const result = {nodeName: '#document-fragment', childNodes: []}\n result.childNodes = all(node.children, result, schema)\n patch(node, result)\n return result\n}\n\n/**\n * @param {Doctype} node\n * Node (hast) to transform.\n * @returns {Parse5Doctype}\n * Parse5 node.\n */\nfunction doctype(node) {\n /** @type {Parse5Doctype} */\n const result = {\n nodeName: '#documentType',\n name: 'html',\n publicId: '',\n systemId: '',\n parentNode: null\n }\n\n patch(node, result)\n return result\n}\n\n/**\n * @param {Text} node\n * Node (hast) to transform.\n * @returns {Parse5Text}\n * Parse5 node.\n */\nfunction text(node) {\n /** @type {Parse5Text} */\n const result = {\n nodeName: '#text',\n value: node.value,\n parentNode: null\n }\n patch(node, result)\n return result\n}\n\n/**\n * @param {Comment} node\n * Node (hast) to transform.\n * @returns {Parse5Comment}\n * Parse5 node.\n */\nfunction comment(node) {\n /** @type {Parse5Comment} */\n const result = {\n nodeName: '#comment',\n data: node.value,\n parentNode: null\n }\n\n patch(node, result)\n\n return result\n}\n\n/**\n * @param {Element} node\n * Node (hast) to transform.\n * @param {Schema} schema\n * Current schema.\n * @returns {Parse5Element}\n * Parse5 node.\n */\nfunction element(node, schema) {\n const parentSchema = schema\n let currentSchema = parentSchema\n\n if (\n node.type === 'element' &&\n node.tagName.toLowerCase() === 'svg' &&\n parentSchema.space === 'html'\n ) {\n currentSchema = svg\n }\n\n /** @type {Array} */\n const attrs = []\n /** @type {string} */\n let prop\n\n if (node.properties) {\n for (prop in node.properties) {\n if (prop !== 'children' && own.call(node.properties, prop)) {\n const result = createProperty(\n currentSchema,\n prop,\n node.properties[prop]\n )\n\n if (result) {\n attrs.push(result)\n }\n }\n }\n }\n\n const space = currentSchema.space\n // `html` and `svg` both have a space.\n assert(space)\n\n /** @type {Parse5Element} */\n const result = {\n nodeName: node.tagName,\n tagName: node.tagName,\n attrs,\n // @ts-expect-error: `parse5` types are wrong.\n namespaceURI: webNamespaces[space],\n childNodes: [],\n parentNode: null\n }\n result.childNodes = all(node.children, result, currentSchema)\n patch(node, result)\n\n if (node.tagName === 'template' && node.content) {\n // @ts-expect-error: `parse5` types are wrong.\n result.content = fragment(node.content, currentSchema)\n }\n\n return result\n}\n\n/**\n * Handle a property.\n *\n * @param {Schema} schema\n * Current schema.\n * @param {string} prop\n * Key.\n * @param {Array | boolean | number | string | null | undefined} value\n * hast property value.\n * @returns {Parse5Attribute | undefined}\n * Field for runtime, optional.\n */\nfunction createProperty(schema, prop, value) {\n const info = find(schema, prop)\n\n // Ignore nullish and `NaN` values.\n if (\n value === false ||\n value === null ||\n value === undefined ||\n (typeof value === 'number' && Number.isNaN(value)) ||\n (!value && info.boolean)\n ) {\n return\n }\n\n if (Array.isArray(value)) {\n // Accept `array`.\n // Most props are space-separated.\n value = info.commaSeparated ? commas(value) : spaces(value)\n }\n\n /** @type {Parse5Attribute} */\n const attribute = {\n name: info.attribute,\n value: value === true ? '' : String(value)\n }\n\n if (info.space && info.space !== 'html' && info.space !== 'svg') {\n const index = attribute.name.indexOf(':')\n\n if (index < 0) {\n attribute.prefix = ''\n } else {\n attribute.name = attribute.name.slice(index + 1)\n attribute.prefix = info.attribute.slice(0, index)\n }\n\n attribute.namespace = webNamespaces[info.space]\n }\n\n return attribute\n}\n\n/**\n * Transform all hast nodes.\n *\n * @param {Array} children\n * List of children.\n * @param {Parse5Parent} parentNode\n * `parse5` parent node.\n * @param {Schema} schema\n * Current schema.\n * @returns {Array}\n * Transformed children.\n */\nfunction all(children, parentNode, schema) {\n let index = -1\n /** @type {Array} */\n const results = []\n\n if (children) {\n while (++index < children.length) {\n /** @type {Parse5Content} */\n const child = one(children[index], schema)\n\n child.parentNode = parentNode\n\n results.push(child)\n }\n }\n\n return results\n}\n\n/**\n * Add position info from `from` to `to`.\n *\n * @param {Nodes} from\n * hast node.\n * @param {Parse5Nodes} to\n * `parse5` node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n const position = from.position\n\n if (position && position.start && position.end) {\n assert(typeof position.start.offset === 'number')\n assert(typeof position.end.offset === 'number')\n\n to.sourceCodeLocation = {\n startLine: position.start.line,\n startCol: position.start.column,\n startOffset: position.start.offset,\n endLine: position.end.line,\n endCol: position.end.column,\n endOffset: position.end.offset\n }\n }\n}\n","/**\n * List of HTML void tag names.\n *\n * @type {Array}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n","const UNDEFINED_CODE_POINTS = new Set([\n 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,\n 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,\n 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574,\n 1048575, 1114110, 1114111,\n]);\nexport const REPLACEMENT_CHARACTER = '\\uFFFD';\nexport var CODE_POINTS;\n(function (CODE_POINTS) {\n CODE_POINTS[CODE_POINTS[\"EOF\"] = -1] = \"EOF\";\n CODE_POINTS[CODE_POINTS[\"NULL\"] = 0] = \"NULL\";\n CODE_POINTS[CODE_POINTS[\"TABULATION\"] = 9] = \"TABULATION\";\n CODE_POINTS[CODE_POINTS[\"CARRIAGE_RETURN\"] = 13] = \"CARRIAGE_RETURN\";\n CODE_POINTS[CODE_POINTS[\"LINE_FEED\"] = 10] = \"LINE_FEED\";\n CODE_POINTS[CODE_POINTS[\"FORM_FEED\"] = 12] = \"FORM_FEED\";\n CODE_POINTS[CODE_POINTS[\"SPACE\"] = 32] = \"SPACE\";\n CODE_POINTS[CODE_POINTS[\"EXCLAMATION_MARK\"] = 33] = \"EXCLAMATION_MARK\";\n CODE_POINTS[CODE_POINTS[\"QUOTATION_MARK\"] = 34] = \"QUOTATION_MARK\";\n CODE_POINTS[CODE_POINTS[\"NUMBER_SIGN\"] = 35] = \"NUMBER_SIGN\";\n CODE_POINTS[CODE_POINTS[\"AMPERSAND\"] = 38] = \"AMPERSAND\";\n CODE_POINTS[CODE_POINTS[\"APOSTROPHE\"] = 39] = \"APOSTROPHE\";\n CODE_POINTS[CODE_POINTS[\"HYPHEN_MINUS\"] = 45] = \"HYPHEN_MINUS\";\n CODE_POINTS[CODE_POINTS[\"SOLIDUS\"] = 47] = \"SOLIDUS\";\n CODE_POINTS[CODE_POINTS[\"DIGIT_0\"] = 48] = \"DIGIT_0\";\n CODE_POINTS[CODE_POINTS[\"DIGIT_9\"] = 57] = \"DIGIT_9\";\n CODE_POINTS[CODE_POINTS[\"SEMICOLON\"] = 59] = \"SEMICOLON\";\n CODE_POINTS[CODE_POINTS[\"LESS_THAN_SIGN\"] = 60] = \"LESS_THAN_SIGN\";\n CODE_POINTS[CODE_POINTS[\"EQUALS_SIGN\"] = 61] = \"EQUALS_SIGN\";\n CODE_POINTS[CODE_POINTS[\"GREATER_THAN_SIGN\"] = 62] = \"GREATER_THAN_SIGN\";\n CODE_POINTS[CODE_POINTS[\"QUESTION_MARK\"] = 63] = \"QUESTION_MARK\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_A\"] = 65] = \"LATIN_CAPITAL_A\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_F\"] = 70] = \"LATIN_CAPITAL_F\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_X\"] = 88] = \"LATIN_CAPITAL_X\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_Z\"] = 90] = \"LATIN_CAPITAL_Z\";\n CODE_POINTS[CODE_POINTS[\"RIGHT_SQUARE_BRACKET\"] = 93] = \"RIGHT_SQUARE_BRACKET\";\n CODE_POINTS[CODE_POINTS[\"GRAVE_ACCENT\"] = 96] = \"GRAVE_ACCENT\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_A\"] = 97] = \"LATIN_SMALL_A\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_F\"] = 102] = \"LATIN_SMALL_F\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_X\"] = 120] = \"LATIN_SMALL_X\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_Z\"] = 122] = \"LATIN_SMALL_Z\";\n CODE_POINTS[CODE_POINTS[\"REPLACEMENT_CHARACTER\"] = 65533] = \"REPLACEMENT_CHARACTER\";\n})(CODE_POINTS = CODE_POINTS || (CODE_POINTS = {}));\nexport const SEQUENCES = {\n DASH_DASH: '--',\n CDATA_START: '[CDATA[',\n DOCTYPE: 'doctype',\n SCRIPT: 'script',\n PUBLIC: 'public',\n SYSTEM: 'system',\n};\n//Surrogates\nexport function isSurrogate(cp) {\n return cp >= 55296 && cp <= 57343;\n}\nexport function isSurrogatePair(cp) {\n return cp >= 56320 && cp <= 57343;\n}\nexport function getSurrogatePairCodePoint(cp1, cp2) {\n return (cp1 - 55296) * 1024 + 9216 + cp2;\n}\n//NOTE: excluding NULL and ASCII whitespace\nexport function isControlCodePoint(cp) {\n return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||\n (cp >= 0x7f && cp <= 0x9f));\n}\nexport function isUndefinedCodePoint(cp) {\n return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);\n}\n//# sourceMappingURL=unicode.js.map","export var ERR;\n(function (ERR) {\n ERR[\"controlCharacterInInputStream\"] = \"control-character-in-input-stream\";\n ERR[\"noncharacterInInputStream\"] = \"noncharacter-in-input-stream\";\n ERR[\"surrogateInInputStream\"] = \"surrogate-in-input-stream\";\n ERR[\"nonVoidHtmlElementStartTagWithTrailingSolidus\"] = \"non-void-html-element-start-tag-with-trailing-solidus\";\n ERR[\"endTagWithAttributes\"] = \"end-tag-with-attributes\";\n ERR[\"endTagWithTrailingSolidus\"] = \"end-tag-with-trailing-solidus\";\n ERR[\"unexpectedSolidusInTag\"] = \"unexpected-solidus-in-tag\";\n ERR[\"unexpectedNullCharacter\"] = \"unexpected-null-character\";\n ERR[\"unexpectedQuestionMarkInsteadOfTagName\"] = \"unexpected-question-mark-instead-of-tag-name\";\n ERR[\"invalidFirstCharacterOfTagName\"] = \"invalid-first-character-of-tag-name\";\n ERR[\"unexpectedEqualsSignBeforeAttributeName\"] = \"unexpected-equals-sign-before-attribute-name\";\n ERR[\"missingEndTagName\"] = \"missing-end-tag-name\";\n ERR[\"unexpectedCharacterInAttributeName\"] = \"unexpected-character-in-attribute-name\";\n ERR[\"unknownNamedCharacterReference\"] = \"unknown-named-character-reference\";\n ERR[\"missingSemicolonAfterCharacterReference\"] = \"missing-semicolon-after-character-reference\";\n ERR[\"unexpectedCharacterAfterDoctypeSystemIdentifier\"] = \"unexpected-character-after-doctype-system-identifier\";\n ERR[\"unexpectedCharacterInUnquotedAttributeValue\"] = \"unexpected-character-in-unquoted-attribute-value\";\n ERR[\"eofBeforeTagName\"] = \"eof-before-tag-name\";\n ERR[\"eofInTag\"] = \"eof-in-tag\";\n ERR[\"missingAttributeValue\"] = \"missing-attribute-value\";\n ERR[\"missingWhitespaceBetweenAttributes\"] = \"missing-whitespace-between-attributes\";\n ERR[\"missingWhitespaceAfterDoctypePublicKeyword\"] = \"missing-whitespace-after-doctype-public-keyword\";\n ERR[\"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers\"] = \"missing-whitespace-between-doctype-public-and-system-identifiers\";\n ERR[\"missingWhitespaceAfterDoctypeSystemKeyword\"] = \"missing-whitespace-after-doctype-system-keyword\";\n ERR[\"missingQuoteBeforeDoctypePublicIdentifier\"] = \"missing-quote-before-doctype-public-identifier\";\n ERR[\"missingQuoteBeforeDoctypeSystemIdentifier\"] = \"missing-quote-before-doctype-system-identifier\";\n ERR[\"missingDoctypePublicIdentifier\"] = \"missing-doctype-public-identifier\";\n ERR[\"missingDoctypeSystemIdentifier\"] = \"missing-doctype-system-identifier\";\n ERR[\"abruptDoctypePublicIdentifier\"] = \"abrupt-doctype-public-identifier\";\n ERR[\"abruptDoctypeSystemIdentifier\"] = \"abrupt-doctype-system-identifier\";\n ERR[\"cdataInHtmlContent\"] = \"cdata-in-html-content\";\n ERR[\"incorrectlyOpenedComment\"] = \"incorrectly-opened-comment\";\n ERR[\"eofInScriptHtmlCommentLikeText\"] = \"eof-in-script-html-comment-like-text\";\n ERR[\"eofInDoctype\"] = \"eof-in-doctype\";\n ERR[\"nestedComment\"] = \"nested-comment\";\n ERR[\"abruptClosingOfEmptyComment\"] = \"abrupt-closing-of-empty-comment\";\n ERR[\"eofInComment\"] = \"eof-in-comment\";\n ERR[\"incorrectlyClosedComment\"] = \"incorrectly-closed-comment\";\n ERR[\"eofInCdata\"] = \"eof-in-cdata\";\n ERR[\"absenceOfDigitsInNumericCharacterReference\"] = \"absence-of-digits-in-numeric-character-reference\";\n ERR[\"nullCharacterReference\"] = \"null-character-reference\";\n ERR[\"surrogateCharacterReference\"] = \"surrogate-character-reference\";\n ERR[\"characterReferenceOutsideUnicodeRange\"] = \"character-reference-outside-unicode-range\";\n ERR[\"controlCharacterReference\"] = \"control-character-reference\";\n ERR[\"noncharacterCharacterReference\"] = \"noncharacter-character-reference\";\n ERR[\"missingWhitespaceBeforeDoctypeName\"] = \"missing-whitespace-before-doctype-name\";\n ERR[\"missingDoctypeName\"] = \"missing-doctype-name\";\n ERR[\"invalidCharacterSequenceAfterDoctypeName\"] = \"invalid-character-sequence-after-doctype-name\";\n ERR[\"duplicateAttribute\"] = \"duplicate-attribute\";\n ERR[\"nonConformingDoctype\"] = \"non-conforming-doctype\";\n ERR[\"missingDoctype\"] = \"missing-doctype\";\n ERR[\"misplacedDoctype\"] = \"misplaced-doctype\";\n ERR[\"endTagWithoutMatchingOpenElement\"] = \"end-tag-without-matching-open-element\";\n ERR[\"closingOfElementWithOpenChildElements\"] = \"closing-of-element-with-open-child-elements\";\n ERR[\"disallowedContentInNoscriptInHead\"] = \"disallowed-content-in-noscript-in-head\";\n ERR[\"openElementsLeftAfterEof\"] = \"open-elements-left-after-eof\";\n ERR[\"abandonedHeadElementChild\"] = \"abandoned-head-element-child\";\n ERR[\"misplacedStartTagForHeadElement\"] = \"misplaced-start-tag-for-head-element\";\n ERR[\"nestedNoscriptInHead\"] = \"nested-noscript-in-head\";\n ERR[\"eofInElementThatCanContainOnlyText\"] = \"eof-in-element-that-can-contain-only-text\";\n})(ERR = ERR || (ERR = {}));\n//# sourceMappingURL=error-codes.js.map","import { CODE_POINTS as $, getSurrogatePairCodePoint, isControlCodePoint, isSurrogate, isSurrogatePair, isUndefinedCodePoint, } from '../common/unicode.js';\nimport { ERR } from '../common/error-codes.js';\n//Const\nconst DEFAULT_BUFFER_WATERLINE = 1 << 16;\n//Preprocessor\n//NOTE: HTML input preprocessing\n//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)\nexport class Preprocessor {\n constructor(handler) {\n this.handler = handler;\n this.html = '';\n this.pos = -1;\n // NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0\n this.lastGapPos = -2;\n this.gapStack = [];\n this.skipNextNewLine = false;\n this.lastChunkWritten = false;\n this.endOfChunkHit = false;\n this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;\n this.isEol = false;\n this.lineStartPos = 0;\n this.droppedBufferSize = 0;\n this.line = 1;\n //NOTE: avoid reporting errors twice on advance/retreat\n this.lastErrOffset = -1;\n }\n /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */\n get col() {\n return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n }\n get offset() {\n return this.droppedBufferSize + this.pos;\n }\n getError(code) {\n const { line, col, offset } = this;\n return {\n code,\n startLine: line,\n endLine: line,\n startCol: col,\n endCol: col,\n startOffset: offset,\n endOffset: offset,\n };\n }\n _err(code) {\n if (this.handler.onParseError && this.lastErrOffset !== this.offset) {\n this.lastErrOffset = this.offset;\n this.handler.onParseError(this.getError(code));\n }\n }\n _addGap() {\n this.gapStack.push(this.lastGapPos);\n this.lastGapPos = this.pos;\n }\n _processSurrogate(cp) {\n //NOTE: try to peek a surrogate pair\n if (this.pos !== this.html.length - 1) {\n const nextCp = this.html.charCodeAt(this.pos + 1);\n if (isSurrogatePair(nextCp)) {\n //NOTE: we have a surrogate pair. Peek pair character and recalculate code point.\n this.pos++;\n //NOTE: add a gap that should be avoided during retreat\n this._addGap();\n return getSurrogatePairCodePoint(cp, nextCp);\n }\n }\n //NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet.\n else if (!this.lastChunkWritten) {\n this.endOfChunkHit = true;\n return $.EOF;\n }\n //NOTE: isolated surrogate\n this._err(ERR.surrogateInInputStream);\n return cp;\n }\n willDropParsedChunk() {\n return this.pos > this.bufferWaterline;\n }\n dropParsedChunk() {\n if (this.willDropParsedChunk()) {\n this.html = this.html.substring(this.pos);\n this.lineStartPos -= this.pos;\n this.droppedBufferSize += this.pos;\n this.pos = 0;\n this.lastGapPos = -2;\n this.gapStack.length = 0;\n }\n }\n write(chunk, isLastChunk) {\n if (this.html.length > 0) {\n this.html += chunk;\n }\n else {\n this.html = chunk;\n }\n this.endOfChunkHit = false;\n this.lastChunkWritten = isLastChunk;\n }\n insertHtmlAtCurrentPos(chunk) {\n this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);\n this.endOfChunkHit = false;\n }\n startsWith(pattern, caseSensitive) {\n // Check if our buffer has enough characters\n if (this.pos + pattern.length > this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return false;\n }\n if (caseSensitive) {\n return this.html.startsWith(pattern, this.pos);\n }\n for (let i = 0; i < pattern.length; i++) {\n const cp = this.html.charCodeAt(this.pos + i) | 0x20;\n if (cp !== pattern.charCodeAt(i)) {\n return false;\n }\n }\n return true;\n }\n peek(offset) {\n const pos = this.pos + offset;\n if (pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return $.EOF;\n }\n const code = this.html.charCodeAt(pos);\n return code === $.CARRIAGE_RETURN ? $.LINE_FEED : code;\n }\n advance() {\n this.pos++;\n //NOTE: LF should be in the last column of the line\n if (this.isEol) {\n this.isEol = false;\n this.line++;\n this.lineStartPos = this.pos;\n }\n if (this.pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return $.EOF;\n }\n let cp = this.html.charCodeAt(this.pos);\n //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters\n if (cp === $.CARRIAGE_RETURN) {\n this.isEol = true;\n this.skipNextNewLine = true;\n return $.LINE_FEED;\n }\n //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character\n //must be ignored.\n if (cp === $.LINE_FEED) {\n this.isEol = true;\n if (this.skipNextNewLine) {\n // `line` will be bumped again in the recursive call.\n this.line--;\n this.skipNextNewLine = false;\n this._addGap();\n return this.advance();\n }\n }\n this.skipNextNewLine = false;\n if (isSurrogate(cp)) {\n cp = this._processSurrogate(cp);\n }\n //OPTIMIZATION: first check if code point is in the common allowed\n //range (ASCII alphanumeric, whitespaces, big chunk of BMP)\n //before going into detailed performance cost validation.\n const isCommonValidRange = this.handler.onParseError === null ||\n (cp > 0x1f && cp < 0x7f) ||\n cp === $.LINE_FEED ||\n cp === $.CARRIAGE_RETURN ||\n (cp > 0x9f && cp < 64976);\n if (!isCommonValidRange) {\n this._checkForProblematicCharacters(cp);\n }\n return cp;\n }\n _checkForProblematicCharacters(cp) {\n if (isControlCodePoint(cp)) {\n this._err(ERR.controlCharacterInInputStream);\n }\n else if (isUndefinedCodePoint(cp)) {\n this._err(ERR.noncharacterInInputStream);\n }\n }\n retreat(count) {\n this.pos -= count;\n while (this.pos < this.lastGapPos) {\n this.lastGapPos = this.gapStack.pop();\n this.pos--;\n }\n this.isEol = false;\n }\n}\n//# sourceMappingURL=preprocessor.js.map","export var TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"CHARACTER\"] = 0] = \"CHARACTER\";\n TokenType[TokenType[\"NULL_CHARACTER\"] = 1] = \"NULL_CHARACTER\";\n TokenType[TokenType[\"WHITESPACE_CHARACTER\"] = 2] = \"WHITESPACE_CHARACTER\";\n TokenType[TokenType[\"START_TAG\"] = 3] = \"START_TAG\";\n TokenType[TokenType[\"END_TAG\"] = 4] = \"END_TAG\";\n TokenType[TokenType[\"COMMENT\"] = 5] = \"COMMENT\";\n TokenType[TokenType[\"DOCTYPE\"] = 6] = \"DOCTYPE\";\n TokenType[TokenType[\"EOF\"] = 7] = \"EOF\";\n TokenType[TokenType[\"HIBERNATION\"] = 8] = \"HIBERNATION\";\n})(TokenType = TokenType || (TokenType = {}));\nexport function getTokenAttr(token, attrName) {\n for (let i = token.attrs.length - 1; i >= 0; i--) {\n if (token.attrs[i].name === attrName) {\n return token.attrs[i].value;\n }\n }\n return null;\n}\n//# sourceMappingURL=token.js.map",null,null,null,null,"/** All valid namespaces in HTML. */\nexport var NS;\n(function (NS) {\n NS[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n NS[\"MATHML\"] = \"http://www.w3.org/1998/Math/MathML\";\n NS[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n NS[\"XLINK\"] = \"http://www.w3.org/1999/xlink\";\n NS[\"XML\"] = \"http://www.w3.org/XML/1998/namespace\";\n NS[\"XMLNS\"] = \"http://www.w3.org/2000/xmlns/\";\n})(NS = NS || (NS = {}));\nexport var ATTRS;\n(function (ATTRS) {\n ATTRS[\"TYPE\"] = \"type\";\n ATTRS[\"ACTION\"] = \"action\";\n ATTRS[\"ENCODING\"] = \"encoding\";\n ATTRS[\"PROMPT\"] = \"prompt\";\n ATTRS[\"NAME\"] = \"name\";\n ATTRS[\"COLOR\"] = \"color\";\n ATTRS[\"FACE\"] = \"face\";\n ATTRS[\"SIZE\"] = \"size\";\n})(ATTRS = ATTRS || (ATTRS = {}));\n/**\n * The mode of the document.\n *\n * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}\n */\nexport var DOCUMENT_MODE;\n(function (DOCUMENT_MODE) {\n DOCUMENT_MODE[\"NO_QUIRKS\"] = \"no-quirks\";\n DOCUMENT_MODE[\"QUIRKS\"] = \"quirks\";\n DOCUMENT_MODE[\"LIMITED_QUIRKS\"] = \"limited-quirks\";\n})(DOCUMENT_MODE = DOCUMENT_MODE || (DOCUMENT_MODE = {}));\nexport var TAG_NAMES;\n(function (TAG_NAMES) {\n TAG_NAMES[\"A\"] = \"a\";\n TAG_NAMES[\"ADDRESS\"] = \"address\";\n TAG_NAMES[\"ANNOTATION_XML\"] = \"annotation-xml\";\n TAG_NAMES[\"APPLET\"] = \"applet\";\n TAG_NAMES[\"AREA\"] = \"area\";\n TAG_NAMES[\"ARTICLE\"] = \"article\";\n TAG_NAMES[\"ASIDE\"] = \"aside\";\n TAG_NAMES[\"B\"] = \"b\";\n TAG_NAMES[\"BASE\"] = \"base\";\n TAG_NAMES[\"BASEFONT\"] = \"basefont\";\n TAG_NAMES[\"BGSOUND\"] = \"bgsound\";\n TAG_NAMES[\"BIG\"] = \"big\";\n TAG_NAMES[\"BLOCKQUOTE\"] = \"blockquote\";\n TAG_NAMES[\"BODY\"] = \"body\";\n TAG_NAMES[\"BR\"] = \"br\";\n TAG_NAMES[\"BUTTON\"] = \"button\";\n TAG_NAMES[\"CAPTION\"] = \"caption\";\n TAG_NAMES[\"CENTER\"] = \"center\";\n TAG_NAMES[\"CODE\"] = \"code\";\n TAG_NAMES[\"COL\"] = \"col\";\n TAG_NAMES[\"COLGROUP\"] = \"colgroup\";\n TAG_NAMES[\"DD\"] = \"dd\";\n TAG_NAMES[\"DESC\"] = \"desc\";\n TAG_NAMES[\"DETAILS\"] = \"details\";\n TAG_NAMES[\"DIALOG\"] = \"dialog\";\n TAG_NAMES[\"DIR\"] = \"dir\";\n TAG_NAMES[\"DIV\"] = \"div\";\n TAG_NAMES[\"DL\"] = \"dl\";\n TAG_NAMES[\"DT\"] = \"dt\";\n TAG_NAMES[\"EM\"] = \"em\";\n TAG_NAMES[\"EMBED\"] = \"embed\";\n TAG_NAMES[\"FIELDSET\"] = \"fieldset\";\n TAG_NAMES[\"FIGCAPTION\"] = \"figcaption\";\n TAG_NAMES[\"FIGURE\"] = \"figure\";\n TAG_NAMES[\"FONT\"] = \"font\";\n TAG_NAMES[\"FOOTER\"] = \"footer\";\n TAG_NAMES[\"FOREIGN_OBJECT\"] = \"foreignObject\";\n TAG_NAMES[\"FORM\"] = \"form\";\n TAG_NAMES[\"FRAME\"] = \"frame\";\n TAG_NAMES[\"FRAMESET\"] = \"frameset\";\n TAG_NAMES[\"H1\"] = \"h1\";\n TAG_NAMES[\"H2\"] = \"h2\";\n TAG_NAMES[\"H3\"] = \"h3\";\n TAG_NAMES[\"H4\"] = \"h4\";\n TAG_NAMES[\"H5\"] = \"h5\";\n TAG_NAMES[\"H6\"] = \"h6\";\n TAG_NAMES[\"HEAD\"] = \"head\";\n TAG_NAMES[\"HEADER\"] = \"header\";\n TAG_NAMES[\"HGROUP\"] = \"hgroup\";\n TAG_NAMES[\"HR\"] = \"hr\";\n TAG_NAMES[\"HTML\"] = \"html\";\n TAG_NAMES[\"I\"] = \"i\";\n TAG_NAMES[\"IMG\"] = \"img\";\n TAG_NAMES[\"IMAGE\"] = \"image\";\n TAG_NAMES[\"INPUT\"] = \"input\";\n TAG_NAMES[\"IFRAME\"] = \"iframe\";\n TAG_NAMES[\"KEYGEN\"] = \"keygen\";\n TAG_NAMES[\"LABEL\"] = \"label\";\n TAG_NAMES[\"LI\"] = \"li\";\n TAG_NAMES[\"LINK\"] = \"link\";\n TAG_NAMES[\"LISTING\"] = \"listing\";\n TAG_NAMES[\"MAIN\"] = \"main\";\n TAG_NAMES[\"MALIGNMARK\"] = \"malignmark\";\n TAG_NAMES[\"MARQUEE\"] = \"marquee\";\n TAG_NAMES[\"MATH\"] = \"math\";\n TAG_NAMES[\"MENU\"] = \"menu\";\n TAG_NAMES[\"META\"] = \"meta\";\n TAG_NAMES[\"MGLYPH\"] = \"mglyph\";\n TAG_NAMES[\"MI\"] = \"mi\";\n TAG_NAMES[\"MO\"] = \"mo\";\n TAG_NAMES[\"MN\"] = \"mn\";\n TAG_NAMES[\"MS\"] = \"ms\";\n TAG_NAMES[\"MTEXT\"] = \"mtext\";\n TAG_NAMES[\"NAV\"] = \"nav\";\n TAG_NAMES[\"NOBR\"] = \"nobr\";\n TAG_NAMES[\"NOFRAMES\"] = \"noframes\";\n TAG_NAMES[\"NOEMBED\"] = \"noembed\";\n TAG_NAMES[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES[\"OBJECT\"] = \"object\";\n TAG_NAMES[\"OL\"] = \"ol\";\n TAG_NAMES[\"OPTGROUP\"] = \"optgroup\";\n TAG_NAMES[\"OPTION\"] = \"option\";\n TAG_NAMES[\"P\"] = \"p\";\n TAG_NAMES[\"PARAM\"] = \"param\";\n TAG_NAMES[\"PLAINTEXT\"] = \"plaintext\";\n TAG_NAMES[\"PRE\"] = \"pre\";\n TAG_NAMES[\"RB\"] = \"rb\";\n TAG_NAMES[\"RP\"] = \"rp\";\n TAG_NAMES[\"RT\"] = \"rt\";\n TAG_NAMES[\"RTC\"] = \"rtc\";\n TAG_NAMES[\"RUBY\"] = \"ruby\";\n TAG_NAMES[\"S\"] = \"s\";\n TAG_NAMES[\"SCRIPT\"] = \"script\";\n TAG_NAMES[\"SECTION\"] = \"section\";\n TAG_NAMES[\"SELECT\"] = \"select\";\n TAG_NAMES[\"SOURCE\"] = \"source\";\n TAG_NAMES[\"SMALL\"] = \"small\";\n TAG_NAMES[\"SPAN\"] = \"span\";\n TAG_NAMES[\"STRIKE\"] = \"strike\";\n TAG_NAMES[\"STRONG\"] = \"strong\";\n TAG_NAMES[\"STYLE\"] = \"style\";\n TAG_NAMES[\"SUB\"] = \"sub\";\n TAG_NAMES[\"SUMMARY\"] = \"summary\";\n TAG_NAMES[\"SUP\"] = \"sup\";\n TAG_NAMES[\"TABLE\"] = \"table\";\n TAG_NAMES[\"TBODY\"] = \"tbody\";\n TAG_NAMES[\"TEMPLATE\"] = \"template\";\n TAG_NAMES[\"TEXTAREA\"] = \"textarea\";\n TAG_NAMES[\"TFOOT\"] = \"tfoot\";\n TAG_NAMES[\"TD\"] = \"td\";\n TAG_NAMES[\"TH\"] = \"th\";\n TAG_NAMES[\"THEAD\"] = \"thead\";\n TAG_NAMES[\"TITLE\"] = \"title\";\n TAG_NAMES[\"TR\"] = \"tr\";\n TAG_NAMES[\"TRACK\"] = \"track\";\n TAG_NAMES[\"TT\"] = \"tt\";\n TAG_NAMES[\"U\"] = \"u\";\n TAG_NAMES[\"UL\"] = \"ul\";\n TAG_NAMES[\"SVG\"] = \"svg\";\n TAG_NAMES[\"VAR\"] = \"var\";\n TAG_NAMES[\"WBR\"] = \"wbr\";\n TAG_NAMES[\"XMP\"] = \"xmp\";\n})(TAG_NAMES = TAG_NAMES || (TAG_NAMES = {}));\n/**\n * Tag IDs are numeric IDs for known tag names.\n *\n * We use tag IDs to improve the performance of tag name comparisons.\n */\nexport var TAG_ID;\n(function (TAG_ID) {\n TAG_ID[TAG_ID[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n TAG_ID[TAG_ID[\"A\"] = 1] = \"A\";\n TAG_ID[TAG_ID[\"ADDRESS\"] = 2] = \"ADDRESS\";\n TAG_ID[TAG_ID[\"ANNOTATION_XML\"] = 3] = \"ANNOTATION_XML\";\n TAG_ID[TAG_ID[\"APPLET\"] = 4] = \"APPLET\";\n TAG_ID[TAG_ID[\"AREA\"] = 5] = \"AREA\";\n TAG_ID[TAG_ID[\"ARTICLE\"] = 6] = \"ARTICLE\";\n TAG_ID[TAG_ID[\"ASIDE\"] = 7] = \"ASIDE\";\n TAG_ID[TAG_ID[\"B\"] = 8] = \"B\";\n TAG_ID[TAG_ID[\"BASE\"] = 9] = \"BASE\";\n TAG_ID[TAG_ID[\"BASEFONT\"] = 10] = \"BASEFONT\";\n TAG_ID[TAG_ID[\"BGSOUND\"] = 11] = \"BGSOUND\";\n TAG_ID[TAG_ID[\"BIG\"] = 12] = \"BIG\";\n TAG_ID[TAG_ID[\"BLOCKQUOTE\"] = 13] = \"BLOCKQUOTE\";\n TAG_ID[TAG_ID[\"BODY\"] = 14] = \"BODY\";\n TAG_ID[TAG_ID[\"BR\"] = 15] = \"BR\";\n TAG_ID[TAG_ID[\"BUTTON\"] = 16] = \"BUTTON\";\n TAG_ID[TAG_ID[\"CAPTION\"] = 17] = \"CAPTION\";\n TAG_ID[TAG_ID[\"CENTER\"] = 18] = \"CENTER\";\n TAG_ID[TAG_ID[\"CODE\"] = 19] = \"CODE\";\n TAG_ID[TAG_ID[\"COL\"] = 20] = \"COL\";\n TAG_ID[TAG_ID[\"COLGROUP\"] = 21] = \"COLGROUP\";\n TAG_ID[TAG_ID[\"DD\"] = 22] = \"DD\";\n TAG_ID[TAG_ID[\"DESC\"] = 23] = \"DESC\";\n TAG_ID[TAG_ID[\"DETAILS\"] = 24] = \"DETAILS\";\n TAG_ID[TAG_ID[\"DIALOG\"] = 25] = \"DIALOG\";\n TAG_ID[TAG_ID[\"DIR\"] = 26] = \"DIR\";\n TAG_ID[TAG_ID[\"DIV\"] = 27] = \"DIV\";\n TAG_ID[TAG_ID[\"DL\"] = 28] = \"DL\";\n TAG_ID[TAG_ID[\"DT\"] = 29] = \"DT\";\n TAG_ID[TAG_ID[\"EM\"] = 30] = \"EM\";\n TAG_ID[TAG_ID[\"EMBED\"] = 31] = \"EMBED\";\n TAG_ID[TAG_ID[\"FIELDSET\"] = 32] = \"FIELDSET\";\n TAG_ID[TAG_ID[\"FIGCAPTION\"] = 33] = \"FIGCAPTION\";\n TAG_ID[TAG_ID[\"FIGURE\"] = 34] = \"FIGURE\";\n TAG_ID[TAG_ID[\"FONT\"] = 35] = \"FONT\";\n TAG_ID[TAG_ID[\"FOOTER\"] = 36] = \"FOOTER\";\n TAG_ID[TAG_ID[\"FOREIGN_OBJECT\"] = 37] = \"FOREIGN_OBJECT\";\n TAG_ID[TAG_ID[\"FORM\"] = 38] = \"FORM\";\n TAG_ID[TAG_ID[\"FRAME\"] = 39] = \"FRAME\";\n TAG_ID[TAG_ID[\"FRAMESET\"] = 40] = \"FRAMESET\";\n TAG_ID[TAG_ID[\"H1\"] = 41] = \"H1\";\n TAG_ID[TAG_ID[\"H2\"] = 42] = \"H2\";\n TAG_ID[TAG_ID[\"H3\"] = 43] = \"H3\";\n TAG_ID[TAG_ID[\"H4\"] = 44] = \"H4\";\n TAG_ID[TAG_ID[\"H5\"] = 45] = \"H5\";\n TAG_ID[TAG_ID[\"H6\"] = 46] = \"H6\";\n TAG_ID[TAG_ID[\"HEAD\"] = 47] = \"HEAD\";\n TAG_ID[TAG_ID[\"HEADER\"] = 48] = \"HEADER\";\n TAG_ID[TAG_ID[\"HGROUP\"] = 49] = \"HGROUP\";\n TAG_ID[TAG_ID[\"HR\"] = 50] = \"HR\";\n TAG_ID[TAG_ID[\"HTML\"] = 51] = \"HTML\";\n TAG_ID[TAG_ID[\"I\"] = 52] = \"I\";\n TAG_ID[TAG_ID[\"IMG\"] = 53] = \"IMG\";\n TAG_ID[TAG_ID[\"IMAGE\"] = 54] = \"IMAGE\";\n TAG_ID[TAG_ID[\"INPUT\"] = 55] = \"INPUT\";\n TAG_ID[TAG_ID[\"IFRAME\"] = 56] = \"IFRAME\";\n TAG_ID[TAG_ID[\"KEYGEN\"] = 57] = \"KEYGEN\";\n TAG_ID[TAG_ID[\"LABEL\"] = 58] = \"LABEL\";\n TAG_ID[TAG_ID[\"LI\"] = 59] = \"LI\";\n TAG_ID[TAG_ID[\"LINK\"] = 60] = \"LINK\";\n TAG_ID[TAG_ID[\"LISTING\"] = 61] = \"LISTING\";\n TAG_ID[TAG_ID[\"MAIN\"] = 62] = \"MAIN\";\n TAG_ID[TAG_ID[\"MALIGNMARK\"] = 63] = \"MALIGNMARK\";\n TAG_ID[TAG_ID[\"MARQUEE\"] = 64] = \"MARQUEE\";\n TAG_ID[TAG_ID[\"MATH\"] = 65] = \"MATH\";\n TAG_ID[TAG_ID[\"MENU\"] = 66] = \"MENU\";\n TAG_ID[TAG_ID[\"META\"] = 67] = \"META\";\n TAG_ID[TAG_ID[\"MGLYPH\"] = 68] = \"MGLYPH\";\n TAG_ID[TAG_ID[\"MI\"] = 69] = \"MI\";\n TAG_ID[TAG_ID[\"MO\"] = 70] = \"MO\";\n TAG_ID[TAG_ID[\"MN\"] = 71] = \"MN\";\n TAG_ID[TAG_ID[\"MS\"] = 72] = \"MS\";\n TAG_ID[TAG_ID[\"MTEXT\"] = 73] = \"MTEXT\";\n TAG_ID[TAG_ID[\"NAV\"] = 74] = \"NAV\";\n TAG_ID[TAG_ID[\"NOBR\"] = 75] = \"NOBR\";\n TAG_ID[TAG_ID[\"NOFRAMES\"] = 76] = \"NOFRAMES\";\n TAG_ID[TAG_ID[\"NOEMBED\"] = 77] = \"NOEMBED\";\n TAG_ID[TAG_ID[\"NOSCRIPT\"] = 78] = \"NOSCRIPT\";\n TAG_ID[TAG_ID[\"OBJECT\"] = 79] = \"OBJECT\";\n TAG_ID[TAG_ID[\"OL\"] = 80] = \"OL\";\n TAG_ID[TAG_ID[\"OPTGROUP\"] = 81] = \"OPTGROUP\";\n TAG_ID[TAG_ID[\"OPTION\"] = 82] = \"OPTION\";\n TAG_ID[TAG_ID[\"P\"] = 83] = \"P\";\n TAG_ID[TAG_ID[\"PARAM\"] = 84] = \"PARAM\";\n TAG_ID[TAG_ID[\"PLAINTEXT\"] = 85] = \"PLAINTEXT\";\n TAG_ID[TAG_ID[\"PRE\"] = 86] = \"PRE\";\n TAG_ID[TAG_ID[\"RB\"] = 87] = \"RB\";\n TAG_ID[TAG_ID[\"RP\"] = 88] = \"RP\";\n TAG_ID[TAG_ID[\"RT\"] = 89] = \"RT\";\n TAG_ID[TAG_ID[\"RTC\"] = 90] = \"RTC\";\n TAG_ID[TAG_ID[\"RUBY\"] = 91] = \"RUBY\";\n TAG_ID[TAG_ID[\"S\"] = 92] = \"S\";\n TAG_ID[TAG_ID[\"SCRIPT\"] = 93] = \"SCRIPT\";\n TAG_ID[TAG_ID[\"SECTION\"] = 94] = \"SECTION\";\n TAG_ID[TAG_ID[\"SELECT\"] = 95] = \"SELECT\";\n TAG_ID[TAG_ID[\"SOURCE\"] = 96] = \"SOURCE\";\n TAG_ID[TAG_ID[\"SMALL\"] = 97] = \"SMALL\";\n TAG_ID[TAG_ID[\"SPAN\"] = 98] = \"SPAN\";\n TAG_ID[TAG_ID[\"STRIKE\"] = 99] = \"STRIKE\";\n TAG_ID[TAG_ID[\"STRONG\"] = 100] = \"STRONG\";\n TAG_ID[TAG_ID[\"STYLE\"] = 101] = \"STYLE\";\n TAG_ID[TAG_ID[\"SUB\"] = 102] = \"SUB\";\n TAG_ID[TAG_ID[\"SUMMARY\"] = 103] = \"SUMMARY\";\n TAG_ID[TAG_ID[\"SUP\"] = 104] = \"SUP\";\n TAG_ID[TAG_ID[\"TABLE\"] = 105] = \"TABLE\";\n TAG_ID[TAG_ID[\"TBODY\"] = 106] = \"TBODY\";\n TAG_ID[TAG_ID[\"TEMPLATE\"] = 107] = \"TEMPLATE\";\n TAG_ID[TAG_ID[\"TEXTAREA\"] = 108] = \"TEXTAREA\";\n TAG_ID[TAG_ID[\"TFOOT\"] = 109] = \"TFOOT\";\n TAG_ID[TAG_ID[\"TD\"] = 110] = \"TD\";\n TAG_ID[TAG_ID[\"TH\"] = 111] = \"TH\";\n TAG_ID[TAG_ID[\"THEAD\"] = 112] = \"THEAD\";\n TAG_ID[TAG_ID[\"TITLE\"] = 113] = \"TITLE\";\n TAG_ID[TAG_ID[\"TR\"] = 114] = \"TR\";\n TAG_ID[TAG_ID[\"TRACK\"] = 115] = \"TRACK\";\n TAG_ID[TAG_ID[\"TT\"] = 116] = \"TT\";\n TAG_ID[TAG_ID[\"U\"] = 117] = \"U\";\n TAG_ID[TAG_ID[\"UL\"] = 118] = \"UL\";\n TAG_ID[TAG_ID[\"SVG\"] = 119] = \"SVG\";\n TAG_ID[TAG_ID[\"VAR\"] = 120] = \"VAR\";\n TAG_ID[TAG_ID[\"WBR\"] = 121] = \"WBR\";\n TAG_ID[TAG_ID[\"XMP\"] = 122] = \"XMP\";\n})(TAG_ID = TAG_ID || (TAG_ID = {}));\nconst TAG_NAME_TO_ID = new Map([\n [TAG_NAMES.A, TAG_ID.A],\n [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],\n [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],\n [TAG_NAMES.APPLET, TAG_ID.APPLET],\n [TAG_NAMES.AREA, TAG_ID.AREA],\n [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],\n [TAG_NAMES.ASIDE, TAG_ID.ASIDE],\n [TAG_NAMES.B, TAG_ID.B],\n [TAG_NAMES.BASE, TAG_ID.BASE],\n [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],\n [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],\n [TAG_NAMES.BIG, TAG_ID.BIG],\n [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],\n [TAG_NAMES.BODY, TAG_ID.BODY],\n [TAG_NAMES.BR, TAG_ID.BR],\n [TAG_NAMES.BUTTON, TAG_ID.BUTTON],\n [TAG_NAMES.CAPTION, TAG_ID.CAPTION],\n [TAG_NAMES.CENTER, TAG_ID.CENTER],\n [TAG_NAMES.CODE, TAG_ID.CODE],\n [TAG_NAMES.COL, TAG_ID.COL],\n [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],\n [TAG_NAMES.DD, TAG_ID.DD],\n [TAG_NAMES.DESC, TAG_ID.DESC],\n [TAG_NAMES.DETAILS, TAG_ID.DETAILS],\n [TAG_NAMES.DIALOG, TAG_ID.DIALOG],\n [TAG_NAMES.DIR, TAG_ID.DIR],\n [TAG_NAMES.DIV, TAG_ID.DIV],\n [TAG_NAMES.DL, TAG_ID.DL],\n [TAG_NAMES.DT, TAG_ID.DT],\n [TAG_NAMES.EM, TAG_ID.EM],\n [TAG_NAMES.EMBED, TAG_ID.EMBED],\n [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],\n [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],\n [TAG_NAMES.FIGURE, TAG_ID.FIGURE],\n [TAG_NAMES.FONT, TAG_ID.FONT],\n [TAG_NAMES.FOOTER, TAG_ID.FOOTER],\n [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],\n [TAG_NAMES.FORM, TAG_ID.FORM],\n [TAG_NAMES.FRAME, TAG_ID.FRAME],\n [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],\n [TAG_NAMES.H1, TAG_ID.H1],\n [TAG_NAMES.H2, TAG_ID.H2],\n [TAG_NAMES.H3, TAG_ID.H3],\n [TAG_NAMES.H4, TAG_ID.H4],\n [TAG_NAMES.H5, TAG_ID.H5],\n [TAG_NAMES.H6, TAG_ID.H6],\n [TAG_NAMES.HEAD, TAG_ID.HEAD],\n [TAG_NAMES.HEADER, TAG_ID.HEADER],\n [TAG_NAMES.HGROUP, TAG_ID.HGROUP],\n [TAG_NAMES.HR, TAG_ID.HR],\n [TAG_NAMES.HTML, TAG_ID.HTML],\n [TAG_NAMES.I, TAG_ID.I],\n [TAG_NAMES.IMG, TAG_ID.IMG],\n [TAG_NAMES.IMAGE, TAG_ID.IMAGE],\n [TAG_NAMES.INPUT, TAG_ID.INPUT],\n [TAG_NAMES.IFRAME, TAG_ID.IFRAME],\n [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],\n [TAG_NAMES.LABEL, TAG_ID.LABEL],\n [TAG_NAMES.LI, TAG_ID.LI],\n [TAG_NAMES.LINK, TAG_ID.LINK],\n [TAG_NAMES.LISTING, TAG_ID.LISTING],\n [TAG_NAMES.MAIN, TAG_ID.MAIN],\n [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],\n [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],\n [TAG_NAMES.MATH, TAG_ID.MATH],\n [TAG_NAMES.MENU, TAG_ID.MENU],\n [TAG_NAMES.META, TAG_ID.META],\n [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],\n [TAG_NAMES.MI, TAG_ID.MI],\n [TAG_NAMES.MO, TAG_ID.MO],\n [TAG_NAMES.MN, TAG_ID.MN],\n [TAG_NAMES.MS, TAG_ID.MS],\n [TAG_NAMES.MTEXT, TAG_ID.MTEXT],\n [TAG_NAMES.NAV, TAG_ID.NAV],\n [TAG_NAMES.NOBR, TAG_ID.NOBR],\n [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],\n [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],\n [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],\n [TAG_NAMES.OBJECT, TAG_ID.OBJECT],\n [TAG_NAMES.OL, TAG_ID.OL],\n [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],\n [TAG_NAMES.OPTION, TAG_ID.OPTION],\n [TAG_NAMES.P, TAG_ID.P],\n [TAG_NAMES.PARAM, TAG_ID.PARAM],\n [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],\n [TAG_NAMES.PRE, TAG_ID.PRE],\n [TAG_NAMES.RB, TAG_ID.RB],\n [TAG_NAMES.RP, TAG_ID.RP],\n [TAG_NAMES.RT, TAG_ID.RT],\n [TAG_NAMES.RTC, TAG_ID.RTC],\n [TAG_NAMES.RUBY, TAG_ID.RUBY],\n [TAG_NAMES.S, TAG_ID.S],\n [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],\n [TAG_NAMES.SECTION, TAG_ID.SECTION],\n [TAG_NAMES.SELECT, TAG_ID.SELECT],\n [TAG_NAMES.SOURCE, TAG_ID.SOURCE],\n [TAG_NAMES.SMALL, TAG_ID.SMALL],\n [TAG_NAMES.SPAN, TAG_ID.SPAN],\n [TAG_NAMES.STRIKE, TAG_ID.STRIKE],\n [TAG_NAMES.STRONG, TAG_ID.STRONG],\n [TAG_NAMES.STYLE, TAG_ID.STYLE],\n [TAG_NAMES.SUB, TAG_ID.SUB],\n [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],\n [TAG_NAMES.SUP, TAG_ID.SUP],\n [TAG_NAMES.TABLE, TAG_ID.TABLE],\n [TAG_NAMES.TBODY, TAG_ID.TBODY],\n [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],\n [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],\n [TAG_NAMES.TFOOT, TAG_ID.TFOOT],\n [TAG_NAMES.TD, TAG_ID.TD],\n [TAG_NAMES.TH, TAG_ID.TH],\n [TAG_NAMES.THEAD, TAG_ID.THEAD],\n [TAG_NAMES.TITLE, TAG_ID.TITLE],\n [TAG_NAMES.TR, TAG_ID.TR],\n [TAG_NAMES.TRACK, TAG_ID.TRACK],\n [TAG_NAMES.TT, TAG_ID.TT],\n [TAG_NAMES.U, TAG_ID.U],\n [TAG_NAMES.UL, TAG_ID.UL],\n [TAG_NAMES.SVG, TAG_ID.SVG],\n [TAG_NAMES.VAR, TAG_ID.VAR],\n [TAG_NAMES.WBR, TAG_ID.WBR],\n [TAG_NAMES.XMP, TAG_ID.XMP],\n]);\nexport function getTagID(tagName) {\n var _a;\n return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;\n}\nconst $ = TAG_ID;\nexport const SPECIAL_ELEMENTS = {\n [NS.HTML]: new Set([\n $.ADDRESS,\n $.APPLET,\n $.AREA,\n $.ARTICLE,\n $.ASIDE,\n $.BASE,\n $.BASEFONT,\n $.BGSOUND,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.BUTTON,\n $.CAPTION,\n $.CENTER,\n $.COL,\n $.COLGROUP,\n $.DD,\n $.DETAILS,\n $.DIR,\n $.DIV,\n $.DL,\n $.DT,\n $.EMBED,\n $.FIELDSET,\n $.FIGCAPTION,\n $.FIGURE,\n $.FOOTER,\n $.FORM,\n $.FRAME,\n $.FRAMESET,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HEADER,\n $.HGROUP,\n $.HR,\n $.HTML,\n $.IFRAME,\n $.IMG,\n $.INPUT,\n $.LI,\n $.LINK,\n $.LISTING,\n $.MAIN,\n $.MARQUEE,\n $.MENU,\n $.META,\n $.NAV,\n $.NOEMBED,\n $.NOFRAMES,\n $.NOSCRIPT,\n $.OBJECT,\n $.OL,\n $.P,\n $.PARAM,\n $.PLAINTEXT,\n $.PRE,\n $.SCRIPT,\n $.SECTION,\n $.SELECT,\n $.SOURCE,\n $.STYLE,\n $.SUMMARY,\n $.TABLE,\n $.TBODY,\n $.TD,\n $.TEMPLATE,\n $.TEXTAREA,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TITLE,\n $.TR,\n $.TRACK,\n $.UL,\n $.WBR,\n $.XMP,\n ]),\n [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]),\n [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]),\n [NS.XLINK]: new Set(),\n [NS.XML]: new Set(),\n [NS.XMLNS]: new Set(),\n};\nexport function isNumberedHeader(tn) {\n return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;\n}\nconst UNESCAPED_TEXT = new Set([\n TAG_NAMES.STYLE,\n TAG_NAMES.SCRIPT,\n TAG_NAMES.XMP,\n TAG_NAMES.IFRAME,\n TAG_NAMES.NOEMBED,\n TAG_NAMES.NOFRAMES,\n TAG_NAMES.PLAINTEXT,\n]);\nexport function hasUnescapedText(tn, scriptingEnabled) {\n return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT);\n}\n//# sourceMappingURL=html.js.map","import { Preprocessor } from './preprocessor.js';\nimport { CODE_POINTS as $, SEQUENCES as $$, REPLACEMENT_CHARACTER, isSurrogate, isUndefinedCodePoint, isControlCodePoint, } from '../common/unicode.js';\nimport { TokenType, getTokenAttr, } from '../common/token.js';\nimport { htmlDecodeTree, BinTrieFlags, determineBranch } from 'entities/lib/decode.js';\nimport { ERR } from '../common/error-codes.js';\nimport { TAG_ID, getTagID } from '../common/html.js';\n//C1 Unicode control character reference replacements\nconst C1_CONTROLS_REFERENCE_REPLACEMENTS = new Map([\n [0x80, 8364],\n [0x82, 8218],\n [0x83, 402],\n [0x84, 8222],\n [0x85, 8230],\n [0x86, 8224],\n [0x87, 8225],\n [0x88, 710],\n [0x89, 8240],\n [0x8a, 352],\n [0x8b, 8249],\n [0x8c, 338],\n [0x8e, 381],\n [0x91, 8216],\n [0x92, 8217],\n [0x93, 8220],\n [0x94, 8221],\n [0x95, 8226],\n [0x96, 8211],\n [0x97, 8212],\n [0x98, 732],\n [0x99, 8482],\n [0x9a, 353],\n [0x9b, 8250],\n [0x9c, 339],\n [0x9e, 382],\n [0x9f, 376],\n]);\n//States\nvar State;\n(function (State) {\n State[State[\"DATA\"] = 0] = \"DATA\";\n State[State[\"RCDATA\"] = 1] = \"RCDATA\";\n State[State[\"RAWTEXT\"] = 2] = \"RAWTEXT\";\n State[State[\"SCRIPT_DATA\"] = 3] = \"SCRIPT_DATA\";\n State[State[\"PLAINTEXT\"] = 4] = \"PLAINTEXT\";\n State[State[\"TAG_OPEN\"] = 5] = \"TAG_OPEN\";\n State[State[\"END_TAG_OPEN\"] = 6] = \"END_TAG_OPEN\";\n State[State[\"TAG_NAME\"] = 7] = \"TAG_NAME\";\n State[State[\"RCDATA_LESS_THAN_SIGN\"] = 8] = \"RCDATA_LESS_THAN_SIGN\";\n State[State[\"RCDATA_END_TAG_OPEN\"] = 9] = \"RCDATA_END_TAG_OPEN\";\n State[State[\"RCDATA_END_TAG_NAME\"] = 10] = \"RCDATA_END_TAG_NAME\";\n State[State[\"RAWTEXT_LESS_THAN_SIGN\"] = 11] = \"RAWTEXT_LESS_THAN_SIGN\";\n State[State[\"RAWTEXT_END_TAG_OPEN\"] = 12] = \"RAWTEXT_END_TAG_OPEN\";\n State[State[\"RAWTEXT_END_TAG_NAME\"] = 13] = \"RAWTEXT_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_LESS_THAN_SIGN\"] = 14] = \"SCRIPT_DATA_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_END_TAG_OPEN\"] = 15] = \"SCRIPT_DATA_END_TAG_OPEN\";\n State[State[\"SCRIPT_DATA_END_TAG_NAME\"] = 16] = \"SCRIPT_DATA_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_ESCAPE_START\"] = 17] = \"SCRIPT_DATA_ESCAPE_START\";\n State[State[\"SCRIPT_DATA_ESCAPE_START_DASH\"] = 18] = \"SCRIPT_DATA_ESCAPE_START_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED\"] = 19] = \"SCRIPT_DATA_ESCAPED\";\n State[State[\"SCRIPT_DATA_ESCAPED_DASH\"] = 20] = \"SCRIPT_DATA_ESCAPED_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED_DASH_DASH\"] = 21] = \"SCRIPT_DATA_ESCAPED_DASH_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\"] = 22] = \"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\"] = 23] = \"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\";\n State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_NAME\"] = 24] = \"SCRIPT_DATA_ESCAPED_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_START\"] = 25] = \"SCRIPT_DATA_DOUBLE_ESCAPE_START\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED\"] = 26] = \"SCRIPT_DATA_DOUBLE_ESCAPED\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\"] = 27] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\"] = 28] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\"] = 29] = \"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_END\"] = 30] = \"SCRIPT_DATA_DOUBLE_ESCAPE_END\";\n State[State[\"BEFORE_ATTRIBUTE_NAME\"] = 31] = \"BEFORE_ATTRIBUTE_NAME\";\n State[State[\"ATTRIBUTE_NAME\"] = 32] = \"ATTRIBUTE_NAME\";\n State[State[\"AFTER_ATTRIBUTE_NAME\"] = 33] = \"AFTER_ATTRIBUTE_NAME\";\n State[State[\"BEFORE_ATTRIBUTE_VALUE\"] = 34] = \"BEFORE_ATTRIBUTE_VALUE\";\n State[State[\"ATTRIBUTE_VALUE_DOUBLE_QUOTED\"] = 35] = \"ATTRIBUTE_VALUE_DOUBLE_QUOTED\";\n State[State[\"ATTRIBUTE_VALUE_SINGLE_QUOTED\"] = 36] = \"ATTRIBUTE_VALUE_SINGLE_QUOTED\";\n State[State[\"ATTRIBUTE_VALUE_UNQUOTED\"] = 37] = \"ATTRIBUTE_VALUE_UNQUOTED\";\n State[State[\"AFTER_ATTRIBUTE_VALUE_QUOTED\"] = 38] = \"AFTER_ATTRIBUTE_VALUE_QUOTED\";\n State[State[\"SELF_CLOSING_START_TAG\"] = 39] = \"SELF_CLOSING_START_TAG\";\n State[State[\"BOGUS_COMMENT\"] = 40] = \"BOGUS_COMMENT\";\n State[State[\"MARKUP_DECLARATION_OPEN\"] = 41] = \"MARKUP_DECLARATION_OPEN\";\n State[State[\"COMMENT_START\"] = 42] = \"COMMENT_START\";\n State[State[\"COMMENT_START_DASH\"] = 43] = \"COMMENT_START_DASH\";\n State[State[\"COMMENT\"] = 44] = \"COMMENT\";\n State[State[\"COMMENT_LESS_THAN_SIGN\"] = 45] = \"COMMENT_LESS_THAN_SIGN\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG\"] = 46] = \"COMMENT_LESS_THAN_SIGN_BANG\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH\"] = 47] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\"] = 48] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\";\n State[State[\"COMMENT_END_DASH\"] = 49] = \"COMMENT_END_DASH\";\n State[State[\"COMMENT_END\"] = 50] = \"COMMENT_END\";\n State[State[\"COMMENT_END_BANG\"] = 51] = \"COMMENT_END_BANG\";\n State[State[\"DOCTYPE\"] = 52] = \"DOCTYPE\";\n State[State[\"BEFORE_DOCTYPE_NAME\"] = 53] = \"BEFORE_DOCTYPE_NAME\";\n State[State[\"DOCTYPE_NAME\"] = 54] = \"DOCTYPE_NAME\";\n State[State[\"AFTER_DOCTYPE_NAME\"] = 55] = \"AFTER_DOCTYPE_NAME\";\n State[State[\"AFTER_DOCTYPE_PUBLIC_KEYWORD\"] = 56] = \"AFTER_DOCTYPE_PUBLIC_KEYWORD\";\n State[State[\"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\"] = 57] = \"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\";\n State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\"] = 58] = \"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\";\n State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\"] = 59] = \"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\";\n State[State[\"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\"] = 60] = \"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\";\n State[State[\"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\"] = 61] = \"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\";\n State[State[\"AFTER_DOCTYPE_SYSTEM_KEYWORD\"] = 62] = \"AFTER_DOCTYPE_SYSTEM_KEYWORD\";\n State[State[\"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\"] = 63] = \"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\";\n State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\"] = 64] = \"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\";\n State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\"] = 65] = \"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\";\n State[State[\"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\"] = 66] = \"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\";\n State[State[\"BOGUS_DOCTYPE\"] = 67] = \"BOGUS_DOCTYPE\";\n State[State[\"CDATA_SECTION\"] = 68] = \"CDATA_SECTION\";\n State[State[\"CDATA_SECTION_BRACKET\"] = 69] = \"CDATA_SECTION_BRACKET\";\n State[State[\"CDATA_SECTION_END\"] = 70] = \"CDATA_SECTION_END\";\n State[State[\"CHARACTER_REFERENCE\"] = 71] = \"CHARACTER_REFERENCE\";\n State[State[\"NAMED_CHARACTER_REFERENCE\"] = 72] = \"NAMED_CHARACTER_REFERENCE\";\n State[State[\"AMBIGUOUS_AMPERSAND\"] = 73] = \"AMBIGUOUS_AMPERSAND\";\n State[State[\"NUMERIC_CHARACTER_REFERENCE\"] = 74] = \"NUMERIC_CHARACTER_REFERENCE\";\n State[State[\"HEXADEMICAL_CHARACTER_REFERENCE_START\"] = 75] = \"HEXADEMICAL_CHARACTER_REFERENCE_START\";\n State[State[\"HEXADEMICAL_CHARACTER_REFERENCE\"] = 76] = \"HEXADEMICAL_CHARACTER_REFERENCE\";\n State[State[\"DECIMAL_CHARACTER_REFERENCE\"] = 77] = \"DECIMAL_CHARACTER_REFERENCE\";\n State[State[\"NUMERIC_CHARACTER_REFERENCE_END\"] = 78] = \"NUMERIC_CHARACTER_REFERENCE_END\";\n})(State || (State = {}));\n//Tokenizer initial states for different modes\nexport const TokenizerMode = {\n DATA: State.DATA,\n RCDATA: State.RCDATA,\n RAWTEXT: State.RAWTEXT,\n SCRIPT_DATA: State.SCRIPT_DATA,\n PLAINTEXT: State.PLAINTEXT,\n CDATA_SECTION: State.CDATA_SECTION,\n};\n//Utils\n//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline\n//this functions if they will be situated in another module due to context switch.\n//Always perform inlining check before modifying this functions ('node --trace-inlining').\nfunction isAsciiDigit(cp) {\n return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;\n}\nfunction isAsciiUpper(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;\n}\nfunction isAsciiLower(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;\n}\nfunction isAsciiLetter(cp) {\n return isAsciiLower(cp) || isAsciiUpper(cp);\n}\nfunction isAsciiAlphaNumeric(cp) {\n return isAsciiLetter(cp) || isAsciiDigit(cp);\n}\nfunction isAsciiUpperHexDigit(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_F;\n}\nfunction isAsciiLowerHexDigit(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_F;\n}\nfunction isAsciiHexDigit(cp) {\n return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);\n}\nfunction toAsciiLower(cp) {\n return cp + 32;\n}\nfunction isWhitespace(cp) {\n return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;\n}\nfunction isEntityInAttributeInvalidEnd(nextCp) {\n return nextCp === $.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);\n}\nfunction isScriptDataDoubleEscapeSequenceEnd(cp) {\n return isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN;\n}\n//Tokenizer\nexport class Tokenizer {\n constructor(options, handler) {\n this.options = options;\n this.handler = handler;\n this.paused = false;\n /** Ensures that the parsing loop isn't run multiple times at once. */\n this.inLoop = false;\n /**\n * Indicates that the current adjusted node exists, is not an element in the HTML namespace,\n * and that it is not an integration point for either MathML or HTML.\n *\n * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction}\n */\n this.inForeignNode = false;\n this.lastStartTagName = '';\n this.active = false;\n this.state = State.DATA;\n this.returnState = State.DATA;\n this.charRefCode = -1;\n this.consumedAfterSnapshot = -1;\n this.currentCharacterToken = null;\n this.currentToken = null;\n this.currentAttr = { name: '', value: '' };\n this.preprocessor = new Preprocessor(handler);\n this.currentLocation = this.getCurrentLocation(-1);\n }\n //Errors\n _err(code) {\n var _a, _b;\n (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code));\n }\n // NOTE: `offset` may never run across line boundaries.\n getCurrentLocation(offset) {\n if (!this.options.sourceCodeLocationInfo) {\n return null;\n }\n return {\n startLine: this.preprocessor.line,\n startCol: this.preprocessor.col - offset,\n startOffset: this.preprocessor.offset - offset,\n endLine: -1,\n endCol: -1,\n endOffset: -1,\n };\n }\n _runParsingLoop() {\n if (this.inLoop)\n return;\n this.inLoop = true;\n while (this.active && !this.paused) {\n this.consumedAfterSnapshot = 0;\n const cp = this._consume();\n if (!this._ensureHibernation()) {\n this._callState(cp);\n }\n }\n this.inLoop = false;\n }\n //API\n pause() {\n this.paused = true;\n }\n resume(writeCallback) {\n if (!this.paused) {\n throw new Error('Parser was already resumed');\n }\n this.paused = false;\n // Necessary for synchronous resume.\n if (this.inLoop)\n return;\n this._runParsingLoop();\n if (!this.paused) {\n writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n }\n }\n write(chunk, isLastChunk, writeCallback) {\n this.active = true;\n this.preprocessor.write(chunk, isLastChunk);\n this._runParsingLoop();\n if (!this.paused) {\n writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n }\n }\n insertHtmlAtCurrentPos(chunk) {\n this.active = true;\n this.preprocessor.insertHtmlAtCurrentPos(chunk);\n this._runParsingLoop();\n }\n //Hibernation\n _ensureHibernation() {\n if (this.preprocessor.endOfChunkHit) {\n this._unconsume(this.consumedAfterSnapshot);\n this.active = false;\n return true;\n }\n return false;\n }\n //Consumption\n _consume() {\n this.consumedAfterSnapshot++;\n return this.preprocessor.advance();\n }\n _unconsume(count) {\n this.consumedAfterSnapshot -= count;\n this.preprocessor.retreat(count);\n }\n _reconsumeInState(state, cp) {\n this.state = state;\n this._callState(cp);\n }\n _advanceBy(count) {\n this.consumedAfterSnapshot += count;\n for (let i = 0; i < count; i++) {\n this.preprocessor.advance();\n }\n }\n _consumeSequenceIfMatch(pattern, caseSensitive) {\n if (this.preprocessor.startsWith(pattern, caseSensitive)) {\n // We will already have consumed one character before calling this method.\n this._advanceBy(pattern.length - 1);\n return true;\n }\n return false;\n }\n //Token creation\n _createStartTagToken() {\n this.currentToken = {\n type: TokenType.START_TAG,\n tagName: '',\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(1),\n };\n }\n _createEndTagToken() {\n this.currentToken = {\n type: TokenType.END_TAG,\n tagName: '',\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(2),\n };\n }\n _createCommentToken(offset) {\n this.currentToken = {\n type: TokenType.COMMENT,\n data: '',\n location: this.getCurrentLocation(offset),\n };\n }\n _createDoctypeToken(initialName) {\n this.currentToken = {\n type: TokenType.DOCTYPE,\n name: initialName,\n forceQuirks: false,\n publicId: null,\n systemId: null,\n location: this.currentLocation,\n };\n }\n _createCharacterToken(type, chars) {\n this.currentCharacterToken = {\n type,\n chars,\n location: this.currentLocation,\n };\n }\n //Tag attributes\n _createAttr(attrNameFirstCh) {\n this.currentAttr = {\n name: attrNameFirstCh,\n value: '',\n };\n this.currentLocation = this.getCurrentLocation(0);\n }\n _leaveAttrName() {\n var _a;\n var _b;\n const token = this.currentToken;\n if (getTokenAttr(token, this.currentAttr.name) === null) {\n token.attrs.push(this.currentAttr);\n if (token.location && this.currentLocation) {\n const attrLocations = ((_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : (_b.attrs = Object.create(null)));\n attrLocations[this.currentAttr.name] = this.currentLocation;\n // Set end location\n this._leaveAttrValue();\n }\n }\n else {\n this._err(ERR.duplicateAttribute);\n }\n }\n _leaveAttrValue() {\n if (this.currentLocation) {\n this.currentLocation.endLine = this.preprocessor.line;\n this.currentLocation.endCol = this.preprocessor.col;\n this.currentLocation.endOffset = this.preprocessor.offset;\n }\n }\n //Token emission\n prepareToken(ct) {\n this._emitCurrentCharacterToken(ct.location);\n this.currentToken = null;\n if (ct.location) {\n ct.location.endLine = this.preprocessor.line;\n ct.location.endCol = this.preprocessor.col + 1;\n ct.location.endOffset = this.preprocessor.offset + 1;\n }\n this.currentLocation = this.getCurrentLocation(-1);\n }\n emitCurrentTagToken() {\n const ct = this.currentToken;\n this.prepareToken(ct);\n ct.tagID = getTagID(ct.tagName);\n if (ct.type === TokenType.START_TAG) {\n this.lastStartTagName = ct.tagName;\n this.handler.onStartTag(ct);\n }\n else {\n if (ct.attrs.length > 0) {\n this._err(ERR.endTagWithAttributes);\n }\n if (ct.selfClosing) {\n this._err(ERR.endTagWithTrailingSolidus);\n }\n this.handler.onEndTag(ct);\n }\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentComment(ct) {\n this.prepareToken(ct);\n this.handler.onComment(ct);\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentDoctype(ct) {\n this.prepareToken(ct);\n this.handler.onDoctype(ct);\n this.preprocessor.dropParsedChunk();\n }\n _emitCurrentCharacterToken(nextLocation) {\n if (this.currentCharacterToken) {\n //NOTE: if we have a pending character token, make it's end location equal to the\n //current token's start location.\n if (nextLocation && this.currentCharacterToken.location) {\n this.currentCharacterToken.location.endLine = nextLocation.startLine;\n this.currentCharacterToken.location.endCol = nextLocation.startCol;\n this.currentCharacterToken.location.endOffset = nextLocation.startOffset;\n }\n switch (this.currentCharacterToken.type) {\n case TokenType.CHARACTER: {\n this.handler.onCharacter(this.currentCharacterToken);\n break;\n }\n case TokenType.NULL_CHARACTER: {\n this.handler.onNullCharacter(this.currentCharacterToken);\n break;\n }\n case TokenType.WHITESPACE_CHARACTER: {\n this.handler.onWhitespaceCharacter(this.currentCharacterToken);\n break;\n }\n }\n this.currentCharacterToken = null;\n }\n }\n _emitEOFToken() {\n const location = this.getCurrentLocation(0);\n if (location) {\n location.endLine = location.startLine;\n location.endCol = location.startCol;\n location.endOffset = location.startOffset;\n }\n this._emitCurrentCharacterToken(location);\n this.handler.onEof({ type: TokenType.EOF, location });\n this.active = false;\n }\n //Characters emission\n //OPTIMIZATION: specification uses only one type of character tokens (one token per character).\n //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.\n //If we have a sequence of characters that belong to the same group, the parser can process it\n //as a single solid character token.\n //So, there are 3 types of character tokens in parse5:\n //1)TokenType.NULL_CHARACTER - \\u0000-character sequences (e.g. '\\u0000\\u0000\\u0000')\n //2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\\n \\r\\t \\f')\n //3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')\n _appendCharToCurrentCharacterToken(type, ch) {\n if (this.currentCharacterToken) {\n if (this.currentCharacterToken.type !== type) {\n this.currentLocation = this.getCurrentLocation(0);\n this._emitCurrentCharacterToken(this.currentLocation);\n this.preprocessor.dropParsedChunk();\n }\n else {\n this.currentCharacterToken.chars += ch;\n return;\n }\n }\n this._createCharacterToken(type, ch);\n }\n _emitCodePoint(cp) {\n const type = isWhitespace(cp)\n ? TokenType.WHITESPACE_CHARACTER\n : cp === $.NULL\n ? TokenType.NULL_CHARACTER\n : TokenType.CHARACTER;\n this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));\n }\n //NOTE: used when we emit characters explicitly.\n //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.\n _emitChars(ch) {\n this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);\n }\n // Character reference helpers\n _matchNamedCharacterReference(cp) {\n let result = null;\n let excess = 0;\n let withoutSemicolon = false;\n for (let i = 0, current = htmlDecodeTree[0]; i >= 0; cp = this._consume()) {\n i = determineBranch(htmlDecodeTree, current, i + 1, cp);\n if (i < 0)\n break;\n excess += 1;\n current = htmlDecodeTree[i];\n const masked = current & BinTrieFlags.VALUE_LENGTH;\n // If the branch is a value, store it and continue\n if (masked) {\n // The mask is the number of bytes of the value, including the current byte.\n const valueLength = (masked >> 14) - 1;\n // Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n // See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n if (cp !== $.SEMICOLON &&\n this._isCharacterReferenceInAttribute() &&\n isEntityInAttributeInvalidEnd(this.preprocessor.peek(1))) {\n //NOTE: we don't flush all consumed code points here, and instead switch back to the original state after\n //emitting an ampersand. This is fine, as alphanumeric characters won't be parsed differently in attributes.\n result = [$.AMPERSAND];\n // Skip over the value.\n i += valueLength;\n }\n else {\n // If this is a surrogate pair, consume the next two bytes.\n result =\n valueLength === 0\n ? [htmlDecodeTree[i] & ~BinTrieFlags.VALUE_LENGTH]\n : valueLength === 1\n ? [htmlDecodeTree[++i]]\n : [htmlDecodeTree[++i], htmlDecodeTree[++i]];\n excess = 0;\n withoutSemicolon = cp !== $.SEMICOLON;\n }\n if (valueLength === 0) {\n // If the value is zero-length, we're done.\n this._consume();\n break;\n }\n }\n }\n this._unconsume(excess);\n if (withoutSemicolon && !this.preprocessor.endOfChunkHit) {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n }\n // We want to emit the error above on the code point after the entity.\n // We always consume one code point too many in the loop, and we wait to\n // unconsume it until after the error is emitted.\n this._unconsume(1);\n return result;\n }\n _isCharacterReferenceInAttribute() {\n return (this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED ||\n this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED ||\n this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED);\n }\n _flushCodePointConsumedAsCharacterReference(cp) {\n if (this._isCharacterReferenceInAttribute()) {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n else {\n this._emitCodePoint(cp);\n }\n }\n // Calling states this way turns out to be much faster than any other approach.\n _callState(cp) {\n switch (this.state) {\n case State.DATA: {\n this._stateData(cp);\n break;\n }\n case State.RCDATA: {\n this._stateRcdata(cp);\n break;\n }\n case State.RAWTEXT: {\n this._stateRawtext(cp);\n break;\n }\n case State.SCRIPT_DATA: {\n this._stateScriptData(cp);\n break;\n }\n case State.PLAINTEXT: {\n this._statePlaintext(cp);\n break;\n }\n case State.TAG_OPEN: {\n this._stateTagOpen(cp);\n break;\n }\n case State.END_TAG_OPEN: {\n this._stateEndTagOpen(cp);\n break;\n }\n case State.TAG_NAME: {\n this._stateTagName(cp);\n break;\n }\n case State.RCDATA_LESS_THAN_SIGN: {\n this._stateRcdataLessThanSign(cp);\n break;\n }\n case State.RCDATA_END_TAG_OPEN: {\n this._stateRcdataEndTagOpen(cp);\n break;\n }\n case State.RCDATA_END_TAG_NAME: {\n this._stateRcdataEndTagName(cp);\n break;\n }\n case State.RAWTEXT_LESS_THAN_SIGN: {\n this._stateRawtextLessThanSign(cp);\n break;\n }\n case State.RAWTEXT_END_TAG_OPEN: {\n this._stateRawtextEndTagOpen(cp);\n break;\n }\n case State.RAWTEXT_END_TAG_NAME: {\n this._stateRawtextEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_LESS_THAN_SIGN: {\n this._stateScriptDataLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_END_TAG_OPEN: {\n this._stateScriptDataEndTagOpen(cp);\n break;\n }\n case State.SCRIPT_DATA_END_TAG_NAME: {\n this._stateScriptDataEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPE_START: {\n this._stateScriptDataEscapeStart(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPE_START_DASH: {\n this._stateScriptDataEscapeStartDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED: {\n this._stateScriptDataEscaped(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_DASH: {\n this._stateScriptDataEscapedDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {\n this._stateScriptDataEscapedDashDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {\n this._stateScriptDataEscapedLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {\n this._stateScriptDataEscapedEndTagOpen(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {\n this._stateScriptDataEscapedEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {\n this._stateScriptDataDoubleEscapeStart(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED: {\n this._stateScriptDataDoubleEscaped(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {\n this._stateScriptDataDoubleEscapedDash(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {\n this._stateScriptDataDoubleEscapedDashDash(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {\n this._stateScriptDataDoubleEscapedLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {\n this._stateScriptDataDoubleEscapeEnd(cp);\n break;\n }\n case State.BEFORE_ATTRIBUTE_NAME: {\n this._stateBeforeAttributeName(cp);\n break;\n }\n case State.ATTRIBUTE_NAME: {\n this._stateAttributeName(cp);\n break;\n }\n case State.AFTER_ATTRIBUTE_NAME: {\n this._stateAfterAttributeName(cp);\n break;\n }\n case State.BEFORE_ATTRIBUTE_VALUE: {\n this._stateBeforeAttributeValue(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {\n this._stateAttributeValueDoubleQuoted(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {\n this._stateAttributeValueSingleQuoted(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_UNQUOTED: {\n this._stateAttributeValueUnquoted(cp);\n break;\n }\n case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {\n this._stateAfterAttributeValueQuoted(cp);\n break;\n }\n case State.SELF_CLOSING_START_TAG: {\n this._stateSelfClosingStartTag(cp);\n break;\n }\n case State.BOGUS_COMMENT: {\n this._stateBogusComment(cp);\n break;\n }\n case State.MARKUP_DECLARATION_OPEN: {\n this._stateMarkupDeclarationOpen(cp);\n break;\n }\n case State.COMMENT_START: {\n this._stateCommentStart(cp);\n break;\n }\n case State.COMMENT_START_DASH: {\n this._stateCommentStartDash(cp);\n break;\n }\n case State.COMMENT: {\n this._stateComment(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN: {\n this._stateCommentLessThanSign(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG: {\n this._stateCommentLessThanSignBang(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {\n this._stateCommentLessThanSignBangDash(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {\n this._stateCommentLessThanSignBangDashDash(cp);\n break;\n }\n case State.COMMENT_END_DASH: {\n this._stateCommentEndDash(cp);\n break;\n }\n case State.COMMENT_END: {\n this._stateCommentEnd(cp);\n break;\n }\n case State.COMMENT_END_BANG: {\n this._stateCommentEndBang(cp);\n break;\n }\n case State.DOCTYPE: {\n this._stateDoctype(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_NAME: {\n this._stateBeforeDoctypeName(cp);\n break;\n }\n case State.DOCTYPE_NAME: {\n this._stateDoctypeName(cp);\n break;\n }\n case State.AFTER_DOCTYPE_NAME: {\n this._stateAfterDoctypeName(cp);\n break;\n }\n case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {\n this._stateAfterDoctypePublicKeyword(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {\n this._stateBeforeDoctypePublicIdentifier(cp);\n break;\n }\n case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {\n this._stateDoctypePublicIdentifierDoubleQuoted(cp);\n break;\n }\n case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {\n this._stateDoctypePublicIdentifierSingleQuoted(cp);\n break;\n }\n case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {\n this._stateAfterDoctypePublicIdentifier(cp);\n break;\n }\n case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {\n this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);\n break;\n }\n case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {\n this._stateAfterDoctypeSystemKeyword(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {\n this._stateBeforeDoctypeSystemIdentifier(cp);\n break;\n }\n case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {\n this._stateDoctypeSystemIdentifierDoubleQuoted(cp);\n break;\n }\n case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {\n this._stateDoctypeSystemIdentifierSingleQuoted(cp);\n break;\n }\n case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {\n this._stateAfterDoctypeSystemIdentifier(cp);\n break;\n }\n case State.BOGUS_DOCTYPE: {\n this._stateBogusDoctype(cp);\n break;\n }\n case State.CDATA_SECTION: {\n this._stateCdataSection(cp);\n break;\n }\n case State.CDATA_SECTION_BRACKET: {\n this._stateCdataSectionBracket(cp);\n break;\n }\n case State.CDATA_SECTION_END: {\n this._stateCdataSectionEnd(cp);\n break;\n }\n case State.CHARACTER_REFERENCE: {\n this._stateCharacterReference(cp);\n break;\n }\n case State.NAMED_CHARACTER_REFERENCE: {\n this._stateNamedCharacterReference(cp);\n break;\n }\n case State.AMBIGUOUS_AMPERSAND: {\n this._stateAmbiguousAmpersand(cp);\n break;\n }\n case State.NUMERIC_CHARACTER_REFERENCE: {\n this._stateNumericCharacterReference(cp);\n break;\n }\n case State.HEXADEMICAL_CHARACTER_REFERENCE_START: {\n this._stateHexademicalCharacterReferenceStart(cp);\n break;\n }\n case State.HEXADEMICAL_CHARACTER_REFERENCE: {\n this._stateHexademicalCharacterReference(cp);\n break;\n }\n case State.DECIMAL_CHARACTER_REFERENCE: {\n this._stateDecimalCharacterReference(cp);\n break;\n }\n case State.NUMERIC_CHARACTER_REFERENCE_END: {\n this._stateNumericCharacterReferenceEnd(cp);\n break;\n }\n default: {\n throw new Error('Unknown state');\n }\n }\n }\n // State machine\n // Data state\n //------------------------------------------------------------------\n _stateData(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.TAG_OPEN;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.DATA;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitCodePoint(cp);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // RCDATA state\n //------------------------------------------------------------------\n _stateRcdata(cp) {\n switch (cp) {\n case $.AMPERSAND: {\n this.returnState = State.RCDATA;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.RCDATA_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // RAWTEXT state\n //------------------------------------------------------------------\n _stateRawtext(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.RAWTEXT_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data state\n //------------------------------------------------------------------\n _stateScriptData(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // PLAINTEXT state\n //------------------------------------------------------------------\n _statePlaintext(cp) {\n switch (cp) {\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Tag open state\n //------------------------------------------------------------------\n _stateTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createStartTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n }\n else\n switch (cp) {\n case $.EXCLAMATION_MARK: {\n this.state = State.MARKUP_DECLARATION_OPEN;\n break;\n }\n case $.SOLIDUS: {\n this.state = State.END_TAG_OPEN;\n break;\n }\n case $.QUESTION_MARK: {\n this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n this._createCommentToken(1);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('<');\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._emitChars('<');\n this.state = State.DATA;\n this._stateData(cp);\n }\n }\n }\n // End tag open state\n //------------------------------------------------------------------\n _stateEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createEndTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n }\n else\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingEndTagName);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data escaped less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataEscapedLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;\n }\n else if (isAsciiLetter(cp)) {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;\n this._stateScriptDataDoubleEscapeStart(cp);\n }\n else {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n // Script data escaped end tag open state\n //------------------------------------------------------------------\n _stateScriptDataEscapedEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;\n this._stateScriptDataEscapedEndTagName(cp);\n }\n else {\n this._emitChars('');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data double escaped less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapedLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;\n this._emitChars('/');\n }\n else {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n // Script data double escape end state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapeEnd(cp) {\n if (this.preprocessor.startsWith($$.SCRIPT, false) &&\n isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek($$.SCRIPT.length))) {\n this._emitCodePoint(cp);\n for (let i = 0; i < $$.SCRIPT.length; i++) {\n this._emitCodePoint(this._consume());\n }\n this.state = State.SCRIPT_DATA_ESCAPED;\n }\n else if (!this._ensureHibernation()) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n // Before attribute name state\n //------------------------------------------------------------------\n _stateBeforeAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.SOLIDUS:\n case $.GREATER_THAN_SIGN:\n case $.EOF: {\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n }\n case $.EQUALS_SIGN: {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = State.ATTRIBUTE_NAME;\n break;\n }\n default: {\n this._createAttr('');\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n }\n // Attribute name state\n //------------------------------------------------------------------\n _stateAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED:\n case $.SOLIDUS:\n case $.GREATER_THAN_SIGN:\n case $.EOF: {\n this._leaveAttrName();\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n }\n case $.EQUALS_SIGN: {\n this._leaveAttrName();\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n }\n case $.QUOTATION_MARK:\n case $.APOSTROPHE:\n case $.LESS_THAN_SIGN: {\n this._err(ERR.unexpectedCharacterInAttributeName);\n this.currentAttr.name += String.fromCodePoint(cp);\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.name += REPLACEMENT_CHARACTER;\n break;\n }\n default: {\n this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // After attribute name state\n //------------------------------------------------------------------\n _stateAfterAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.SOLIDUS: {\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.EQUALS_SIGN: {\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._createAttr('');\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n }\n // Before attribute value state\n //------------------------------------------------------------------\n _stateBeforeAttributeValue(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingAttributeValue);\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n default: {\n this.state = State.ATTRIBUTE_VALUE_UNQUOTED;\n this._stateAttributeValueUnquoted(cp);\n }\n }\n }\n // Attribute value (double-quoted) state\n //------------------------------------------------------------------\n _stateAttributeValueDoubleQuoted(cp) {\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // Attribute value (single-quoted) state\n //------------------------------------------------------------------\n _stateAttributeValueSingleQuoted(cp) {\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // Attribute value (unquoted) state\n //------------------------------------------------------------------\n _stateAttributeValueUnquoted(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.AMPERSAND: {\n this.returnState = State.ATTRIBUTE_VALUE_UNQUOTED;\n this.state = State.CHARACTER_REFERENCE;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.QUOTATION_MARK:\n case $.APOSTROPHE:\n case $.LESS_THAN_SIGN:\n case $.EQUALS_SIGN:\n case $.GRAVE_ACCENT: {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += String.fromCodePoint(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // After attribute value (quoted) state\n //------------------------------------------------------------------\n _stateAfterAttributeValueQuoted(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.SOLIDUS: {\n this._leaveAttrValue();\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingWhitespaceBetweenAttributes);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n }\n // Self-closing start tag state\n //------------------------------------------------------------------\n _stateSelfClosingStartTag(cp) {\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n const token = this.currentToken;\n token.selfClosing = true;\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.unexpectedSolidusInTag);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n }\n // Bogus comment state\n //------------------------------------------------------------------\n _stateBogusComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n }\n default: {\n token.data += String.fromCodePoint(cp);\n }\n }\n }\n // Markup declaration open state\n //------------------------------------------------------------------\n _stateMarkupDeclarationOpen(cp) {\n if (this._consumeSequenceIfMatch($$.DASH_DASH, true)) {\n this._createCommentToken($$.DASH_DASH.length + 1);\n this.state = State.COMMENT_START;\n }\n else if (this._consumeSequenceIfMatch($$.DOCTYPE, false)) {\n // NOTE: Doctypes tokens are created without fixed offsets. We keep track of the moment a doctype *might* start here.\n this.currentLocation = this.getCurrentLocation($$.DOCTYPE.length + 1);\n this.state = State.DOCTYPE;\n }\n else if (this._consumeSequenceIfMatch($$.CDATA_START, true)) {\n if (this.inForeignNode) {\n this.state = State.CDATA_SECTION;\n }\n else {\n this._err(ERR.cdataInHtmlContent);\n this._createCommentToken($$.CDATA_START.length + 1);\n this.currentToken.data = '[CDATA[';\n this.state = State.BOGUS_COMMENT;\n }\n }\n //NOTE: Sequence lookups can be abrupted by hibernation. In that case, lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.incorrectlyOpenedComment);\n this._createCommentToken(2);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n }\n }\n // Comment start state\n //------------------------------------------------------------------\n _stateCommentStart(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_START_DASH;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n const token = this.currentToken;\n this.emitCurrentComment(token);\n break;\n }\n default: {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment start dash state\n //------------------------------------------------------------------\n _stateCommentStartDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '-';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment state\n //------------------------------------------------------------------\n _stateComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END_DASH;\n break;\n }\n case $.LESS_THAN_SIGN: {\n token.data += '<';\n this.state = State.COMMENT_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += String.fromCodePoint(cp);\n }\n }\n }\n // Comment less-than sign state\n //------------------------------------------------------------------\n _stateCommentLessThanSign(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.EXCLAMATION_MARK: {\n token.data += '!';\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG;\n break;\n }\n case $.LESS_THAN_SIGN: {\n token.data += '<';\n break;\n }\n default: {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment less-than sign bang state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBang(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;\n }\n else {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n // Comment less-than sign bang dash state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBangDash(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;\n }\n else {\n this.state = State.COMMENT_END_DASH;\n this._stateCommentEndDash(cp);\n }\n }\n // Comment less-than sign bang dash dash state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBangDashDash(cp) {\n if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) {\n this._err(ERR.nestedComment);\n }\n this.state = State.COMMENT_END;\n this._stateCommentEnd(cp);\n }\n // Comment end dash state\n //------------------------------------------------------------------\n _stateCommentEndDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '-';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment end state\n //------------------------------------------------------------------\n _stateCommentEnd(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EXCLAMATION_MARK: {\n this.state = State.COMMENT_END_BANG;\n break;\n }\n case $.HYPHEN_MINUS: {\n token.data += '-';\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '--';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment end bang state\n //------------------------------------------------------------------\n _stateCommentEndBang(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n token.data += '--!';\n this.state = State.COMMENT_END_DASH;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.incorrectlyClosedComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '--!';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // DOCTYPE state\n //------------------------------------------------------------------\n _stateDoctype(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingWhitespaceBeforeDoctypeName);\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n }\n }\n }\n // Before DOCTYPE name state\n //------------------------------------------------------------------\n _stateBeforeDoctypeName(cp) {\n if (isAsciiUpper(cp)) {\n this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));\n this.state = State.DOCTYPE_NAME;\n }\n else\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._createDoctypeToken(REPLACEMENT_CHARACTER);\n this.state = State.DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeName);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._createDoctypeToken(String.fromCodePoint(cp));\n this.state = State.DOCTYPE_NAME;\n }\n }\n }\n // DOCTYPE name state\n //------------------------------------------------------------------\n _stateDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.AFTER_DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.name += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // After DOCTYPE name state\n //------------------------------------------------------------------\n _stateAfterDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n if (this._consumeSequenceIfMatch($$.PUBLIC, false)) {\n this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;\n }\n else if (this._consumeSequenceIfMatch($$.SYSTEM, false)) {\n this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;\n }\n //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n }\n // After DOCTYPE public keyword state\n //------------------------------------------------------------------\n _stateAfterDoctypePublicKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Before DOCTYPE public identifier state\n //------------------------------------------------------------------\n _stateBeforeDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // DOCTYPE public identifier (double-quoted) state\n //------------------------------------------------------------------\n _stateDoctypePublicIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }\n // DOCTYPE public identifier (single-quoted) state\n //------------------------------------------------------------------\n _stateDoctypePublicIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }\n // After DOCTYPE public identifier state\n //------------------------------------------------------------------\n _stateAfterDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Between DOCTYPE public and system identifiers state\n //------------------------------------------------------------------\n _stateBetweenDoctypePublicAndSystemIdentifiers(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.QUOTATION_MARK: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // After DOCTYPE system keyword state\n //------------------------------------------------------------------\n _stateAfterDoctypeSystemKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Before DOCTYPE system identifier state\n //------------------------------------------------------------------\n _stateBeforeDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // DOCTYPE system identifier (double-quoted) state\n //------------------------------------------------------------------\n _stateDoctypeSystemIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }\n // DOCTYPE system identifier (single-quoted) state\n //------------------------------------------------------------------\n _stateDoctypeSystemIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }\n // After DOCTYPE system identifier state\n //------------------------------------------------------------------\n _stateAfterDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Bogus DOCTYPE state\n //------------------------------------------------------------------\n _stateBogusDoctype(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n break;\n }\n case $.EOF: {\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default:\n // Do nothing\n }\n }\n // CDATA section state\n //------------------------------------------------------------------\n _stateCdataSection(cp) {\n switch (cp) {\n case $.RIGHT_SQUARE_BRACKET: {\n this.state = State.CDATA_SECTION_BRACKET;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInCdata);\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // CDATA section bracket state\n //------------------------------------------------------------------\n _stateCdataSectionBracket(cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = State.CDATA_SECTION_END;\n }\n else {\n this._emitChars(']');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n // CDATA section end state\n //------------------------------------------------------------------\n _stateCdataSectionEnd(cp) {\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n break;\n }\n case $.RIGHT_SQUARE_BRACKET: {\n this._emitChars(']');\n break;\n }\n default: {\n this._emitChars(']]');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n }\n // Character reference state\n //------------------------------------------------------------------\n _stateCharacterReference(cp) {\n if (cp === $.NUMBER_SIGN) {\n this.state = State.NUMERIC_CHARACTER_REFERENCE;\n }\n else if (isAsciiAlphaNumeric(cp)) {\n this.state = State.NAMED_CHARACTER_REFERENCE;\n this._stateNamedCharacterReference(cp);\n }\n else {\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this._reconsumeInState(this.returnState, cp);\n }\n }\n // Named character reference state\n //------------------------------------------------------------------\n _stateNamedCharacterReference(cp) {\n const matchResult = this._matchNamedCharacterReference(cp);\n //NOTE: Matching can be abrupted by hibernation. In that case, match\n //results are no longer valid and we will need to start over.\n if (this._ensureHibernation()) {\n // Stay in the state, try again.\n }\n else if (matchResult) {\n for (let i = 0; i < matchResult.length; i++) {\n this._flushCodePointConsumedAsCharacterReference(matchResult[i]);\n }\n this.state = this.returnState;\n }\n else {\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this.state = State.AMBIGUOUS_AMPERSAND;\n }\n }\n // Ambiguos ampersand state\n //------------------------------------------------------------------\n _stateAmbiguousAmpersand(cp) {\n if (isAsciiAlphaNumeric(cp)) {\n this._flushCodePointConsumedAsCharacterReference(cp);\n }\n else {\n if (cp === $.SEMICOLON) {\n this._err(ERR.unknownNamedCharacterReference);\n }\n this._reconsumeInState(this.returnState, cp);\n }\n }\n // Numeric character reference state\n //------------------------------------------------------------------\n _stateNumericCharacterReference(cp) {\n this.charRefCode = 0;\n if (cp === $.LATIN_SMALL_X || cp === $.LATIN_CAPITAL_X) {\n this.state = State.HEXADEMICAL_CHARACTER_REFERENCE_START;\n }\n // Inlined decimal character reference start state\n else if (isAsciiDigit(cp)) {\n this.state = State.DECIMAL_CHARACTER_REFERENCE;\n this._stateDecimalCharacterReference(cp);\n }\n else {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this._flushCodePointConsumedAsCharacterReference($.NUMBER_SIGN);\n this._reconsumeInState(this.returnState, cp);\n }\n }\n // Hexademical character reference start state\n //------------------------------------------------------------------\n _stateHexademicalCharacterReferenceStart(cp) {\n if (isAsciiHexDigit(cp)) {\n this.state = State.HEXADEMICAL_CHARACTER_REFERENCE;\n this._stateHexademicalCharacterReference(cp);\n }\n else {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this._flushCodePointConsumedAsCharacterReference($.NUMBER_SIGN);\n this._unconsume(2);\n this.state = this.returnState;\n }\n }\n // Hexademical character reference state\n //------------------------------------------------------------------\n _stateHexademicalCharacterReference(cp) {\n if (isAsciiUpperHexDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x37;\n }\n else if (isAsciiLowerHexDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x57;\n }\n else if (isAsciiDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x30;\n }\n else if (cp === $.SEMICOLON) {\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n }\n else {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n this._stateNumericCharacterReferenceEnd(cp);\n }\n }\n // Decimal character reference state\n //------------------------------------------------------------------\n _stateDecimalCharacterReference(cp) {\n if (isAsciiDigit(cp)) {\n this.charRefCode = this.charRefCode * 10 + cp - 0x30;\n }\n else if (cp === $.SEMICOLON) {\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n }\n else {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n this.state = State.NUMERIC_CHARACTER_REFERENCE_END;\n this._stateNumericCharacterReferenceEnd(cp);\n }\n }\n // Numeric character reference end state\n //------------------------------------------------------------------\n _stateNumericCharacterReferenceEnd(cp) {\n if (this.charRefCode === $.NULL) {\n this._err(ERR.nullCharacterReference);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n }\n else if (this.charRefCode > 1114111) {\n this._err(ERR.characterReferenceOutsideUnicodeRange);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n }\n else if (isSurrogate(this.charRefCode)) {\n this._err(ERR.surrogateCharacterReference);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n }\n else if (isUndefinedCodePoint(this.charRefCode)) {\n this._err(ERR.noncharacterCharacterReference);\n }\n else if (isControlCodePoint(this.charRefCode) || this.charRefCode === $.CARRIAGE_RETURN) {\n this._err(ERR.controlCharacterReference);\n const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);\n if (replacement !== undefined) {\n this.charRefCode = replacement;\n }\n }\n this._flushCodePointConsumedAsCharacterReference(this.charRefCode);\n this._reconsumeInState(this.returnState, cp);\n }\n}\n//# sourceMappingURL=index.js.map","import { TAG_ID as $, NS, isNumberedHeader } from '../common/html.js';\n//Element utils\nconst IMPLICIT_END_TAG_REQUIRED = new Set([$.DD, $.DT, $.LI, $.OPTGROUP, $.OPTION, $.P, $.RB, $.RP, $.RT, $.RTC]);\nconst IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([\n ...IMPLICIT_END_TAG_REQUIRED,\n $.CAPTION,\n $.COLGROUP,\n $.TBODY,\n $.TD,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TR,\n]);\nconst SCOPING_ELEMENT_NS = new Map([\n [$.APPLET, NS.HTML],\n [$.CAPTION, NS.HTML],\n [$.HTML, NS.HTML],\n [$.MARQUEE, NS.HTML],\n [$.OBJECT, NS.HTML],\n [$.TABLE, NS.HTML],\n [$.TD, NS.HTML],\n [$.TEMPLATE, NS.HTML],\n [$.TH, NS.HTML],\n [$.ANNOTATION_XML, NS.MATHML],\n [$.MI, NS.MATHML],\n [$.MN, NS.MATHML],\n [$.MO, NS.MATHML],\n [$.MS, NS.MATHML],\n [$.MTEXT, NS.MATHML],\n [$.DESC, NS.SVG],\n [$.FOREIGN_OBJECT, NS.SVG],\n [$.TITLE, NS.SVG],\n]);\nconst NAMED_HEADERS = [$.H1, $.H2, $.H3, $.H4, $.H5, $.H6];\nconst TABLE_ROW_CONTEXT = [$.TR, $.TEMPLATE, $.HTML];\nconst TABLE_BODY_CONTEXT = [$.TBODY, $.TFOOT, $.THEAD, $.TEMPLATE, $.HTML];\nconst TABLE_CONTEXT = [$.TABLE, $.TEMPLATE, $.HTML];\nconst TABLE_CELLS = [$.TD, $.TH];\n//Stack of open elements\nexport class OpenElementStack {\n get currentTmplContentOrNode() {\n return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;\n }\n constructor(document, treeAdapter, handler) {\n this.treeAdapter = treeAdapter;\n this.handler = handler;\n this.items = [];\n this.tagIDs = [];\n this.stackTop = -1;\n this.tmplCount = 0;\n this.currentTagId = $.UNKNOWN;\n this.current = document;\n }\n //Index of element\n _indexOf(element) {\n return this.items.lastIndexOf(element, this.stackTop);\n }\n //Update current element\n _isInTemplate() {\n return this.currentTagId === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;\n }\n _updateCurrentElement() {\n this.current = this.items[this.stackTop];\n this.currentTagId = this.tagIDs[this.stackTop];\n }\n //Mutations\n push(element, tagID) {\n this.stackTop++;\n this.items[this.stackTop] = element;\n this.current = element;\n this.tagIDs[this.stackTop] = tagID;\n this.currentTagId = tagID;\n if (this._isInTemplate()) {\n this.tmplCount++;\n }\n this.handler.onItemPush(element, tagID, true);\n }\n pop() {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) {\n this.tmplCount--;\n }\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, true);\n }\n replace(oldElement, newElement) {\n const idx = this._indexOf(oldElement);\n this.items[idx] = newElement;\n if (idx === this.stackTop) {\n this.current = newElement;\n }\n }\n insertAfter(referenceElement, newElement, newElementID) {\n const insertionIdx = this._indexOf(referenceElement) + 1;\n this.items.splice(insertionIdx, 0, newElement);\n this.tagIDs.splice(insertionIdx, 0, newElementID);\n this.stackTop++;\n if (insertionIdx === this.stackTop) {\n this._updateCurrentElement();\n }\n this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);\n }\n popUntilTagNamePopped(tagName) {\n let targetIdx = this.stackTop + 1;\n do {\n targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);\n } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);\n this.shortenToLength(targetIdx < 0 ? 0 : targetIdx);\n }\n shortenToLength(idx) {\n while (this.stackTop >= idx) {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) {\n this.tmplCount -= 1;\n }\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, this.stackTop < idx);\n }\n }\n popUntilElementPopped(element) {\n const idx = this._indexOf(element);\n this.shortenToLength(idx < 0 ? 0 : idx);\n }\n popUntilPopped(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(idx < 0 ? 0 : idx);\n }\n popUntilNumberedHeaderPopped() {\n this.popUntilPopped(NAMED_HEADERS, NS.HTML);\n }\n popUntilTableCellPopped() {\n this.popUntilPopped(TABLE_CELLS, NS.HTML);\n }\n popAllUpToHtmlElement() {\n //NOTE: here we assume that the root element is always first in the open element stack, so\n //we perform this fast stack clean up.\n this.tmplCount = 0;\n this.shortenToLength(1);\n }\n _indexOfTagNames(tagNames, namespace) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (tagNames.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {\n return i;\n }\n }\n return -1;\n }\n clearBackTo(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(idx + 1);\n }\n clearBackToTableContext() {\n this.clearBackTo(TABLE_CONTEXT, NS.HTML);\n }\n clearBackToTableBodyContext() {\n this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);\n }\n clearBackToTableRowContext() {\n this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);\n }\n remove(element) {\n const idx = this._indexOf(element);\n if (idx >= 0) {\n if (idx === this.stackTop) {\n this.pop();\n }\n else {\n this.items.splice(idx, 1);\n this.tagIDs.splice(idx, 1);\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(element, false);\n }\n }\n }\n //Search\n tryPeekProperlyNestedBodyElement() {\n //Properly nested element (should be second element in stack).\n return this.stackTop >= 1 && this.tagIDs[1] === $.BODY ? this.items[1] : null;\n }\n contains(element) {\n return this._indexOf(element) > -1;\n }\n getCommonAncestor(element) {\n const elementIdx = this._indexOf(element) - 1;\n return elementIdx >= 0 ? this.items[elementIdx] : null;\n }\n isRootHtmlElementCurrent() {\n return this.stackTop === 0 && this.tagIDs[0] === $.HTML;\n }\n //Element in scope\n hasInScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (tn === tagName && ns === NS.HTML) {\n return true;\n }\n if (SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasNumberedHeaderInScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (isNumberedHeader(tn) && ns === NS.HTML) {\n return true;\n }\n if (SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasInListItemScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (tn === tagName && ns === NS.HTML) {\n return true;\n }\n if (((tn === $.UL || tn === $.OL) && ns === NS.HTML) || SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasInButtonScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (tn === tagName && ns === NS.HTML) {\n return true;\n }\n if ((tn === $.BUTTON && ns === NS.HTML) || SCOPING_ELEMENT_NS.get(tn) === ns) {\n return false;\n }\n }\n return true;\n }\n hasInTableScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (ns !== NS.HTML) {\n continue;\n }\n if (tn === tagName) {\n return true;\n }\n if (tn === $.TABLE || tn === $.TEMPLATE || tn === $.HTML) {\n return false;\n }\n }\n return true;\n }\n hasTableBodyContextInTableScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (ns !== NS.HTML) {\n continue;\n }\n if (tn === $.TBODY || tn === $.THEAD || tn === $.TFOOT) {\n return true;\n }\n if (tn === $.TABLE || tn === $.HTML) {\n return false;\n }\n }\n return true;\n }\n hasInSelectScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n const ns = this.treeAdapter.getNamespaceURI(this.items[i]);\n if (ns !== NS.HTML) {\n continue;\n }\n if (tn === tagName) {\n return true;\n }\n if (tn !== $.OPTION && tn !== $.OPTGROUP) {\n return false;\n }\n }\n return true;\n }\n //Implied end tags\n generateImpliedEndTags() {\n while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {\n this.pop();\n }\n }\n generateImpliedEndTagsThoroughly() {\n while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n this.pop();\n }\n }\n generateImpliedEndTagsWithExclusion(exclusionId) {\n while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n this.pop();\n }\n }\n}\n//# sourceMappingURL=open-element-stack.js.map","//Const\nconst NOAH_ARK_CAPACITY = 3;\nexport var EntryType;\n(function (EntryType) {\n EntryType[EntryType[\"Marker\"] = 0] = \"Marker\";\n EntryType[EntryType[\"Element\"] = 1] = \"Element\";\n})(EntryType = EntryType || (EntryType = {}));\nconst MARKER = { type: EntryType.Marker };\n//List of formatting elements\nexport class FormattingElementList {\n constructor(treeAdapter) {\n this.treeAdapter = treeAdapter;\n this.entries = [];\n this.bookmark = null;\n }\n //Noah Ark's condition\n //OPTIMIZATION: at first we try to find possible candidates for exclusion using\n //lightweight heuristics without thorough attributes check.\n _getNoahArkConditionCandidates(newElement, neAttrs) {\n const candidates = [];\n const neAttrsLength = neAttrs.length;\n const neTagName = this.treeAdapter.getTagName(newElement);\n const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);\n for (let i = 0; i < this.entries.length; i++) {\n const entry = this.entries[i];\n if (entry.type === EntryType.Marker) {\n break;\n }\n const { element } = entry;\n if (this.treeAdapter.getTagName(element) === neTagName &&\n this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {\n const elementAttrs = this.treeAdapter.getAttrList(element);\n if (elementAttrs.length === neAttrsLength) {\n candidates.push({ idx: i, attrs: elementAttrs });\n }\n }\n }\n return candidates;\n }\n _ensureNoahArkCondition(newElement) {\n if (this.entries.length < NOAH_ARK_CAPACITY)\n return;\n const neAttrs = this.treeAdapter.getAttrList(newElement);\n const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);\n if (candidates.length < NOAH_ARK_CAPACITY)\n return;\n //NOTE: build attrs map for the new element, so we can perform fast lookups\n const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));\n let validCandidates = 0;\n //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met\n for (let i = 0; i < candidates.length; i++) {\n const candidate = candidates[i];\n // We know that `candidate.attrs.length === neAttrs.length`\n if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {\n validCandidates += 1;\n if (validCandidates >= NOAH_ARK_CAPACITY) {\n this.entries.splice(candidate.idx, 1);\n }\n }\n }\n }\n //Mutations\n insertMarker() {\n this.entries.unshift(MARKER);\n }\n pushElement(element, token) {\n this._ensureNoahArkCondition(element);\n this.entries.unshift({\n type: EntryType.Element,\n element,\n token,\n });\n }\n insertElementAfterBookmark(element, token) {\n const bookmarkIdx = this.entries.indexOf(this.bookmark);\n this.entries.splice(bookmarkIdx, 0, {\n type: EntryType.Element,\n element,\n token,\n });\n }\n removeEntry(entry) {\n const entryIndex = this.entries.indexOf(entry);\n if (entryIndex >= 0) {\n this.entries.splice(entryIndex, 1);\n }\n }\n /**\n * Clears the list of formatting elements up to the last marker.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker\n */\n clearToLastMarker() {\n const markerIdx = this.entries.indexOf(MARKER);\n if (markerIdx >= 0) {\n this.entries.splice(0, markerIdx + 1);\n }\n else {\n this.entries.length = 0;\n }\n }\n //Search\n getElementEntryInScopeWithTagName(tagName) {\n const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);\n return entry && entry.type === EntryType.Element ? entry : null;\n }\n getElementEntry(element) {\n return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);\n }\n}\n//# sourceMappingURL=formatting-element-list.js.map","import { DOCUMENT_MODE } from '../common/html.js';\nfunction createTextNode(value) {\n return {\n nodeName: '#text',\n value,\n parentNode: null,\n };\n}\nexport const defaultTreeAdapter = {\n //Node construction\n createDocument() {\n return {\n nodeName: '#document',\n mode: DOCUMENT_MODE.NO_QUIRKS,\n childNodes: [],\n };\n },\n createDocumentFragment() {\n return {\n nodeName: '#document-fragment',\n childNodes: [],\n };\n },\n createElement(tagName, namespaceURI, attrs) {\n return {\n nodeName: tagName,\n tagName,\n attrs,\n namespaceURI,\n childNodes: [],\n parentNode: null,\n };\n },\n createCommentNode(data) {\n return {\n nodeName: '#comment',\n data,\n parentNode: null,\n };\n },\n //Tree mutation\n appendChild(parentNode, newNode) {\n parentNode.childNodes.push(newNode);\n newNode.parentNode = parentNode;\n },\n insertBefore(parentNode, newNode, referenceNode) {\n const insertionIdx = parentNode.childNodes.indexOf(referenceNode);\n parentNode.childNodes.splice(insertionIdx, 0, newNode);\n newNode.parentNode = parentNode;\n },\n setTemplateContent(templateElement, contentElement) {\n templateElement.content = contentElement;\n },\n getTemplateContent(templateElement) {\n return templateElement.content;\n },\n setDocumentType(document, name, publicId, systemId) {\n const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType');\n if (doctypeNode) {\n doctypeNode.name = name;\n doctypeNode.publicId = publicId;\n doctypeNode.systemId = systemId;\n }\n else {\n const node = {\n nodeName: '#documentType',\n name,\n publicId,\n systemId,\n parentNode: null,\n };\n defaultTreeAdapter.appendChild(document, node);\n }\n },\n setDocumentMode(document, mode) {\n document.mode = mode;\n },\n getDocumentMode(document) {\n return document.mode;\n },\n detachNode(node) {\n if (node.parentNode) {\n const idx = node.parentNode.childNodes.indexOf(node);\n node.parentNode.childNodes.splice(idx, 1);\n node.parentNode = null;\n }\n },\n insertText(parentNode, text) {\n if (parentNode.childNodes.length > 0) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];\n if (defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text;\n return;\n }\n }\n defaultTreeAdapter.appendChild(parentNode, createTextNode(text));\n },\n insertTextBefore(parentNode, text, referenceNode) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];\n if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text;\n }\n else {\n defaultTreeAdapter.insertBefore(parentNode, createTextNode(text), referenceNode);\n }\n },\n adoptAttributes(recipient, attrs) {\n const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));\n for (let j = 0; j < attrs.length; j++) {\n if (!recipientAttrsMap.has(attrs[j].name)) {\n recipient.attrs.push(attrs[j]);\n }\n }\n },\n //Tree traversing\n getFirstChild(node) {\n return node.childNodes[0];\n },\n getChildNodes(node) {\n return node.childNodes;\n },\n getParentNode(node) {\n return node.parentNode;\n },\n getAttrList(element) {\n return element.attrs;\n },\n //Node data\n getTagName(element) {\n return element.tagName;\n },\n getNamespaceURI(element) {\n return element.namespaceURI;\n },\n getTextNodeContent(textNode) {\n return textNode.value;\n },\n getCommentNodeContent(commentNode) {\n return commentNode.data;\n },\n getDocumentTypeNodeName(doctypeNode) {\n return doctypeNode.name;\n },\n getDocumentTypeNodePublicId(doctypeNode) {\n return doctypeNode.publicId;\n },\n getDocumentTypeNodeSystemId(doctypeNode) {\n return doctypeNode.systemId;\n },\n //Node types\n isTextNode(node) {\n return node.nodeName === '#text';\n },\n isCommentNode(node) {\n return node.nodeName === '#comment';\n },\n isDocumentTypeNode(node) {\n return node.nodeName === '#documentType';\n },\n isElementNode(node) {\n return Object.prototype.hasOwnProperty.call(node, 'tagName');\n },\n // Source code location\n setNodeSourceCodeLocation(node, location) {\n node.sourceCodeLocation = location;\n },\n getNodeSourceCodeLocation(node) {\n return node.sourceCodeLocation;\n },\n updateNodeSourceCodeLocation(node, endLocation) {\n node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };\n },\n};\n//# sourceMappingURL=default.js.map","import { DOCUMENT_MODE } from './html.js';\n//Const\nconst VALID_DOCTYPE_NAME = 'html';\nconst VALID_SYSTEM_ID = 'about:legacy-compat';\nconst QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';\nconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n '+//silmaril//dtd html pro v0r11 19970101//',\n '-//as//dtd html 3.0 aswedit + extensions//',\n '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',\n '-//ietf//dtd html 2.0 level 1//',\n '-//ietf//dtd html 2.0 level 2//',\n '-//ietf//dtd html 2.0 strict level 1//',\n '-//ietf//dtd html 2.0 strict level 2//',\n '-//ietf//dtd html 2.0 strict//',\n '-//ietf//dtd html 2.0//',\n '-//ietf//dtd html 2.1e//',\n '-//ietf//dtd html 3.0//',\n '-//ietf//dtd html 3.2 final//',\n '-//ietf//dtd html 3.2//',\n '-//ietf//dtd html 3//',\n '-//ietf//dtd html level 0//',\n '-//ietf//dtd html level 1//',\n '-//ietf//dtd html level 2//',\n '-//ietf//dtd html level 3//',\n '-//ietf//dtd html strict level 0//',\n '-//ietf//dtd html strict level 1//',\n '-//ietf//dtd html strict level 2//',\n '-//ietf//dtd html strict level 3//',\n '-//ietf//dtd html strict//',\n '-//ietf//dtd html//',\n '-//metrius//dtd metrius presentational//',\n '-//microsoft//dtd internet explorer 2.0 html strict//',\n '-//microsoft//dtd internet explorer 2.0 html//',\n '-//microsoft//dtd internet explorer 2.0 tables//',\n '-//microsoft//dtd internet explorer 3.0 html strict//',\n '-//microsoft//dtd internet explorer 3.0 html//',\n '-//microsoft//dtd internet explorer 3.0 tables//',\n '-//netscape comm. corp.//dtd html//',\n '-//netscape comm. corp.//dtd strict html//',\n \"-//o'reilly and associates//dtd html 2.0//\",\n \"-//o'reilly and associates//dtd html extended 1.0//\",\n \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n '-//sq//dtd html 2.0 hotmetal + extensions//',\n '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',\n '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',\n '-//spyglass//dtd html 2.0 extended//',\n '-//sun microsystems corp.//dtd hotjava html//',\n '-//sun microsystems corp.//dtd hotjava strict html//',\n '-//w3c//dtd html 3 1995-03-24//',\n '-//w3c//dtd html 3.2 draft//',\n '-//w3c//dtd html 3.2 final//',\n '-//w3c//dtd html 3.2//',\n '-//w3c//dtd html 3.2s draft//',\n '-//w3c//dtd html 4.0 frameset//',\n '-//w3c//dtd html 4.0 transitional//',\n '-//w3c//dtd html experimental 19960712//',\n '-//w3c//dtd html experimental 970421//',\n '-//w3c//dtd w3 html//',\n '-//w3o//dtd w3 html 3.0//',\n '-//webtechs//dtd mozilla html 2.0//',\n '-//webtechs//dtd mozilla html//',\n];\nconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...QUIRKS_MODE_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\nconst QUIRKS_MODE_PUBLIC_IDS = new Set([\n '-//w3o//dtd w3 html strict 3.0//en//',\n '-/w3c/dtd html 4.0 transitional/en',\n 'html',\n]);\nconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\nconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\n//Utils\nfunction hasPrefix(publicId, prefixes) {\n return prefixes.some((prefix) => publicId.startsWith(prefix));\n}\n//API\nexport function isConforming(token) {\n return (token.name === VALID_DOCTYPE_NAME &&\n token.publicId === null &&\n (token.systemId === null || token.systemId === VALID_SYSTEM_ID));\n}\nexport function getDocumentMode(token) {\n if (token.name !== VALID_DOCTYPE_NAME) {\n return DOCUMENT_MODE.QUIRKS;\n }\n const { systemId } = token;\n if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let { publicId } = token;\n if (publicId !== null) {\n publicId = publicId.toLowerCase();\n if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n prefixes =\n systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.LIMITED_QUIRKS;\n }\n }\n return DOCUMENT_MODE.NO_QUIRKS;\n}\n//# sourceMappingURL=doctype.js.map","import { TAG_ID as $, NS, ATTRS, getTagID } from './html.js';\n//MIME types\nconst MIME_TYPES = {\n TEXT_HTML: 'text/html',\n APPLICATION_XML: 'application/xhtml+xml',\n};\n//Attributes\nconst DEFINITION_URL_ATTR = 'definitionurl';\nconst ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL';\nconst SVG_ATTRS_ADJUSTMENT_MAP = new Map([\n 'attributeName',\n 'attributeType',\n 'baseFrequency',\n 'baseProfile',\n 'calcMode',\n 'clipPathUnits',\n 'diffuseConstant',\n 'edgeMode',\n 'filterUnits',\n 'glyphRef',\n 'gradientTransform',\n 'gradientUnits',\n 'kernelMatrix',\n 'kernelUnitLength',\n 'keyPoints',\n 'keySplines',\n 'keyTimes',\n 'lengthAdjust',\n 'limitingConeAngle',\n 'markerHeight',\n 'markerUnits',\n 'markerWidth',\n 'maskContentUnits',\n 'maskUnits',\n 'numOctaves',\n 'pathLength',\n 'patternContentUnits',\n 'patternTransform',\n 'patternUnits',\n 'pointsAtX',\n 'pointsAtY',\n 'pointsAtZ',\n 'preserveAlpha',\n 'preserveAspectRatio',\n 'primitiveUnits',\n 'refX',\n 'refY',\n 'repeatCount',\n 'repeatDur',\n 'requiredExtensions',\n 'requiredFeatures',\n 'specularConstant',\n 'specularExponent',\n 'spreadMethod',\n 'startOffset',\n 'stdDeviation',\n 'stitchTiles',\n 'surfaceScale',\n 'systemLanguage',\n 'tableValues',\n 'targetX',\n 'targetY',\n 'textLength',\n 'viewBox',\n 'viewTarget',\n 'xChannelSelector',\n 'yChannelSelector',\n 'zoomAndPan',\n].map((attr) => [attr.toLowerCase(), attr]));\nconst XML_ATTRS_ADJUSTMENT_MAP = new Map([\n ['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK }],\n ['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK }],\n ['xlink:href', { prefix: 'xlink', name: 'href', namespace: NS.XLINK }],\n ['xlink:role', { prefix: 'xlink', name: 'role', namespace: NS.XLINK }],\n ['xlink:show', { prefix: 'xlink', name: 'show', namespace: NS.XLINK }],\n ['xlink:title', { prefix: 'xlink', name: 'title', namespace: NS.XLINK }],\n ['xlink:type', { prefix: 'xlink', name: 'type', namespace: NS.XLINK }],\n ['xml:base', { prefix: 'xml', name: 'base', namespace: NS.XML }],\n ['xml:lang', { prefix: 'xml', name: 'lang', namespace: NS.XML }],\n ['xml:space', { prefix: 'xml', name: 'space', namespace: NS.XML }],\n ['xmlns', { prefix: '', name: 'xmlns', namespace: NS.XMLNS }],\n ['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS }],\n]);\n//SVG tag names adjustment map\nexport const SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'textPath',\n].map((tn) => [tn.toLowerCase(), tn]));\n//Tags that causes exit from foreign content\nconst EXITS_FOREIGN_CONTENT = new Set([\n $.B,\n $.BIG,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.CENTER,\n $.CODE,\n $.DD,\n $.DIV,\n $.DL,\n $.DT,\n $.EM,\n $.EMBED,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HR,\n $.I,\n $.IMG,\n $.LI,\n $.LISTING,\n $.MENU,\n $.META,\n $.NOBR,\n $.OL,\n $.P,\n $.PRE,\n $.RUBY,\n $.S,\n $.SMALL,\n $.SPAN,\n $.STRONG,\n $.STRIKE,\n $.SUB,\n $.SUP,\n $.TABLE,\n $.TT,\n $.U,\n $.UL,\n $.VAR,\n]);\n//Check exit from foreign content\nexport function causesExit(startTagToken) {\n const tn = startTagToken.tagID;\n const isFontWithAttrs = tn === $.FONT &&\n startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE);\n return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);\n}\n//Token adjustments\nexport function adjustTokenMathMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n if (token.attrs[i].name === DEFINITION_URL_ATTR) {\n token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;\n break;\n }\n }\n}\nexport function adjustTokenSVGAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrName != null) {\n token.attrs[i].name = adjustedAttrName;\n }\n }\n}\nexport function adjustTokenXMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrEntry) {\n token.attrs[i].prefix = adjustedAttrEntry.prefix;\n token.attrs[i].name = adjustedAttrEntry.name;\n token.attrs[i].namespace = adjustedAttrEntry.namespace;\n }\n }\n}\nexport function adjustTokenSVGTagName(token) {\n const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);\n if (adjustedTagName != null) {\n token.tagName = adjustedTagName;\n token.tagID = getTagID(token.tagName);\n }\n}\n//Integration points\nfunction isMathMLTextIntegrationPoint(tn, ns) {\n return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT);\n}\nfunction isHtmlIntegrationPoint(tn, ns, attrs) {\n if (ns === NS.MATHML && tn === $.ANNOTATION_XML) {\n for (let i = 0; i < attrs.length; i++) {\n if (attrs[i].name === ATTRS.ENCODING) {\n const value = attrs[i].value.toLowerCase();\n return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;\n }\n }\n }\n return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE);\n}\nexport function isIntegrationPoint(tn, ns, attrs, foreignNS) {\n return (((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||\n ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));\n}\n//# sourceMappingURL=foreign-content.js.map","import { Tokenizer, TokenizerMode } from '../tokenizer/index.js';\nimport { OpenElementStack } from './open-element-stack.js';\nimport { FormattingElementList, EntryType } from './formatting-element-list.js';\nimport { defaultTreeAdapter } from '../tree-adapters/default.js';\nimport * as doctype from '../common/doctype.js';\nimport * as foreignContent from '../common/foreign-content.js';\nimport { ERR } from '../common/error-codes.js';\nimport * as unicode from '../common/unicode.js';\nimport { TAG_ID as $, TAG_NAMES as TN, NS, ATTRS, SPECIAL_ELEMENTS, DOCUMENT_MODE, isNumberedHeader, getTagID, } from '../common/html.js';\nimport { TokenType, getTokenAttr, } from '../common/token.js';\n//Misc constants\nconst HIDDEN_INPUT_TYPE = 'hidden';\n//Adoption agency loops iteration count\nconst AA_OUTER_LOOP_ITER = 8;\nconst AA_INNER_LOOP_ITER = 3;\n//Insertion modes\nvar InsertionMode;\n(function (InsertionMode) {\n InsertionMode[InsertionMode[\"INITIAL\"] = 0] = \"INITIAL\";\n InsertionMode[InsertionMode[\"BEFORE_HTML\"] = 1] = \"BEFORE_HTML\";\n InsertionMode[InsertionMode[\"BEFORE_HEAD\"] = 2] = \"BEFORE_HEAD\";\n InsertionMode[InsertionMode[\"IN_HEAD\"] = 3] = \"IN_HEAD\";\n InsertionMode[InsertionMode[\"IN_HEAD_NO_SCRIPT\"] = 4] = \"IN_HEAD_NO_SCRIPT\";\n InsertionMode[InsertionMode[\"AFTER_HEAD\"] = 5] = \"AFTER_HEAD\";\n InsertionMode[InsertionMode[\"IN_BODY\"] = 6] = \"IN_BODY\";\n InsertionMode[InsertionMode[\"TEXT\"] = 7] = \"TEXT\";\n InsertionMode[InsertionMode[\"IN_TABLE\"] = 8] = \"IN_TABLE\";\n InsertionMode[InsertionMode[\"IN_TABLE_TEXT\"] = 9] = \"IN_TABLE_TEXT\";\n InsertionMode[InsertionMode[\"IN_CAPTION\"] = 10] = \"IN_CAPTION\";\n InsertionMode[InsertionMode[\"IN_COLUMN_GROUP\"] = 11] = \"IN_COLUMN_GROUP\";\n InsertionMode[InsertionMode[\"IN_TABLE_BODY\"] = 12] = \"IN_TABLE_BODY\";\n InsertionMode[InsertionMode[\"IN_ROW\"] = 13] = \"IN_ROW\";\n InsertionMode[InsertionMode[\"IN_CELL\"] = 14] = \"IN_CELL\";\n InsertionMode[InsertionMode[\"IN_SELECT\"] = 15] = \"IN_SELECT\";\n InsertionMode[InsertionMode[\"IN_SELECT_IN_TABLE\"] = 16] = \"IN_SELECT_IN_TABLE\";\n InsertionMode[InsertionMode[\"IN_TEMPLATE\"] = 17] = \"IN_TEMPLATE\";\n InsertionMode[InsertionMode[\"AFTER_BODY\"] = 18] = \"AFTER_BODY\";\n InsertionMode[InsertionMode[\"IN_FRAMESET\"] = 19] = \"IN_FRAMESET\";\n InsertionMode[InsertionMode[\"AFTER_FRAMESET\"] = 20] = \"AFTER_FRAMESET\";\n InsertionMode[InsertionMode[\"AFTER_AFTER_BODY\"] = 21] = \"AFTER_AFTER_BODY\";\n InsertionMode[InsertionMode[\"AFTER_AFTER_FRAMESET\"] = 22] = \"AFTER_AFTER_FRAMESET\";\n})(InsertionMode || (InsertionMode = {}));\nconst BASE_LOC = {\n startLine: -1,\n startCol: -1,\n startOffset: -1,\n endLine: -1,\n endCol: -1,\n endOffset: -1,\n};\nconst TABLE_STRUCTURE_TAGS = new Set([$.TABLE, $.TBODY, $.TFOOT, $.THEAD, $.TR]);\nconst defaultParserOptions = {\n scriptingEnabled: true,\n sourceCodeLocationInfo: false,\n treeAdapter: defaultTreeAdapter,\n onParseError: null,\n};\n//Parser\nexport class Parser {\n constructor(options, document, fragmentContext = null, scriptHandler = null) {\n this.fragmentContext = fragmentContext;\n this.scriptHandler = scriptHandler;\n this.currentToken = null;\n this.stopped = false;\n this.insertionMode = InsertionMode.INITIAL;\n this.originalInsertionMode = InsertionMode.INITIAL;\n this.headElement = null;\n this.formElement = null;\n /** Indicates that the current node is not an element in the HTML namespace */\n this.currentNotInHTML = false;\n /**\n * The template insertion mode stack is maintained from the left.\n * Ie. the topmost element will always have index 0.\n */\n this.tmplInsertionModeStack = [];\n this.pendingCharacterTokens = [];\n this.hasNonWhitespacePendingCharacterToken = false;\n this.framesetOk = true;\n this.skipNextNewLine = false;\n this.fosterParentingEnabled = false;\n this.options = {\n ...defaultParserOptions,\n ...options,\n };\n this.treeAdapter = this.options.treeAdapter;\n this.onParseError = this.options.onParseError;\n // Always enable location info if we report parse errors.\n if (this.onParseError) {\n this.options.sourceCodeLocationInfo = true;\n }\n this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();\n this.tokenizer = new Tokenizer(this.options, this);\n this.activeFormattingElements = new FormattingElementList(this.treeAdapter);\n this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : $.UNKNOWN;\n this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);\n this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);\n }\n // API\n static parse(html, options) {\n const parser = new this(options);\n parser.tokenizer.write(html, true);\n return parser.document;\n }\n static getFragmentParser(fragmentContext, options) {\n const opts = {\n ...defaultParserOptions,\n ...options,\n };\n //NOTE: use a
getContrastingColor.ts -
+
index.ts +
100%6/6100%4/4100%1/1100%6/6
index.ts -
-
100%139/139100%74/74100%27/27100%128/128
utils.ts -
-
100%15/15100%6/6100%4/4100%11/1146.87%75/16011.9%10/8425%8/3248.96%71/145