@orangesk/orange-design-system 2.0.0-alpha.1 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/404.html +1 -1
- package/build/_next/static/BGy4QLZfZPwswIZT7YGE2/_buildManifest.js +1 -0
- package/build/_next/static/chunks/1206-59e86c9be0c6edc8.js +1 -0
- package/build/_next/static/chunks/1684-f3cca2440b2d04c9.js +1 -0
- package/build/_next/static/chunks/1790-42537fde486481dc.js +1 -0
- package/build/_next/static/chunks/1856-87fba6dedcfa51f4.js +1 -0
- package/build/_next/static/chunks/2355.4c3c65d46ce6edf1.js +1 -0
- package/build/_next/static/chunks/2366-ccdf9c167d62c230.js +1 -0
- package/build/_next/static/chunks/2511.d334cb67ac6af21d.js +1 -0
- package/build/_next/static/chunks/2735.7a75728bb235d0d4.js +1 -0
- package/build/_next/static/chunks/3557.53c406667aa62240.js +1 -0
- package/build/_next/static/chunks/4bd1b696-63246a30a5dafad8.js +1 -0
- package/build/_next/static/chunks/5426-60b8df37a33e8cf3.js +1 -0
- package/build/_next/static/chunks/579-22f1eb9ccb4fc983.js +1 -0
- package/build/_next/static/chunks/6729-c9c23d280815e7ae.js +1 -0
- package/build/_next/static/chunks/7916.f1f5aa6f1d094885.js +1 -0
- package/build/_next/static/chunks/7998-4f9ee8dd2d772e13.js +1 -0
- package/build/_next/static/chunks/9186-7ca86a881bc0fae7.js +4 -0
- package/build/_next/static/chunks/app/_not-found/page-a9506bc9a3364319.js +1 -0
- package/build/_next/static/chunks/app/components/accordion/page-aa200fabd855563b.js +1 -0
- package/build/_next/static/chunks/app/components/alert/page-7c67ea9c86227082.js +1 -0
- package/build/_next/static/chunks/app/components/bar/page-c30f8fd11c4651d6.js +1 -0
- package/build/_next/static/chunks/app/components/block-action/page-7274174a43629f9f.js +1 -0
- package/build/_next/static/chunks/app/components/body-banner/page-15ff1f59b2aa843d.js +1 -0
- package/build/_next/static/chunks/app/components/button/page-0e30b9dfcecf1399.js +1 -0
- package/build/_next/static/chunks/app/components/buttons/page-fffd250aa886c49b.js +1 -0
- package/build/_next/static/chunks/app/components/card/page-cd4cf793507e5671.js +1 -0
- package/build/_next/static/chunks/app/components/carousel/page-b365266404937787.js +1 -0
- package/build/_next/static/chunks/app/components/carousel-promotions/page-a44240a70a405853.js +1 -0
- package/build/_next/static/chunks/app/components/cart-table/page-c33464d94e85aacb.js +1 -0
- package/build/_next/static/chunks/app/components/controls/page-ab8a0113b4b2e54b.js +1 -0
- package/build/_next/static/chunks/app/components/cover/page-c5a39a466cf72302.js +1 -0
- package/build/_next/static/chunks/app/components/divider/page-048e0ea7f0f61c9f.js +1 -0
- package/build/_next/static/chunks/app/components/dropdown/page-86dc20ead95d1104.js +1 -0
- package/build/_next/static/chunks/app/components/expander/page-37e9fdf98c038541.js +1 -0
- package/build/_next/static/chunks/app/components/feature-accordion/page-994e106b83948b2a.js +1 -0
- package/build/_next/static/chunks/app/components/footer/page-39f76624a4c5435a.js +1 -0
- package/build/_next/static/chunks/app/components/forms/addons/page-b819ad9999952653.js +1 -0
- package/build/_next/static/chunks/app/components/forms/autocomplete/page-0cfae5a356eefe59.js +1 -0
- package/build/_next/static/chunks/app/components/forms/captions/hint/page-36a64250bd583aca.js +1 -0
- package/build/_next/static/chunks/app/components/forms/captions/label/page-84cb1a7b98fb64c8.js +1 -0
- package/build/_next/static/chunks/app/components/forms/captions/message/page-c22889abedb1d070.js +1 -0
- package/build/_next/static/chunks/app/components/forms/checkbox/page-8428d9a5becd0678.js +1 -0
- package/build/_next/static/chunks/app/components/forms/field/page-3c75a0c1a8f4867a.js +1 -0
- package/build/_next/static/chunks/app/components/forms/fieldset/page-5e7316fdf0310e1e.js +1 -0
- package/build/_next/static/chunks/app/components/forms/file/page-a83e9d5be583038b.js +1 -0
- package/build/_next/static/chunks/app/components/forms/inputstepper/page-2a61408ee3dd66a3.js +1 -0
- package/build/_next/static/chunks/app/components/forms/radio/page-d25e81a49e31fd5f.js +1 -0
- package/build/_next/static/chunks/app/components/forms/rangeslider/page-2b516b597dabcdde.js +1 -0
- package/build/_next/static/chunks/app/components/forms/select/page-28d631ad9ea28a9c.js +1 -0
- package/build/_next/static/chunks/app/components/forms/text-area/page-167de9c3a457c62a.js +1 -0
- package/build/_next/static/chunks/app/components/forms/text-input/page-5798b254c725bec1.js +1 -0
- package/build/_next/static/chunks/app/components/gauge/page-8299bca301ad707b.js +1 -0
- package/build/_next/static/chunks/app/components/icon/page-3d2696eb1415bbb8.js +1 -0
- package/build/_next/static/chunks/app/components/link/page-5691bc96657b379e.js +1 -0
- package/build/_next/static/chunks/app/components/list/page-93428135db5e0f50.js +1 -0
- package/build/_next/static/chunks/app/components/loader/page-60a3331abd258bde.js +1 -0
- package/build/_next/static/chunks/app/components/modal/page-193e4d93ab10dc9a.js +1 -0
- package/build/_next/static/chunks/app/components/pagination/page-dd52f805ef5196de.js +1 -0
- package/build/_next/static/chunks/app/components/progress/page-4ac45801c7ec5663.js +1 -0
- package/build/_next/static/chunks/app/components/skeleton/page-71307720865ef677.js +1 -0
- package/build/_next/static/chunks/app/components/sticker/page-c79c492044c10f40.js +1 -0
- package/build/_next/static/chunks/app/components/table/page-9dc77bc63b3b5895.js +1 -0
- package/build/_next/static/chunks/app/components/tabs/page-dcc36f18992b00f9.js +1 -0
- package/build/_next/static/chunks/app/components/tag/page-ba00a3d16f7f6d11.js +1 -0
- package/build/_next/static/chunks/app/components/testimonial/page-a3615b0a32c32fe1.js +1 -0
- package/build/_next/static/chunks/app/components/tile/page-b354dd7941df8670.js +1 -0
- package/build/_next/static/chunks/app/components/tooltip/page-9861cd4f82830d82.js +1 -0
- package/build/_next/static/chunks/app/javascript/toggle/page-8b83ddce80f9d755.js +1 -0
- package/build/_next/static/chunks/app/layout-41aa6f28da614a69.js +1 -0
- package/build/_next/static/chunks/app/page-e1799527aabeb98a.js +1 -0
- package/build/_next/static/chunks/app/utilities/horizontal-scroll/page-c6ee529373c337f9.js +1 -0
- package/build/_next/static/chunks/framework-fda66049c8bbcca5.js +1 -0
- package/build/_next/static/chunks/main-3e6405259d828a22.js +1 -0
- package/build/_next/static/chunks/main-app-a265e200b32683f1.js +1 -0
- package/build/_next/static/chunks/pages/{_app-da15c11dea942c36.js → _app-eb694f3fd49020c8.js} +1 -1
- package/build/_next/static/chunks/pages/_error-2b3482c094a540b4.js +1 -0
- package/build/_next/static/chunks/webpack-1a128887cf981885.js +1 -0
- package/build/_next/static/css/05453e813192b05b.css +1 -0
- package/build/_next/static/css/05c85c9ea7e2ea58.css +1 -0
- package/build/_next/static/css/0e5de495ff48931f.css +1 -0
- package/build/_next/static/css/1139a47c85362386.css +1 -0
- package/build/_next/static/css/1b3f28cfd13039ad.css +1 -0
- package/build/_next/static/css/1fdf8ee56483471a.css +1 -0
- package/build/_next/static/css/286405eb07784ddd.css +1 -0
- package/build/_next/static/css/2cb6b1436172662a.css +1 -0
- package/build/_next/static/css/33a9af3bd42f0314.css +1 -0
- package/build/_next/static/css/3632d2fdde580dcb.css +1 -0
- package/build/_next/static/css/37365c3a0857a3c5.css +1 -0
- package/build/_next/static/css/412dd278760dc9fc.css +1 -0
- package/build/_next/static/css/417edeeaaadbac4d.css +1 -0
- package/build/_next/static/css/43c66157c59241c2.css +1 -0
- package/build/_next/static/css/57b0c84bbf7d7098.css +1 -0
- package/build/_next/static/css/5b55b50737ef7662.css +1 -0
- package/build/_next/static/css/5ec7df8d7719c810.css +1 -0
- package/build/_next/static/css/62680b6eacd53665.css +1 -0
- package/build/_next/static/css/645dada84db193d4.css +1 -0
- package/build/_next/static/css/7058542e728d5b05.css +1 -0
- package/build/_next/static/css/7108a96a607fe7c5.css +1 -0
- package/build/_next/static/css/7202aa220abab0eb.css +1 -0
- package/build/_next/static/css/75e15d3944ffd4f3.css +1 -0
- package/build/_next/static/css/77590e66868bf291.css +1 -0
- package/build/_next/static/css/7c62e057927bfe3a.css +1 -0
- package/build/_next/static/css/7d4c59347b15c45f.css +1 -0
- package/build/_next/static/css/7f570791ca140154.css +1 -0
- package/build/_next/static/css/8ed102a331809889.css +1 -0
- package/build/_next/static/css/a88042aa83a2c354.css +1 -0
- package/build/_next/static/css/a9a58f4c38bee2fd.css +1 -0
- package/build/_next/static/css/ac1d2e9b77b16926.css +1 -0
- package/build/_next/static/css/ae4b3848536f0c88.css +1 -0
- package/build/_next/static/css/b0ab7f81488aec78.css +1 -0
- package/build/_next/static/css/b853a4f8d045643a.css +1 -0
- package/build/_next/static/css/bcaa5e7fd24949ed.css +1 -0
- package/build/_next/static/css/d38343a4cf5388d8.css +1 -0
- package/build/_next/static/css/d829c1a3f2fcd594.css +1 -0
- package/build/_next/static/css/dbfffa33262d63c5.css +1 -0
- package/build/_next/static/css/dfae3c27eaeb27f7.css +1 -0
- package/build/_next/static/css/e0b468ba3d618325.css +1 -0
- package/build/_next/static/css/e5e018b7f5cf6e41.css +1 -0
- package/build/_next/static/css/e6a4dfa3d63d18c0.css +1 -0
- package/build/_next/static/css/ee49dfd49ae395ac.css +1 -0
- package/build/_next/static/css/ef46db3751d8e999.css +0 -0
- package/build/_next/static/css/f2867b2bd265a443.css +1 -0
- package/build/_next/static/media/phones.a832cbb3.png +0 -0
- package/build/components/Accordion/index.js +3 -1157
- package/build/components/Accordion/index.js.map +1 -1
- package/build/components/Accordion/style.css +1 -1
- package/build/components/Accordion/style.css.map +1 -1
- package/build/components/Alert/index.js +3 -1907
- package/build/components/Alert/index.js.map +1 -1
- package/build/components/Alert/style.css +1 -1
- package/build/components/Alert/style.css.map +1 -1
- package/build/components/Bar/index.js +16 -0
- package/build/components/Bar/index.js.map +1 -0
- package/build/components/Bar/style.css +2 -0
- package/build/components/Bar/style.css.map +1 -0
- package/build/components/BlockAction/index.js +16 -0
- package/build/components/BlockAction/index.js.map +1 -0
- package/build/components/BlockAction/style.css +2 -0
- package/build/components/BlockAction/style.css.map +1 -0
- package/build/components/BodyBanner/index.js +16 -0
- package/build/components/BodyBanner/index.js.map +1 -0
- package/build/components/BodyBanner/style.css +2 -0
- package/build/components/BodyBanner/style.css.map +1 -0
- package/build/components/Breadcrumbs/index.js +3 -674
- package/build/components/Breadcrumbs/index.js.map +1 -1
- package/build/components/Breadcrumbs/style.css +1 -1
- package/build/components/Breadcrumbs/style.css.map +1 -1
- package/build/components/Button/index.js +3 -721
- package/build/components/Button/index.js.map +1 -1
- package/build/components/Button/style.css +1 -1
- package/build/components/Button/style.css.map +1 -1
- package/build/components/Buttons/index.js +3 -601
- package/build/components/Buttons/index.js.map +1 -1
- package/build/components/Buttons/style.css +1 -1
- package/build/components/Buttons/style.css.map +1 -1
- package/build/components/Card/index.js +16 -0
- package/build/components/Card/index.js.map +1 -0
- package/build/components/Card/style.css +2 -0
- package/build/components/Card/style.css.map +1 -0
- package/build/components/Carousel/index.js +31 -0
- package/build/components/Carousel/index.js.map +1 -0
- package/build/components/Carousel/style.css +2 -0
- package/build/components/Carousel/style.css.map +1 -0
- package/build/components/CarouselPromotions/index.js +16 -0
- package/build/components/CarouselPromotions/index.js.map +1 -0
- package/build/components/CarouselPromotions/style.css +2 -0
- package/build/components/CarouselPromotions/style.css.map +1 -0
- package/build/components/CartTable/index.js +16 -0
- package/build/components/CartTable/index.js.map +1 -0
- package/build/components/CartTable/style.css +2 -0
- package/build/components/CartTable/style.css.map +1 -0
- package/build/components/Container/index.js +3 -598
- package/build/components/Container/index.js.map +1 -1
- package/build/components/Container/style.css +1 -1
- package/build/components/Container/style.css.map +1 -1
- package/build/components/Controls/index.js +16 -0
- package/build/components/Controls/index.js.map +1 -0
- package/build/components/Controls/style.css +2 -0
- package/build/components/Controls/style.css.map +1 -0
- package/build/components/Cover/index.js +16 -0
- package/build/components/Cover/index.js.map +1 -0
- package/build/components/Cover/style.css +2 -0
- package/build/components/Cover/style.css.map +1 -0
- package/build/components/Divider/index.js +16 -0
- package/build/components/Divider/index.js.map +1 -0
- package/build/components/Divider/style.css +2 -0
- package/build/components/Divider/style.css.map +1 -0
- package/build/components/Dropdown/index.js +16 -0
- package/build/components/Dropdown/index.js.map +1 -0
- package/build/components/Dropdown/style.css +2 -0
- package/build/components/Dropdown/style.css.map +1 -0
- package/build/components/Expander/index.js +16 -0
- package/build/components/Expander/index.js.map +1 -0
- package/build/components/Expander/style.css +2 -0
- package/build/components/Expander/style.css.map +1 -0
- package/build/components/FeatureAccordion/index.js +16 -0
- package/build/components/FeatureAccordion/index.js.map +1 -0
- package/build/components/FeatureAccordion/style.css +2 -0
- package/build/components/FeatureAccordion/style.css.map +1 -0
- package/build/components/Footer/index.js +16 -0
- package/build/components/Footer/index.js.map +1 -0
- package/build/components/Footer/style.css +2 -0
- package/build/components/Footer/style.css.map +1 -0
- package/build/components/Forms/index.js +18 -0
- package/build/components/Forms/index.js.map +1 -0
- package/build/components/Forms/style.css +2 -0
- package/build/components/Forms/style.css.map +1 -0
- package/build/components/Gauge/index.js +16 -0
- package/build/components/Gauge/index.js.map +1 -0
- package/build/components/Gauge/style.css +2 -0
- package/build/components/Gauge/style.css.map +1 -0
- package/build/components/Grid/index.js +3 -1069
- package/build/components/Grid/index.js.map +1 -1
- package/build/components/Grid/style.css +1 -1
- package/build/components/Grid/style.css.map +1 -1
- package/build/components/Icon/index.js +2 -619
- package/build/components/Icon/index.js.map +1 -1
- package/build/components/Icon/style.css +1 -1
- package/build/components/Icon/style.css.map +1 -1
- package/build/components/Image/index.js +3 -646
- package/build/components/Image/index.js.map +1 -1
- package/build/components/Image/style.css +1 -1
- package/build/components/Image/style.css.map +1 -1
- package/build/components/Link/index.js +2 -168
- package/build/components/Link/index.js.map +1 -1
- package/build/components/Link/style.css +1 -1
- package/build/components/Link/style.css.map +1 -1
- package/build/components/List/index.js +16 -0
- package/build/components/List/index.js.map +1 -0
- package/build/components/List/style.css +2 -0
- package/build/components/List/style.css.map +1 -0
- package/build/components/Loader/index.js +16 -0
- package/build/components/Loader/index.js.map +1 -0
- package/build/components/Loader/style.css +2 -0
- package/build/components/Loader/style.css.map +1 -0
- package/build/components/Modal/index.js +4 -3154
- package/build/components/Modal/index.js.map +1 -1
- package/build/components/Modal/style.css +1 -1
- package/build/components/Modal/style.css.map +1 -1
- package/build/components/Pagination/index.js +16 -0
- package/build/components/Pagination/index.js.map +1 -0
- package/build/components/Pagination/style.css +2 -0
- package/build/components/Pagination/style.css.map +1 -0
- package/build/components/Progress/index.js +16 -0
- package/build/components/Progress/index.js.map +1 -0
- package/build/components/Progress/style.css +2 -0
- package/build/components/Progress/style.css.map +1 -0
- package/build/components/Section/index.js +3 -619
- package/build/components/Section/index.js.map +1 -1
- package/build/components/Section/style.css +1 -1
- package/build/components/Section/style.css.map +1 -1
- package/build/components/Skeleton/index.js +16 -0
- package/build/components/Skeleton/index.js.map +1 -0
- package/build/components/Skeleton/style.css +2 -0
- package/build/components/Skeleton/style.css.map +1 -0
- package/build/components/Sticker/index.js +16 -0
- package/build/components/Sticker/index.js.map +1 -0
- package/build/components/Sticker/style.css +2 -0
- package/build/components/Sticker/style.css.map +1 -0
- package/build/components/Table/index.js +16 -0
- package/build/components/Table/index.js.map +1 -0
- package/build/components/Table/style.css +2 -0
- package/build/components/Table/style.css.map +1 -0
- package/build/components/Tabs/index.js +3 -1043
- package/build/components/Tabs/index.js.map +1 -1
- package/build/components/Tabs/style.css +1 -1
- package/build/components/Tabs/style.css.map +1 -1
- package/build/components/Tag/index.js +16 -0
- package/build/components/Tag/index.js.map +1 -0
- package/build/components/Tag/style.css +2 -0
- package/build/components/Tag/style.css.map +1 -0
- package/build/components/Testimonial/index.js +16 -0
- package/build/components/Testimonial/index.js.map +1 -0
- package/build/components/Testimonial/style.css +2 -0
- package/build/components/Testimonial/style.css.map +1 -0
- package/build/components/Tile/index.js +16 -0
- package/build/components/Tile/index.js.map +1 -0
- package/build/components/Tile/style.css +2 -0
- package/build/components/Tile/style.css.map +1 -0
- package/build/components/Tooltip/index.js +16 -0
- package/build/components/Tooltip/index.js.map +1 -0
- package/build/components/Tooltip/style.css +2 -0
- package/build/components/Tooltip/style.css.map +1 -0
- package/build/components/accordion.html +18 -0
- package/build/components/accordion.txt +28 -0
- package/build/components/alert.html +4 -2
- package/build/components/alert.txt +13 -11
- package/build/components/bar.html +10 -0
- package/build/components/bar.txt +27 -0
- package/build/components/block-action.html +4 -0
- package/build/components/block-action.txt +26 -0
- package/build/components/body-banner.html +1 -0
- package/build/components/body-banner.txt +28 -0
- package/build/components/button.html +2 -2
- package/build/components/button.txt +10 -8
- package/build/components/buttons.html +1 -1
- package/build/components/buttons.txt +10 -8
- package/build/components/card.html +20 -0
- package/build/components/card.txt +35 -0
- package/build/components/carousel-promotions.html +20 -0
- package/build/components/carousel-promotions.txt +31 -0
- package/build/components/carousel.html +5 -0
- package/build/components/carousel.txt +32 -0
- package/build/components/cart-table.html +39 -0
- package/build/components/cart-table.txt +35 -0
- package/build/components/controls.html +2 -0
- package/build/components/controls.txt +29 -0
- package/build/components/cover.html +1 -0
- package/build/components/cover.txt +26 -0
- package/build/components/divider.html +6 -0
- package/build/components/divider.txt +29 -0
- package/build/components/dropdown.html +18 -0
- package/build/components/dropdown.txt +36 -0
- package/build/components/expander.html +1 -0
- package/build/components/expander.txt +27 -0
- package/build/components/feature-accordion.html +1 -0
- package/build/components/feature-accordion.txt +31 -0
- package/build/components/footer.html +2 -0
- package/build/components/footer.txt +31 -0
- package/build/components/forms/addons.html +2 -0
- package/build/components/forms/addons.txt +26 -0
- package/build/components/forms/autocomplete.html +2 -0
- package/build/components/forms/autocomplete.txt +27 -0
- package/build/components/forms/captions/hint.html +4 -0
- package/build/components/forms/captions/hint.txt +26 -0
- package/build/components/forms/captions/label.html +4 -0
- package/build/components/forms/captions/label.txt +24 -0
- package/build/components/forms/captions/message.html +1 -0
- package/build/components/forms/captions/message.txt +24 -0
- package/build/components/forms/checkbox.html +2 -0
- package/build/components/forms/checkbox.txt +27 -0
- package/build/components/forms/field.html +3 -0
- package/build/components/forms/field.txt +24 -0
- package/build/components/forms/fieldset.html +2 -0
- package/build/components/forms/fieldset.txt +26 -0
- package/build/components/forms/file.html +1 -0
- package/build/components/forms/file.txt +24 -0
- package/build/components/forms/inputstepper.html +2 -0
- package/build/components/forms/inputstepper.txt +26 -0
- package/build/components/forms/radio.html +1 -0
- package/build/components/forms/radio.txt +37 -0
- package/build/components/forms/rangeslider.html +2 -0
- package/build/components/forms/rangeslider.txt +26 -0
- package/build/components/forms/select.html +1 -0
- package/build/components/forms/select.txt +24 -0
- package/build/components/forms/text-area.html +1 -0
- package/build/components/forms/text-area.txt +24 -0
- package/build/components/forms/text-input.html +1 -0
- package/build/components/forms/text-input.txt +24 -0
- package/build/components/gauge.html +15 -0
- package/build/components/gauge.txt +28 -0
- package/build/components/icon.html +1 -1
- package/build/components/icon.txt +5 -4
- package/build/components/index.css +2 -1
- package/build/components/index.css.map +1 -1
- package/build/components/index.js +19 -3660
- package/build/components/index.js.map +1 -1
- package/build/components/link.html +6 -0
- package/build/components/link.txt +29 -0
- package/build/components/list.html +1 -0
- package/build/components/list.txt +30 -0
- package/build/components/loader.html +18 -0
- package/build/components/loader.txt +32 -0
- package/build/components/modal.html +2 -1
- package/build/components/modal.txt +26 -22
- package/build/components/pagination.html +1 -0
- package/build/components/pagination.txt +27 -0
- package/build/components/progress.html +1 -0
- package/build/components/progress.txt +33 -0
- package/build/components/skeleton.html +13 -0
- package/build/components/skeleton.txt +30 -0
- package/build/components/static.css +2 -0
- package/build/components/static.css.map +1 -0
- package/build/components/static.js +4 -2440
- package/build/components/static.js.map +1 -1
- package/build/components/sticker.html +1 -0
- package/build/components/sticker.txt +27 -0
- package/build/components/table.html +2 -0
- package/build/components/table.txt +30 -0
- package/build/components/tabs.html +2 -1
- package/build/components/tabs.txt +10 -8
- package/build/components/tag.html +7 -0
- package/build/components/tag.txt +30 -0
- package/build/components/testimonial.html +1 -0
- package/build/components/testimonial.txt +28 -0
- package/build/components/tile.html +19 -0
- package/build/components/tile.txt +37 -0
- package/build/components/tooltip.html +4 -0
- package/build/components/tooltip.txt +26 -0
- package/build/components/types/components/Accordion/Accordion.d.ts +17 -0
- package/build/components/types/components/Accordion/Accordion.static.d.ts +17 -0
- package/build/components/types/components/Accordion/AccordionHeader.d.ts +15 -0
- package/build/components/types/components/Accordion/AccordionItem.d.ts +19 -0
- package/build/components/types/components/Accordion/HeadingContext.d.ts +2 -0
- package/build/components/types/components/Accordion/index.d.ts +3 -0
- package/build/components/types/components/Alert/Alert.d.ts +2 -2
- package/build/components/types/components/Bar/Bar.d.ts +22 -0
- package/build/components/types/components/Bar/BarBreak.d.ts +12 -0
- package/build/components/types/components/Bar/BarItem.d.ts +16 -0
- package/build/components/types/components/Bar/index.d.ts +4 -0
- package/build/components/types/components/BlockAction/BlockAction.d.ts +9 -0
- package/build/components/types/components/BlockAction/BlockActionControl.d.ts +9 -0
- package/build/components/types/components/BlockAction/BlockActionIndicator.d.ts +9 -0
- package/build/components/types/components/BlockAction/CloneElementWithClassName.d.ts +8 -0
- package/build/components/types/components/BlockAction/Context.d.ts +13 -0
- package/build/components/types/components/BlockAction/index.d.ts +16 -0
- package/build/components/types/components/BodyBanner/BodyBanner.d.ts +20 -0
- package/build/components/types/components/BodyBanner/index.d.ts +2 -0
- package/build/components/types/components/Breadcrumbs/BreadcrumbItem.d.ts +15 -0
- package/build/components/types/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/build/components/types/components/Breadcrumbs/index.d.ts +2 -0
- package/build/components/types/components/Button/Button.d.ts +1 -1
- package/build/components/types/components/Card/Card.d.ts +13 -0
- package/build/components/types/components/Card/CardProductHeader.d.ts +9 -0
- package/build/components/types/components/Card/CardSection.d.ts +14 -0
- package/build/components/types/components/Card/index.d.ts +4 -0
- package/build/components/types/components/Carousel/Carousel.d.ts +12 -0
- package/build/components/types/components/Carousel/Carousel.static.d.ts +58 -0
- package/build/components/types/components/Carousel/CarouselItem.d.ts +7 -0
- package/build/components/types/components/Carousel/constants.d.ts +16 -0
- package/build/components/types/components/Carousel/index.d.ts +3 -0
- package/build/components/types/components/CarouselPromotions/CarouselPromotions.d.ts +10 -0
- package/build/components/types/components/CarouselPromotions/CarouselPromotions.static.d.ts +47 -0
- package/build/components/types/components/CarouselPromotions/CarouselPromotionsItem.d.ts +12 -0
- package/build/components/types/components/CarouselPromotions/constants.d.ts +18 -0
- package/build/components/types/components/CarouselPromotions/index.d.ts +3 -0
- package/build/components/types/components/CartTable/CartTable.d.ts +13 -0
- package/build/components/types/components/CartTable/FooterNameColumn.d.ts +7 -0
- package/build/components/types/components/CartTable/FooterPriceColumn.d.ts +9 -0
- package/build/components/types/components/CartTable/Price.d.ts +10 -0
- package/build/components/types/components/CartTable/generateFooter.d.ts +22 -0
- package/build/components/types/components/CartTable/generateRow.d.ts +21 -0
- package/build/components/types/components/CartTable/generateTotal.d.ts +45 -0
- package/build/components/types/components/CartTable/index.d.ts +2 -0
- package/build/components/types/components/Container/Container.d.ts +3 -6
- package/build/components/types/components/Container/index.d.ts +2 -3
- package/build/components/types/components/Controls/Controls.d.ts +16 -0
- package/build/components/types/components/Controls/index.d.ts +2 -0
- package/build/components/types/components/Cover/Cover.d.ts +42 -0
- package/build/components/types/components/Cover/index.d.ts +3 -0
- package/build/components/types/components/Divider/Divider.d.ts +13 -0
- package/build/components/types/components/Divider/index.d.ts +2 -0
- package/build/components/types/components/Dropdown/Dropdown.d.ts +20 -0
- package/build/components/types/components/Dropdown/Dropdown.static.d.ts +28 -0
- package/build/components/types/components/Dropdown/DropdownDivider.d.ts +3 -0
- package/build/components/types/components/Dropdown/DropdownItem.d.ts +9 -0
- package/build/components/types/components/Dropdown/DropdownToggleButton.d.ts +7 -0
- package/build/components/types/components/Dropdown/index.d.ts +5 -0
- package/build/components/types/components/Expander/Expander.d.ts +22 -0
- package/build/components/types/components/Expander/Expander.static.d.ts +13 -0
- package/build/components/types/components/FeatureAccordion/FeatureAccordion.d.ts +11 -0
- package/build/components/types/components/FeatureAccordion/FeatureAccordion.static.d.ts +23 -0
- package/build/components/types/components/FeatureAccordion/FeatureAccordionItem.d.ts +11 -0
- package/build/components/types/components/FeatureAccordion/index.d.ts +2 -0
- package/build/components/types/components/Footer/Footer.d.ts +12 -0
- package/build/components/types/components/Footer/data.d.ts +15 -0
- package/build/components/types/components/Footer/index.d.ts +1 -0
- package/build/components/types/components/Forms/Autocomplete/Autocomplete.d.ts +17 -0
- package/build/components/types/components/Forms/Autocomplete/Autocomplete.static.d.ts +21 -0
- package/build/components/types/components/Forms/Autocomplete/index.d.ts +2 -0
- package/build/components/types/components/Forms/Checkbox/Checkbox.d.ts +21 -0
- package/build/components/types/components/Forms/Checkbox/index.d.ts +2 -0
- package/build/components/types/components/Forms/Field/Control.d.ts +6 -0
- package/build/components/types/components/Forms/Field/Description.d.ts +7 -0
- package/build/components/types/components/Forms/Field/Field.d.ts +17 -0
- package/build/components/types/components/Forms/Field/FieldContext.d.ts +18 -0
- package/build/components/types/components/Forms/Field/Label.d.ts +11 -0
- package/build/components/types/components/Forms/Field/Messages.d.ts +12 -0
- package/build/components/types/components/Forms/Field/Tooltip.d.ts +11 -0
- package/build/components/types/components/Forms/Field/index.d.ts +2 -0
- package/build/components/types/components/Forms/Field/utils.d.ts +16 -0
- package/build/components/types/components/Forms/Fieldset/Fieldset.d.ts +16 -0
- package/build/components/types/components/Forms/Fieldset/FieldsetContext.d.ts +7 -0
- package/build/components/types/components/Forms/Fieldset/index.d.ts +2 -0
- package/build/components/types/components/Forms/File/File.d.ts +17 -0
- package/build/components/types/components/Forms/File/File.static.d.ts +27 -0
- package/build/components/types/components/Forms/File/index.d.ts +2 -0
- package/build/components/types/components/Forms/Group/Group.d.ts +14 -0
- package/build/components/types/components/Forms/Group/Item.d.ts +8 -0
- package/build/components/types/components/Forms/Group/index.d.ts +2 -0
- package/build/components/types/components/Forms/Hint/Hint.d.ts +7 -0
- package/build/components/types/components/Forms/Hint/index.d.ts +2 -0
- package/build/components/types/components/Forms/InputStepper/InputStepper.d.ts +20 -0
- package/build/components/types/components/Forms/InputStepper/InputStepper.static.d.ts +24 -0
- package/build/components/types/components/Forms/InputStepper/index.d.ts +2 -0
- package/build/components/types/components/Forms/Label/Label.d.ts +8 -0
- package/build/components/types/components/Forms/Label/index.d.ts +2 -0
- package/build/components/types/components/Forms/Message/Message.d.ts +12 -0
- package/build/components/types/components/Forms/Message/index.d.ts +2 -0
- package/build/components/types/components/Forms/Radio/Radio.d.ts +21 -0
- package/build/components/types/components/Forms/Radio/index.d.ts +2 -0
- package/build/components/types/components/Forms/RangeSlider/RangeSlider.d.ts +38 -0
- package/build/components/types/components/Forms/RangeSlider/RangeSlider.static.d.ts +24 -0
- package/build/components/types/components/Forms/RangeSlider/data.d.ts +49 -0
- package/build/components/types/components/Forms/RangeSlider/index.d.ts +2 -0
- package/build/components/types/components/Forms/Select/Select.d.ts +33 -0
- package/build/components/types/components/Forms/Select/index.d.ts +4 -0
- package/build/components/types/components/Forms/TextArea/TextArea.d.ts +29 -0
- package/build/components/types/components/Forms/TextArea/index.d.ts +2 -0
- package/build/components/types/components/Forms/TextInput/TextInput.d.ts +32 -0
- package/build/components/types/components/Forms/TextInput/index.d.ts +2 -0
- package/build/components/types/components/Forms/index.d.ts +15 -0
- package/build/components/types/components/Gauge/Gauge.d.ts +11 -0
- package/build/components/types/components/Gauge/index.d.ts +2 -0
- package/build/components/types/components/Grid/Grid.d.ts +14 -0
- package/build/components/types/components/Grid/GridCol.d.ts +12 -0
- package/build/components/types/components/Grid/index.d.ts +3 -0
- package/build/components/types/components/Icon/Icon.d.ts +2 -2
- package/build/components/types/components/Image/Image.d.ts +20 -0
- package/build/components/types/components/Image/index.d.ts +2 -0
- package/build/components/types/components/Link/Link.d.ts +18 -0
- package/build/components/types/components/Link/index.d.ts +2 -0
- package/build/components/types/components/List/ClickableControl.d.ts +9 -0
- package/build/components/types/components/List/List.d.ts +13 -0
- package/build/components/types/components/List/ListItem.d.ts +16 -0
- package/build/components/types/components/List/index.d.ts +3 -0
- package/build/components/types/components/Loader/Loader.d.ts +14 -0
- package/build/components/types/components/Loader/Loader.static.d.ts +19 -0
- package/build/components/types/components/Loader/index.d.ts +2 -0
- package/build/components/types/components/Modal/Modal.d.ts +2 -0
- package/build/components/types/components/Pagination/Pagination.d.ts +28 -0
- package/build/components/types/components/Pagination/PaginationItem.d.ts +21 -0
- package/build/components/types/components/Pagination/Separator.d.ts +6 -0
- package/build/components/types/components/Pagination/helpers.d.ts +23 -0
- package/build/components/types/components/Pagination/index.d.ts +4 -0
- package/build/components/types/components/Progress/Progress.d.ts +15 -0
- package/build/components/types/components/Progress/index.d.ts +2 -0
- package/build/components/types/components/Skeleton/Skeleton.d.ts +3 -0
- package/build/components/types/components/Skeleton/index.d.ts +2 -0
- package/build/components/types/components/Sticker/Sticker.d.ts +10 -0
- package/build/components/types/components/Sticker/index.d.ts +3 -0
- package/build/components/types/components/Table/Cell.d.ts +11 -0
- package/build/components/types/components/Table/Footer.d.ts +3 -0
- package/build/components/types/components/Table/Header.d.ts +3 -0
- package/build/components/types/components/Table/Row.d.ts +10 -0
- package/build/components/types/components/Table/Rows.d.ts +3 -0
- package/build/components/types/components/Table/Table.d.ts +24 -0
- package/build/components/types/components/Table/Table.static.d.ts +23 -0
- package/build/components/types/components/Table/TableContext.d.ts +4 -0
- package/build/components/types/components/Table/index.d.ts +3 -0
- package/build/components/types/components/Table/types.d.ts +34 -0
- package/build/components/types/components/Tabs/Tabs.d.ts +1 -3
- package/build/components/types/components/Tag/Tag.d.ts +24 -0
- package/build/components/types/components/Tag/TagButton.d.ts +12 -0
- package/build/components/types/components/Tag/index.d.ts +4 -0
- package/build/components/types/components/Testimonial/Testimonial.d.ts +10 -0
- package/build/components/types/components/Testimonial/index.d.ts +2 -0
- package/build/components/types/components/Tile/Tile.d.ts +23 -0
- package/build/components/types/components/Tile/index.d.ts +2 -0
- package/build/components/types/components/Tooltip/InfoTooltip.d.ts +8 -0
- package/build/components/types/components/Tooltip/Tooltip.d.ts +25 -0
- package/build/components/types/components/Tooltip/Tooltip.static.d.ts +26 -0
- package/build/components/types/components/Tooltip/index.d.ts +3 -0
- package/build/components/types/components/index.d.ts +34 -2
- package/build/components/types/docs/utils/ToggleButton.d.ts +9 -0
- package/build/components/types/scripts/modules/Toggle.d.ts +39 -0
- package/build/components/types/scripts/modules/toggleUtil.d.ts +13 -0
- package/build/components/types/styles/export/breakpoint.d.ts +9 -0
- package/build/components/types/utils/ConditionalWrapper.d.ts +9 -12
- package/build/components/types/utils/classes.d.ts +5 -0
- package/build/components/types/utils/color.d.ts +20 -0
- package/build/components/types/utils/helpers.d.ts +11 -0
- package/build/components/types/utils/hooks.d.ts +2 -1
- package/build/components/types/utils/index.d.ts +5 -0
- package/build/images/product-1.svg +10 -0
- package/build/images/product-2.svg +14 -0
- package/build/images/product-3.svg +9 -0
- package/build/index.html +57 -3
- package/build/index.txt +5 -4
- package/build/javascript/toggle.html +1 -0
- package/build/javascript/toggle.txt +29 -0
- package/build/lib/after-components.css +1 -1
- package/build/lib/after-components.css.map +1 -1
- package/build/lib/before-components.css +2 -1
- package/build/lib/before-components.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/scripts.css +2 -0
- package/build/lib/scripts.css.map +1 -0
- package/build/lib/scripts.js +4 -2442
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +2 -1
- package/build/lib/style.css.map +1 -1
- package/build/logo.svg +1 -0
- package/build/utilities/horizontal-scroll.html +4 -0
- package/build/utilities/horizontal-scroll.txt +26 -0
- package/package.json +12 -2
- package/src/components/Accordion/Accordion.mdx +2 -2
- package/src/components/Accordion/Accordion.tsx +12 -20
- package/src/components/Accordion/AccordionItem.tsx +16 -26
- package/src/components/Accordion/index.ts +3 -3
- package/src/components/Accordion/styles/mixins.scss +11 -11
- package/src/components/Accordion/styles/style.scss +34 -32
- package/src/components/Accordion/tests/Accordion.unit.test.js +2 -2
- package/src/components/Alert/Alert.tsx +6 -5
- package/src/components/Alert/CHANGELOG.md +33 -0
- package/src/components/Alert/styles/config.scss +2 -41
- package/src/components/Alert/styles/mixins.scss +20 -8
- package/src/components/Alert/styles/style.scss +22 -30
- package/src/components/Alert/tests/Alert.test.js +26 -0
- package/src/components/Bar/Bar.mdx +203 -0
- package/src/components/Bar/Bar.tsx +58 -0
- package/src/components/Bar/BarBreak.tsx +29 -0
- package/src/components/Bar/BarItem.tsx +50 -0
- package/src/components/Bar/index.ts +5 -0
- package/src/components/Bar/styles/config.scss +10 -0
- package/src/components/Bar/styles/mixins.scss +84 -0
- package/src/components/Bar/styles/style.scss +62 -0
- package/src/components/Bar/tests/Bar.conformance.test.js +29 -0
- package/src/components/Bar/tests/Bar.unit.test.js +58 -0
- package/src/components/Bar/tests/BarBreak.unit.test.js +32 -0
- package/src/components/Bar/tests/BarItem.unit.test.js +51 -0
- package/src/components/BlockAction/BlockAction.mdx +244 -0
- package/src/components/BlockAction/BlockAction.static.ts +104 -0
- package/src/components/BlockAction/BlockAction.tsx +27 -0
- package/src/components/BlockAction/BlockActionControl.tsx +32 -0
- package/src/components/BlockAction/BlockActionIndicator.tsx +32 -0
- package/src/components/BlockAction/CloneElementWithClassName.tsx +23 -0
- package/src/components/BlockAction/Context.tsx +39 -0
- package/src/components/BlockAction/index.tsx +29 -0
- package/src/components/BlockAction/styles/config.scss +10 -0
- package/src/components/BlockAction/styles/mixins.scss +33 -0
- package/src/components/BlockAction/styles/style.scss +35 -0
- package/src/components/BlockAction/tests/BlockAction.conformance.test.js +117 -0
- package/src/components/BlockAction/tests/BlockAction.unit.test.js +44 -0
- package/src/components/BlockAction/tests/BlockActionControl.unit.test.js +146 -0
- package/src/components/BlockAction/tests/BlockActionIndicator.unit.test.js +68 -0
- package/src/components/BlockAction/tests/CloneElementWithClassName.unit.test.js +33 -0
- package/src/components/BodyBanner/BodyBanner.mdx +268 -0
- package/src/components/BodyBanner/BodyBanner.tsx +102 -0
- package/src/components/BodyBanner/index.tsx +3 -0
- package/src/components/BodyBanner/styles/mixins.scss +106 -0
- package/src/components/BodyBanner/styles/style.scss +41 -0
- package/src/components/Breadcrumbs/BreadcrumbItem.tsx +13 -13
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +16 -15
- package/src/components/Breadcrumbs/index.ts +2 -4
- package/src/components/Breadcrumbs/styles/style.scss +25 -23
- package/src/components/Breadcrumbs/tests/BreadcrumbItem.unit.test.js +1 -2
- package/src/components/Breadcrumbs/tests/Breadcrumbs.conformance.test.js +16 -17
- package/src/components/Breadcrumbs/tests/Breadcrumbs.integration.test.js +5 -5
- package/src/components/Breadcrumbs/tests/Breadcrumbs.unit.test.js +1 -2
- package/src/components/Button/Button.tsx +4 -3
- package/src/components/Button/styles/config.scss +34 -127
- package/src/components/Button/styles/mixins.scss +2 -11
- package/src/components/Button/styles/style.scss +28 -48
- package/src/components/Button/tests/Button.test.js +8 -3
- package/src/components/Buttons/styles/style.scss +6 -4
- package/src/components/Card/CHANGELOG.md +19 -0
- package/src/components/Card/Card.mdx +334 -0
- package/src/components/Card/Card.tsx +35 -0
- package/src/components/Card/CardProductHeader.tsx +34 -0
- package/src/components/Card/CardSection.tsx +44 -0
- package/src/components/Card/index.ts +5 -0
- package/src/components/Card/styles/config.scss +16 -0
- package/src/components/Card/styles/mixins.scss +68 -0
- package/src/components/Card/styles/style.scss +37 -0
- package/src/components/Card/tests/Card.conformance.test.js +31 -0
- package/src/components/Card/tests/Card.unit.test.js +47 -0
- package/src/components/Card/tests/CardProductHeader.unit.test.js +51 -0
- package/src/components/Card/tests/CardSection.unit.test.js +61 -0
- package/src/components/Card/tests/data.ts +44 -0
- package/src/components/Carousel/Carousel.mdx +163 -0
- package/src/components/Carousel/Carousel.static.ts +227 -0
- package/src/components/Carousel/Carousel.tsx +93 -0
- package/src/components/Carousel/CarouselItem.tsx +29 -0
- package/src/components/Carousel/constants.ts +18 -0
- package/src/components/Carousel/index.ts +4 -0
- package/src/components/Carousel/styles/config.scss +44 -0
- package/src/components/Carousel/styles/mixins.scss +231 -0
- package/src/components/Carousel/styles/style.scss +64 -0
- package/src/components/Carousel/tests/Carousel.conformance.test.js +26 -0
- package/src/components/Carousel/tests/Carousel.unit.test.js +150 -0
- package/src/components/Carousel/tests/CarouselItem.unit.test.js +27 -0
- package/src/components/CarouselPromotions/CarouselPromotions.mdx +246 -0
- package/src/components/CarouselPromotions/CarouselPromotions.static.ts +254 -0
- package/src/components/CarouselPromotions/CarouselPromotions.tsx +63 -0
- package/src/components/CarouselPromotions/CarouselPromotionsItem.tsx +53 -0
- package/src/components/CarouselPromotions/constants.ts +21 -0
- package/src/components/CarouselPromotions/index.ts +4 -0
- package/src/components/CarouselPromotions/styles/config.scss +65 -0
- package/src/components/CarouselPromotions/styles/mixins.scss +286 -0
- package/src/components/CarouselPromotions/styles/style.scss +51 -0
- package/src/components/CarouselPromotions/tests/CarouselPromotions.conformance.test.js +30 -0
- package/src/components/CarouselPromotions/tests/CarouselPromotions.unit.test.js +94 -0
- package/src/components/CarouselPromotions/tests/CarouselPromotionsItem.unit.test.js +33 -0
- package/src/components/CartTable/CartTable.mdx +129 -0
- package/src/components/CartTable/CartTable.tsx +111 -0
- package/src/components/CartTable/FooterNameColumn.tsx +32 -0
- package/src/components/CartTable/FooterPriceColumn.tsx +50 -0
- package/src/components/CartTable/Price.tsx +48 -0
- package/src/components/CartTable/data.ts +147 -0
- package/src/components/CartTable/generateFooter.tsx +97 -0
- package/src/components/CartTable/generateRow.tsx +196 -0
- package/src/components/CartTable/generateTotal.ts +157 -0
- package/src/components/CartTable/index.ts +3 -0
- package/src/components/CartTable/styles/config.scss +19 -0
- package/src/components/CartTable/styles/mixins.scss +141 -0
- package/src/components/CartTable/styles/style.scss +37 -0
- package/src/components/CartTable/tests/CartTable.conformance.test.js +16 -0
- package/src/components/Container/Container.tsx +11 -9
- package/src/components/Container/index.ts +2 -4
- package/src/components/Container/styles/style.scss +5 -3
- package/src/components/Container/tests/Container.conformance.test.js +59 -53
- package/src/components/Container/tests/Container.unit.test.js +131 -131
- package/src/components/Controls/Controls.mdx +469 -0
- package/src/components/Controls/Controls.tsx +50 -0
- package/src/components/Controls/index.ts +3 -0
- package/src/components/Controls/styles/config.scss +61 -0
- package/src/components/Controls/styles/mixins.scss +70 -0
- package/src/components/Controls/styles/style.scss +16 -0
- package/src/components/Controls/tests/Controls.test.js +479 -0
- package/src/components/Cover/Cover.mdx +87 -0
- package/src/components/Cover/Cover.tsx +81 -0
- package/src/components/Cover/index.ts +5 -0
- package/src/components/Cover/styles/config.scss +55 -0
- package/src/components/Cover/styles/mixins.scss +43 -0
- package/src/components/Cover/styles/style.scss +32 -0
- package/src/components/Cover/tests/Cover.conformance.test.js +28 -0
- package/src/components/Cover/tests/Cover.unit.test.js +116 -0
- package/src/components/Divider/Divider.mdx +65 -0
- package/src/components/Divider/Divider.tsx +57 -0
- package/src/components/Divider/index.ts +3 -0
- package/src/components/Divider/styles/config.scss +27 -0
- package/src/components/Divider/styles/mixins.scss +45 -0
- package/src/components/Divider/styles/style.scss +33 -0
- package/src/components/{Badge/tests/Badge.conformance.test.js → Divider/tests/Divider.conformance.test.js} +5 -8
- package/src/components/Divider/tests/Divider.unit.test.js +80 -0
- package/src/components/Dropdown/Dropdown.mdx +260 -0
- package/src/components/Dropdown/Dropdown.static.ts +198 -0
- package/src/components/Dropdown/Dropdown.tsx +107 -0
- package/src/components/Dropdown/DropdownDivider.tsx +17 -0
- package/src/components/Dropdown/DropdownItem.tsx +43 -0
- package/src/components/Dropdown/DropdownToggleButton.tsx +37 -0
- package/src/components/Dropdown/index.ts +6 -0
- package/src/components/Dropdown/styles/config.scss +43 -0
- package/src/components/Dropdown/styles/mixins.scss +79 -0
- package/src/components/Dropdown/styles/style.scss +33 -0
- package/src/components/Dropdown/tests/Dropdown.conformance.test.js +48 -0
- package/src/components/Dropdown/tests/Dropdown.unit.test.js +69 -0
- package/src/components/Expander/Expander.mdx +153 -0
- package/src/components/Expander/Expander.static.ts +59 -0
- package/src/components/Expander/Expander.tsx +99 -0
- package/src/components/Expander/index.ts +3 -0
- package/src/components/Expander/styles/style.scss +63 -0
- package/src/components/Expander/tests/Expander.conformance.test.js +59 -0
- package/src/components/Expander/tests/Expander.unit.test.js +124 -0
- package/src/components/FeatureAccordion/FeatureAccordion.mdx +33 -0
- package/src/components/FeatureAccordion/FeatureAccordion.static.ts +121 -0
- package/src/components/FeatureAccordion/FeatureAccordion.tsx +116 -0
- package/src/components/FeatureAccordion/FeatureAccordionItem.tsx +31 -0
- package/src/components/FeatureAccordion/index.ts +2 -0
- package/src/components/FeatureAccordion/styles/mixins.scss +74 -0
- package/src/components/FeatureAccordion/styles/style.scss +21 -0
- package/src/components/FeatureAccordion/tests/FeatureAccordion.conformance.test.js +92 -0
- package/src/components/FeatureAccordion/tests/FeatureAccordion.unit.test.js +80 -0
- package/src/components/Footer/Footer.tsx +93 -0
- package/src/components/Footer/data.ts +71 -0
- package/src/components/Footer/index.ts +1 -0
- package/src/components/Footer/tests/Footer.conformance.test.js +13 -0
- package/src/components/Footer/tests/Footer.unit.test.js +66 -0
- package/src/components/Forms/Autocomplete/Autocomplete.mdx +198 -0
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +90 -0
- package/src/components/Forms/Autocomplete/Autocomplete.tsx +66 -0
- package/src/components/Forms/Autocomplete/index.ts +3 -0
- package/src/components/Forms/Autocomplete/styles/config.scss +7 -0
- package/src/components/Forms/Autocomplete/styles/mixins.scss +77 -0
- package/src/components/Forms/Autocomplete/styles/style.scss +66 -0
- package/src/components/Forms/Checkbox/Checkbox.mdx +139 -0
- package/src/components/Forms/Checkbox/Checkbox.tsx +75 -0
- package/src/components/Forms/Checkbox/index.ts +3 -0
- package/src/components/Forms/Checkbox/styles/config.scss +25 -0
- package/src/components/Forms/Checkbox/styles/mixins.scss +2 -0
- package/src/components/Forms/Checkbox/styles/style.scss +89 -0
- package/src/components/Forms/Checkbox/tests/Checkbox.unit.test.js +95 -0
- package/src/components/Forms/Field/Control.tsx +129 -0
- package/src/components/Forms/Field/Description.tsx +40 -0
- package/src/components/Forms/Field/Field.mdx +383 -0
- package/src/components/Forms/Field/Field.tsx +102 -0
- package/src/components/Forms/Field/FieldContext.tsx +24 -0
- package/src/components/Forms/Field/Label.tsx +71 -0
- package/src/components/Forms/Field/Messages.tsx +36 -0
- package/src/components/Forms/Field/Tooltip.tsx +35 -0
- package/src/components/Forms/Field/index.ts +3 -0
- package/src/components/Forms/Field/styles/config.scss +25 -0
- package/src/components/Forms/Field/styles/mixins.scss +43 -0
- package/src/components/Forms/Field/styles/style.scss +37 -0
- package/src/components/Forms/Field/tests/Autocomplete.Field.conformance.test.js +52 -0
- package/src/components/Forms/Field/tests/Checkbox.Field.conformance.test.js +43 -0
- package/src/components/Forms/Field/tests/Field.unit.test.js +11 -0
- package/src/components/Forms/Field/tests/File.Field.conformance.test.js +47 -0
- package/src/components/Forms/Field/tests/Group.Field.conformance.test.js +47 -0
- package/src/components/Forms/Field/tests/Label.unit.test.js +163 -0
- package/src/components/Forms/Field/tests/Messages.unit.test.js +102 -0
- package/src/components/Forms/Field/tests/Radio.Field.conformance.test.js +43 -0
- package/src/components/Forms/Field/tests/Rangeslider.Field.test.js +60 -0
- package/src/components/Forms/Field/tests/Select.Field.conformance.test.js +45 -0
- package/src/components/Forms/Field/tests/Text.Field.conformance.test.js +43 -0
- package/src/components/Forms/Field/tests/Textarea.Field.conformance.test.js +43 -0
- package/src/components/Forms/Field/tests/Tooltip.unit.test.js +38 -0
- package/src/components/Forms/Field/utils.ts +36 -0
- package/src/components/Forms/Fieldset/Fieldset.mdx +178 -0
- package/src/components/Forms/Fieldset/Fieldset.tsx +62 -0
- package/src/components/Forms/Fieldset/FieldsetContext.ts +13 -0
- package/src/components/Forms/Fieldset/docsData.ts +75 -0
- package/src/components/Forms/Fieldset/index.ts +3 -0
- package/src/components/Forms/Fieldset/styles/mixins.scss +6 -0
- package/src/components/Forms/Fieldset/styles/style.scss +10 -0
- package/src/components/Forms/Fieldset/tests/Fieldset.unit.test.js +63 -0
- package/src/components/Forms/File/File.mdx +88 -0
- package/src/components/Forms/File/File.static.ts +164 -0
- package/src/components/Forms/File/File.tsx +77 -0
- package/src/components/Forms/File/index.ts +3 -0
- package/src/components/Forms/File/styles/config.scss +12 -0
- package/src/components/Forms/File/styles/mixins.scss +87 -0
- package/src/components/Forms/File/styles/style.scss +51 -0
- package/src/components/Forms/FormTooltip.mdx +51 -0
- package/src/components/Forms/Forms.mdx +48 -0
- package/src/components/Forms/Group/CHANGELOG.md +5 -0
- package/src/components/Forms/Group/Group.mdx +146 -0
- package/src/components/Forms/Group/Group.tsx +74 -0
- package/src/components/Forms/Group/Item.tsx +35 -0
- package/src/components/Forms/Group/index.ts +3 -0
- package/src/components/Forms/Group/styles/config.scss +9 -0
- package/src/components/Forms/Group/styles/mixins.scss +54 -0
- package/src/components/Forms/Group/styles/style.scss +19 -0
- package/src/components/Forms/Group/tests/Group.unit.test.js +171 -0
- package/src/components/Forms/Group/tests/Item.unit.test.js +31 -0
- package/src/components/Forms/Hint/Hint.mdx +40 -0
- package/src/components/Forms/Hint/Hint.tsx +21 -0
- package/src/components/Forms/Hint/index.ts +3 -0
- package/src/components/Forms/Hint/styles/config.scss +5 -0
- package/src/components/Forms/Hint/styles/mixins.scss +6 -0
- package/src/components/Forms/Hint/styles/style.scss +7 -0
- package/src/components/Forms/Hint/tests/Hint.unit.test.js +35 -0
- package/src/components/Forms/InputStepper/InputStepper.mdx +147 -0
- package/src/components/Forms/InputStepper/InputStepper.static.ts +187 -0
- package/src/components/Forms/InputStepper/InputStepper.tsx +86 -0
- package/src/components/Forms/InputStepper/index.ts +3 -0
- package/src/components/Forms/InputStepper/styles/style.scss +210 -0
- package/src/components/Forms/InputStepper/tests/InputStepper.unit.test.js +54 -0
- package/src/components/Forms/Label/Label.mdx +95 -0
- package/src/components/Forms/Label/Label.tsx +26 -0
- package/src/components/Forms/Label/index.ts +3 -0
- package/src/components/Forms/Label/styles/config.scss +4 -0
- package/src/components/Forms/Label/styles/mixins.scss +6 -0
- package/src/components/Forms/Label/styles/style.scss +11 -0
- package/src/components/Forms/Label/tests/Label.unit.test.js +42 -0
- package/src/components/Forms/Message/Message.mdx +40 -0
- package/src/components/Forms/Message/Message.tsx +64 -0
- package/src/components/Forms/Message/index.ts +3 -0
- package/src/components/Forms/Message/styles/config.scss +21 -0
- package/src/components/Forms/Message/styles/mixins.scss +20 -0
- package/src/components/Forms/Message/styles/style.scss +12 -0
- package/src/components/Forms/Message/tests/Message.unit.test.js +83 -0
- package/src/components/Forms/Radio/Radio.mdx +98 -0
- package/src/components/Forms/Radio/Radio.tsx +70 -0
- package/src/components/Forms/Radio/index.ts +3 -0
- package/src/components/Forms/Radio/styles/config.scss +25 -0
- package/src/components/Forms/Radio/styles/mixins.scss +6 -0
- package/src/components/Forms/Radio/styles/style.scss +25 -0
- package/src/components/Forms/Radio/tests/Radio.unit.test.js +105 -0
- package/src/components/Forms/RangeSlider/RangeSlider.mdx +304 -0
- package/src/components/Forms/RangeSlider/RangeSlider.static.ts +121 -0
- package/src/components/Forms/RangeSlider/RangeSlider.tsx +98 -0
- package/src/components/Forms/RangeSlider/data.ts +50 -0
- package/src/components/Forms/RangeSlider/index.ts +3 -0
- package/src/components/Forms/RangeSlider/styles/config.scss +32 -0
- package/src/components/Forms/RangeSlider/styles/mixins.scss +139 -0
- package/src/components/Forms/RangeSlider/styles/style.scss +97 -0
- package/src/components/Forms/Select/Select.mdx +106 -0
- package/src/components/Forms/Select/Select.tsx +97 -0
- package/src/components/Forms/Select/index.tsx +9 -0
- package/src/components/Forms/Select/styles/config.scss +53 -0
- package/src/components/Forms/Select/styles/mixins.scss +34 -0
- package/src/components/Forms/Select/styles/style.scss +22 -0
- package/src/components/Forms/Select/tests/Select.unit.test.js +98 -0
- package/src/components/Forms/TextArea/TextArea.mdx +109 -0
- package/src/components/Forms/TextArea/TextArea.tsx +84 -0
- package/src/components/Forms/TextArea/index.ts +3 -0
- package/src/components/Forms/TextArea/styles/config.scss +35 -0
- package/src/components/Forms/TextArea/styles/mixins.scss +48 -0
- package/src/components/Forms/TextArea/styles/style.scss +22 -0
- package/src/components/Forms/TextArea/tests/TextArea.unit.test.js +127 -0
- package/src/components/Forms/TextInput/TextInput.mdx +153 -0
- package/src/components/Forms/TextInput/TextInput.tsx +101 -0
- package/src/components/Forms/TextInput/index.ts +3 -0
- package/src/components/Forms/TextInput/styles/config.scss +60 -0
- package/src/components/Forms/TextInput/styles/mixins.scss +80 -0
- package/src/components/Forms/TextInput/styles/style.scss +30 -0
- package/src/components/Forms/TextInput/tests/TextInput.unit.test.js +108 -0
- package/src/components/Forms/index.ts +16 -0
- package/src/components/Forms/styles/config.scss +41 -0
- package/src/components/Forms/styles/mixins.scss +44 -0
- package/src/components/Gauge/Gauge.mdx +35 -0
- package/src/components/Gauge/Gauge.tsx +72 -0
- package/src/components/Gauge/GaugeMaker.tsx +90 -0
- package/src/components/Gauge/index.ts +3 -0
- package/src/components/Gauge/styles/style.scss +34 -0
- package/src/components/Gauge/tests/Gauge.conformance.test.js +25 -0
- package/src/components/Gauge/tests/Gauge.unit.test.js +35 -0
- package/src/components/Grid/Grid.mdx +20 -19
- package/src/components/Grid/Grid.tsx +27 -22
- package/src/components/Grid/index.ts +3 -5
- package/src/components/Grid/styles/style.scss +29 -27
- package/src/components/Icon/Icon.tsx +2 -2
- package/src/components/Icon/styles/config.scss +5 -5
- package/src/components/Icon/styles/style.scss +12 -10
- package/src/components/Image/Image.mdx +29 -20
- package/src/components/Image/Image.tsx +12 -13
- package/src/components/Image/index.ts +2 -6
- package/src/components/Image/styles/style.scss +9 -6
- package/src/components/Image/tests/Image.conformance.test.js +1 -1
- package/src/components/Image/tests/Image.unit.test.js +166 -188
- package/src/components/Link/CHANGELOG.md +25 -0
- package/src/components/Link/Link.tsx +14 -9
- package/src/components/Link/styles/mixins.scss +8 -17
- package/src/components/Link/styles/style.scss +37 -54
- package/src/components/Link/tests/Link.conformance.test.js +7 -25
- package/src/components/Link/tests/Link.unit.test.js +20 -33
- package/src/components/List/ClickableControl.tsx +33 -0
- package/src/components/List/List.mdx +216 -0
- package/src/components/List/List.tsx +40 -0
- package/src/components/List/ListItem.tsx +44 -0
- package/src/components/List/index.ts +5 -0
- package/src/components/List/styles/config.scss +38 -0
- package/src/components/List/styles/mixins.scss +99 -0
- package/src/components/List/styles/style.scss +48 -0
- package/src/components/List/tests/ClickableControl.unit.test.js +100 -0
- package/src/components/List/tests/List.conformance.test.js +69 -0
- package/src/components/List/tests/List.unit.test.js +47 -0
- package/src/components/List/tests/ListItem.unit.test.js +104 -0
- package/src/components/Loader/Loader.mdx +148 -0
- package/src/components/Loader/Loader.static.ts +85 -0
- package/src/components/Loader/Loader.tsx +75 -0
- package/src/components/Loader/index.ts +3 -0
- package/src/components/Loader/styles/config.scss +16 -0
- package/src/components/Loader/styles/mixins.scss +66 -0
- package/src/components/Loader/styles/style.scss +38 -0
- package/src/components/Loader/tests/Loader.conformance.test.js +22 -0
- package/src/components/Loader/tests/Loader.unit.test.js +59 -0
- package/src/components/Loader/tests/test.scss +5 -0
- package/src/components/Modal/Modal.mdx +86 -86
- package/src/components/Modal/Modal.tsx +5 -0
- package/src/components/Modal/styles/config.scss +7 -8
- package/src/components/Modal/styles/mixins.scss +2 -2
- package/src/components/Modal/styles/style.scss +65 -63
- package/src/components/Modal/tests/Modal.unit.test.js +22 -0
- package/src/components/Pagination/Pagination.mdx +45 -0
- package/src/components/Pagination/Pagination.tsx +86 -0
- package/src/components/Pagination/PaginationItem.tsx +61 -0
- package/src/components/Pagination/Separator.tsx +19 -0
- package/src/components/Pagination/helpers.ts +71 -0
- package/src/components/Pagination/index.ts +5 -0
- package/src/components/Pagination/styles/mixins.scss +43 -0
- package/src/components/Pagination/styles/style.scss +28 -0
- package/src/components/Pagination/tests/Item.unit.test.js +96 -0
- package/src/components/Pagination/tests/Pagination.conformance.test.js +41 -0
- package/src/components/Pagination/tests/Pagination.unit.test.js +108 -0
- package/src/components/Pagination/tests/Separator.unit.test.js +25 -0
- package/src/components/Pagination/tests/utils.js +12 -0
- package/src/components/Progress/Progress.mdx +119 -0
- package/src/components/Progress/Progress.tsx +60 -0
- package/src/components/Progress/index.ts +3 -0
- package/src/components/Progress/styles/config.scss +19 -0
- package/src/components/Progress/styles/mixins.scss +40 -0
- package/src/components/Progress/styles/style.scss +31 -0
- package/src/components/Progress/tests/Progress.conformance.test.js +27 -0
- package/src/components/Progress/tests/Progress.unit.test.js +108 -0
- package/src/components/Section/Section.tsx +1 -1
- package/src/components/Section/styles/style.scss +28 -26
- package/src/components/Skeleton/Skeleton.mdx +90 -0
- package/src/components/Skeleton/Skeleton.tsx +21 -0
- package/src/components/Skeleton/index.ts +3 -0
- package/src/components/Skeleton/styles/config.scss +31 -0
- package/src/components/Skeleton/styles/mixins.scss +22 -0
- package/src/components/Skeleton/styles/style.scss +7 -0
- package/src/components/Skeleton/tests/Skeleton.conformance.test.js +16 -0
- package/src/components/Skeleton/tests/Skeleton.unit.test.js +22 -0
- package/src/components/Sticker/Sticker.mdx +50 -0
- package/src/components/Sticker/Sticker.tsx +31 -0
- package/src/components/Sticker/index.ts +4 -0
- package/src/components/Sticker/styles/config.scss +31 -0
- package/src/components/Sticker/styles/mixins.scss +25 -0
- package/src/components/Sticker/styles/style.scss +22 -0
- package/src/components/Sticker/tests/Sticker.conformance.test.js +17 -0
- package/src/components/Sticker/tests/Sticker.unit.test.js +42 -0
- package/src/components/Table/Cell.tsx +22 -0
- package/src/components/Table/Footer.tsx +25 -0
- package/src/components/Table/Header.tsx +73 -0
- package/src/components/Table/Row.tsx +70 -0
- package/src/components/Table/Rows.tsx +36 -0
- package/src/components/Table/Table.mdx +199 -0
- package/src/components/Table/Table.static.ts +146 -0
- package/src/components/Table/Table.tsx +130 -0
- package/src/components/Table/TableContext.ts +9 -0
- package/src/components/Table/docsData.ts +210 -0
- package/src/components/Table/index.ts +4 -0
- package/src/components/Table/styles/config.scss +4 -0
- package/src/components/Table/styles/mixins.scss +115 -0
- package/src/components/Table/styles/style.scss +103 -0
- package/src/components/Table/tests/Cell.unit.test.js +59 -0
- package/src/components/Table/tests/Footer.unit.test.js +70 -0
- package/src/components/Table/tests/Header.unit.test.js +120 -0
- package/src/components/Table/tests/Row.unit.test.js +206 -0
- package/src/components/Table/tests/Rows.unit.test.js +92 -0
- package/src/components/Table/tests/Table.conformance.test.js +74 -0
- package/src/components/Table/tests/Table.unit.test.js +296 -0
- package/src/components/Table/types.ts +40 -0
- package/src/components/Tabs/Tabs.tsx +4 -5
- package/src/components/Tabs/styles/config.scss +29 -48
- package/src/components/Tabs/styles/mixins.scss +20 -29
- package/src/components/Tabs/styles/style.scss +34 -42
- package/src/components/Tabs/tests/Tabs.unit.test.js +8 -0
- package/src/components/Tag/CHANGELOG.md +93 -0
- package/src/components/Tag/Tag.mdx +52 -0
- package/src/components/Tag/Tag.tsx +118 -0
- package/src/components/Tag/TagButton.tsx +67 -0
- package/src/components/Tag/index.ts +5 -0
- package/src/components/Tag/styles/config.scss +132 -0
- package/src/components/Tag/styles/mixins.scss +54 -0
- package/src/components/Tag/styles/style.scss +69 -0
- package/src/components/Tag/tests/Tag.conformance.test.js +44 -0
- package/src/components/Tag/tests/Tag.unit.test.js +93 -0
- package/src/components/Tag/tests/TagButton.conformance.test.js +24 -0
- package/src/components/Tag/tests/TagButton.unit.test.js +96 -0
- package/src/components/Testimonial/Testimonial.mdx +41 -0
- package/src/components/Testimonial/Testimonial.tsx +38 -0
- package/src/components/Testimonial/index.ts +3 -0
- package/src/components/Testimonial/styles/config.scss +39 -0
- package/src/components/Testimonial/styles/mixins.scss +40 -0
- package/src/components/Testimonial/styles/style.scss +16 -0
- package/src/components/Testimonial/tests/Testimonial.conformance.test.js +17 -0
- package/src/components/Testimonial/tests/Testimonial.unit.test.js +44 -0
- package/src/components/Tile/CHANGELOG.md +14 -0
- package/src/components/Tile/Tile.mdx +163 -0
- package/src/components/Tile/Tile.tsx +86 -0
- package/src/components/Tile/index.ts +3 -0
- package/src/components/Tile/styles/config.scss +17 -0
- package/src/components/Tile/styles/mixins.scss +78 -0
- package/src/components/Tile/styles/style.scss +55 -0
- package/src/components/Tile/tests/Tile.conformance.test.js +16 -0
- package/src/components/Tile/tests/Tile.unit.test.js +126 -0
- package/src/components/Tooltip/InfoTooltip.tsx +40 -0
- package/src/components/Tooltip/TODO.md +1 -0
- package/src/components/Tooltip/Tooltip.mdx +227 -0
- package/src/components/Tooltip/Tooltip.static.ts +213 -0
- package/src/components/Tooltip/Tooltip.tsx +107 -0
- package/src/components/Tooltip/index.ts +4 -0
- package/src/components/Tooltip/styles/config.scss +58 -0
- package/src/components/Tooltip/styles/mixins.scss +94 -0
- package/src/components/Tooltip/styles/style.scss +30 -0
- package/src/components/Tooltip/tests/BaseWrapper.tsx +10 -0
- package/src/components/Tooltip/tests/InfoTooltip.unit.test.js +98 -0
- package/src/components/Tooltip/tests/Tooltip.conformance.test.js +44 -0
- package/src/components/Tooltip/tests/Tooltip.unit.test.js +326 -0
- package/src/components/index.ts +124 -3
- package/src/components/static.ts +1 -1
- package/src/styles/base/globals-forms.scss +15 -13
- package/src/styles/base/globals.scss +132 -103
- package/src/styles/before-components.scss +8 -4
- package/src/styles/export/base.scss +1 -1
- package/src/styles/export/color.scss +22 -22
- package/src/styles/shame.scss +10 -8
- package/src/styles/tokens/base.scss +4 -4
- package/src/styles/tokens/color.scss +11 -11
- package/src/styles/typography/mixins.scss +1 -1
- package/src/styles/typography/style.scss +43 -41
- package/src/styles/utilities/border.scss +16 -15
- package/src/styles/utilities/color.scss +115 -95
- package/src/styles/utilities/horizontal-scroll.scss +40 -36
- package/src/styles/utilities/layout.scss +159 -157
- package/src/styles/utilities/text.scss +98 -84
- package/src/styles/utilities/visibility.scss +66 -62
- package/build/_next/static/CRhIjUFtohDOfdDfzvfXM/_buildManifest.js +0 -1
- package/build/_next/static/chunks/4bd1b696-40a218329c8ae32b.js +0 -1
- package/build/_next/static/chunks/684-c72f8f73e7f2d568.js +0 -1
- package/build/_next/static/chunks/925.75d0c8afa7ab7cfa.js +0 -1
- package/build/_next/static/chunks/998-a45c3cf6f575e126.js +0 -1
- package/build/_next/static/chunks/app/_not-found/page-c799b4c91b89a5c2.js +0 -1
- package/build/_next/static/chunks/app/components/alert/page-d591b03a7394f81e.js +0 -1
- package/build/_next/static/chunks/app/components/badge/page-bbcffd5558aeab06.js +0 -1
- package/build/_next/static/chunks/app/components/button/page-b922a8f5114b0a69.js +0 -1
- package/build/_next/static/chunks/app/components/buttons/page-0a5bf7e5ac7991fb.js +0 -1
- package/build/_next/static/chunks/app/components/icon/page-dac6ba29b85d924d.js +0 -1
- package/build/_next/static/chunks/app/components/modal/page-4a249b6d271eea91.js +0 -1
- package/build/_next/static/chunks/app/components/tabs/page-7d82e8eafd25b86e.js +0 -1
- package/build/_next/static/chunks/app/layout-f74d44a2772d8d63.js +0 -1
- package/build/_next/static/chunks/app/page-9efa16a51ef59461.js +0 -1
- package/build/_next/static/chunks/framework-f593a28cde54158e.js +0 -1
- package/build/_next/static/chunks/main-43608b6b4bb05f8f.js +0 -1
- package/build/_next/static/chunks/main-app-ce2a2222e012907f.js +0 -1
- package/build/_next/static/chunks/pages/_error-cc3f077a18ea1793.js +0 -1
- package/build/_next/static/chunks/webpack-623f6e616651e1c0.js +0 -1
- package/build/_next/static/css/14f3a3e0186fb7a8.css +0 -3
- package/build/_next/static/css/168dd2b7e791cf72.css +0 -1
- package/build/_next/static/css/28a41a1d7dcdbfd9.css +0 -1
- package/build/_next/static/css/291602d64f1f3570.css +0 -1
- package/build/_next/static/css/4c4366b3963177f0.css +0 -1
- package/build/_next/static/css/5481aeac9adca710.css +0 -1
- package/build/_next/static/css/73b136688c14b891.css +0 -1
- package/build/_next/static/css/91c8cf755bf9ff19.css +0 -1
- package/build/_next/static/css/c1b0424033f305ff.css +0 -1
- package/build/_next/static/css/eea9fd9ccdd56c76.css +0 -1
- package/build/components/Badge/index.js +0 -619
- package/build/components/Badge/index.js.map +0 -1
- package/build/components/Badge/style.css +0 -2
- package/build/components/Badge/style.css.map +0 -1
- package/build/components/badge.html +0 -4
- package/build/components/badge.txt +0 -24
- package/build/components/types/components/Badge/Badge.d.ts +0 -12
- package/build/components/types/components/Badge/index.d.ts +0 -2
- package/src/components/Badge/Badge.mdx +0 -52
- package/src/components/Badge/Badge.tsx +0 -47
- package/src/components/Badge/index.ts +0 -3
- package/src/components/Badge/styles/config.scss +0 -88
- package/src/components/Badge/styles/mixins.scss +0 -26
- package/src/components/Badge/styles/style.scss +0 -21
- package/src/components/Badge/tests/Badge.unit.test.js +0 -50
- package/src/components/Link/styles/config.scss +0 -85
- package/src/components/Link/tests/Link.integration.test.js +0 -393
- /package/build/_next/static/{CRhIjUFtohDOfdDfzvfXM → BGy4QLZfZPwswIZT7YGE2}/_ssgManifest.js +0 -0
package/build/lib/scripts.js
CHANGED
|
@@ -1,2446 +1,8 @@
|
|
|
1
|
-
function _arrayLikeToArray(r, a) {
|
|
2
|
-
|
|
3
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
4
|
-
return n;
|
|
5
|
-
}
|
|
6
|
-
function _arrayWithHoles(r) {
|
|
7
|
-
if (Array.isArray(r)) return r;
|
|
8
|
-
}
|
|
9
|
-
function _arrayWithoutHoles(r) {
|
|
10
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
11
|
-
}
|
|
12
|
-
function _classCallCheck(a, n) {
|
|
13
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
function _defineProperties(e, r) {
|
|
16
|
-
for (var t = 0; t < r.length; t++) {
|
|
17
|
-
var o = r[t];
|
|
18
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function _createClass(e, r, t) {
|
|
22
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
23
|
-
writable: false
|
|
24
|
-
}), e;
|
|
25
|
-
}
|
|
26
|
-
function _createForOfIteratorHelper(r, e) {
|
|
27
|
-
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
28
|
-
if (!t) {
|
|
29
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
|
|
30
|
-
t && (r = t);
|
|
31
|
-
var n = 0,
|
|
32
|
-
F = function () {};
|
|
33
|
-
return {
|
|
34
|
-
s: F,
|
|
35
|
-
n: function () {
|
|
36
|
-
return n >= r.length ? {
|
|
37
|
-
done: true
|
|
38
|
-
} : {
|
|
39
|
-
done: false,
|
|
40
|
-
value: r[n++]
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
e: function (r) {
|
|
44
|
-
throw r;
|
|
45
|
-
},
|
|
46
|
-
f: F
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
50
|
-
}
|
|
51
|
-
var o,
|
|
52
|
-
a = true,
|
|
53
|
-
u = false;
|
|
54
|
-
return {
|
|
55
|
-
s: function () {
|
|
56
|
-
t = t.call(r);
|
|
57
|
-
},
|
|
58
|
-
n: function () {
|
|
59
|
-
var r = t.next();
|
|
60
|
-
return a = r.done, r;
|
|
61
|
-
},
|
|
62
|
-
e: function (r) {
|
|
63
|
-
u = true, o = r;
|
|
64
|
-
},
|
|
65
|
-
f: function () {
|
|
66
|
-
try {
|
|
67
|
-
a || null == t.return || t.return();
|
|
68
|
-
} finally {
|
|
69
|
-
if (u) throw o;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function _defineProperty(e, r, t) {
|
|
75
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
76
|
-
value: t,
|
|
77
|
-
enumerable: true,
|
|
78
|
-
configurable: true,
|
|
79
|
-
writable: true
|
|
80
|
-
}) : e[r] = t, e;
|
|
81
|
-
}
|
|
82
|
-
function _iterableToArray(r) {
|
|
83
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
84
|
-
}
|
|
85
|
-
function _iterableToArrayLimit(r, l) {
|
|
86
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
87
|
-
if (null != t) {
|
|
88
|
-
var e,
|
|
89
|
-
n,
|
|
90
|
-
i,
|
|
91
|
-
u,
|
|
92
|
-
a = [],
|
|
93
|
-
f = true,
|
|
94
|
-
o = false;
|
|
95
|
-
try {
|
|
96
|
-
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
97
|
-
} catch (r) {
|
|
98
|
-
o = true, n = r;
|
|
99
|
-
} finally {
|
|
100
|
-
try {
|
|
101
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
102
|
-
} finally {
|
|
103
|
-
if (o) throw n;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return a;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function _nonIterableRest() {
|
|
110
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
111
|
-
}
|
|
112
|
-
function _nonIterableSpread() {
|
|
113
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
114
|
-
}
|
|
115
|
-
function ownKeys(e, r) {
|
|
116
|
-
var t = Object.keys(e);
|
|
117
|
-
if (Object.getOwnPropertySymbols) {
|
|
118
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
119
|
-
r && (o = o.filter(function (r) {
|
|
120
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
121
|
-
})), t.push.apply(t, o);
|
|
122
|
-
}
|
|
123
|
-
return t;
|
|
124
|
-
}
|
|
125
|
-
function _objectSpread2(e) {
|
|
126
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
127
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
128
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
129
|
-
_defineProperty(e, r, t[r]);
|
|
130
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
131
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
return e;
|
|
135
|
-
}
|
|
136
|
-
function _slicedToArray(r, e) {
|
|
137
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
138
|
-
}
|
|
139
|
-
function _toConsumableArray(r) {
|
|
140
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
141
|
-
}
|
|
142
|
-
function _toPrimitive(t, r) {
|
|
143
|
-
if ("object" != typeof t || !t) return t;
|
|
144
|
-
var e = t[Symbol.toPrimitive];
|
|
145
|
-
if (void 0 !== e) {
|
|
146
|
-
var i = e.call(t, r);
|
|
147
|
-
if ("object" != typeof i) return i;
|
|
148
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
149
|
-
}
|
|
150
|
-
return (String )(t);
|
|
151
|
-
}
|
|
152
|
-
function _toPropertyKey(t) {
|
|
153
|
-
var i = _toPrimitive(t, "string");
|
|
154
|
-
return "symbol" == typeof i ? i : i + "";
|
|
155
|
-
}
|
|
156
|
-
function _typeof(o) {
|
|
157
|
-
"@babel/helpers - typeof";
|
|
158
|
-
|
|
159
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
160
|
-
return typeof o;
|
|
161
|
-
} : function (o) {
|
|
162
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
163
|
-
}, _typeof(o);
|
|
164
|
-
}
|
|
165
|
-
function _unsupportedIterableToArray(r, a) {
|
|
166
|
-
if (r) {
|
|
167
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
168
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
169
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
var wNumb = {exports: {}};
|
|
174
|
-
|
|
175
|
-
var hasRequiredWNumb;
|
|
176
|
-
|
|
177
|
-
function requireWNumb () {
|
|
178
|
-
if (hasRequiredWNumb) return wNumb.exports;
|
|
179
|
-
hasRequiredWNumb = 1;
|
|
180
|
-
(function (module, exports) {
|
|
181
|
-
(function(factory) {
|
|
182
|
-
{
|
|
183
|
-
// Node/CommonJS
|
|
184
|
-
module.exports = factory();
|
|
185
|
-
}
|
|
186
|
-
})(function() {
|
|
187
|
-
|
|
188
|
-
var FormatOptions = [
|
|
189
|
-
"decimals",
|
|
190
|
-
"thousand",
|
|
191
|
-
"mark",
|
|
192
|
-
"prefix",
|
|
193
|
-
"suffix",
|
|
194
|
-
"encoder",
|
|
195
|
-
"decoder",
|
|
196
|
-
"negativeBefore",
|
|
197
|
-
"negative",
|
|
198
|
-
"edit",
|
|
199
|
-
"undo"
|
|
200
|
-
];
|
|
201
|
-
|
|
202
|
-
// General
|
|
203
|
-
|
|
204
|
-
// Reverse a string
|
|
205
|
-
function strReverse(a) {
|
|
206
|
-
return a
|
|
207
|
-
.split("")
|
|
208
|
-
.reverse()
|
|
209
|
-
.join("");
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// Check if a string starts with a specified prefix.
|
|
213
|
-
function strStartsWith(input, match) {
|
|
214
|
-
return input.substring(0, match.length) === match;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Check is a string ends in a specified suffix.
|
|
218
|
-
function strEndsWith(input, match) {
|
|
219
|
-
return input.slice(-1 * match.length) === match;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Throw an error if formatting options are incompatible.
|
|
223
|
-
function throwEqualError(F, a, b) {
|
|
224
|
-
if ((F[a] || F[b]) && F[a] === F[b]) {
|
|
225
|
-
throw new Error(a);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// Check if a number is finite and not NaN
|
|
230
|
-
function isValidNumber(input) {
|
|
231
|
-
return typeof input === "number" && isFinite(input);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
// Provide rounding-accurate toFixed method.
|
|
235
|
-
// Borrowed: http://stackoverflow.com/a/21323330/775265
|
|
236
|
-
function toFixed(value, exp) {
|
|
237
|
-
value = value.toString().split("e");
|
|
238
|
-
value = Math.round(+(value[0] + "e" + (value[1] ? +value[1] + exp : exp)));
|
|
239
|
-
value = value.toString().split("e");
|
|
240
|
-
return (+(value[0] + "e" + (value[1] ? +value[1] - exp : -exp))).toFixed(exp);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Formatting
|
|
244
|
-
|
|
245
|
-
// Accept a number as input, output formatted string.
|
|
246
|
-
function formatTo(
|
|
247
|
-
decimals,
|
|
248
|
-
thousand,
|
|
249
|
-
mark,
|
|
250
|
-
prefix,
|
|
251
|
-
suffix,
|
|
252
|
-
encoder,
|
|
253
|
-
decoder,
|
|
254
|
-
negativeBefore,
|
|
255
|
-
negative,
|
|
256
|
-
edit,
|
|
257
|
-
undo,
|
|
258
|
-
input
|
|
259
|
-
) {
|
|
260
|
-
var originalInput = input,
|
|
261
|
-
inputIsNegative,
|
|
262
|
-
inputPieces,
|
|
263
|
-
inputBase,
|
|
264
|
-
inputDecimals = "",
|
|
265
|
-
output = "";
|
|
266
|
-
|
|
267
|
-
// Apply user encoder to the input.
|
|
268
|
-
// Expected outcome: number.
|
|
269
|
-
if (encoder) {
|
|
270
|
-
input = encoder(input);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// Stop if no valid number was provided, the number is infinite or NaN.
|
|
274
|
-
if (!isValidNumber(input)) {
|
|
275
|
-
return false;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// Rounding away decimals might cause a value of -0
|
|
279
|
-
// when using very small ranges. Remove those cases.
|
|
280
|
-
if (decimals !== false && parseFloat(input.toFixed(decimals)) === 0) {
|
|
281
|
-
input = 0;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Formatting is done on absolute numbers,
|
|
285
|
-
// decorated by an optional negative symbol.
|
|
286
|
-
if (input < 0) {
|
|
287
|
-
inputIsNegative = true;
|
|
288
|
-
input = Math.abs(input);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// Reduce the number of decimals to the specified option.
|
|
292
|
-
if (decimals !== false) {
|
|
293
|
-
input = toFixed(input, decimals);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// Transform the number into a string, so it can be split.
|
|
297
|
-
input = input.toString();
|
|
298
|
-
|
|
299
|
-
// Break the number on the decimal separator.
|
|
300
|
-
if (input.indexOf(".") !== -1) {
|
|
301
|
-
inputPieces = input.split(".");
|
|
302
|
-
|
|
303
|
-
inputBase = inputPieces[0];
|
|
304
|
-
|
|
305
|
-
if (mark) {
|
|
306
|
-
inputDecimals = mark + inputPieces[1];
|
|
307
|
-
}
|
|
308
|
-
} else {
|
|
309
|
-
// If it isn't split, the entire number will do.
|
|
310
|
-
inputBase = input;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// Group numbers in sets of three.
|
|
314
|
-
if (thousand) {
|
|
315
|
-
inputBase = strReverse(inputBase).match(/.{1,3}/g);
|
|
316
|
-
inputBase = strReverse(inputBase.join(strReverse(thousand)));
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// If the number is negative, prefix with negation symbol.
|
|
320
|
-
if (inputIsNegative && negativeBefore) {
|
|
321
|
-
output += negativeBefore;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// Prefix the number
|
|
325
|
-
if (prefix) {
|
|
326
|
-
output += prefix;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Normal negative option comes after the prefix. Defaults to '-'.
|
|
330
|
-
if (inputIsNegative && negative) {
|
|
331
|
-
output += negative;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// Append the actual number.
|
|
335
|
-
output += inputBase;
|
|
336
|
-
output += inputDecimals;
|
|
337
|
-
|
|
338
|
-
// Apply the suffix.
|
|
339
|
-
if (suffix) {
|
|
340
|
-
output += suffix;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// Run the output through a user-specified post-formatter.
|
|
344
|
-
if (edit) {
|
|
345
|
-
output = edit(output, originalInput);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// All done.
|
|
349
|
-
return output;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
// Accept a sting as input, output decoded number.
|
|
353
|
-
function formatFrom(
|
|
354
|
-
decimals,
|
|
355
|
-
thousand,
|
|
356
|
-
mark,
|
|
357
|
-
prefix,
|
|
358
|
-
suffix,
|
|
359
|
-
encoder,
|
|
360
|
-
decoder,
|
|
361
|
-
negativeBefore,
|
|
362
|
-
negative,
|
|
363
|
-
edit,
|
|
364
|
-
undo,
|
|
365
|
-
input
|
|
366
|
-
) {
|
|
367
|
-
var inputIsNegative,
|
|
368
|
-
output = "";
|
|
369
|
-
|
|
370
|
-
// User defined pre-decoder. Result must be a non empty string.
|
|
371
|
-
if (undo) {
|
|
372
|
-
input = undo(input);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
// Test the input. Can't be empty.
|
|
376
|
-
if (!input || typeof input !== "string") {
|
|
377
|
-
return false;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// If the string starts with the negativeBefore value: remove it.
|
|
381
|
-
// Remember is was there, the number is negative.
|
|
382
|
-
if (negativeBefore && strStartsWith(input, negativeBefore)) {
|
|
383
|
-
input = input.replace(negativeBefore, "");
|
|
384
|
-
inputIsNegative = true;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// Repeat the same procedure for the prefix.
|
|
388
|
-
if (prefix && strStartsWith(input, prefix)) {
|
|
389
|
-
input = input.replace(prefix, "");
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
// And again for negative.
|
|
393
|
-
if (negative && strStartsWith(input, negative)) {
|
|
394
|
-
input = input.replace(negative, "");
|
|
395
|
-
inputIsNegative = true;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
// Remove the suffix.
|
|
399
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice
|
|
400
|
-
if (suffix && strEndsWith(input, suffix)) {
|
|
401
|
-
input = input.slice(0, -1 * suffix.length);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// Remove the thousand grouping.
|
|
405
|
-
if (thousand) {
|
|
406
|
-
input = input.split(thousand).join("");
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// Set the decimal separator back to period.
|
|
410
|
-
if (mark) {
|
|
411
|
-
input = input.replace(mark, ".");
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
// Prepend the negative symbol.
|
|
415
|
-
if (inputIsNegative) {
|
|
416
|
-
output += "-";
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// Add the number
|
|
420
|
-
output += input;
|
|
421
|
-
|
|
422
|
-
// Trim all non-numeric characters (allow '.' and '-');
|
|
423
|
-
output = output.replace(/[^0-9\.\-.]/g, "");
|
|
424
|
-
|
|
425
|
-
// The value contains no parse-able number.
|
|
426
|
-
if (output === "") {
|
|
427
|
-
return false;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
// Covert to number.
|
|
431
|
-
output = Number(output);
|
|
432
|
-
|
|
433
|
-
// Run the user-specified post-decoder.
|
|
434
|
-
if (decoder) {
|
|
435
|
-
output = decoder(output);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
// Check is the output is valid, otherwise: return false.
|
|
439
|
-
if (!isValidNumber(output)) {
|
|
440
|
-
return false;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
return output;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
// Framework
|
|
447
|
-
|
|
448
|
-
// Validate formatting options
|
|
449
|
-
function validate(inputOptions) {
|
|
450
|
-
var i,
|
|
451
|
-
optionName,
|
|
452
|
-
optionValue,
|
|
453
|
-
filteredOptions = {};
|
|
454
|
-
|
|
455
|
-
if (inputOptions["suffix"] === undefined) {
|
|
456
|
-
inputOptions["suffix"] = inputOptions["postfix"];
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
for (i = 0; i < FormatOptions.length; i += 1) {
|
|
460
|
-
optionName = FormatOptions[i];
|
|
461
|
-
optionValue = inputOptions[optionName];
|
|
462
|
-
|
|
463
|
-
if (optionValue === undefined) {
|
|
464
|
-
// Only default if negativeBefore isn't set.
|
|
465
|
-
if (optionName === "negative" && !filteredOptions.negativeBefore) {
|
|
466
|
-
filteredOptions[optionName] = "-";
|
|
467
|
-
// Don't set a default for mark when 'thousand' is set.
|
|
468
|
-
} else if (optionName === "mark" && filteredOptions.thousand !== ".") {
|
|
469
|
-
filteredOptions[optionName] = ".";
|
|
470
|
-
} else {
|
|
471
|
-
filteredOptions[optionName] = false;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
// Floating points in JS are stable up to 7 decimals.
|
|
475
|
-
} else if (optionName === "decimals") {
|
|
476
|
-
if (optionValue >= 0 && optionValue < 8) {
|
|
477
|
-
filteredOptions[optionName] = optionValue;
|
|
478
|
-
} else {
|
|
479
|
-
throw new Error(optionName);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
// These options, when provided, must be functions.
|
|
483
|
-
} else if (
|
|
484
|
-
optionName === "encoder" ||
|
|
485
|
-
optionName === "decoder" ||
|
|
486
|
-
optionName === "edit" ||
|
|
487
|
-
optionName === "undo"
|
|
488
|
-
) {
|
|
489
|
-
if (typeof optionValue === "function") {
|
|
490
|
-
filteredOptions[optionName] = optionValue;
|
|
491
|
-
} else {
|
|
492
|
-
throw new Error(optionName);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
// Other options are strings.
|
|
496
|
-
} else {
|
|
497
|
-
if (typeof optionValue === "string") {
|
|
498
|
-
filteredOptions[optionName] = optionValue;
|
|
499
|
-
} else {
|
|
500
|
-
throw new Error(optionName);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
// Some values can't be extracted from a
|
|
506
|
-
// string if certain combinations are present.
|
|
507
|
-
throwEqualError(filteredOptions, "mark", "thousand");
|
|
508
|
-
throwEqualError(filteredOptions, "prefix", "negative");
|
|
509
|
-
throwEqualError(filteredOptions, "prefix", "negativeBefore");
|
|
510
|
-
|
|
511
|
-
return filteredOptions;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// Pass all options as function arguments
|
|
515
|
-
function passAll(options, method, input) {
|
|
516
|
-
var i,
|
|
517
|
-
args = [];
|
|
518
|
-
|
|
519
|
-
// Add all options in order of FormatOptions
|
|
520
|
-
for (i = 0; i < FormatOptions.length; i += 1) {
|
|
521
|
-
args.push(options[FormatOptions[i]]);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// Append the input, then call the method, presenting all
|
|
525
|
-
// options as arguments.
|
|
526
|
-
args.push(input);
|
|
527
|
-
return method.apply("", args);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
function wNumb(options) {
|
|
531
|
-
if (!(this instanceof wNumb)) {
|
|
532
|
-
return new wNumb(options);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
if (typeof options !== "object") {
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
options = validate(options);
|
|
540
|
-
|
|
541
|
-
// Call 'formatTo' with proper arguments.
|
|
542
|
-
this.to = function(input) {
|
|
543
|
-
return passAll(options, formatTo, input);
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
// Call 'formatFrom' with proper arguments.
|
|
547
|
-
this.from = function(input) {
|
|
548
|
-
return passAll(options, formatFrom, input);
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
return wNumb;
|
|
553
|
-
});
|
|
554
|
-
} (wNumb));
|
|
555
|
-
return wNumb.exports;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
requireWNumb();
|
|
559
|
-
|
|
560
|
-
function lowerCamelCase(string) {
|
|
561
|
-
return string.charAt(0).toLowerCase() + string.slice(1);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
const not = {
|
|
565
|
-
inert: ':not([inert]):not([inert] *)',
|
|
566
|
-
negTabIndex: ':not([tabindex^="-"])',
|
|
567
|
-
disabled: ':not(:disabled)',
|
|
568
|
-
};
|
|
569
|
-
|
|
570
|
-
var focusableSelectors = [
|
|
571
|
-
`a[href]${not.inert}${not.negTabIndex}`,
|
|
572
|
-
`area[href]${not.inert}${not.negTabIndex}`,
|
|
573
|
-
`input:not([type="hidden"]):not([type="radio"])${not.inert}${not.negTabIndex}${not.disabled}`,
|
|
574
|
-
`input[type="radio"]${not.inert}${not.negTabIndex}${not.disabled}`,
|
|
575
|
-
`select${not.inert}${not.negTabIndex}${not.disabled}`,
|
|
576
|
-
`textarea${not.inert}${not.negTabIndex}${not.disabled}`,
|
|
577
|
-
`button${not.inert}${not.negTabIndex}${not.disabled}`,
|
|
578
|
-
`details${not.inert} > summary:first-of-type${not.negTabIndex}`,
|
|
579
|
-
// Discard until Firefox supports `:has()`
|
|
580
|
-
// See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
|
|
581
|
-
// `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
|
|
582
|
-
`iframe${not.inert}${not.negTabIndex}`,
|
|
583
|
-
`audio[controls]${not.inert}${not.negTabIndex}`,
|
|
584
|
-
`video[controls]${not.inert}${not.negTabIndex}`,
|
|
585
|
-
`[contenteditable]${not.inert}${not.negTabIndex}`,
|
|
586
|
-
`[tabindex]${not.inert}${not.negTabIndex}`,
|
|
587
|
-
];
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Set the focus to the first element with `autofocus` with the element or the
|
|
591
|
-
* element itself.
|
|
592
|
-
*/
|
|
593
|
-
function focus(el) {
|
|
594
|
-
(el.querySelector('[autofocus]') || el).focus();
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
* Get the first and last focusable elements within a given element.
|
|
598
|
-
*/
|
|
599
|
-
function getFocusableEdges(el) {
|
|
600
|
-
// Check for a focusable element within the subtree of the given element.
|
|
601
|
-
const firstEl = findFocusableEl(el, true);
|
|
602
|
-
// Only if we find the first element do we need to look for the last one. If
|
|
603
|
-
// there’s no last element, we set `lastEl` as a reference to `firstEl` so
|
|
604
|
-
// that the returned array is still always of length 2.
|
|
605
|
-
const lastEl = firstEl ? findFocusableEl(el, false) || firstEl : null;
|
|
606
|
-
return [firstEl, lastEl];
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* Find the first focusable element inside the given element if `forward` is
|
|
610
|
-
* truthy or the last focusable element otherwise.
|
|
611
|
-
*/
|
|
612
|
-
function findFocusableEl(el, forward) {
|
|
613
|
-
// If we’re walking forward, check if this element is focusable, and return it
|
|
614
|
-
// immediately if it is.
|
|
615
|
-
if (forward && isFocusable(el))
|
|
616
|
-
return el;
|
|
617
|
-
// We should only search the subtree of this element if it can have focusable
|
|
618
|
-
// children.
|
|
619
|
-
if (canHaveFocusableChildren(el)) {
|
|
620
|
-
// Start walking the DOM tree, looking for focusable elements.
|
|
621
|
-
// Case 1: If this element has a shadow root, search it recursively.
|
|
622
|
-
if (el.shadowRoot) {
|
|
623
|
-
// Descend into this subtree.
|
|
624
|
-
let next = getNextChildEl(el.shadowRoot, forward);
|
|
625
|
-
// Traverse the siblings, searching the subtree of each one for focusable
|
|
626
|
-
// elements.
|
|
627
|
-
while (next) {
|
|
628
|
-
const focusableEl = findFocusableEl(next, forward);
|
|
629
|
-
if (focusableEl)
|
|
630
|
-
return focusableEl;
|
|
631
|
-
next = getNextSiblingEl(next, forward);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
// Case 2: If this element is a slot for a Custom Element, search its
|
|
635
|
-
// assigned elements recursively.
|
|
636
|
-
else if (el.localName === 'slot') {
|
|
637
|
-
const assignedElements = el.assignedElements({
|
|
638
|
-
flatten: true,
|
|
639
|
-
});
|
|
640
|
-
if (!forward)
|
|
641
|
-
assignedElements.reverse();
|
|
642
|
-
for (const assignedElement of assignedElements) {
|
|
643
|
-
const focusableEl = findFocusableEl(assignedElement, forward);
|
|
644
|
-
if (focusableEl)
|
|
645
|
-
return focusableEl;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
// Case 3: this is a regular Light DOM element. Search its subtree.
|
|
649
|
-
else {
|
|
650
|
-
// Descend into this subtree.
|
|
651
|
-
let next = getNextChildEl(el, forward);
|
|
652
|
-
// Traverse siblings, searching the subtree of each one
|
|
653
|
-
// for focusable elements.
|
|
654
|
-
while (next) {
|
|
655
|
-
const focusableEl = findFocusableEl(next, forward);
|
|
656
|
-
if (focusableEl)
|
|
657
|
-
return focusableEl;
|
|
658
|
-
next = getNextSiblingEl(next, forward);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
// If we’re walking backward, we want to check the element’s entire subtree
|
|
663
|
-
// before checking the element itself. If this element is focusable, return
|
|
664
|
-
// it.
|
|
665
|
-
if (!forward && isFocusable(el))
|
|
666
|
-
return el;
|
|
667
|
-
return null;
|
|
668
|
-
}
|
|
669
|
-
function getNextChildEl(el, forward) {
|
|
670
|
-
return forward ? el.firstElementChild : el.lastElementChild;
|
|
671
|
-
}
|
|
672
|
-
function getNextSiblingEl(el, forward) {
|
|
673
|
-
return forward ? el.nextElementSibling : el.previousElementSibling;
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* Determine if an element is hidden from the user.
|
|
677
|
-
*/
|
|
678
|
-
const isHidden$1 = (el) => {
|
|
679
|
-
// Browsers hide all non-<summary> descendants of closed <details> elements
|
|
680
|
-
// from user interaction, but those non-<summary> elements may still match our
|
|
681
|
-
// focusable-selectors and may still have dimensions, so we need a special
|
|
682
|
-
// case to ignore them.
|
|
683
|
-
if (el.matches('details:not([open]) *') &&
|
|
684
|
-
!el.matches('details>summary:first-of-type'))
|
|
685
|
-
return true;
|
|
686
|
-
// If this element has no painted dimensions, it's hidden.
|
|
687
|
-
return !(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
|
|
688
|
-
};
|
|
689
|
-
/**
|
|
690
|
-
* Determine if an element is focusable and has user-visible painted dimensions.
|
|
691
|
-
*/
|
|
692
|
-
const isFocusable = (el) => {
|
|
693
|
-
// A shadow host that delegates focus will never directly receive focus,
|
|
694
|
-
// even with `tabindex=0`. Consider our <fancy-button> custom element, which
|
|
695
|
-
// delegates focus to its shadow button:
|
|
696
|
-
//
|
|
697
|
-
// <fancy-button tabindex="0">
|
|
698
|
-
// #shadow-root
|
|
699
|
-
// <button><slot></slot></button>
|
|
700
|
-
// </fancy-button>
|
|
701
|
-
//
|
|
702
|
-
// The browser acts as as if there is only one focusable element – the shadow
|
|
703
|
-
// button. Our library should behave the same way.
|
|
704
|
-
if (el.shadowRoot?.delegatesFocus)
|
|
705
|
-
return false;
|
|
706
|
-
return el.matches(focusableSelectors.join(',')) && !isHidden$1(el);
|
|
707
|
-
};
|
|
708
|
-
/**
|
|
709
|
-
* Determine if an element can have focusable children. Useful for bailing out
|
|
710
|
-
* early when walking the DOM tree.
|
|
711
|
-
* @example
|
|
712
|
-
* This div is inert, so none of its children can be focused, even though they
|
|
713
|
-
* meet our criteria for what is focusable. Once we check the div, we can skip
|
|
714
|
-
* the rest of the subtree.
|
|
715
|
-
* ```html
|
|
716
|
-
* <div inert>
|
|
717
|
-
* <button>Button</button>
|
|
718
|
-
* <a href="#">Link</a>
|
|
719
|
-
* </div>
|
|
720
|
-
* ```
|
|
721
|
-
*/
|
|
722
|
-
function canHaveFocusableChildren(el) {
|
|
723
|
-
// The browser will never send focus into a Shadow DOM if the host element
|
|
724
|
-
// has a negative tabindex. This applies to both slotted Light DOM Shadow DOM
|
|
725
|
-
// children
|
|
726
|
-
if (el.shadowRoot && el.getAttribute('tabindex') === '-1')
|
|
727
|
-
return false;
|
|
728
|
-
// Elemments matching this selector are either hidden entirely from the user,
|
|
729
|
-
// or are visible but unavailable for interaction. Their descentants can never
|
|
730
|
-
// receive focus.
|
|
731
|
-
return !el.matches(':disabled,[hidden],[inert]');
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Get the active element, accounting for Shadow DOM subtrees.
|
|
735
|
-
* @author Cory LaViska
|
|
736
|
-
* @see: https://www.abeautifulsite.net/posts/finding-the-active-element-in-a-shadow-root/
|
|
737
|
-
*/
|
|
738
|
-
function getActiveEl(root = document) {
|
|
739
|
-
const activeEl = root.activeElement;
|
|
740
|
-
if (!activeEl)
|
|
741
|
-
return null;
|
|
742
|
-
// If there’s a shadow root, recursively find the active element within it.
|
|
743
|
-
// If the recursive call returns null, return the active element
|
|
744
|
-
// of the top-level Document.
|
|
745
|
-
if (activeEl.shadowRoot)
|
|
746
|
-
return getActiveEl(activeEl.shadowRoot) || document.activeElement;
|
|
747
|
-
// If not, we can just return the active element
|
|
748
|
-
return activeEl;
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* Trap the focus inside the given element
|
|
752
|
-
*/
|
|
753
|
-
function trapTabKey(el, event) {
|
|
754
|
-
const [firstFocusableEl, lastFocusableEl] = getFocusableEdges(el);
|
|
755
|
-
// If there are no focusable children in the dialog, prevent the user from
|
|
756
|
-
// tabbing out of it
|
|
757
|
-
if (!firstFocusableEl)
|
|
758
|
-
return event.preventDefault();
|
|
759
|
-
const activeEl = getActiveEl();
|
|
760
|
-
// If the SHIFT key is pressed while tabbing (moving backwards) and the
|
|
761
|
-
// currently focused item is the first one, move the focus to the last
|
|
762
|
-
// focusable item from the dialog element
|
|
763
|
-
if (event.shiftKey && activeEl === firstFocusableEl) {
|
|
764
|
-
// @ts-ignore: we know that `lastFocusableEl` is not null here
|
|
765
|
-
lastFocusableEl.focus();
|
|
766
|
-
event.preventDefault();
|
|
767
|
-
}
|
|
768
|
-
// If the SHIFT key is not pressed (moving forwards) and the currently focused
|
|
769
|
-
// item is the last one, move the focus to the first focusable item from the
|
|
770
|
-
// dialog element
|
|
771
|
-
else if (!event.shiftKey && activeEl === lastFocusableEl) {
|
|
772
|
-
firstFocusableEl.focus();
|
|
773
|
-
event.preventDefault();
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
/**
|
|
777
|
-
* Find the closest element to the given element matching the given selector,
|
|
778
|
-
* accounting for Shadow DOM subtrees.
|
|
779
|
-
* @author Louis St-Amour
|
|
780
|
-
* @see: https://stackoverflow.com/a/56105394
|
|
781
|
-
*/
|
|
782
|
-
function closest(selector, base) {
|
|
783
|
-
function from(el) {
|
|
784
|
-
if (!el || el === document || el === window)
|
|
785
|
-
return null;
|
|
786
|
-
// Reading the `assignedSlot` property from the element (as suggested by the
|
|
787
|
-
// aforementioned StackOverflow answer) is not enough, because it does not
|
|
788
|
-
// take into consideration elements nested deeply within a <slot>. For these
|
|
789
|
-
// elements, the `assignedSlot` property is `null` as it is only specified
|
|
790
|
-
// for top-level elements within a <slot>. To still find the closest <slot>,
|
|
791
|
-
// we walk up the tree looking for the `assignedSlot` property.
|
|
792
|
-
const slot = findAssignedSlot(el);
|
|
793
|
-
if (slot)
|
|
794
|
-
el = slot;
|
|
795
|
-
return (el.closest(selector) ||
|
|
796
|
-
from(el.getRootNode().host));
|
|
797
|
-
}
|
|
798
|
-
return from(base);
|
|
799
|
-
}
|
|
800
|
-
function findAssignedSlot(node) {
|
|
801
|
-
return (node.assignedSlot ||
|
|
802
|
-
(node.parentNode ? findAssignedSlot(node.parentNode) : null));
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
const SCOPE = 'data-a11y-dialog';
|
|
806
|
-
class A11yDialog {
|
|
807
|
-
$el;
|
|
808
|
-
id;
|
|
809
|
-
previouslyFocused;
|
|
810
|
-
shown;
|
|
811
|
-
constructor(element) {
|
|
812
|
-
this.$el = element;
|
|
813
|
-
this.id = this.$el.getAttribute(SCOPE) || this.$el.id;
|
|
814
|
-
this.previouslyFocused = null;
|
|
815
|
-
this.shown = false;
|
|
816
|
-
this.maintainFocus = this.maintainFocus.bind(this);
|
|
817
|
-
this.bindKeypress = this.bindKeypress.bind(this);
|
|
818
|
-
this.handleTriggerClicks = this.handleTriggerClicks.bind(this);
|
|
819
|
-
this.show = this.show.bind(this);
|
|
820
|
-
this.hide = this.hide.bind(this);
|
|
821
|
-
this.$el.setAttribute('aria-hidden', 'true');
|
|
822
|
-
this.$el.setAttribute('aria-modal', 'true');
|
|
823
|
-
this.$el.setAttribute('tabindex', '-1');
|
|
824
|
-
if (!this.$el.hasAttribute('role')) {
|
|
825
|
-
this.$el.setAttribute('role', 'dialog');
|
|
826
|
-
}
|
|
827
|
-
document.addEventListener('click', this.handleTriggerClicks, true);
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* Destroy the current instance (after making sure the dialog has been hidden)
|
|
831
|
-
* and remove all associated listeners from dialog openers and closers
|
|
832
|
-
*/
|
|
833
|
-
destroy() {
|
|
834
|
-
// Dispatch a `destroy` event
|
|
835
|
-
const destroyEvent = this.fire('destroy');
|
|
836
|
-
// If the event was prevented, do not continue with the normal behavior
|
|
837
|
-
if (destroyEvent.defaultPrevented)
|
|
838
|
-
return this;
|
|
839
|
-
// Hide the dialog to avoid destroying an open instance
|
|
840
|
-
this.hide();
|
|
841
|
-
// Remove the click event delegates for our openers and closers
|
|
842
|
-
document.removeEventListener('click', this.handleTriggerClicks, true);
|
|
843
|
-
// Clone and replace the dialog element to prevent memory leaks caused by
|
|
844
|
-
// event listeners that the author might not have cleaned up.
|
|
845
|
-
this.$el.replaceWith(this.$el.cloneNode(true));
|
|
846
|
-
return this;
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* Show the dialog element, trap the current focus within it, listen for some
|
|
850
|
-
* specific key presses and fire all registered callbacks for `show` event
|
|
851
|
-
*/
|
|
852
|
-
show(event) {
|
|
853
|
-
// If the dialog is already open, abort
|
|
854
|
-
if (this.shown)
|
|
855
|
-
return this;
|
|
856
|
-
// Dispatch a `show` event
|
|
857
|
-
const showEvent = this.fire('show', event);
|
|
858
|
-
// If the event was prevented, do not continue with the normal behavior
|
|
859
|
-
if (showEvent.defaultPrevented)
|
|
860
|
-
return this;
|
|
861
|
-
// Keep a reference to the currently focused element to be able to restore
|
|
862
|
-
// it later
|
|
863
|
-
this.shown = true;
|
|
864
|
-
this.$el.removeAttribute('aria-hidden');
|
|
865
|
-
this.previouslyFocused = getActiveEl();
|
|
866
|
-
// Due to a long lasting bug in Safari, clicking an interactive element
|
|
867
|
-
// (like a <button>) does *not* move the focus to that element, which means
|
|
868
|
-
// `document.activeElement` is whatever element is currently focused (like
|
|
869
|
-
// an <input>), or the <body> element otherwise. We can work around that
|
|
870
|
-
// problem by checking whether the focused element is the <body>, and if it,
|
|
871
|
-
// store the click event target.
|
|
872
|
-
// See: https://bugs.webkit.org/show_bug.cgi?id=22261
|
|
873
|
-
if (this.previouslyFocused?.tagName === 'BODY' && event?.target) {
|
|
874
|
-
this.previouslyFocused = event.target;
|
|
875
|
-
}
|
|
876
|
-
// Set the focus to the dialog element
|
|
877
|
-
// See: https://github.com/KittyGiraudel/a11y-dialog/pull/583
|
|
878
|
-
if (event?.type === 'focus') {
|
|
879
|
-
this.maintainFocus();
|
|
880
|
-
}
|
|
881
|
-
else {
|
|
882
|
-
focus(this.$el);
|
|
883
|
-
}
|
|
884
|
-
// Bind a focus event listener to the body element to make sure the focus
|
|
885
|
-
// stays trapped inside the dialog while open, and start listening for some
|
|
886
|
-
// specific key presses (TAB and ESC)
|
|
887
|
-
document.body.addEventListener('focus', this.maintainFocus, true);
|
|
888
|
-
this.$el.addEventListener('keydown', this.bindKeypress, true);
|
|
889
|
-
return this;
|
|
890
|
-
}
|
|
891
|
-
/**
|
|
892
|
-
* Hide the dialog element, restore the focus to the previously active
|
|
893
|
-
* element, stop listening for some specific key presses and fire all
|
|
894
|
-
* registered callbacks for `hide` event
|
|
895
|
-
*/
|
|
896
|
-
hide(event) {
|
|
897
|
-
// If the dialog is already closed, abort
|
|
898
|
-
if (!this.shown)
|
|
899
|
-
return this;
|
|
900
|
-
// Dispatch a `hide` event
|
|
901
|
-
const hideEvent = this.fire('hide', event);
|
|
902
|
-
// If the event was prevented, do not continue with the normal behavior
|
|
903
|
-
if (hideEvent.defaultPrevented)
|
|
904
|
-
return this;
|
|
905
|
-
this.shown = false;
|
|
906
|
-
this.$el.setAttribute('aria-hidden', 'true');
|
|
907
|
-
// Remove the focus event listener to the body element and stop listening
|
|
908
|
-
// for specific key presses
|
|
909
|
-
document.body.removeEventListener('focus', this.maintainFocus, true);
|
|
910
|
-
this.$el.removeEventListener('keydown', this.bindKeypress, true);
|
|
911
|
-
// Ensure the previously focused element (if any) has a `focus` method
|
|
912
|
-
// before attempting to call it to account for SVG elements
|
|
913
|
-
// See: https://github.com/KittyGiraudel/a11y-dialog/issues/108
|
|
914
|
-
this.previouslyFocused?.focus?.();
|
|
915
|
-
return this;
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Register a new callback for the given event type
|
|
919
|
-
*/
|
|
920
|
-
on(type, handler, options) {
|
|
921
|
-
this.$el.addEventListener(type, handler, options);
|
|
922
|
-
return this;
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Unregister an existing callback for the given event type
|
|
926
|
-
*/
|
|
927
|
-
off(type, handler, options) {
|
|
928
|
-
this.$el.removeEventListener(type, handler, options);
|
|
929
|
-
return this;
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* Dispatch and return a custom event from the DOM element associated with
|
|
933
|
-
* this dialog; this allows authors to listen for and respond to the events
|
|
934
|
-
* in their own code
|
|
935
|
-
*/
|
|
936
|
-
fire(type, event) {
|
|
937
|
-
const customEvent = new CustomEvent(type, {
|
|
938
|
-
detail: event,
|
|
939
|
-
cancelable: true,
|
|
940
|
-
});
|
|
941
|
-
this.$el.dispatchEvent(customEvent);
|
|
942
|
-
return customEvent;
|
|
943
|
-
}
|
|
944
|
-
/**
|
|
945
|
-
* Add a delegated event listener for when elememts that open or close the
|
|
946
|
-
* dialog are clicked, and call `show` or `hide`, respectively
|
|
947
|
-
*/
|
|
948
|
-
handleTriggerClicks(event) {
|
|
949
|
-
// We need to retrieve the click target while accounting for Shadow DOM.
|
|
950
|
-
// When within a web component, `event.target` is the shadow root (e.g.
|
|
951
|
-
// `<my-dialog>`), so we need to use `event.composedPath()` to get the click
|
|
952
|
-
// target
|
|
953
|
-
// See: https://github.com/KittyGiraudel/a11y-dialog/issues/582
|
|
954
|
-
const target = event.composedPath()[0];
|
|
955
|
-
const opener = closest(`[${SCOPE}-show="${this.id}"]`, target);
|
|
956
|
-
const explicitCloser = closest(`[${SCOPE}-hide="${this.id}"]`, target);
|
|
957
|
-
const implicitCloser = closest(`[${SCOPE}-hide]`, target) &&
|
|
958
|
-
closest('[aria-modal="true"]', target) === this.$el;
|
|
959
|
-
// We use `closest(..)` (instead of `matches(..)`) so that clicking an
|
|
960
|
-
// element nested within a dialog opener does cause the dialog to open, and
|
|
961
|
-
// we use our custom `closest(..)` function so that it can cross shadow
|
|
962
|
-
// boundaries
|
|
963
|
-
// See: https://github.com/KittyGiraudel/a11y-dialog/issues/712
|
|
964
|
-
if (opener)
|
|
965
|
-
this.show(event);
|
|
966
|
-
if (explicitCloser || implicitCloser)
|
|
967
|
-
this.hide(event);
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* Private event handler used when listening to some specific key presses
|
|
971
|
-
* (namely ESC and TAB)
|
|
972
|
-
*/
|
|
973
|
-
bindKeypress(event) {
|
|
974
|
-
// This is an escape hatch in case there are nested open dialogs, so that
|
|
975
|
-
// only the top most dialog gets interacted with (`closest` is basically
|
|
976
|
-
// `Element.prototype.closest()` accounting for Shadow DOM subtrees)
|
|
977
|
-
if (closest('[aria-modal="true"]', getActiveEl()) !== this.$el) {
|
|
978
|
-
return;
|
|
979
|
-
}
|
|
980
|
-
let hasOpenPopover = false;
|
|
981
|
-
try {
|
|
982
|
-
hasOpenPopover = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
983
|
-
}
|
|
984
|
-
catch {
|
|
985
|
-
// Run that DOM query in a try/catch because not all browsers support the
|
|
986
|
-
// `:popover-open` selector, which would cause the whole expression to
|
|
987
|
-
// fail
|
|
988
|
-
// See: https://caniuse.com/mdn-css_selectors_popover-open
|
|
989
|
-
// See: https://github.com/KittyGiraudel/a11y-dialog/pull/578#discussion_r1343215149
|
|
990
|
-
}
|
|
991
|
-
// If the dialog is shown and the ESC key is pressed, prevent any further
|
|
992
|
-
// effects from the ESC key and hide the dialog, unless:
|
|
993
|
-
// - its role is `alertdialog`, which means it should be modal
|
|
994
|
-
// - or it contains an open popover, in which case ESC should close it
|
|
995
|
-
if (event.key === 'Escape' &&
|
|
996
|
-
this.$el.getAttribute('role') !== 'alertdialog' &&
|
|
997
|
-
!hasOpenPopover) {
|
|
998
|
-
event.preventDefault();
|
|
999
|
-
this.hide(event);
|
|
1000
|
-
}
|
|
1001
|
-
// If the dialog is shown and the TAB key is pressed, make sure the focus
|
|
1002
|
-
// stays trapped within the dialog element
|
|
1003
|
-
if (event.key === 'Tab') {
|
|
1004
|
-
trapTabKey(this.$el, event);
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
/**
|
|
1008
|
-
* If the dialog is shown and the focus is not within a dialog element (either
|
|
1009
|
-
* this one or another one in case of nested dialogs) or an element with the
|
|
1010
|
-
* ignore attribute, move it back to the dialog container
|
|
1011
|
-
* See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
|
|
1012
|
-
*/
|
|
1013
|
-
maintainFocus() {
|
|
1014
|
-
// We use `getActiveEl()` and not `event.target` here because the latter can
|
|
1015
|
-
// be a shadow root. This can happen when having a focusable element after
|
|
1016
|
-
// slotted content: tabbing out of it causes this focus listener to trigger
|
|
1017
|
-
// with the shadow root as a target event. In such a case, the focus would
|
|
1018
|
-
// be incorrectly moved to the dialog, which shouldn’t happen. Getting the
|
|
1019
|
-
// active element (while accounting for Shadow DOM) avoids that problem.
|
|
1020
|
-
// See: https://github.com/KittyGiraudel/a11y-dialog/issues/778
|
|
1021
|
-
const target = getActiveEl();
|
|
1022
|
-
if (!closest(`[aria-modal="true"], [${SCOPE}-ignore-focus-trap]`, target)) {
|
|
1023
|
-
focus(this.$el);
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
function instantiateDialogs() {
|
|
1029
|
-
for (const el of document.querySelectorAll('[data-a11y-dialog]')) {
|
|
1030
|
-
new A11yDialog(el);
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
if (typeof document !== 'undefined') {
|
|
1034
|
-
if (document.readyState === 'loading') {
|
|
1035
|
-
document.addEventListener('DOMContentLoaded', instantiateDialogs);
|
|
1036
|
-
}
|
|
1037
|
-
else {
|
|
1038
|
-
instantiateDialogs();
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,s(i.key),i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t);else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d,h={exports:{}};var f=c((d||(d=1,h.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function n(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function o(e,t,n){if((e[t]||e[n])&&e[t]===e[n])throw new Error(t)}function r(e){return"number"==typeof e&&isFinite(e)}function a(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function s(e,n,i,o,s,l,u,c,d,h,f,p){var m,v,g,b=p,y="",w="";return l&&(p=l(p)),!!r(p)&&(!1!==e&&0===parseFloat(p.toFixed(e))&&(p=0),p<0&&(m=!0,p=Math.abs(p)),!1!==e&&(p=a(p,e)),-1!==(p=p.toString()).indexOf(".")?(g=(v=p.split("."))[0],i&&(y=i+v[1])):g=p,n&&(g=t(g).match(/.{1,3}/g),g=t(g.join(t(n)))),m&&c&&(w+=c),o&&(w+=o),m&&d&&(w+=d),w+=g,w+=y,s&&(w+=s),h&&(w=h(w,b)),w)}function l(e,t,o,a,s,l,u,c,d,h,f,p){var m,v="";return f&&(p=f(p)),!(!p||"string"!=typeof p)&&(c&&n(p,c)&&(p=p.replace(c,""),m=!0),a&&n(p,a)&&(p=p.replace(a,"")),d&&n(p,d)&&(p=p.replace(d,""),m=!0),s&&i(p,s)&&(p=p.slice(0,-1*s.length)),t&&(p=p.split(t).join("")),o&&(p=p.replace(o,".")),m&&(v+="-"),""!==(v=(v+=p).replace(/[^0-9\.\-.]/g,""))&&(v=Number(v),u&&(v=u(v)),!!r(v)&&v))}function u(t){var n,i,r,a={};for(void 0===t.suffix&&(t.suffix=t.postfix),n=0;n<e.length;n+=1)if(void 0===(r=t[i=e[n]]))"negative"!==i||a.negativeBefore?"mark"===i&&"."!==a.thousand?a[i]=".":a[i]=!1:a[i]="-";else if("decimals"===i){if(!(r>=0&&r<8))throw new Error(i);a[i]=r}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof r)throw new Error(i);a[i]=r}else{if("string"!=typeof r)throw new Error(i);a[i]=r}return o(a,"mark","thousand"),o(a,"prefix","negative"),o(a,"prefix","negativeBefore"),a}function c(t,n,i){var o,r=[];for(o=0;o<e.length;o+=1)r.push(t[e[o]]);return r.push(i),n.apply("",r)}function d(e){if(!(this instanceof d))return new d(e);"object"==typeof e&&(e=u(e),this.to=function(t){return c(e,s,t)},this.from=function(t){return c(e,l,t)})}return d}()),h.exports));function p(e){return e.charAt(0).toLowerCase()+e.slice(1)}var m={TAB:["Tab"],ESC:["Esc","Escape"],ARROWLEFT:["Left","ArrowLeft"],ARROWUP:["Up","ArrowUp"],ARROWRIGHT:["Right","ArrowRight"],ARROWDOWN:["Down","ArrowDown"]},v=function(){return i(function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{direction:"horizontal"};t(this,e),this.elems=n,this.config=i,this.isActive=!1,this.onKeydown=this.onKeydown.bind(this)},[{key:"init",value:function(){document.addEventListener("keydown",this.onKeydown),this.isActive=!0}},{key:"destroy",value:function(){document.removeEventListener("keydown",this.onKeydown),this.isActive=!1}},{key:"update",value:function(e){this.elems=e}},{key:"onKeydown",value:function(e){var t=this.elems.indexOf(document.activeElement);(m.ARROWUP.includes(e.key)||m.ARROWDOWN.includes(e.key))&&"horizontal"===this.config.direction||(m.ARROWLEFT.includes(e.key)||m.ARROWRIGHT.includes(e.key))&&"vertical"===this.config.direction||((m.ARROWDOWN.includes(e.key)||m.ARROWRIGHT.includes(e.key))&&(e.preventDefault(),t>=0&&t<this.elems.length-1?this.elems[t+1].focus():this.elems[0].focus()),(m.ARROWUP.includes(e.key)||m.ARROWLEFT.includes(e.key))&&(e.preventDefault(),t>=1?this.elems[t-1].focus():this.elems[this.elems.length-1].focus()),m.TAB.includes(e.key)&&this.destroy())}}])}(),g={activeClass:"is-active",settingsAttr:"data-toggle"},b=function(){function e(n,i){return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},g),i),this.settings=[],this.targets=[],this.handleClick=this.handleClick.bind(this),this.element.ODS_Toggle=this,this.init(),this}return i(e,[{key:"doToggle",value:function(e){var t=e.dispatchEvent,n=void 0===t||t,i=e.element,o=e.attribute,r=e.value,a=e.action,s=Object.assign({},e),l={trigger:this.element,element:i},u=o,c=i,d=r;"icon"===u&&(u="xlink:href",c=i.querySelector("use")),"text"===u&&(c=i.querySelector("[data-toggle-text-target]")||i),void 0===d&&(d=!1);var h=y({element:c,attribute:u,action:a,value:d,dispatchEvent:n,eventDetail:l});return null!==h&&(s.value=h),s}},{key:"init",value:function(){return this.settings=this.parseSettings(),this.targets=this.setupTargets(),this.element.addEventListener("click",this.handleClick),this.targets}},{key:"handleClick",value:function(){var e=this;this.targets=this.targets.map(function(t){return e.doToggle(t)}),this.element.dispatchEvent(new CustomEvent("toggleTrigger",{bubbles:!0}))}},{key:"destroy",value:function(){this.element.removeEventListener("click",this.handleClick),this.settings=[],this.targets=[]}},{key:"update",value:function(){this.removeNonExistentTargets(),this.addNewTargets()}},{key:"parseSettings",value:function(){var e=this.element.getAttribute(this.config.settingsAttr),t=this.element.getAttribute("aria-controls"),n=[];try{e&&(n=JSON.parse(e))}catch(e){console.warn("Invalid JSON in data-toggle attribute",e)}if(t){var i=this.element.getAttribute("aria-expanded");n=[].concat(a(i?[{target:"self",attribute:"aria-expanded"}]:[]),[{target:t.split(" ").map(function(e){return"#".concat(e)}).join(","),attribute:"hidden"}],a(Array.isArray(n)?n:[]))}return n}},{key:"setupTargets",value:function(){var t=this.element;return this.settings.reduce(function(n,i){return i&&i.target?[].concat(a(n),a(i.target.split(",").reduce(function(n,o){return[].concat(a(n),a(e.getTargetElementsFromString({target:o,trigger:t}).map(function(e){return Object.assign(Object.assign({},i),{element:e})})))},[]))):n},[])}},{key:"removeNonExistentTargets",value:function(){this.targets=this.targets.filter(function(e){return document.contains(e.element)})}},{key:"addNewTargets",value:function(){var e=this,t=this.setupTargets().filter(function(t){return!e.targets.find(function(e){return e.element===t.element&&e.action===t.action})});this.targets=[].concat(a(this.targets),a(t))}}],[{key:"getTargetElementsFromString",value:function(e){var t=e.target,n=e.trigger,i=t.trim();return"self"===i?[n]:"parent"===i?[n.parentNode]:"previous"===i?[n.previousElementSibling]:"next"===i?[n.nextElementSibling]:"string"==typeof i?Array.from(document.querySelectorAll(i)):[]}},{key:"getInstance",value:function(e){return e&&e.ODS_Toggle?e.ODS_Toggle:null}}])}();function y(e){var t=e.element,n=e.attribute,i=e.action,o=e.value,r=e.dispatchEvent,a=void 0===r||r,s=e.eventDetail,l=null;if(!(t&&t instanceof Element))return l;if("focus"===i&&setTimeout(function(){return t.focus()},20),"click"===i&&t.click(),"class"===n&&"string"==typeof o&&(t.classList.toggle(o),l=o),"text"===n){var u=t.textContent;t.textContent=(null==o?void 0:o.toString())||"",l=u}return"class"!==n&&"text"!==n&&void 0===i&&(l=t.getAttribute(n),"hidden"===n?t.hasAttribute(n)?t.removeAttribute(n):t.setAttribute(n,""):o?t.setAttribute(n,String(o)):t.setAttribute(n,String(!("true"===l)))),a&&t.dispatchEvent(new CustomEvent("toggle",{detail:s,bubbles:!0})),l}var w,S={buttonSelector:"[data-accordion-toggle]"},E=function(){return i(function e(n,i){return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},S),i),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.element.ODS_Accordion=this,this.init(),this},[{key:"onFocus",value:function(e){this.rovingTabindex.isActive||this.rovingTabindex.init();var t=e.currentTarget;window.location.hash.substring(1)===t.getAttribute("id")&&"false"===t.getAttribute("aria-expanded")&&t.click()}},{key:"init",value:function(){var e=this;this.buttons=Array.from(this.element.querySelectorAll(this.config.buttonSelector)),this.rovingTabindex?this.rovingTabindex.update(this.buttons):this.rovingTabindex=new v(this.buttons,{direction:"vertical"}),this.buttons.forEach(function(t){t.addEventListener("focus",e.onFocus),t.getAttribute("data-toggle")||t.addEventListener("click",e.onClick)})}},{key:"onClick",value:function(e){var t=e.currentTarget,n=this.element.querySelector("#".concat(t.getAttribute("aria-controls")));y({element:t,attribute:"aria-expanded"}),y({element:n,attribute:"hidden"})}},{key:"destroy",value:function(){var e=this;this.rovingTabindex.destroy(),this.buttons.forEach(function(t){t.removeEventListener("focus",e.onFocus),t.removeEventListener("click",e.onClick)})}},{key:"update",value:function(){this.destroy(),this.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Accordion?e.ODS_Accordion:null}}])}(),x={exports:{}};var k,A=c(w?x.exports:(w=1,window,x.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=37)}([function(e,t,n){var i=n(1),o=n(6),r=n(7),a=n(16),s=n(18),l="prototype",u=function(e,t,n){var c,d,h,f,p=e&u.F,m=e&u.G,v=e&u.S,g=e&u.P,b=e&u.B,y=m?i:v?i[t]||(i[t]={}):(i[t]||{})[l],w=m?o:o[t]||(o[t]={}),S=w[l]||(w[l]={});for(c in m&&(n=t),n)h=((d=!p&&y&&void 0!==y[c])?y:n)[c],f=b&&d?s(h,i):g&&"function"==typeof h?s(Function.call,h):h,y&&a(y,c,h,e&u.U),w[c]!=h&&r(w,c,f),g&&S[c]!=h&&(S[c]=h)};i.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){n.r(t),n.d(t,"h",function(){return s}),n.d(t,"createElement",function(){return s}),n.d(t,"cloneElement",function(){return c}),n.d(t,"Component",function(){return I}),n.d(t,"render",function(){return R}),n.d(t,"rerender",function(){return p}),n.d(t,"options",function(){return o});var i=function(){},o={},r=[],a=[];function s(e,t){var n,s,l,u,c=a;for(u=arguments.length;2<u--;)r.push(arguments[u]);for(t&&null!=t.children&&(r.length||r.push(t.children),delete t.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(l="function"!=typeof e)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(l=!1)),l&&n?c[c.length-1]+=s:c===a?c=[s]:c.push(s),n=l;var d=new i;return d.nodeName=e,d.children=c,d.attributes=null==t?void 0:t,d.key=null==t?void 0:t.key,void 0!==o.vnode&&o.vnode(d),d}function l(e,t){for(var n in t)e[n]=t[n];return e}var u="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(e,t){return s(e.nodeName,l(l({},e.attributes),t),2<arguments.length?[].slice.call(arguments,2):e.children)}var d=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function f(e){!e._dirty&&(e._dirty=!0)&&1==h.push(e)&&(o.debounceRendering||u)(p)}function p(){var e,t=h;for(h=[];e=t.pop();)e._dirty&&N(e)}function m(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(e){var t=l({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===t[i]&&(t[i]=n[i]);return t}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n,i,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),i&&i(e);else if("class"!==t||o)if("style"===t){if(i&&"string"!=typeof i&&"string"!=typeof n||(e.style.cssText=i||""),i&&"object"==typeof i){if("string"!=typeof n)for(var r in n)r in i||(e.style[r]="");for(var r in i)e.style[r]="number"==typeof i[r]&&!1===d.test(r)?i[r]+"px":i[r]}}else if("dangerouslySetInnerHTML"===t)i&&(e.innerHTML=i.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),i?n||e.addEventListener(t,y,a):e.removeEventListener(t,y,a),(e._listeners||(e._listeners={}))[t]=i}else if("list"!==t&&"type"!==t&&!o&&t in e){try{e[t]=null==i?"":i}catch(e){}null!=i&&!1!==i||"spellcheck"==t||e.removeAttribute(t)}else{var s=o&&t!==(t=t.replace(/^xlink:?/,""));null==i||!1===i?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof i&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),i):e.setAttribute(t,i))}else e.className=i||""}function y(e){return this._listeners[e.type](o.event&&o.event(e)||e)}var w=[],S=0,E=!1,x=!1;function k(){for(var e;e=w.pop();)o.afterMount&&o.afterMount(e),e.componentDidMount&&e.componentDidMount()}function A(e,t,n,i,o){var r=e,a=E;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(r=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(r,e),O(e,!0))),r.__preactattr_=!0,r;var s=t.nodeName;if("function"==typeof s)return function(e,t,n,i){for(var o=e&&e._component,r=o,a=e,s=o&&e._componentConstructor===t.nodeName,l=s,u=v(t);o&&!l&&(o=o._parentComponent);)l=o.constructor===t.nodeName;return o&&l&&(!i||o._component)?(L(o,u,3,n,i),e=o.base):(r&&!s&&(M(r),e=a=null),o=T(t.nodeName,u,n),e&&!o.nextBase&&(o.nextBase=e,a=null),L(o,u,1,n,i),e=o.base,a&&e!==a&&(a._component=null,O(a,!1))),e}(e,t,n,i);if(E="svg"===s||"foreignObject"!==s&&E,s=String(s),(!e||!m(e,s))&&(r=function(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}(s,E),e)){for(;e.firstChild;)r.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(r,e),O(e,!0)}var l=r.firstChild,u=r.__preactattr_,c=t.children;if(null==u){u=r.__preactattr_={};for(var d=r.attributes,h=d.length;h--;)u[d[h].name]=d[h].value}return!x&&c&&1===c.length&&"string"==typeof c[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=c[0]&&(l.nodeValue=c[0]):(c&&c.length||null!=l)&&function(e,t,n,i,o){var r,a,s,l,u,c,d,h,f=e.childNodes,p=[],v={},b=0,y=0,w=f.length,S=0,E=t?t.length:0;if(0!==w)for(var x=0;x<w;x++){var k=f[x],_=k.__preactattr_;null!=(C=E&&_?k._component?k._component.__key:_.key:null)?(b++,v[C]=k):(_||(void 0!==k.splitText?!o||k.nodeValue.trim():o))&&(p[S++]=k)}if(0!==E)for(x=0;x<E;x++){var C;if(u=null,null!=(C=(l=t[x]).key))b&&void 0!==v[C]&&(u=v[C],v[C]=void 0,b--);else if(y<S)for(r=y;r<S;r++)if(void 0!==p[r]&&(c=a=p[r],h=o,"string"==typeof(d=l)||"number"==typeof d?void 0!==c.splitText:"string"==typeof d.nodeName?!c._componentConstructor&&m(c,d.nodeName):h||c._componentConstructor===d.nodeName)){u=a,p[r]=void 0,r===S-1&&S--,r===y&&y++;break}u=A(u,l,n,i),s=f[x],u&&u!==e&&u!==s&&(null==s?e.appendChild(u):u===s.nextSibling?g(s):e.insertBefore(u,s))}if(b)for(var x in v)void 0!==v[x]&&O(v[x],!1);for(;y<=S;)void 0!==(u=p[S--])&&O(u,!1)}(r,c,n,i,x||null!=u.dangerouslySetInnerHTML),function(e,t,n){var i;for(i in n)t&&null!=t[i]||null==n[i]||b(e,i,n[i],n[i]=void 0,E);for(i in t)"children"===i||"innerHTML"===i||i in n&&t[i]===("value"===i||"checked"===i?e[i]:n[i])||b(e,i,n[i],n[i]=t[i],E)}(r,t.attributes,u),E=a,r}function O(e,t){var n=e._component;n?M(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||g(e),_(e))}function _(e){for(e=e.lastChild;e;){var t=e.previousSibling;O(e,!0),e=t}}var C=[];function T(e,t,n){var i,o=C.length;for(e.prototype&&e.prototype.render?(i=new e(t,n),I.call(i,t,n)):((i=new I(t,n)).constructor=e,i.render=D);o--;)if(C[o].constructor===e)return i.nextBase=C[o].nextBase,C.splice(o,1),i;return i}function D(e,t,n){return this.constructor(e,n)}function L(e,t,n,i,r){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,void 0===e.constructor.getDerivedStateFromProps&&(!e.base||r?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,i)),i&&i!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=i),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===o.syncComponentUpdates&&e.base?f(e):N(e,1,r)),e.__ref&&e.__ref(e))}function N(e,t,n,i){if(!e._disable){var r,a,s,u=e.props,c=e.state,d=e.context,h=e.prevProps||u,f=e.prevState||c,p=e.prevContext||d,m=e.base,g=e.nextBase,b=m||g,y=e._component,_=!1,C=p;if(e.constructor.getDerivedStateFromProps&&(c=l(l({},c),e.constructor.getDerivedStateFromProps(u,c)),e.state=c),m&&(e.props=h,e.state=f,e.context=p,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,d)?_=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,d),e.props=u,e.state=c,e.context=d),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!_){r=e.render(u,c,d),e.getChildContext&&(d=l(l({},d),e.getChildContext())),m&&e.getSnapshotBeforeUpdate&&(C=e.getSnapshotBeforeUpdate(h,f));var D,I,R=r&&r.nodeName;if("function"==typeof R){var P=v(r);(a=y)&&a.constructor===R&&P.key==a.__key?L(a,P,1,d,!1):(D=a,e._component=a=T(R,P,d),a.nextBase=a.nextBase||g,a._parentComponent=e,L(a,P,0,d,!1),N(a,1,n,!0)),I=a.base}else s=b,(D=y)&&(s=e._component=null),(b||1===t)&&(s&&(s._component=null),I=function(e,t,n,i,o,r){S++||(E=null!=o&&void 0!==o.ownerSVGElement,x=null!=e&&!("__preactattr_"in e));var a=A(e,t,n,i,r);return o&&a.parentNode!==o&&o.appendChild(a),--S||(x=!1),a}(s,r,d,n||!m,b&&b.parentNode,!0));if(b&&I!==b&&a!==y){var j=b.parentNode;j&&I!==j&&(j.replaceChild(I,b),D||(b._component=null,O(b,!1)))}if(D&&M(D),(e.base=I)&&!i){for(var B=e,U=e;U=U._parentComponent;)(B=U).base=I;I._component=B,I._componentConstructor=B.constructor}}for(!m||n?w.unshift(e):_||(e.componentDidUpdate&&e.componentDidUpdate(h,f,C),o.afterUpdate&&o.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);S||i||k()}}function M(e){o.beforeUnmount&&o.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?M(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),g(e.nextBase=t),C.push(e),_(t)),e.__ref&&e.__ref(null)}function I(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function R(e,t,n){return function(e,t,n,i,o,r){S++||(E=null!=o&&void 0!==o.ownerSVGElement,x=null!=e&&!("__preactattr_"in e));var a=A(e,t,n,i,r);return o&&a.parentNode!==o&&o.appendChild(a),--S||(x=!1,k()),a}(n,e,{},!1,t,!1)}l(I.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=l(l({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),f(this)},forceUpdate:function(e){e&&this._renderCallbacks.push(e),N(this,2)},render:function(){}});var P={h:s,createElement:s,cloneElement:c,Component:I,render:R,rerender:p,options:o};t.default=P},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var i=n(8),o=n(40);e.exports=n(3)?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(9),o=n(38),r=n(39),a=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(2);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,n){var i=n(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(4);e.exports=function(e,t){return!!e&&i(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var i=n(0);i(i.S+i.F,"Object",{assign:n(41)})},function(e,t,n){var i=n(2),o=n(1).document,r=i(o)&&i(o.createElement);e.exports=function(e){return r?o.createElement(e):{}}},function(e,t,n){var i=n(1),o=n(7),r=n(17),a=n(10)("src"),s="toString",l=Function[s],u=(""+l).split(s);n(6).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(r(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(r(n,a)||o(n,a,e[t]?""+e[t]:u.join(String(t)))),e===i?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||l.call(this)})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(19);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(42),o=n(28);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t,n){var i=n(11),o=n(12);e.exports=function(e){return i(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var i=n(21),o=n(24),r=n(43);e.exports=function(e){return function(t,n,a){var s,l=i(t),u=o(l.length),c=r(a,u);if(e&&n!=n){for(;c<u;)if((s=l[c++])!=s)return!0}else for(;c<u;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var i=n(25),o=Math.min;e.exports=function(e){return 0<e?o(i(e),9007199254740991):0}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?i:n)(e)}},function(e,t,n){var i=n(27)("keys"),o=n(10);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var i=n(6),o=n(1),r="__core-js_shared__",a=o[r]||(o[r]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n(44)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var i=n(12);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(8).f,o=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in o||n(3)&&i(o,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(e){return""}}})},function(e,t,n){var i=n(0),o=n(32)(1);i(i.P+i.F*!n(13)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var i=n(18),o=n(11),r=n(29),a=n(24),s=n(47);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,d=6==e,h=5==e||d,f=t||s;return function(t,s,p){for(var m,v,g=r(t),b=o(g),y=i(s,p,3),w=a(b.length),S=0,E=n?f(t,w):l?f(t,0):void 0;S<w;S++)if((h||S in b)&&(v=y(m=b[S],S,g),e))if(n)E[S]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return S;case 2:E.push(m)}else if(c)return!1;return d?-1:u||c?c:E}}},function(e,t,n){var i=n(22);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(27)("wks"),o=n(10),r=n(1).Symbol,a="function"==typeof r;(e.exports=function(e){return i[e]||(i[e]=a&&r[e]||(a?r:o)("Symbol."+e))}).store=i},function(e,t,n){var i=n(0),o=n(23)(!1),r=[].indexOf,a=!!r&&1/[1].indexOf(1,-0)<0;i(i.P+i.F*(a||!n(13)(r)),"Array",{indexOf:function(e){return a?r.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var i=n(0);i(i.S,"Object",{create:n(52)})},function(e,t,n){t.__esModule=!0,t.default=void 0,n(14),n(30),n(31),n(35),n(49),n(50);var i=n(5),o=function(e){return e&&e.__esModule?e:{default:e}}(n(51));function r(e){if(!e.element)throw new Error("element is not defined");if(!e.id)throw new Error("id is not defined");if(!e.source)throw new Error("source is not defined");Array.isArray(e.source)&&(e.source=a(e.source)),(0,i.render)((0,i.createElement)(o.default,e),e.element)}var a=function(e){return function(t,n){n(e.filter(function(e){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}))}};r.enhanceSelectElement=function(e){if(!e.selectElement)throw new Error("selectElement is not defined");if(!e.source){var t=[].filter.call(e.selectElement.options,function(t){return t.value||e.preserveNullOptions});e.source=t.map(function(e){return e.textContent||e.innerText})}if(e.onConfirm=e.onConfirm||function(t){var n=[].filter.call(e.selectElement.options,function(e){return(e.textContent||e.innerText)===t})[0];n&&(n.selected=!0)},e.selectElement.value||void 0===e.defaultValue){var n=e.selectElement.options[e.selectElement.options.selectedIndex];e.defaultValue=n.textContent||n.innerText}void 0===e.name&&(e.name=""),void 0===e.id&&(void 0===e.selectElement.id?e.id="":e.id=e.selectElement.id),void 0===e.autoselect&&(e.autoselect=!0);var i=document.createElement("div");e.selectElement.parentNode.insertBefore(i,e.selectElement),r(Object.assign({},e,{element:i})),e.selectElement.style.display="none",e.selectElement.id=e.selectElement.id+"-select"};var s=r;t.default=s},function(e,t,n){e.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(2);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(20),o=n(45),r=n(46),a=n(29),s=n(11),l=Object.assign;e.exports=!l||n(4)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=i})?function(e,t){for(var n=a(e),l=arguments.length,u=1,c=o.f,d=r.f;u<l;)for(var h,f=s(arguments[u++]),p=c?i(f).concat(c(f)):i(f),m=p.length,v=0;v<m;)d.call(f,h=p[v++])&&(n[h]=f[h]);return n}:l},function(e,t,n){var i=n(17),o=n(21),r=n(23)(!1),a=n(26)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),l=0,u=[];for(n in s)n!=a&&i(s,n)&&u.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~r(u,n)||u.push(n));return u}},function(e,t,n){var i=n(25),o=Math.max,r=Math.min;e.exports=function(e,t){return(e=i(e))<0?o(e+t,0):r(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var i=n(48);e.exports=function(e,t){return new(i(e))(t)}},function(e,t,n){var i=n(2),o=n(33),r=n(34)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),i(t)&&null===(t=t[r])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var i=n(0),o=n(32)(2);i(i.P+i.F*!n(13)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var i=n(0);i(i.S,"Array",{isArray:n(33)})},function(e,t,n){t.__esModule=!0,t.default=void 0,n(14),n(36),n(30),n(31),n(35),n(55),n(58);var i=n(5),o=a(n(60)),r=a(n(61));function a(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function c(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var d=function(e){function t(t){var n;return(n=e.call(this,t)||this).elementReferences={},n.state={focused:null,hovered:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0,searchOnInteraction:!0},n.handleComponentBlur=n.handleComponentBlur.bind(l(l(n))),n.handleKeyDown=n.handleKeyDown.bind(l(l(n))),n.handleUpArrow=n.handleUpArrow.bind(l(l(n))),n.handleDownArrow=n.handleDownArrow.bind(l(l(n))),n.handleEnter=n.handleEnter.bind(l(l(n))),n.handlePrintableKey=n.handlePrintableKey.bind(l(l(n))),n.handleListMouseLeave=n.handleListMouseLeave.bind(l(l(n))),n.handleOptionBlur=n.handleOptionBlur.bind(l(l(n))),n.handleOptionClick=n.handleOptionClick.bind(l(l(n))),n.handleOptionFocus=n.handleOptionFocus.bind(l(l(n))),n.handleOptionMouseDown=n.handleOptionMouseDown.bind(l(l(n))),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(l(l(n))),n.handleInputBlur=n.handleInputBlur.bind(l(l(n))),n.handleInputChange=n.handleInputChange.bind(l(l(n))),n.handleInputFocus=n.handleInputFocus.bind(l(l(n))),n.pollInputElement=n.pollInputElement.bind(l(l(n))),n.getDirectInputChanges=n.getDirectInputChanges.bind(l(l(n))),n}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e);var n=t.prototype;return n.isQueryAnOption=function(e,t){var n=this;return-1!==t.map(function(e){return n.templateInputValue(e).toLowerCase()}).indexOf(e.toLowerCase())},n.componentDidMount=function(){this.pollInputElement()},n.componentWillUnmount=function(){clearTimeout(this.$pollInput)},n.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){e.pollInputElement()},100)},n.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},n.componentDidUpdate=function(e,t){var n=this.state.focused,i=null===n,o=t.focused!==n;o&&!i&&this.elementReferences[n].focus();var r=-1===n,a=o&&null===t.focused;if(r&&a){var s=this.elementReferences[n];s.setSelectionRange(0,s.value.length)}},n.hasAutoselect=function(){return this.props.autoselect},n.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},n.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},n.handleComponentBlur=function(e){var t,n=this.state,i=n.options,o=n.query,r=n.selected;this.props.confirmOnBlur?(t=e.query||o,this.props.onConfirm(i[r])):t=o,this.setState({focused:null,menuOpen:e.menuOpen||!1,query:t,selected:null,validChoiceMade:this.isQueryAnOption(t,i)})},n.handleListMouseLeave=function(e){this.setState({hovered:null})},n.handleOptionBlur=function(e,t){var n=this.state,i=n.focused,o=n.menuOpen,r=n.options,a=n.selected,s=null===e.relatedTarget,l=e.relatedTarget===this.elementReferences[-1],u=i!==t&&-1!==i;if(!u&&s||!u&&!l){var d=o&&c()&&!this.hasAutoselect();this.handleComponentBlur({menuOpen:d,query:this.templateInputValue(r[a])})}},n.handleInputBlur=function(e){var t=this.state,n=t.focused,i=t.menuOpen,o=t.options,r=t.query,a=t.selected,s=0<=n;if(c()&&!e.relatedTarget&&!s&&this.hasAutoselect()){var l=this.templateInputValue(o[a]);this.handleComponentBlur({menuOpen:!1,query:l})}else if(!s){var u=i&&c(),d=c()?r:this.templateInputValue(o[a]);this.handleComponentBlur({menuOpen:u,query:d})}},n.handleInputChange=function(e){var t=this,n=this.props,i=n.minLength,o=n.source,r=n.showAllValues,a=this.state.searchOnInteraction,s=this.hasAutoselect(),l=e.target.value,u=0===l.length,c=a||this.state.query.length!==l.length,d=l.length>=i;this.setState({query:l,ariaHint:u,searchOnInteraction:!0}),r||!u&&c&&d?o(l,function(e){var n=0<e.length;t.setState(function(t){return{menuOpen:n&&null!==t.focused,options:e,selected:s&&n?0:-1,validChoiceMade:!1}})}):!u&&d||this.setState({menuOpen:!1,options:[]})},n.handleInputClick=function(e){this.handleInputChange(e)},n.handleInputFocus=function(e){var t=this.state,n=t.query,i=t.validChoiceMade,o=t.options,r=this.props.minLength,a=!i&&n.length>=r&&0<o.length;a?this.setState(function(e){var t=e.menuOpen;return{focused:-1,menuOpen:a||t,selected:-1}}):this.setState({focused:-1}),e&&this.handleInputChange(e)},n.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e,searchOnInteraction:-1!==e})},n.handleOptionMouseEnter=function(e,t){c()||this.setState({hovered:t})},n.handleOptionClick=function(e,t){var n=this.state.options[t],i=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:i,selected:-1,validChoiceMade:!0}),this.forceUpdate()},n.handleOptionMouseDown=function(e){e.preventDefault()},n.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,i=t.selected;-1!==i&&n&&this.handleOptionFocus(i-1)},n.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})});else if(!0===this.state.menuOpen){var n=this.state,i=n.menuOpen,o=n.options,r=n.selected;r!==o.length-1&&i&&this.handleOptionFocus(r+1)}},n.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e})})),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},n.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),0<=this.state.selected&&this.handleOptionClick(e,this.state.selected))},n.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},n.handleKeyDown=function(e){switch(u[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(e){return 47<e&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223})(e.keyCode)&&this.handlePrintableKey(e)}},n.render=function(){var e,t=this,n=this.props,r=n.cssNamespace,a=n.customInputClassName,l=n.wrapperClassName,u=n.optionClassName,d=n.menuClassName,h=n.displayMenu,f=n.enterKeyHint,p=n.id,m=n.minLength,v=n.name,g=n.placeholder,b=n.required,y=n.showAllValues,w=n.tNoResults,S=n.tStatusQueryTooShort,E=n.tStatusNoResults,x=n.tStatusSelectedOption,k=n.tStatusResults,A=n.tAssistiveHint,O=n.dropdownArrow,_=this.state,C=_.focused,T=_.hovered,D=_.menuOpen,L=_.options,N=_.query,M=_.selected,I=_.ariaHint,R=_.validChoiceMade,P=this.hasAutoselect(),j=-1===C,B=0===L.length,U=0!==N.length,F=N.length>=m,H=this.props.showNoOptionsFound&&j&&B&&U&&F,V=r+"__wrapper"+(l?" "+l:""),W=r+"__input",z=null!==C?" "+W+"--focused":"",q=this.props.showAllValues?" "+W+"--show-all-values":" "+W+"--default",$=r+"__dropdown-arrow-down",K=-1!==C&&null!==C,G=r+"__menu",Y=G+"--"+h,X=G+"--"+(D||H?"visible":"hidden"),J=r+"__option",Q=r+"__hint",Z=this.templateInputValue(L[M]),ee=Z&&0===Z.toLowerCase().indexOf(N.toLowerCase())&&P?N+Z.substr(N.length):"",te=p+"__assistiveHint",ne=I?{"aria-describedby":te}:null;return y&&"string"==typeof(e=O({className:$}))&&(e=(0,i.createElement)("div",{className:r+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,i.createElement)("div",{className:V,onKeyDown:this.handleKeyDown},(0,i.createElement)(o.default,{id:p,length:L.length,queryLength:N.length,minQueryLength:m,selectedOption:this.templateInputValue(L[M]),selectedOptionIndex:M,validChoiceMade:R,isInFocus:null!==this.state.focused,tQueryTooShort:S,tNoResults:E,tSelectedOption:x,tResults:k}),ee&&(0,i.createElement)("span",null,(0,i.createElement)("input",{className:Q,readonly:!0,tabIndex:"-1",value:ee})),(0,i.createElement)("input",s({enterkeyhint:f||(c()&&this.hasAutoselect()?"done":""),"aria-expanded":D?"true":"false","aria-activedescendant":!!K&&p+"__option--"+C,"aria-owns":p+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},ne,{autoComplete:"off",className:""+W+z+q+(a?" "+a:""),id:p,onClick:function(e){return t.handleInputClick(e)},onBlur:this.handleInputBlur},function(e){return{onInput:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:v,placeholder:g,ref:function(e){t.elementReferences[-1]=e},type:"text",role:"combobox",required:b,value:N})),e,(0,i.createElement)("ul",{className:G+" "+Y+" "+X+(d?" "+d:""),onMouseLeave:function(e){return t.handleListMouseLeave(e)},id:p+"__listbox",role:"listbox"},L.map(function(e,n){var o=(-1===C?M===n:C===n)&&null===T?" "+J+"--focused":"",r=n%2?" "+J+"--odd":"",a=c()?"<span id="+p+"__option-suffix--"+n+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(n+1)+" of "+L.length+"</span>":"";return(0,i.createElement)("li",{"aria-selected":C===n?"true":"false",className:""+J+o+r+(u?" "+u:""),dangerouslySetInnerHTML:{__html:t.templateSuggestion(e)+a},id:p+"__option--"+n,key:n,onBlur:function(e){return t.handleOptionBlur(e,n)},onClick:function(e){return t.handleOptionClick(e,n)},onMouseDown:t.handleOptionMouseDown,onMouseEnter:function(e){return t.handleOptionMouseEnter(e,n)},ref:function(e){t.elementReferences[n]=e},role:"option",tabIndex:"-1","aria-posinset":n+1,"aria-setsize":L.length})}),H&&(0,i.createElement)("li",{className:J+(u?" "+u:"")+" "+J+"--no-results"},w())),(0,i.createElement)("span",{id:te,style:{display:"none"}},A()))},t}(i.Component);(t.default=d).defaultProps={autoselect:!1,cssNamespace:"autocomplete",wrapperClassName:"",customInputClassName:"",menuClassName:"",optionClassName:"",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:r.default}},function(e,t,n){var i=n(9),o=n(53),r=n(28),a=n(26)("IE_PROTO"),s=function(){},l="prototype",u=function(){var e,t=n(15)("iframe"),i=r.length;for(t.style.display="none",n(54).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;i--;)delete u[l][r[i]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=i(e),n=new s,s[l]=null,n[a]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(8),o=n(9),r=n(20);e.exports=n(3)?Object.defineProperties:function(e,t){o(e);for(var n,a=r(t),s=a.length,l=0;l<s;)i.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var i=n(1).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(0);i(i.P,"Function",{bind:n(56)})},function(e,t,n){var i=n(19),o=n(2),r=n(57),a=[].slice,s={};e.exports=Function.bind||function(e){var t=i(this),n=a.call(arguments,1),l=function(){var i=n.concat(a.call(arguments));return this instanceof l?function(e,t,n){if(!(t in s)){for(var i=[],o=0;o<t;o++)i[o]="a["+o+"]";s[t]=Function("F,a","return new F("+i.join(",")+")")}return s[t](e,n)}(t,i.length,i):r(t,i,e)};return o(t.prototype)&&(l.prototype=t.prototype),l}},function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){n(59)("match",1,function(e,t,n){return[function(n){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i):new RegExp(n)[t](String(i))},n]})},function(e,t,n){var i=n(7),o=n(16),r=n(4),a=n(12),s=n(34);e.exports=function(e,t,n){var l=s(e),u=n(a,l,""[e]),c=u[0],d=u[1];r(function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),i(RegExp.prototype,l,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)}))}},function(e,t,n){t.__esModule=!0,t.default=void 0,n(36);var i=n(5),o=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))||this).state={bump:!1,debounced:!1},t}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e);var n=t.prototype;return n.componentWillMount=function(){var e=this;this.debounceStatusUpdate=function(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(i,o)},t)}}(function(){if(!e.state.debounced){var t=!e.props.isInFocus||e.props.validChoiceMade;e.setState(function(e){return{bump:!e.bump,debounced:!0,silenced:t}})}},1400)},n.componentWillReceiveProps=function(e){e.queryLength,this.setState({debounced:!1})},n.render=function(){var e,t=this.props,n=t.id,o=t.length,r=t.queryLength,a=t.minQueryLength,s=t.selectedOption,l=t.selectedOptionIndex,u=t.tQueryTooShort,c=t.tNoResults,d=t.tSelectedOption,h=t.tResults,f=this.state,p=f.bump,m=f.debounced,v=f.silenced,g=r<a,b=0===o,y=s?d(s,o,l):"";return e=g?u(a):b?c():h(o,y),this.debounceStatusUpdate(),(0,i.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,i.createElement)("div",{id:n+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!v&&m&&p?e:""),(0,i.createElement)("div",{id:n+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},v||!m||p?"":e))},t}(i.Component);(t.default=o).defaultProps={tQueryTooShort:function(e){return"Type in "+e+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(e,t,n){return e+" "+(n+1)+" of "+t+" is highlighted"},tResults:function(e,t){return e+" "+(1===e?"result":"results")+" "+(1===e?"is":"are")+" available. "+t}}},function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(5);t.default=function(e){var t=e.className;return(0,i.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},(0,i.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,i.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))}}]).default)),O={autoselect:!0,wrapperClassName:"",menuClassName:"",optionClassName:"",customInputClassName:"",displayMenu:"overlay",tAssistiveHint:function(){return"Pre prezeranie výsledkov automatického dopĺňania použite šípky nahor a nadol a pre výber konkrétneho výsledku použite tlačidlo Enter. Pri dotykových zariadeniach použite dotyk alebo potiahnutie prstom do strany."}},_=function(){return i(function e(n,i){return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},O),i),this.onPageshow=this.onPageshow.bind(this),this.instance=null,this.element.ODS_Autocomplete=this,this.init(),this},[{key:"init",value:function(){var e=this.element.getAttribute("data-autocomplete-config"),t={};if(e)try{t=JSON.parse(e)}catch(e){}this.config=Object.assign(Object.assign({},this.config),t),"SELECT"===this.element.tagName?A.enhanceSelectElement(Object.assign({selectElement:this.element},this.config)):A(Object.assign({element:this.element},this.config)),window.addEventListener("pageshow",this.onPageshow)}},{key:"onPageshow",value:function(e){e.persisted&&window&&window.location.reload()}},{key:"destroy",value:function(){window.removeEventListener("pageshow",this.onPageshow),this.element.ODS_Autocomplete=null}},{key:"update",value:function(){this.destroy(),this.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Autocomplete?e.ODS_Autocomplete:null}}])}(),C={controlSelector:".block-action__control",indicatorSelector:".block-action__indicator",activeClass:"is-indicating"},T=function(){return i(function e(n,i){return t(this,e),this.controlElement=null,this.indicatorElements=[],this.element=n,this.config=Object.assign(Object.assign({},C),i),this.highlightIndicators=this.highlightIndicators.bind(this),this.unhighlightIndicators=this.unhighlightIndicators.bind(this),this.element.ODS_BlockAction=this,this.init(),this},[{key:"init",value:function(){this.controlElement=this.element.querySelector(this.config.controlSelector),this.indicatorElements=Array.from(this.element.querySelectorAll(this.config.indicatorSelector)),!this.controlElement||this.indicatorElements.length<1||(this.controlElement.addEventListener("mouseenter",this.highlightIndicators),this.controlElement.addEventListener("mouseleave",this.unhighlightIndicators),this.controlElement.addEventListener("focus",this.highlightIndicators),this.controlElement.addEventListener("blur",this.unhighlightIndicators))}},{key:"highlightIndicators",value:function(){var e=this;this.indicatorElements.forEach(function(t){return t.classList.add(e.config.activeClass)})}},{key:"unhighlightIndicators",value:function(){var e=this;this.indicatorElements.forEach(function(t){return t.classList.remove(e.config.activeClass)})}},{key:"destroy",value:function(){var e=this;this.indicatorElements.forEach(function(t){return t.classList.remove(e.config.activeClass)}),this.controlElement&&(this.controlElement.removeEventListener("mouseenter",this.highlightIndicators),this.controlElement.removeEventListener("mouseleave",this.unhighlightIndicators),this.controlElement.removeEventListener("focus",this.highlightIndicators),this.controlElement.removeEventListener("blur",this.unhighlightIndicators)),this.controlElement=null,this.indicatorElements=[]}},{key:"update",value:function(){this.destroy(),this.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_BlockAction?e.ODS_BlockAction:null}}])}(),D={exports:{}};var L=(k||(k=1,D.exports=function(){var e="undefined"!=typeof window?window:this,t=e.Glider=function(t,n){var i=this;if(t._glider)return t._glider;if(i.ele=t,i.ele._glider=i,i.opt=Object.assign({},{slidesToScroll:1,slidesToShow:1,resizeLock:!0,duration:.5,easing:function(e,t,n,i,o){return i*(t/=o)*t+n},classes:{glider:"glider",track:"glider-track",slide:"glider-slide",drag:"drag",draggable:"draggable",disabled:"disabled",active:"active",visible:"visible",dot:"glider-dot",dots:"glider-dots"}},n),i.animate_id=i.page=i.slide=0,i.arrows={},i._opt=i.opt,i.opt.skipTrack)i.track=i.ele.children[0];else for(i.track=document.createElement("div"),i.ele.appendChild(i.track);1!==i.ele.children.length;)i.track.appendChild(i.ele.children[0]);i.ele.classList.add(i.opt.classes.glider),i.track.classList.add(i.opt.classes.track),i.init(),i.resize=i.init.bind(i,!0),i.event(i.ele,"add",{scroll:i.updateControls.bind(i)}),i.event(e,"add",{resize:i.resize})},n=t.prototype;return n.init=function(e,t){var n=this,i=0,o=0;n.slides=n.track.children,[].forEach.call(n.slides,function(e,t){e.classList.add("glider-slide"),e.setAttribute("data-gslide",t)}),n.containerWidth=n.ele.clientWidth;var r=n.settingsBreakpoint();if(t||(t=r),"auto"===n.opt.slidesToShow||void 0!==n.opt._autoSlide){var a=n.containerWidth/n.opt.itemWidth;n.opt._autoSlide=n.opt.slidesToShow=n.opt.exactWidth?a:Math.max(1,Math.floor(a))}"auto"===n.opt.slidesToScroll&&(n.opt.slidesToScroll=Math.floor(n.opt.slidesToShow)),n.itemWidth=n.opt.exactWidth?n.opt.itemWidth:n.containerWidth/n.opt.slidesToShow,[].forEach.call(n.slides,function(e){e.style.height="auto",e.style.width=n.itemWidth+"px",i+=n.itemWidth,o=Math.max(e.offsetHeight,o)}),n.track.style.width=i+"px",n.trackWidth=i,n.isDrag=!1,n.preventClick=!1,n.opt.resizeLock&&n.scrollTo(n.slide*n.itemWidth,0),(r||t)&&(n.bindArrows(),n.buildDots(),n.bindDrag()),n.updateControls(),n.emit(e?"refresh":"loaded")},n.bindDrag=function(){var e=this;e.mouse=e.mouse||e.handleMouse.bind(e);var t=function(){e.mouseDown=void 0,e.ele.classList.remove(e.opt.classes.drag),e.isDrag&&(e.preventClick=!0),e.isDrag=!1},n={mouseup:t,mouseleave:t,mousedown:function(t){t.preventDefault(),t.stopPropagation(),e.mouseDown=t.clientX,e.ele.classList.add(e.opt.classes.drag)},mousemove:e.mouse,click:function(t){e.preventClick&&(t.preventDefault(),t.stopPropagation()),e.preventClick=!1}};e.ele.classList.toggle(e.opt.classes.draggable,!0===e.opt.draggable),e.event(e.ele,"remove",n),e.opt.draggable&&e.event(e.ele,"add",n)},n.buildDots=function(){var e=this;if(e.opt.dots){if("string"==typeof e.opt.dots?e.dots=document.querySelector(e.opt.dots):e.dots=e.opt.dots,e.dots){e.dots.innerHTML="",e.dots.classList.add(e.opt.classes.dots);for(var t=0;t<Math.ceil(e.slides.length/Math.floor(e.opt.slidesToShow));++t){var n=document.createElement("button");n.dataset.index=t,n.setAttribute("aria-label","Page "+(t+1)),n.setAttribute("role","tab"),n.className=e.opt.classes.dot+" "+(t?"":e.opt.classes.active),e.event(n,"add",{click:e.scrollItem.bind(e,t,!0)}),e.dots.appendChild(n)}}}else e.dots&&(e.dots.innerHTML="")},n.bindArrows=function(){var e=this;e.opt.arrows?["prev","next"].forEach(function(t){var n=e.opt.arrows[t];n&&("string"==typeof n&&(n=document.querySelector(n)),n&&(n._func=n._func||e.scrollItem.bind(e,t),e.event(n,"remove",{click:n._func}),e.event(n,"add",{click:n._func}),e.arrows[t]=n))}):Object.keys(e.arrows).forEach(function(t){var n=e.arrows[t];e.event(n,"remove",{click:n._func})})},n.updateControls=function(e){var t=this;e&&!t.opt.scrollPropagate&&e.stopPropagation();var n=t.containerWidth>=t.trackWidth;t.opt.rewind||(t.arrows.prev&&(t.arrows.prev.classList.toggle(t.opt.classes.disabled,t.ele.scrollLeft<=0||n),t.arrows.prev.classList.contains("disabled")?t.arrows.prev.setAttribute("aria-disabled",!0):t.arrows.prev.setAttribute("aria-disabled",!1)),t.arrows.next&&(t.arrows.next.classList.toggle(t.opt.classes.disabled,Math.ceil(t.ele.scrollLeft+t.containerWidth)>=Math.floor(t.trackWidth)||n),t.arrows.next.classList.contains("disabled")?t.arrows.next.setAttribute("aria-disabled",!0):t.arrows.next.setAttribute("aria-disabled",!1))),t.slide=Math.round(t.ele.scrollLeft/t.itemWidth),t.page=Math.round(t.ele.scrollLeft/(t.itemWidth*Math.floor(t.opt.slidesToShow)));var i=t.slide+Math.floor(Math.floor(t.opt.slidesToShow)/2),o=Math.floor(t.opt.slidesToShow)%2?0:i+1;1===Math.floor(t.opt.slidesToShow)&&(o=0),t.ele.scrollLeft+t.containerWidth>=Math.floor(t.trackWidth)&&(t.page=t.dots?t.dots.children.length-1:0),[].forEach.call(t.slides,function(e,n){var r=e.classList,a=r.contains(t.opt.classes.visible),s=t.ele.scrollLeft,l=t.ele.scrollLeft+t.containerWidth,u=t.itemWidth*n,c=u+t.itemWidth;[].forEach.call(r,function(e){/^left|right/.test(e)&&r.remove(e)}),r.toggle("active",t.slide===n),i===n||o&&o===n?r.add("center"):(r.remove("center"),r.add([n<i?"left":"right",Math.abs(n-(n<i?i:o||i))].join("-")));var d=Math.ceil(u)>=Math.floor(s)&&Math.floor(c)<=Math.ceil(l);r.toggle("visible",d),d!==a&&t.emit("slide-"+(d?"visible":"hidden"),{slide:n})}),t.dots&&[].forEach.call(t.dots.children,function(e,n){e.classList.toggle(t.opt.classes.active,t.page===n)}),e&&t.opt.scrollLock&&(clearTimeout(t.scrollLock),t.scrollLock=setTimeout(function(){clearTimeout(t.scrollLock),Math.abs(t.ele.scrollLeft/t.itemWidth-t.slide)>.02&&(t.mouseDown||t.trackWidth>t.containerWidth+t.ele.scrollLeft&&t.scrollItem(t.getCurrentSlide()))},t.opt.scrollLockDelay||250))},n.getCurrentSlide=function(){var e=this;return e.round(e.ele.scrollLeft/e.itemWidth)},n.scrollItem=function(e,t,n){n&&n.preventDefault();var i=this,o=e;if(++i.animate_id,!0===t)e*=Math.floor(i.opt.slidesToShow),e*=i.itemWidth;else{if("string"==typeof e){var r="prev"===e;if(e=i.opt.slidesToScroll%1||i.opt.slidesToShow%1?i.getCurrentSlide():i.slide,r?e-=i.opt.slidesToScroll:e+=i.opt.slidesToScroll,i.opt.rewind){var a=i.ele.scrollLeft;e=r&&!a?i.slides.length:!r&&a+i.containerWidth>=Math.floor(i.trackWidth)?0:e}}e=Math.max(Math.min(e,i.slides.length),0),i.slide=e,e=i.itemWidth*e}return i.scrollTo(e,i.opt.duration*Math.abs(i.ele.scrollLeft-e),function(){i.updateControls(),i.emit("animated",{value:o,type:"string"==typeof o?"arrow":t?"dot":"slide"})}),!1},n.settingsBreakpoint=function(){var t=this,n=t._opt.responsive;if(n){n.sort(function(e,t){return t.breakpoint-e.breakpoint});for(var i=0;i<n.length;++i){var o=n[i];if(e.innerWidth>=o.breakpoint)return t.breakpoint!==o.breakpoint&&(t.opt=Object.assign({},t._opt,o.settings),t.breakpoint=o.breakpoint,!0)}}var r=0!==t.breakpoint;return t.opt=Object.assign({},t._opt),t.breakpoint=0,r},n.scrollTo=function(t,n,i){var o=this,r=(new Date).getTime(),a=o.animate_id,s=function(){var l=(new Date).getTime()-r;o.ele.scrollLeft=o.ele.scrollLeft+(t-o.ele.scrollLeft)*o.opt.easing(0,l,0,1,n),l<n&&a===o.animate_id?e.requestAnimationFrame(s):(o.ele.scrollLeft=t,i&&i.call(o))};e.requestAnimationFrame(s)},n.removeItem=function(e){var t=this;t.slides.length&&(t.track.removeChild(t.slides[e]),t.refresh(!0),t.emit("remove"))},n.addItem=function(e){var t=this;t.track.appendChild(e),t.refresh(!0),t.emit("add")},n.handleMouse=function(e){var t=this;t.mouseDown&&(t.isDrag=!0,t.ele.scrollLeft+=(t.mouseDown-e.clientX)*(t.opt.dragVelocity||3.3),t.mouseDown=e.clientX)},n.round=function(e){var t=1/(this.opt.slidesToScroll%1||1);return Math.round(e*t)/t},n.refresh=function(e){this.init(!0,e)},n.setOption=function(e,t){var n=this;n.breakpoint&&!t?n._opt.responsive.forEach(function(t){t.breakpoint===n.breakpoint&&(t.settings=Object.assign({},t.settings,e))}):n._opt=Object.assign({},n._opt,e),n.breakpoint=0,n.settingsBreakpoint()},n.destroy=function(){var t=this,n=t.ele.cloneNode(!0),i=function(e){e.removeAttribute("style"),[].forEach.call(e.classList,function(t){/^glider/.test(t)&&e.classList.remove(t)})};n.children[0].outerHTML=n.children[0].innerHTML,i(n),[].forEach.call(n.getElementsByTagName("*"),i),t.ele.parentNode.replaceChild(n,t.ele),t.event(e,"remove",{resize:t.resize}),t.emit("destroy")},n.emit=function(t,n){var i=this,o=new e.CustomEvent("glider-"+t,{bubbles:!i.opt.eventPropagate,detail:n});i.ele.dispatchEvent(o)},n.event=function(e,t,n){var i=e[t+"EventListener"].bind(e);Object.keys(n).forEach(function(e){i(e,n[e])})},t}()),D.exports),N=c(L),M="top",I="bottom",R="right",P="left",j="auto",B=[M,I,R,P],U="start",F="end",H="viewport",V="popper",W=B.reduce(function(e,t){return e.concat([t+"-"+U,t+"-"+F])},[]),z=[].concat(B,[j]).reduce(function(e,t){return e.concat([t,t+"-"+U,t+"-"+F])},[]),q=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(e){return e?(e.nodeName||"").toLowerCase():null}function K(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function G(e){return e instanceof K(e).Element||e instanceof Element}function Y(e){return e instanceof K(e).HTMLElement||e instanceof HTMLElement}function X(e){return"undefined"!=typeof ShadowRoot&&(e instanceof K(e).ShadowRoot||e instanceof ShadowRoot)}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},o=t.elements[e];Y(o)&&$(o)&&(Object.assign(o.style,n),Object.keys(i).forEach(function(e){var t=i[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],o=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Y(i)&&$(i)&&(Object.assign(i.style,r),Object.keys(o).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function Q(e){return e.split("-")[0]}var Z=Math.max,ee=Math.min,te=Math.round;function ne(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ie(){return!/^((?!chrome|android).)*safari/i.test(ne())}function oe(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=1,r=1;t&&Y(e)&&(o=e.offsetWidth>0&&te(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&te(i.height)/e.offsetHeight||1);var a=(G(e)?K(e):window).visualViewport,s=!ie()&&n,l=(i.left+(s&&a?a.offsetLeft:0))/o,u=(i.top+(s&&a?a.offsetTop:0))/r,c=i.width/o,d=i.height/r;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function re(e){var t=oe(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function ae(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&X(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function se(e){return K(e).getComputedStyle(e)}function le(e){return["table","td","th"].indexOf($(e))>=0}function ue(e){return((G(e)?e.ownerDocument:e.document)||window.document).documentElement}function ce(e){return"html"===$(e)?e:e.assignedSlot||e.parentNode||(X(e)?e.host:null)||ue(e)}function de(e){return Y(e)&&"fixed"!==se(e).position?e.offsetParent:null}function he(e){for(var t=K(e),n=de(e);n&&le(n)&&"static"===se(n).position;)n=de(n);return n&&("html"===$(n)||"body"===$(n)&&"static"===se(n).position)?t:n||function(e){var t=/firefox/i.test(ne());if(/Trident/i.test(ne())&&Y(e)&&"fixed"===se(e).position)return null;var n=ce(e);for(X(n)&&(n=n.host);Y(n)&&["html","body"].indexOf($(n))<0;){var i=se(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function fe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function pe(e,t,n){return Z(e,ee(t,n))}function me(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ve(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,o=e.options,r=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Q(n.placement),l=fe(s),u=[P,R].indexOf(s)>=0?"height":"width";if(r&&a){var c=function(e,t){return me("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ve(e,B))}(o.padding,n),d=re(r),h="y"===l?M:P,f="y"===l?I:R,p=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],v=he(r),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=p/2-m/2,y=c[h],w=g-d[u]-c[f],S=g/2-d[u]/2+b,E=pe(y,S,w),x=l;n.modifiersData[i]=((t={})[x]=E,t.centerOffset=E-S,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&ae(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function be(e){return e.split("-")[1]}var ye={top:"auto",right:"auto",bottom:"auto",left:"auto"};function we(e){var t,n=e.popper,i=e.popperRect,o=e.placement,r=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,h=a.x,f=void 0===h?0:h,p=a.y,m=void 0===p?0:p,v="function"==typeof c?c({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=P,w=M,S=window;if(u){var E=he(n),x="clientHeight",k="clientWidth";if(E===K(n)&&"static"!==se(E=ue(n)).position&&"absolute"===s&&(x="scrollHeight",k="scrollWidth"),o===M||(o===P||o===R)&&r===F)w=I,m-=(d&&E===S&&S.visualViewport?S.visualViewport.height:E[x])-i.height,m*=l?1:-1;if(o===P||(o===M||o===I)&&r===F)y=R,f-=(d&&E===S&&S.visualViewport?S.visualViewport.width:E[k])-i.width,f*=l?1:-1}var A,O=Object.assign({position:s},u&&ye),_=!0===c?function(e,t){var n=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:te(n*o)/o||0,y:te(i*o)/o||0}}({x:f,y:m},K(n)):{x:f,y:m};return f=_.x,m=_.y,l?Object.assign({},O,((A={})[w]=b?"0":"",A[y]=g?"0":"",A.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",A)):Object.assign({},O,((t={})[w]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var Se={passive:!0};var Ee={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(e){return Ee[e]})}var ke={start:"end",end:"start"};function Ae(e){return e.replace(/start|end/g,function(e){return ke[e]})}function Oe(e){var t=K(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function _e(e){return oe(ue(e)).left+Oe(e).scrollLeft}function Ce(e){var t=se(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function Te(e){return["html","body","#document"].indexOf($(e))>=0?e.ownerDocument.body:Y(e)&&Ce(e)?e:Te(ce(e))}function De(e,t){var n;void 0===t&&(t=[]);var i=Te(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),r=K(i),a=o?[r].concat(r.visualViewport||[],Ce(i)?i:[]):i,s=t.concat(a);return o?s:s.concat(De(ce(a)))}function Le(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ne(e,t,n){return t===H?Le(function(e,t){var n=K(e),i=ue(e),o=n.visualViewport,r=i.clientWidth,a=i.clientHeight,s=0,l=0;if(o){r=o.width,a=o.height;var u=ie();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:r,height:a,x:s+_e(e),y:l}}(e,n)):G(t)?function(e,t){var n=oe(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Le(function(e){var t,n=ue(e),i=Oe(e),o=null==(t=e.ownerDocument)?void 0:t.body,r=Z(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Z(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-i.scrollLeft+_e(e),l=-i.scrollTop;return"rtl"===se(o||n).direction&&(s+=Z(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:a,x:s,y:l}}(ue(e)))}function Me(e,t,n,i){var o="clippingParents"===t?function(e){var t=De(ce(e)),n=["absolute","fixed"].indexOf(se(e).position)>=0&&Y(e)?he(e):e;return G(n)?t.filter(function(e){return G(e)&&ae(e,n)&&"body"!==$(e)}):[]}(e):[].concat(t),r=[].concat(o,[n]),a=r[0],s=r.reduce(function(t,n){var o=Ne(e,n,i);return t.top=Z(o.top,t.top),t.right=ee(o.right,t.right),t.bottom=ee(o.bottom,t.bottom),t.left=Z(o.left,t.left),t},Ne(e,a,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ie(e){var t,n=e.reference,i=e.element,o=e.placement,r=o?Q(o):null,a=o?be(o):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(r){case M:t={x:s,y:n.y-i.height};break;case I:t={x:s,y:n.y+n.height};break;case R:t={x:n.x+n.width,y:l};break;case P:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var u=r?fe(r):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case U:t[u]=t[u]-(n[c]/2-i[c]/2);break;case F:t[u]=t[u]+(n[c]/2-i[c]/2)}}return t}function Re(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,r=n.strategy,a=void 0===r?e.strategy:r,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?H:u,d=n.elementContext,h=void 0===d?V:d,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,g=me("number"!=typeof v?v:ve(v,B)),b=h===V?"reference":V,y=e.rects.popper,w=e.elements[p?b:h],S=Me(G(w)?w:w.contextElement||ue(e.elements.popper),l,c,a),E=oe(e.elements.reference),x=Ie({reference:E,element:y,placement:o}),k=Le(Object.assign({},y,x)),A=h===V?k:E,O={top:S.top-A.top+g.top,bottom:A.bottom-S.bottom+g.bottom,left:S.left-A.left+g.left,right:A.right-S.right+g.right},_=e.modifiersData.offset;if(h===V&&_){var C=_[o];Object.keys(O).forEach(function(e){var t=[R,I].indexOf(e)>=0?1:-1,n=[M,I].indexOf(e)>=0?"y":"x";O[e]+=C[n]*t})}return O}function Pe(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=n.boundary,r=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?z:l,c=be(i),d=c?s?W:W.filter(function(e){return be(e)===c}):B,h=d.filter(function(e){return u.indexOf(e)>=0});0===h.length&&(h=d);var f=h.reduce(function(t,n){return t[n]=Re(e,{placement:n,boundary:o,rootBoundary:r,padding:a})[Q(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var je={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,r=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=Q(v),b=l||(g===v||!p?[xe(v)]:function(e){if(Q(e)===j)return[];var t=xe(e);return[Ae(e),t,Ae(t)]}(v)),y=[v].concat(b).reduce(function(e,n){return e.concat(Q(n)===j?Pe(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:m}):n)},[]),w=t.rects.reference,S=t.rects.popper,E=new Map,x=!0,k=y[0],A=0;A<y.length;A++){var O=y[A],_=Q(O),C=be(O)===U,T=[M,I].indexOf(_)>=0,D=T?"width":"height",L=Re(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=T?C?R:P:C?I:M;w[D]>S[D]&&(N=xe(N));var B=xe(N),F=[];if(r&&F.push(L[_]<=0),s&&F.push(L[N]<=0,L[B]<=0),F.every(function(e){return e})){k=O,x=!1;break}E.set(O,F)}if(x)for(var H=function(e){var t=y.find(function(t){var n=E.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return k=t,"break"},V=p?3:1;V>0;V--){if("break"===H(V))break}t.placement!==k&&(t.modifiersData[i]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ue(e){return[M,R,I,P].some(function(t){return e[t]>=0})}var Fe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,o=n.offset,r=void 0===o?[0,0]:o,a=z.reduce(function(e,n){return e[n]=function(e,t,n){var i=Q(e),o=[P,M].indexOf(i)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=r[0],s=r[1];return a=a||0,s=(s||0)*o,[P,R].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,r),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=a}};var He={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,r=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,m=void 0===p?0:p,v=Re(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),g=Q(t.placement),b=be(t.placement),y=!b,w=fe(g),S="x"===w?"y":"x",E=t.modifiersData.popperOffsets,x=t.rects.reference,k=t.rects.popper,A="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,O="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(E){if(r){var T,D="y"===w?M:P,L="y"===w?I:R,N="y"===w?"height":"width",j=E[w],B=j+v[D],F=j-v[L],H=f?-k[N]/2:0,V=b===U?x[N]:k[N],W=b===U?-k[N]:-x[N],z=t.elements.arrow,q=f&&z?re(z):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=$[D],G=$[L],Y=pe(0,x[N],q[N]),X=y?x[N]/2-H-Y-K-O.mainAxis:V-Y-K-O.mainAxis,J=y?-x[N]/2+H+Y+G+O.mainAxis:W+Y+G+O.mainAxis,te=t.elements.arrow&&he(t.elements.arrow),ne=te?"y"===w?te.clientTop||0:te.clientLeft||0:0,ie=null!=(T=null==_?void 0:_[w])?T:0,oe=j+J-ie,ae=pe(f?ee(B,j+X-ie-ne):B,j,f?Z(F,oe):F);E[w]=ae,C[w]=ae-j}if(s){var se,le="x"===w?M:P,ue="x"===w?I:R,ce=E[S],de="y"===S?"height":"width",me=ce+v[le],ve=ce-v[ue],ge=-1!==[M,P].indexOf(g),ye=null!=(se=null==_?void 0:_[S])?se:0,we=ge?me:ce-x[de]-k[de]-ye+O.altAxis,Se=ge?ce+x[de]+k[de]-ye-O.altAxis:ve,Ee=f&&ge?function(e,t,n){var i=pe(e,t,n);return i>n?n:i}(we,ce,Se):pe(f?we:me,ce,f?Se:ve);E[S]=Ee,C[S]=Ee-ce}t.modifiersData[i]=C}},requiresIfExists:["offset"]};function Ve(e,t,n){void 0===n&&(n=!1);var i,o,r=Y(t),a=Y(t)&&function(e){var t=e.getBoundingClientRect(),n=te(t.width)/e.offsetWidth||1,i=te(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),s=ue(t),l=oe(e,a,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(("body"!==$(t)||Ce(s))&&(u=(i=t)!==K(i)&&Y(i)?{scrollLeft:(o=i).scrollLeft,scrollTop:o.scrollTop}:Oe(i)),Y(t)?((c=oe(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=_e(s))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function We(e){var t=new Map,n=new Set,i=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var i=t.get(e);i&&o(i)}}),i.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),i}var ze={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function $e(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,o=t.defaultOptions,r=void 0===o?ze:o;return function(e,t,n){void 0===n&&(n=r);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},ze,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:G(e)?De(e):e.contextElement?De(e.contextElement):[],popper:De(t)};var a,u,h=function(e){var t=We(e);return q.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(i,s.options.modifiers),u=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(u).map(function(e){return u[e]})));return s.orderedModifiers=h.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var r=o({state:s,name:t,instance:c,options:i}),a=function(){};l.push(r||a)}}),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(qe(t,n)){s.rects={reference:Ve(t,he(n),"fixed"===s.options.strategy),popper:re(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var o=s.orderedModifiers[i],r=o.fn,a=o.options,l=void 0===a?{}:a,d=o.name;"function"==typeof r&&(s=r({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,i=-1}}},update:(o=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){d(),u=!0}};if(!qe(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var Ke=$e({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,r=void 0===o||o,a=i.resize,s=void 0===a||a,l=K(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&u.forEach(function(e){e.addEventListener("scroll",n.update,Se)}),s&&l.addEventListener("resize",n.update,Se),function(){r&&u.forEach(function(e){e.removeEventListener("scroll",n.update,Se)}),s&&l.removeEventListener("resize",n.update,Se)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ie({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=void 0===i||i,r=n.adaptive,a=void 0===r||r,s=n.roundOffsets,l=void 0===s||s,u={placement:Q(t.placement),variation:be(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,we(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,we(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},J,Fe,je,He,ge,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,a=Re(t,{elementContext:"reference"}),s=Re(t,{altBoundary:!0}),l=Be(a,i),u=Be(s,o,r),c=Ue(l),d=Ue(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]});function Ge({element:e,visibleClass:t,waitMode:n="transitionend",timeoutDuration:i,hideMode:o="hidden",displayValue:r="block"}){if("timeout"===n&&"number"!=typeof i)return void console.error("\n When calling transitionHiddenElement with waitMode set to timeout,\n you must pass in a number for timeoutDuration.\n ");window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(n="immediate");const a=t=>{t.target===e&&(s(),e.removeEventListener("transitionend",a))},s=()=>{"display"===o?e.style.display="none":e.setAttribute("hidden",!0)};return{show(){e.removeEventListener("transitionend",a),this.timeout&&clearTimeout(this.timeout),"display"===o?e.style.display=r:e.removeAttribute("hidden"),e.offsetHeight,e.classList.add(t)},hide(){"transitionend"===n?e.addEventListener("transitionend",a):"timeout"===n?this.timeout=setTimeout(()=>{s()},i):s(),e.classList.remove(t)},toggle(){this.isHidden()?this.show():this.hide()},isHidden(){const n=null!==e.getAttribute("hidden"),i="none"===e.style.display,o=[...e.classList].includes(t);return n||i||!o},timeout:null}}var Ye={rootContainerSelector:"#root-tooltips",removeDialogOnDestroy:!1,popperOptions:{placement:"bottom",strategy:"absolute",modifiers:[{name:"arrow",options:{element:".tooltip__arrow",padding:10}},{name:"eventListeners",options:{scroll:!1,resize:!1}},{name:"flip",options:{fallbackPlacements:["right","top","auto"]}},{name:"offset",options:{offset:function(e){var t=e.placement;return t.includes("start")?[-10,0]:t.includes("end")?[10,0]:[0,0]}}}]}},Xe=function(){return i(function e(n,i){var o;return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},Ye),i),this.config.popperOptions=Object.assign(Object.assign({},Ye.popperOptions),(null==i?void 0:i.popperOptions)||{}),this.config.popperOptions.modifiers=[].concat(a(Ye.popperOptions.modifiers),a((null===(o=null==i?void 0:i.popperOptions)||void 0===o?void 0:o.modifiers)||[])),this.handleVisibility=this.handleVisibility.bind(this),this.onKeydown=this.onKeydown.bind(this),this.element.ODS_Tooltip=this,this.init(),this},[{key:"wrapLastWordAndButton",value:function(){var e,t;if(this.element.hasAttribute("data-tooltip-keep-with-text")){var n=this.trigger.previousSibling;if(n&&n.nodeType===Node.TEXT_NODE){var i=((null===(e=n.textContent)||void 0===e?void 0:e.trim())||"").split(" "),o=i.pop(),r=i.join(" ");n.textContent=r+" ";var a=document.createElement("span");a.className="text-nowrap",a.innerHTML="".concat(o," ").concat(this.trigger.outerHTML),null===(t=this.trigger.parentNode)||void 0===t||t.replaceChild(a,this.trigger),this.trigger=a.querySelector("[data-tooltip-trigger]")}else console.warn("Previous sibling is not a text node.")}}},{key:"init",value:function(){this.trigger=document.querySelector("[data-tooltip-trigger][aria-describedby=".concat(this.element.getAttribute("id"),"]")),this.trigger||console.warn("tooltip trigger element is not defined and the tooltip cannot be attached. Please provide an element with [aria-describedby=".concat(this.element.getAttribute("id"),"]")),this.element.hasAttribute("data-tooltip-keep-with-text")&&this.wrapLastWordAndButton(),this.rootContainer=document.querySelector(this.config.rootContainerSelector),this.rootContainer?this.rootContainer.appendChild(this.element):console.warn("rootContainer element is not defined. Tooltips will be placed inside content which can affect positioning. Please provide rootContainer element (should be placed outside of main content, usually in end of <body /> tag)");var e=this.element.getAttribute("data-tooltip-placement");e&&(this.config.popperOptions.placement=e),this.instance=Ke(this.trigger,this.element,this.config.popperOptions),this.transitioner=Ge({element:this.element,visibleClass:"is-visible"}),this.trigger.addEventListener("mouseenter",this.handleVisibility),this.trigger.addEventListener("mouseleave",this.handleVisibility),this.trigger.addEventListener("focus",this.handleVisibility),this.trigger.addEventListener("blur",this.handleVisibility)}},{key:"handleVisibility",value:function(e){("mouseenter"!==e.type&&"focus"!==e.type||this.show(),"blur"===e.type&&this.hide(),"mouseleave"===e.type)&&(this.shouldClose(e)&&this.hide())}},{key:"shouldClose",value:function(e){var t=this,n=e.relatedreference||e.toElement||e.relatedTarget,i=function(e){var n=e.relatedreference||e.toElement||e.relatedTarget;t.element.removeEventListener("mouseleave",i),t.trigger.contains(n)||t.hide()};return!this.element.contains(n)||(this.element.addEventListener("mouseleave",i),!1)}},{key:"onKeydown",value:function(e){m.ESC.includes(e.key)&&this.hide()}},{key:"show",value:function(){this.transitioner.show(),this.trigger.classList.add("is-active"),this.instance.forceUpdate(),document.addEventListener("keydown",this.onKeydown)}},{key:"hide",value:function(){this.transitioner.hide(),this.trigger.classList.remove("is-active"),document.removeEventListener("keydown",this.onKeydown)}},{key:"update",value:function(){this.instance.forceUpdate()}},{key:"destroy",value:function(){this.trigger.removeEventListener("mouseenter",this.handleVisibility),this.trigger.removeEventListener("mouseleave",this.handleVisibility),this.trigger.removeEventListener("focus",this.handleVisibility),this.trigger.removeEventListener("blur",this.handleVisibility),this.instance.destroy(),this.element.ODS_Tooltip=null,this.config.removeDialogOnDestroy&&this.element.remove()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Tooltip?e.ODS_Tooltip:null}}])}(),Je="carousel",Qe="".concat(Je,"__viewport"),Ze="".concat(Je,"__track"),et="".concat(Je,"__prev"),tt="".concat(Je,"__next"),nt="".concat(Je,"__pagination"),it=".".concat(Qe),ot=".".concat(Ze),rt=".".concat(et),at=".".concat(tt),st=".".concat(nt),lt={arrows:{prev:rt,next:at},slidesToShow:1.2,dots:st,skipTrack:!0,classes:{glider:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",drag:"is-dragging",draggable:"is-draggable",disabled:"is-disabled",active:"is-active",visible:"is-visible",dots:"carousel__pagination",dot:"carousel__pagination-item"}},ut=function(){return i(function e(n,i){return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},lt),i),this.fixPaginationButtonType=this.fixPaginationButtonType.bind(this),this.handleScroll=this.handleScroll.bind(this),this.updateTooltipPosition=this.updateTooltipPosition.bind(this),this.element.ODS_Carousel=this,this.init(),this},[{key:"init",value:function(){this.getElements(),this.element.hasAttribute("data-glider-options")&&this.getCustomOptions(),this.element.addEventListener("glider-loaded",this.fixPaginationButtonType),this.element.addEventListener("glider-loaded",this.handleScroll),this.element.addEventListener("glider-refresh",this.fixPaginationButtonType),this.viewport.addEventListener("scroll",this.handleScroll),this.instance=new N(this.viewport,this.config)}},{key:"getElements",value:function(){this.viewport=this.element.querySelector(it),this.track=this.viewport.querySelector(ot);var e={arrows:{prev:this.element.querySelector(rt),next:this.element.querySelector(at)},dots:this.element.querySelector(st)};this.config=Object.assign(Object.assign({},this.config),e)}},{key:"getCustomOptions",value:function(){var e=this.element.getAttribute("data-glider-options");if(e){var t=JSON.parse(e);this.config=Object.assign(Object.assign({},this.config),t)}}},{key:"fixPaginationButtonType",value:function(){Array.from(this.element.querySelectorAll("".concat(st," > *"))).forEach(function(e){return e.setAttribute("type","button")})}},{key:"handleScroll",value:function(){var e=this.track.querySelector(".active"),t=this.track.querySelectorAll(".glider-slide:not(.active)");e&&this.updateTooltipPosition(e),t.length>0&&this.hideAllTooltips(t)}},{key:"updateTooltipPosition",value:function(e){var t=e.querySelectorAll('[data-tooltip-trigger="true"]');t.length>0&&t.forEach(function(e){var t=e.getAttribute("aria-describedby");if(t){var n=document.getElementById(t);if(n){var i=Xe.getInstance(n);i&&i.update()}}})}},{key:"hideAllTooltips",value:function(e){e.forEach(function(e){var t=e.querySelectorAll('[data-tooltip-trigger="true"]');t.length>0&&t.forEach(function(e){var t=e.getAttribute("aria-describedby");if(t){var n=document.getElementById(t);if(n){var i=Xe.getInstance(n);i&&(i.hide(),e.blur())}}})})}},{key:"destroy",value:function(){this.instance.destroy()}},{key:"update",value:function(){this.instance.refresh()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Carousel?e.ODS_Carousel:null}}])}(),ct={dataInteractive:"data-dropdown-interactive",focusTrap:"data-dropdown-focus-trap",removeDialogOnDestroy:!1,popperOptions:{placement:"bottom-start",strategy:"absolute",modifiers:[{name:"eventListeners",options:{scroll:!1,resize:!1}},{name:"flip",options:{fallbackPlacements:["bottom-end","bottom-start","bottom"]}},{name:"offset",options:{offset:[0,-1]}}]}},dt=function(){return i(function e(n){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,e),n.ODS_Dropdown?n.ODS_Dropdown:(this.element=n,this.config=Object.assign(Object.assign({},ct),o),this.config.popperOptions=Object.assign(Object.assign({},ct.popperOptions),(null==o?void 0:o.popperOptions)||{}),this.config.popperOptions.modifiers=[].concat(a(ct.popperOptions.modifiers||[]),a((null===(i=null==o?void 0:o.popperOptions)||void 0===i?void 0:i.modifiers)||[])),this.handleVisibility=this.handleVisibility.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleClick=this.handleClick.bind(this),this.element.ODS_Dropdown=this,this.focusableElements=this.element.querySelectorAll('a[href]:not([disabled]), button:not([disabled]),\n textarea:not([disabled]), input[type="text"]:not([disabled]),\n input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]),\n select:not([disabled])'),this.init(),this)},[{key:"init",value:function(){this.trigger=document.getElementById(this.element.id.replace("dropdown","btn"));var e=this.element.getAttribute("data-dropdown-placement");e&&(this.config.popperOptions.placement=e),this.instance=Ke(this.trigger,this.element,this.config.popperOptions),this.transitioner=Ge({element:this.element,visibleClass:"dropdown--visible"}),this.trigger.addEventListener("click",this.handleVisibility,!0)}},{key:"handleVisibility",value:function(){this.element.classList.contains("dropdown--visible")?this.hide():this.show()}},{key:"handleClick",value:function(e){this.trigger===e.target||this.trigger.contains(e.target)||this.element.hasAttribute(this.config.dataInteractive)&&!e.target.id.includes(this.element.id.replace("dropdown","btn"))&&this.element.contains(e.target)||this.handleVisibility()}},{key:"handleKeyPress",value:function(e){if(m.ESC.includes(e.key)&&(this.handleVisibility(),this.element.contains(document.activeElement)&&this.trigger.focus(),this.hide()),this.element.hasAttribute(this.config.focusTrap)){var t=this.focusableElements[0],n=this.focusableElements[this.focusableElements.length-1];document.activeElement!==this.button||"Tab"!==e.key&&9!==e.keyCode?"Tab"!==e.key&&9!==e.keyCode||(e.shiftKey?document.activeElement===t&&(n.focus(),e.preventDefault()):document.activeElement===n&&(t.focus(),e.preventDefault())):e.shiftKey&&(this.focusableElements[this.focusableElements.length-1].focus(),e.preventDefault())}}},{key:"show",value:function(){var e=this;this.transitioner.show(),this.instance.forceUpdate(),document.addEventListener("keydown",this.handleKeyPress),document.addEventListener("click",this.handleClick),window.onresize=function(){return e.update()}}},{key:"hide",value:function(){this.transitioner.hide(),document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("click",this.handleClick),window.onresize=null}},{key:"update",value:function(){this.instance.forceUpdate()}},{key:"destroy",value:function(){this.trigger.removeEventListener("click",this.handleVisibility),this.instance.destroy(),this.element.ODS_Dropdown=null,window.onresize=null,this.config.removeDialogOnDestroy&&this.element.remove()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Dropdown?e.ODS_Dropdown:null}}])}(),ht={itemSelector:"[data-feature-accordion-item]",bodiesSelector:".accordion__body",buttonSelector:"[data-accordion-toggle]",imageSelector:"[data-feature-accordion-image]"},ft=function(){return i(function e(n,i){var o=this;return t(this,e),this.items=[],this.bodies=[],this.buttons=[],this.images=[],this.activeId=null,this.onClick=function(e){var t=e.currentTarget.closest(o.config.itemSelector),n=(null==t?void 0:t.getAttribute("id"))||null;o.setActive(n)},this.element=n,this.config=Object.assign(Object.assign({},ht),i),this.element.ODS_FeatureAccordion=this,this.init(),this},[{key:"init",value:function(){var e=this;this.items=Array.from(this.element.querySelectorAll(this.config.itemSelector)),this.bodies=Array.from(this.element.querySelectorAll(this.config.bodiesSelector)),this.buttons=Array.from(this.element.querySelectorAll(this.config.buttonSelector)),this.images=Array.from(this.element.querySelectorAll(this.config.imageSelector));var t=this.items[0]||null,n=(null==t?void 0:t.getAttribute("id"))||null;this.setActive(n),this.buttons.forEach(function(t){t.addEventListener("click",e.onClick)})}},{key:"setActive",value:function(e){if(e){this.activeId=e;var t=this.buttons.find(function(t){return t.getAttribute("id")===e}),n=null==t?void 0:t.getAttribute("aria-controls");this.bodies.forEach(function(e){e.id===n?e.removeAttribute("hidden"):e.setAttribute("hidden","")}),this.buttons.forEach(function(t){var n=t.getAttribute("id")===e,i=t.closest(".feature-accordion__item");null==i||i.classList.toggle("is-active",n),y({element:t,attribute:"aria-expanded",value:n?"true":"false"})}),this.images.forEach(function(t){var n=t.getAttribute("data-feature-accordion-image-for");t.classList.toggle("hide",n!==e)})}}},{key:"destroy",value:function(){var e=this;this.buttons.forEach(function(t){t.removeEventListener("click",e.onClick)})}},{key:"update",value:function(){this.destroy(),this.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_FeatureAccordion?e.ODS_FeatureAccordion:null}}])}();
|
|
2
|
+
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
3
|
+
const{entries:pt,setPrototypeOf:mt,isFrozen:vt,getPrototypeOf:gt,getOwnPropertyDescriptor:bt}=Object;let{freeze:yt,seal:wt,create:St}=Object,{apply:Et,construct:xt}="undefined"!=typeof Reflect&&Reflect;yt||(yt=function(e){return e}),wt||(wt=function(e){return e}),Et||(Et=function(e,t,n){return e.apply(t,n)}),xt||(xt=function(e,t){return new e(...t)});const kt=Ut(Array.prototype.forEach),At=Ut(Array.prototype.lastIndexOf),Ot=Ut(Array.prototype.pop),_t=Ut(Array.prototype.push),Ct=Ut(Array.prototype.splice),Tt=Ut(String.prototype.toLowerCase),Dt=Ut(String.prototype.toString),Lt=Ut(String.prototype.match),Nt=Ut(String.prototype.replace),Mt=Ut(String.prototype.indexOf),It=Ut(String.prototype.trim),Rt=Ut(Object.prototype.hasOwnProperty),Pt=Ut(RegExp.prototype.test),jt=(Bt=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xt(Bt,t)});var Bt;function Ut(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return Et(e,t,i)}}function Ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Tt;mt&&mt(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(vt(t)||(t[i]=e),o=e)}e[o]=!0}return e}function Ht(e){for(let t=0;t<e.length;t++){Rt(e,t)||(e[t]=null)}return e}function Vt(e){const t=St(null);for(const[n,i]of pt(e)){Rt(e,n)&&(Array.isArray(i)?t[n]=Ht(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=Vt(i):t[n]=i)}return t}function Wt(e,t){for(;null!==e;){const n=bt(e,t);if(n){if(n.get)return Ut(n.get);if("function"==typeof n.value)return Ut(n.value)}e=gt(e)}return function(){return null}}const zt=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qt=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$t=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kt=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Gt=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Yt=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xt=yt(["#text"]),Jt=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Qt=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Zt=yt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),en=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tn=wt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),nn=wt(/<%[\w\W]*|[\w\W]*%>/gm),on=wt(/\$\{[\w\W]*/gm),rn=wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),an=wt(/^aria-[\-\w]+$/),sn=wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=wt(/^(?:\w+script|data):/i),un=wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cn=wt(/^html$/i),dn=wt(/^[a-z][.\w]*(-[.\w]+)+$/i);var hn=Object.freeze({__proto__:null,ARIA_ATTR:an,ATTR_WHITESPACE:un,CUSTOM_ELEMENT:dn,DATA_ATTR:rn,DOCTYPE_NAME:cn,ERB_EXPR:nn,IS_ALLOWED_URI:sn,IS_SCRIPT_OR_DATA:ln,MUSTACHE_EXPR:tn,TMPLIT_EXPR:on});const fn=1,pn=3,mn=7,vn=8,gn=9,bn=function(){return"undefined"==typeof window?null:window};var yn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bn();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==gn||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const o=i,r=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:p}=t,m=u.prototype,v=Wt(m,"cloneNode"),g=Wt(m,"remove"),b=Wt(m,"nextSibling"),y=Wt(m,"childNodes"),w=Wt(m,"parentNode");if("function"==typeof s){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let S,E="";const{implementation:x,createNodeIterator:k,createDocumentFragment:A,getElementsByTagName:O}=i,{importNode:_}=o;let C={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof pt&&"function"==typeof w&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:T,ERB_EXPR:D,TMPLIT_EXPR:L,DATA_ATTR:N,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:P}=hn;let{IS_ALLOWED_URI:j}=hn,B=null;const U=Ft({},[...zt,...qt,...$t,...Gt,...Xt]);let F=null;const H=Ft({},[...Jt,...Qt,...Zt,...en]);let V=Object.seal(St(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,z=null,q=!0,$=!0,K=!1,G=!0,Y=!1,X=!0,J=!1,Q=!1,Z=!1,ee=!1,te=!1,ne=!1,ie=!0,oe=!1,re=!0,ae=!1,se={},le=null;const ue=Ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const de=Ft({},["audio","video","img","source","image","track"]);let he=null;const fe=Ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";let ge=ve,be=!1,ye=null;const we=Ft({},[pe,me,ve],Dt);let Se=Ft({},["mi","mo","mn","ms","mtext"]),Ee=Ft({},["annotation-xml"]);const xe=Ft({},["title","style","font","a","script"]);let ke=null;const Ae=["application/xhtml+xml","text/html"];let Oe=null,_e=null;const Ce=i.createElement("form"),Te=function(e){return e instanceof RegExp||e instanceof Function},De=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!_e||_e!==e){if(e&&"object"==typeof e||(e={}),e=Vt(e),ke=-1===Ae.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Oe="application/xhtml+xml"===ke?Dt:Tt,B=Rt(e,"ALLOWED_TAGS")?Ft({},e.ALLOWED_TAGS,Oe):U,F=Rt(e,"ALLOWED_ATTR")?Ft({},e.ALLOWED_ATTR,Oe):H,ye=Rt(e,"ALLOWED_NAMESPACES")?Ft({},e.ALLOWED_NAMESPACES,Dt):we,he=Rt(e,"ADD_URI_SAFE_ATTR")?Ft(Vt(fe),e.ADD_URI_SAFE_ATTR,Oe):fe,ce=Rt(e,"ADD_DATA_URI_TAGS")?Ft(Vt(de),e.ADD_DATA_URI_TAGS,Oe):de,le=Rt(e,"FORBID_CONTENTS")?Ft({},e.FORBID_CONTENTS,Oe):ue,W=Rt(e,"FORBID_TAGS")?Ft({},e.FORBID_TAGS,Oe):Vt({}),z=Rt(e,"FORBID_ATTR")?Ft({},e.FORBID_ATTR,Oe):Vt({}),se=!!Rt(e,"USE_PROFILES")&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,$=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,J=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,j=e.ALLOWED_URI_REGEXP||sn,ge=e.NAMESPACE||ve,Se=e.MATHML_TEXT_INTEGRATION_POINTS||Se,Ee=e.HTML_INTEGRATION_POINTS||Ee,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&($=!1),te&&(ee=!0),se&&(B=Ft({},Xt),F=[],!0===se.html&&(Ft(B,zt),Ft(F,Jt)),!0===se.svg&&(Ft(B,qt),Ft(F,Qt),Ft(F,en)),!0===se.svgFilters&&(Ft(B,$t),Ft(F,Qt),Ft(F,en)),!0===se.mathMl&&(Ft(B,Gt),Ft(F,Zt),Ft(F,en))),e.ADD_TAGS&&(B===U&&(B=Vt(B)),Ft(B,e.ADD_TAGS,Oe)),e.ADD_ATTR&&(F===H&&(F=Vt(F)),Ft(F,e.ADD_ATTR,Oe)),e.ADD_URI_SAFE_ATTR&&Ft(he,e.ADD_URI_SAFE_ATTR,Oe),e.FORBID_CONTENTS&&(le===ue&&(le=Vt(le)),Ft(le,e.FORBID_CONTENTS,Oe)),re&&(B["#text"]=!0),J&&Ft(B,["html","head","body"]),B.table&&(Ft(B,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw jt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw jt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=e.TRUSTED_TYPES_POLICY,E=S.createHTML("")}else void 0===S&&(S=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,r)),null!==S&&"string"==typeof E&&(E=S.createHTML(""));yt&&yt(e),_e=e}},Le=Ft({},[...qt,...$t,...Kt]),Ne=Ft({},[...Gt,...Yt]),Me=function(e){_t(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){g(e)}},Ie=function(e,t){try{_t(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_t(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Me(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){let t=null,n=null;if(Z)e="<remove></remove>"+e;else{const t=Lt(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ke&&ge===ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=S?S.createHTML(e):e;if(ge===ve)try{t=(new f).parseFromString(o,ke)}catch(e){}if(!t||!t.documentElement){t=x.createDocument(ge,"template",null);try{t.documentElement.innerHTML=be?E:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(i.createTextNode(n),r.childNodes[0]||null),ge===ve?O.call(t,J?"html":"body")[0]:J?t.documentElement:r},Pe=function(e){return k.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},je=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function Ue(e,t,i){kt(e,e=>{e.call(n,t,i,_e)})}const Fe=function(e){let t=null;if(Ue(C.beforeSanitizeElements,e,null),je(e))return Me(e),!0;const i=Oe(e.nodeName);if(Ue(C.uponSanitizeElement,e,{tagName:i,allowedTags:B}),X&&e.hasChildNodes()&&!Be(e.firstElementChild)&&Pt(/<[/\w!]/g,e.innerHTML)&&Pt(/<[/\w!]/g,e.textContent))return Me(e),!0;if(e.nodeType===mn)return Me(e),!0;if(X&&e.nodeType===vn&&Pt(/<[/\w]/g,e.data))return Me(e),!0;if(!B[i]||W[i]){if(!W[i]&&Ve(i)){if(V.tagNameCheck instanceof RegExp&&Pt(V.tagNameCheck,i))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(i))return!1}if(re&&!le[i]){const t=w(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const o=v(n[i],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,b(e))}}}return Me(e),!0}return e instanceof u&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ge,tagName:"template"});const n=Tt(e.tagName),i=Tt(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ve?"svg"===n:t.namespaceURI===pe?"svg"===n&&("annotation-xml"===i||Se[i]):Boolean(Le[n]):e.namespaceURI===pe?t.namespaceURI===ve?"math"===n:t.namespaceURI===me?"math"===n&&Ee[i]:Boolean(Ne[n]):e.namespaceURI===ve?!(t.namespaceURI===me&&!Ee[i])&&!(t.namespaceURI===pe&&!Se[i])&&!Ne[n]&&(xe[n]||!Le[n]):!("application/xhtml+xml"!==ke||!ye[e.namespaceURI]))}(e)?(Me(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Pt(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===pn&&(t=e.textContent,kt([T,D,L],e=>{t=Nt(t,e," ")}),e.textContent!==t&&(_t(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ue(C.afterSanitizeElements,e,null),!1):(Me(e),!0)},He=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in Ce))return!1;if($&&!z[t]&&Pt(N,t));else if(q&&Pt(M,t));else if(!F[t]||z[t]){if(!(Ve(e)&&(V.tagNameCheck instanceof RegExp&&Pt(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&Pt(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Pt(V.tagNameCheck,n)||V.tagNameCheck instanceof Function&&V.tagNameCheck(n))))return!1}else if(he[t]);else if(Pt(j,Nt(n,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Mt(n,"data:")||!ce[e]){if(K&&!Pt(I,Nt(n,R,"")));else if(n)return!1}else;return!0},Ve=function(e){return"annotation-xml"!==e&&Lt(e,P)},We=function(e){Ue(C.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||je(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let o=t.length;for(;o--;){const r=t[o],{name:a,namespaceURI:s,value:l}=r,u=Oe(a),c=l;let d="value"===a?c:It(c);if(i.attrName=u,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,Ue(C.uponSanitizeAttribute,e,i),d=i.attrValue,!oe||"id"!==u&&"name"!==u||(Ie(a,e),d="user-content-"+d),X&&Pt(/((--!?|])>)|<\/(style|title)/i,d)){Ie(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Ie(a,e);continue}if(!G&&Pt(/\/>/i,d)){Ie(a,e);continue}Y&&kt([T,D,L],e=>{d=Nt(d,e," ")});const h=Oe(e.nodeName);if(He(h,u,d)){if(S&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(s);else switch(p.getAttributeType(h,u)){case"TrustedHTML":d=S.createHTML(d);break;case"TrustedScriptURL":d=S.createScriptURL(d)}if(d!==c)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),je(e)?Me(e):Ot(n.removed)}catch(t){Ie(a,e)}}else Ie(a,e)}Ue(C.afterSanitizeAttributes,e,null)},ze=function e(t){let n=null;const i=Pe(t);for(Ue(C.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)Ue(C.uponSanitizeShadowNode,n,null),Fe(n),We(n),n.content instanceof a&&e(n.content);Ue(C.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,r=null,s=null,u=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw jt("toString is not a function");if("string"!=typeof(e=e.toString()))throw jt("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||De(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Oe(e.nodeName);if(!B[t]||W[t])throw jt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=Re("\x3c!----\x3e"),r=i.ownerDocument.importNode(e,!0),r.nodeType===fn&&"BODY"===r.nodeName||"HTML"===r.nodeName?i=r:i.appendChild(r);else{if(!ee&&!Y&&!J&&-1===e.indexOf("<"))return S&&ne?S.createHTML(e):e;if(i=Re(e),!i)return ee?null:ne?E:""}i&&Z&&Me(i.firstChild);const c=Pe(ae?e:i);for(;s=c.nextNode();)Fe(s),We(s),s.content instanceof a&&ze(s.content);if(ae)return e;if(ee){if(te)for(u=A.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(F.shadowroot||F.shadowrootmode)&&(u=_.call(o,u,!0)),u}let d=J?i.outerHTML:i.innerHTML;return J&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Pt(cn,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Y&&kt([T,D,L],e=>{d=Nt(d,e," ")}),S&&ne?S.createHTML(d):d},n.setConfig=function(){De(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){_e=null,Q=!1},n.isValidAttribute=function(e,t,n){_e||De({});const i=Oe(e),o=Oe(t);return He(i,o,n)},n.addHook=function(e,t){"function"==typeof t&&_t(C[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=At(C[e],t);return-1===n?void 0:Ct(C[e],n,1)[0]}return Ot(C[e])},n.removeHooks=function(e){C[e]=[]},n.removeAllHooks=function(){C={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),wn={dragDropClassname:"is-dragdrop",inputSelector:'input[type="file"]',resultsSelector:".file-input__files",deleteButtonSelector:"[data-file-delete]",deleteFileAttr:"data-file-delete",fileTemplate:function(e,t){return"\n <li>".concat(e,' <button type="button" data-file-delete="').concat(t,'" class="file-input__delete">\n <svg class="icon icon--small icon--trash icon--danger" aria-hidden="true">\n <use xlink:href="/sprite.svg#trash"></use>\n </svg>\n <span class="sr-only">Odstrániť súbor ').concat(e,"</span>\n </button>\n </li>\n ")}},Sn=function(){return i(function e(n,i){return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},wn),i),this.input=null,this.files=[],this.results=null,this.removeButtons=[],this.onInputChange=this.onInputChange.bind(this),this.onRemoveButtonClick=this.onRemoveButtonClick.bind(this),this.highlight=this.highlight.bind(this),this.unhighlight=this.unhighlight.bind(this),this.onDrop=this.onDrop.bind(this),this.preventDefaults=this.preventDefaults.bind(this),this.init(),this},[{key:"init",value:function(){var e=this;this.input=this.element.querySelector(this.config.inputSelector),this.results=this.element.querySelector(this.config.resultsSelector),this.input&&this.results&&(this.input.addEventListener("change",this.onInputChange),["dragenter","dragover","dragleave","drop"].forEach(function(t){e.element.addEventListener(t,e.preventDefaults,!1),document.body.addEventListener(t,e.preventDefaults,!1)}),["dragenter","dragover"].forEach(function(t){e.element.addEventListener(t,e.highlight,!1)}),["dragleave","drop"].forEach(function(t){e.element.addEventListener(t,e.unhighlight,!1)}),this.element.addEventListener("drop",this.onDrop))}},{key:"onInputChange",value:function(){var e,t=this;return!(!this.input||!this.results)&&(this.files=Array.from(null!==(e=this.input.files)&&void 0!==e?e:[]),!!this.files&&(this.results.innerHTML="",this.files.map(function(e,n){return t.config.fileTemplate(yn.sanitize(e.name,{ALLOWED_TAGS:[]}),n)}).forEach(function(e){t.results.appendChild(yn.sanitize(e,{ADD_TAGS:["use"],RETURN_DOM_FRAGMENT:!0}))}),this.removeButtons=Array.from(this.results.querySelectorAll(this.config.deleteButtonSelector)),void this.removeButtons.forEach(function(e){return e.addEventListener("click",t.onRemoveButtonClick)})))}},{key:"onDrop",value:function(e){var t;this.input&&(this.input.files=(null===(t=null==e?void 0:e.dataTransfer)||void 0===t?void 0:t.files)||(new DataTransfer).files,this.onInputChange())}},{key:"onRemoveButtonClick",value:function(e){if(this.input){var t=new DataTransfer,n=e.currentTarget,i=Number(n.getAttribute(this.config.deleteFileAttr));this.files.splice(i,1),this.files.forEach(function(e){return t.items.add(e)}),this.input.files=t.files,this.onInputChange()}}},{key:"highlight",value:function(){this.element.classList.add(this.config.dragDropClassname)}},{key:"unhighlight",value:function(){this.element.classList.remove(this.config.dragDropClassname)}},{key:"preventDefaults",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"destroy",value:function(){var e=this;this.input&&(this.input.removeEventListener("change",this.onInputChange),["dragenter","dragover","dragleave","drop"].forEach(function(t){e.element.removeEventListener(t,e.preventDefaults,!1),document.body.removeEventListener(t,e.preventDefaults,!1)}),["dragenter","dragover"].forEach(function(t){e.element.removeEventListener(t,e.highlight,!1)}),["dragleave","drop"].forEach(function(t){e.element.removeEventListener(t,e.unhighlight,!1)}),this.element.removeEventListener("drop",this.onDrop))}},{key:"update",value:function(){this.destroy(),this.init()}}])}(),En={cycleDuration:4e3,delay:5e3},xn=function(){return i(function e(n,i){t(this,e),this.element=n,this.config=Object.assign(Object.assign({},En),i),this.interval=null,this.delay=null,this.currentMessageIndex=0,this.messages=[],this.cycleMessages=this.cycleMessages.bind(this),this.element.ODS_Loader=this,this.init()},[{key:"initBody",value:function(){var e,t=this.element.getAttribute("data-loader-messages");this.messages=t?JSON.parse(t):[],this.messages.length&&(this.interval=window.setInterval(this.cycleMessages,null!==(e=this.config.cycleDuration)&&void 0!==e?e:En.cycleDuration))}},{key:"init",value:function(){var e,t=this;this.element.hasAttribute("data-loader-delayed")?this.delay=window.setTimeout(function(){t.element.parentNode&&t.element.parentNode instanceof HTMLElement&&t.element.parentNode.classList.remove("hide"),t.initBody()},null!==(e=this.config.delay)&&void 0!==e?e:En.delay):this.initBody()}},{key:"destroy",value:function(){this.interval&&window.clearInterval(this.interval),this.delay&&window.clearTimeout(this.delay)}},{key:"cycleMessages",value:function(){this.currentMessageIndex<this.messages.length?(this.element.innerText=this.messages[this.currentMessageIndex],this.currentMessageIndex+=1):this.destroy()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Loader?e.ODS_Loader:null}}])}();const kn=":not([inert]):not([inert] *)",An=':not([tabindex^="-"])',On=":not(:disabled)";var _n=[`a[href]${kn}${An}`,`area[href]${kn}${An}`,`input:not([type="hidden"]):not([type="radio"])${kn}${An}${On}`,`input[type="radio"]${kn}${An}${On}`,`select${kn}${An}${On}`,`textarea${kn}${An}${On}`,`button${kn}${An}${On}`,`details${kn} > summary:first-of-type${An}`,`iframe${kn}${An}`,`audio[controls]${kn}${An}`,`video[controls]${kn}${An}`,`[contenteditable]${kn}${An}`,`[tabindex]${kn}${An}`];function Cn(e){(e.querySelector("[autofocus]")||e).focus()}function Tn(e,t){if(t&&Nn(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let n=Dn(e.shadowRoot,t);for(;n;){const e=Tn(n,t);if(e)return e;n=Ln(n,t)}}else if("slot"===e.localName){const n=e.assignedElements({flatten:!0});t||n.reverse();for(const e of n){const n=Tn(e,t);if(n)return n}}else{let n=Dn(e,t);for(;n;){const e=Tn(n,t);if(e)return e;n=Ln(n,t)}}return!t&&Nn(e)?e:null}function Dn(e,t){return t?e.firstElementChild:e.lastElementChild}function Ln(e,t){return t?e.nextElementSibling:e.previousElementSibling}const Nn=e=>!e.shadowRoot?.delegatesFocus&&(e.matches(_n.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e));function Mn(e=document){const t=e.activeElement;return t?t.shadowRoot?Mn(t.shadowRoot)||document.activeElement:t:null}function In(e,t){const[n,i]=function(e){const t=Tn(e,!0);return[t,t?Tn(e,!1)||t:null]}(e);if(!n)return t.preventDefault();const o=Mn();t.shiftKey&&o===n?(i.focus(),t.preventDefault()):t.shiftKey||o!==i||(n.focus(),t.preventDefault())}function Rn(e,t){return function t(n){if(!n||n===document||n===window)return null;const i=Pn(n);return i&&(n=i),n.closest(e)||t(n.getRootNode().host)}(t)}function Pn(e){return e.assignedSlot||(e.parentNode?Pn(e.parentNode):null)}const jn="data-a11y-dialog";class Bn{$el;id;previouslyFocused;shown;constructor(e){this.$el=e,this.id=this.$el.getAttribute(jn)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented||(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0))),this}show(e){if(this.shown)return this;return this.fire("show",e).defaultPrevented||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=Mn(),"BODY"===this.previouslyFocused?.tagName&&e?.target&&(this.previouslyFocused=e.target),"focus"===e?.type?this.maintainFocus():Cn(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0)),this}hide(e){if(!this.shown)return this;return this.fire("hide",e).defaultPrevented||(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.()),this}on(e,t,n){return this.$el.addEventListener(e,t,n),this}off(e,t,n){return this.$el.removeEventListener(e,t,n),this}fire(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return this.$el.dispatchEvent(n),n}handleTriggerClicks(e){const t=e.composedPath()[0],n=Rn(`[${jn}-show="${this.id}"]`,t),i=Rn(`[${jn}-hide="${this.id}"]`,t),o=Rn(`[${jn}-hide]`,t)&&Rn('[aria-modal="true"]',t)===this.$el;n&&this.show(e),(i||o)&&this.hide(e)}bindKeypress(e){if(Rn('[aria-modal="true"]',Mn())!==this.$el)return;let t=!1;try{t=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"!==e.key||"alertdialog"===this.$el.getAttribute("role")||t||(e.preventDefault(),this.hide(e)),"Tab"===e.key&&In(this.$el,e)}maintainFocus(){const e=Mn();Rn(`[aria-modal="true"], [${jn}-ignore-focus-trap]`,e)||Cn(this.$el)}}function Un(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new Bn(e)}"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Un):Un());
|
|
1042
4
|
/*!
|
|
1043
5
|
* tabbable 6.2.0
|
|
1044
6
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1045
|
-
*/
|
|
1046
|
-
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
1047
|
-
// `:not([inert], [inert] *)` (Feb 2023)
|
|
1048
|
-
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
1049
|
-
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
1050
|
-
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
1051
|
-
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
1052
|
-
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
1053
|
-
var NoElement = typeof Element === 'undefined';
|
|
1054
|
-
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
1055
|
-
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
1056
|
-
var _element$getRootNode;
|
|
1057
|
-
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
1058
|
-
} : function (element) {
|
|
1059
|
-
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* Determines if a node is inert or in an inert ancestor.
|
|
1064
|
-
* @param {Element} [node]
|
|
1065
|
-
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
1066
|
-
* see if any of them are inert. If false, only `node` itself is considered.
|
|
1067
|
-
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
1068
|
-
* False if `node` is falsy.
|
|
1069
|
-
*/
|
|
1070
|
-
var isInert = function isInert(node, lookUp) {
|
|
1071
|
-
var _node$getAttribute;
|
|
1072
|
-
if (lookUp === void 0) {
|
|
1073
|
-
lookUp = true;
|
|
1074
|
-
}
|
|
1075
|
-
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
1076
|
-
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
1077
|
-
// if it's `null` (not specified) or 'false', it's an active element
|
|
1078
|
-
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
1079
|
-
var inert = inertAtt === '' || inertAtt === 'true';
|
|
1080
|
-
|
|
1081
|
-
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
1082
|
-
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
1083
|
-
// code works for any kind of node
|
|
1084
|
-
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
1085
|
-
// so it likely would not support `:is([inert] *)` either...
|
|
1086
|
-
var result = inert || lookUp && node && isInert(node.parentNode); // recursive
|
|
1087
|
-
|
|
1088
|
-
return result;
|
|
1089
|
-
};
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Determines if a node's content is editable.
|
|
1093
|
-
* @param {Element} [node]
|
|
1094
|
-
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
1095
|
-
*/
|
|
1096
|
-
var isContentEditable = function isContentEditable(node) {
|
|
1097
|
-
var _node$getAttribute2;
|
|
1098
|
-
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
1099
|
-
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
1100
|
-
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
1101
|
-
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
1102
|
-
return attValue === '' || attValue === 'true';
|
|
1103
|
-
};
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* @private
|
|
1107
|
-
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
1108
|
-
* @param {HTMLElement} node
|
|
1109
|
-
* @returns {boolean} True if so; false if not.
|
|
1110
|
-
*/
|
|
1111
|
-
var hasTabIndex = function hasTabIndex(node) {
|
|
1112
|
-
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
1113
|
-
};
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Determine the tab index of a given node.
|
|
1117
|
-
* @param {HTMLElement} node
|
|
1118
|
-
* @returns {number} Tab order (negative, 0, or positive number).
|
|
1119
|
-
* @throws {Error} If `node` is falsy.
|
|
1120
|
-
*/
|
|
1121
|
-
var getTabIndex = function getTabIndex(node) {
|
|
1122
|
-
if (!node) {
|
|
1123
|
-
throw new Error('No node provided');
|
|
1124
|
-
}
|
|
1125
|
-
if (node.tabIndex < 0) {
|
|
1126
|
-
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
1127
|
-
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
1128
|
-
// yet they are still part of the regular tab order; in FF, they get a default
|
|
1129
|
-
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
1130
|
-
// order, consider their tab index to be 0.
|
|
1131
|
-
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
1132
|
-
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
1133
|
-
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
1134
|
-
return 0;
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
return node.tabIndex;
|
|
1138
|
-
};
|
|
1139
|
-
var isInput = function isInput(node) {
|
|
1140
|
-
return node.tagName === 'INPUT';
|
|
1141
|
-
};
|
|
1142
|
-
var isHiddenInput = function isHiddenInput(node) {
|
|
1143
|
-
return isInput(node) && node.type === 'hidden';
|
|
1144
|
-
};
|
|
1145
|
-
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
1146
|
-
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
1147
|
-
return child.tagName === 'SUMMARY';
|
|
1148
|
-
});
|
|
1149
|
-
return r;
|
|
1150
|
-
};
|
|
1151
|
-
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
1152
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
1153
|
-
if (nodes[i].checked && nodes[i].form === form) {
|
|
1154
|
-
return nodes[i];
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
};
|
|
1158
|
-
var isTabbableRadio = function isTabbableRadio(node) {
|
|
1159
|
-
if (!node.name) {
|
|
1160
|
-
return true;
|
|
1161
|
-
}
|
|
1162
|
-
var radioScope = node.form || getRootNode(node);
|
|
1163
|
-
var queryRadios = function queryRadios(name) {
|
|
1164
|
-
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
1165
|
-
};
|
|
1166
|
-
var radioSet;
|
|
1167
|
-
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
1168
|
-
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
1169
|
-
} else {
|
|
1170
|
-
try {
|
|
1171
|
-
radioSet = queryRadios(node.name);
|
|
1172
|
-
} catch (err) {
|
|
1173
|
-
// eslint-disable-next-line no-console
|
|
1174
|
-
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
1175
|
-
return false;
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
var checked = getCheckedRadio(radioSet, node.form);
|
|
1179
|
-
return !checked || checked === node;
|
|
1180
|
-
};
|
|
1181
|
-
var isRadio = function isRadio(node) {
|
|
1182
|
-
return isInput(node) && node.type === 'radio';
|
|
1183
|
-
};
|
|
1184
|
-
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
1185
|
-
return isRadio(node) && !isTabbableRadio(node);
|
|
1186
|
-
};
|
|
1187
|
-
|
|
1188
|
-
// determines if a node is ultimately attached to the window's document
|
|
1189
|
-
var isNodeAttached = function isNodeAttached(node) {
|
|
1190
|
-
var _nodeRoot;
|
|
1191
|
-
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
1192
|
-
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
1193
|
-
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
1194
|
-
// is attached, and the one we need to check if it's in the document or not (because the
|
|
1195
|
-
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
1196
|
-
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
1197
|
-
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
1198
|
-
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
1199
|
-
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
1200
|
-
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
1201
|
-
// tested).
|
|
1202
|
-
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
1203
|
-
// that is attached (or find none) because the node might be in nested shadows...
|
|
1204
|
-
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
1205
|
-
// document (per the docs) and while it's a Document-type object, that document does not
|
|
1206
|
-
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
1207
|
-
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
1208
|
-
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
1209
|
-
// node is actually detached.
|
|
1210
|
-
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
1211
|
-
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
1212
|
-
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
1213
|
-
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
1214
|
-
var nodeRoot = node && getRootNode(node);
|
|
1215
|
-
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
1216
|
-
|
|
1217
|
-
// in some cases, a detached node will return itself as the root instead of a document or
|
|
1218
|
-
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
1219
|
-
var attached = false;
|
|
1220
|
-
if (nodeRoot && nodeRoot !== node) {
|
|
1221
|
-
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
1222
|
-
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
1223
|
-
while (!attached && nodeRootHost) {
|
|
1224
|
-
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
1225
|
-
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
1226
|
-
// which means we need to get the host's host and check if that parent host is contained
|
|
1227
|
-
// in (i.e. attached to) the document
|
|
1228
|
-
nodeRoot = getRootNode(nodeRootHost);
|
|
1229
|
-
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
1230
|
-
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
return attached;
|
|
1234
|
-
};
|
|
1235
|
-
var isZeroArea = function isZeroArea(node) {
|
|
1236
|
-
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
1237
|
-
width = _node$getBoundingClie.width,
|
|
1238
|
-
height = _node$getBoundingClie.height;
|
|
1239
|
-
return width === 0 && height === 0;
|
|
1240
|
-
};
|
|
1241
|
-
var isHidden = function isHidden(node, _ref) {
|
|
1242
|
-
var displayCheck = _ref.displayCheck,
|
|
1243
|
-
getShadowRoot = _ref.getShadowRoot;
|
|
1244
|
-
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
1245
|
-
// (see notes about this further down), which means we will consider it visible
|
|
1246
|
-
// (this is legacy behavior from a very long way back)
|
|
1247
|
-
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
1248
|
-
// _visibility_ check, not a _display_ check
|
|
1249
|
-
if (getComputedStyle(node).visibility === 'hidden') {
|
|
1250
|
-
return true;
|
|
1251
|
-
}
|
|
1252
|
-
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
1253
|
-
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
1254
|
-
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
1255
|
-
return true;
|
|
1256
|
-
}
|
|
1257
|
-
if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
|
|
1258
|
-
if (typeof getShadowRoot === 'function') {
|
|
1259
|
-
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
1260
|
-
// 'non-zero-area' fallback
|
|
1261
|
-
var originalNode = node;
|
|
1262
|
-
while (node) {
|
|
1263
|
-
var parentElement = node.parentElement;
|
|
1264
|
-
var rootNode = getRootNode(node);
|
|
1265
|
-
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
1266
|
-
) {
|
|
1267
|
-
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
1268
|
-
// fall back to a non-zero-area test
|
|
1269
|
-
return isZeroArea(node);
|
|
1270
|
-
} else if (node.assignedSlot) {
|
|
1271
|
-
// iterate up slot
|
|
1272
|
-
node = node.assignedSlot;
|
|
1273
|
-
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
1274
|
-
// cross shadow boundary
|
|
1275
|
-
node = rootNode.host;
|
|
1276
|
-
} else {
|
|
1277
|
-
// iterate up normal dom
|
|
1278
|
-
node = parentElement;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
node = originalNode;
|
|
1282
|
-
}
|
|
1283
|
-
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
1284
|
-
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
1285
|
-
// it might be a falsy value, which means shadow DOM support is disabled
|
|
1286
|
-
|
|
1287
|
-
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
1288
|
-
// now we can just test to see if it would normally be visible or not, provided it's
|
|
1289
|
-
// attached to the main document.
|
|
1290
|
-
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
1291
|
-
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
1292
|
-
|
|
1293
|
-
if (isNodeAttached(node)) {
|
|
1294
|
-
// this works wherever the node is: if there's at least one client rect, it's
|
|
1295
|
-
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
1296
|
-
// node itself is hidden in place of its contents; and there's no need to search
|
|
1297
|
-
// up the hierarchy either
|
|
1298
|
-
return !node.getClientRects().length;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
// Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
1302
|
-
// API will __always__ return zero rects (this can happen, for example, if React
|
|
1303
|
-
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
1304
|
-
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
1305
|
-
//
|
|
1306
|
-
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
1307
|
-
// because styles are only computed for nodes that are in the document.
|
|
1308
|
-
//
|
|
1309
|
-
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
1310
|
-
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
1311
|
-
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
1312
|
-
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
1313
|
-
// considering __everything__ to be visible because of the innability to determine styles.
|
|
1314
|
-
//
|
|
1315
|
-
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
1316
|
-
// nodes as visible with the 'none' fallback.__
|
|
1317
|
-
if (displayCheck !== 'legacy-full') {
|
|
1318
|
-
return true; // hidden
|
|
1319
|
-
}
|
|
1320
|
-
// else, fallback to 'none' mode and consider the node visible
|
|
1321
|
-
} else if (displayCheck === 'non-zero-area') {
|
|
1322
|
-
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
1323
|
-
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
1324
|
-
// client rect, we don't special-case for whether the node is attached or not. In
|
|
1325
|
-
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
1326
|
-
// times, and that includes attached or not.
|
|
1327
|
-
return isZeroArea(node);
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
1331
|
-
// it's visible
|
|
1332
|
-
return false;
|
|
1333
|
-
};
|
|
1334
|
-
|
|
1335
|
-
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
1336
|
-
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
1337
|
-
// fieldset
|
|
1338
|
-
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
1339
|
-
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
1340
|
-
var parentNode = node.parentElement;
|
|
1341
|
-
// check if `node` is contained in a disabled <fieldset>
|
|
1342
|
-
while (parentNode) {
|
|
1343
|
-
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
1344
|
-
// look for the first <legend> among the children of the disabled <fieldset>
|
|
1345
|
-
for (var i = 0; i < parentNode.children.length; i++) {
|
|
1346
|
-
var child = parentNode.children.item(i);
|
|
1347
|
-
// when the first <legend> (in document order) is found
|
|
1348
|
-
if (child.tagName === 'LEGEND') {
|
|
1349
|
-
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
1350
|
-
// return whether `node` is a descendant of its first <legend>
|
|
1351
|
-
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
// the disabled <fieldset> containing `node` has no <legend>
|
|
1355
|
-
return true;
|
|
1356
|
-
}
|
|
1357
|
-
parentNode = parentNode.parentElement;
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
// else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
1362
|
-
// enabled/disabled state
|
|
1363
|
-
return false;
|
|
1364
|
-
};
|
|
1365
|
-
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
1366
|
-
if (node.disabled ||
|
|
1367
|
-
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
1368
|
-
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
1369
|
-
// note related to `candidateSelectors`)
|
|
1370
|
-
isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
1371
|
-
// For a details element with a summary, the summary element gets the focus
|
|
1372
|
-
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
1373
|
-
return false;
|
|
1374
|
-
}
|
|
1375
|
-
return true;
|
|
1376
|
-
};
|
|
1377
|
-
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
1378
|
-
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
1379
|
-
return false;
|
|
1380
|
-
}
|
|
1381
|
-
return true;
|
|
1382
|
-
};
|
|
1383
|
-
var isTabbable = function isTabbable(node, options) {
|
|
1384
|
-
options = options || {};
|
|
1385
|
-
if (!node) {
|
|
1386
|
-
throw new Error('No node provided');
|
|
1387
|
-
}
|
|
1388
|
-
if (matches.call(node, candidateSelector) === false) {
|
|
1389
|
-
return false;
|
|
1390
|
-
}
|
|
1391
|
-
return isNodeMatchingSelectorTabbable(options, node);
|
|
1392
|
-
};
|
|
1393
|
-
|
|
1394
|
-
var defaultConfig$2 = function defaultConfig() {
|
|
1395
|
-
return {
|
|
1396
|
-
/** Class which indicates that modal is open */
|
|
1397
|
-
classModalIsOpen: "is-active",
|
|
1398
|
-
/** Class on body which indicates that modal is open */
|
|
1399
|
-
classModalIsOpenBody: "has-modal",
|
|
1400
|
-
/** Root of page content which should be hidden when modal is open */
|
|
1401
|
-
root: "#root",
|
|
1402
|
-
/** Move modal into this element selector (must be unique in DOM) */
|
|
1403
|
-
modalsRoot: "#root-modals"
|
|
1404
|
-
};
|
|
1405
|
-
};
|
|
1406
|
-
var Modal = /*#__PURE__*/function () {
|
|
1407
|
-
function Modal(element, config) {
|
|
1408
|
-
_classCallCheck(this, Modal);
|
|
1409
|
-
this.element = element;
|
|
1410
|
-
this.config = Object.assign(Object.assign({}, defaultConfig$2()), config);
|
|
1411
|
-
this.handleShow = this.handleShow.bind(this);
|
|
1412
|
-
this.handleHide = this.handleHide.bind(this);
|
|
1413
|
-
this.show = this.show.bind(this);
|
|
1414
|
-
this.hide = this.hide.bind(this);
|
|
1415
|
-
this.headerFirstItemSpacing = this.headerFirstItemSpacing.bind(this);
|
|
1416
|
-
Modal.moveToModalRoot = Modal.moveToModalRoot.bind(this);
|
|
1417
|
-
Modal.lockBody = Modal.lockBody.bind(this);
|
|
1418
|
-
Modal.unlockBody = Modal.unlockBody.bind(this);
|
|
1419
|
-
this.element.ODS_Modal = this;
|
|
1420
|
-
this.init();
|
|
1421
|
-
return this;
|
|
1422
|
-
}
|
|
1423
|
-
return _createClass(Modal, [{
|
|
1424
|
-
key: "handleShow",
|
|
1425
|
-
value: function handleShow(el) {
|
|
1426
|
-
Modal.lockBody();
|
|
1427
|
-
if (el) el.classList.add(this.config.classModalIsOpen);
|
|
1428
|
-
// Long modals can have first focusabble element under the fold, so static content above the fold should be focused instead to prevent undesirable scrolling
|
|
1429
|
-
var initialFocusEl = el.querySelector("[data-a11y-dialog-initial-focus]");
|
|
1430
|
-
if (!initialFocusEl) {
|
|
1431
|
-
return;
|
|
1432
|
-
}
|
|
1433
|
-
// set tabindex to -1 so element can't be focused via keyboard
|
|
1434
|
-
if (!isTabbable(initialFocusEl)) {
|
|
1435
|
-
initialFocusEl.setAttribute("tabindex", "-1");
|
|
1436
|
-
}
|
|
1437
|
-
initialFocusEl.focus();
|
|
1438
|
-
}
|
|
1439
|
-
}, {
|
|
1440
|
-
key: "handleHide",
|
|
1441
|
-
value: function handleHide(el) {
|
|
1442
|
-
Modal.unlockBody();
|
|
1443
|
-
if (el) el.classList.remove(this.config.classModalIsOpen);
|
|
1444
|
-
}
|
|
1445
|
-
}, {
|
|
1446
|
-
key: "show",
|
|
1447
|
-
value: function show() {
|
|
1448
|
-
this.instance.show();
|
|
1449
|
-
}
|
|
1450
|
-
}, {
|
|
1451
|
-
key: "hide",
|
|
1452
|
-
value: function hide() {
|
|
1453
|
-
this.instance.hide();
|
|
1454
|
-
}
|
|
1455
|
-
}, {
|
|
1456
|
-
key: "headerFirstItemSpacing",
|
|
1457
|
-
value: function headerFirstItemSpacing() {
|
|
1458
|
-
/**
|
|
1459
|
-
* Target the first element which is not .btn inside .modal__header and add margin-right 40px.
|
|
1460
|
-
* css has its limitations and it is not possible with pseudo selectors
|
|
1461
|
-
*/
|
|
1462
|
-
var modalHeader = this.element.querySelector(".modal__header");
|
|
1463
|
-
if (modalHeader) {
|
|
1464
|
-
var firstNonBtnElement = Array.from(modalHeader.children).find(function (child) {
|
|
1465
|
-
return !child.classList.contains("btn");
|
|
1466
|
-
});
|
|
1467
|
-
if (firstNonBtnElement) {
|
|
1468
|
-
firstNonBtnElement.style.marginRight = "40px";
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
}, {
|
|
1473
|
-
key: "init",
|
|
1474
|
-
value: function init() {
|
|
1475
|
-
var _this = this;
|
|
1476
|
-
if (this.config.modalsRoot) {
|
|
1477
|
-
Modal.moveToModalRoot(this.element, document.querySelector(this.config.modalsRoot));
|
|
1478
|
-
}
|
|
1479
|
-
this.instance = new A11yDialog(this.element);
|
|
1480
|
-
this.instance.on("show", function (event) {
|
|
1481
|
-
var dialogEl = event.currentTarget;
|
|
1482
|
-
_this.handleShow(dialogEl);
|
|
1483
|
-
});
|
|
1484
|
-
this.instance.on("hide", function (event) {
|
|
1485
|
-
var dialogEl = event.currentTarget;
|
|
1486
|
-
_this.handleHide(dialogEl);
|
|
1487
|
-
});
|
|
1488
|
-
this.headerFirstItemSpacing();
|
|
1489
|
-
}
|
|
1490
|
-
}, {
|
|
1491
|
-
key: "destroy",
|
|
1492
|
-
value: function destroy() {
|
|
1493
|
-
this.instance.destroy();
|
|
1494
|
-
this.element.ODS_Modal = this;
|
|
1495
|
-
}
|
|
1496
|
-
}, {
|
|
1497
|
-
key: "update",
|
|
1498
|
-
value: function update() {
|
|
1499
|
-
this.destroy();
|
|
1500
|
-
this.init();
|
|
1501
|
-
}
|
|
1502
|
-
}], [{
|
|
1503
|
-
key: "getInstance",
|
|
1504
|
-
value: function getInstance(el) {
|
|
1505
|
-
if (!el) return null;
|
|
1506
|
-
var modalEl = el;
|
|
1507
|
-
return modalEl.ODS_Modal || null;
|
|
1508
|
-
}
|
|
1509
|
-
}, {
|
|
1510
|
-
key: "moveToModalRoot",
|
|
1511
|
-
value: function moveToModalRoot(el, container) {
|
|
1512
|
-
var _a;
|
|
1513
|
-
if (container) {
|
|
1514
|
-
container.appendChild(el);
|
|
1515
|
-
} else {
|
|
1516
|
-
console.warn("`modalsRoot: ".concat((_a = this.config) === null || _a === void 0 ? void 0 : _a.modalsRoot, "` element is not present in DOM. Modal will be placed inside content which can affect it's styling. Please provide `modalsRoot` selector (should be placed outside of main contant, usualy in end of <body /> tag)"));
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
}, {
|
|
1520
|
-
key: "lockBody",
|
|
1521
|
-
value: function lockBody(className, root) {
|
|
1522
|
-
var _a, _b;
|
|
1523
|
-
var actualClassName = className || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.classModalIsOpenBody);
|
|
1524
|
-
var actualRoot = root || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.root);
|
|
1525
|
-
var container = document.querySelector(actualRoot);
|
|
1526
|
-
// store current scrollTop value
|
|
1527
|
-
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
1528
|
-
document.body.setAttribute("data-lock-scrolltop", scrollTop.toString());
|
|
1529
|
-
// add locking styles to body
|
|
1530
|
-
document.body.style.height = "100%";
|
|
1531
|
-
document.body.style.width = "100%";
|
|
1532
|
-
document.body.style.overflow = "hidden";
|
|
1533
|
-
document.body.style.position = "fixed";
|
|
1534
|
-
// add locking styles to scrollTop
|
|
1535
|
-
if (container) {
|
|
1536
|
-
container.style.height = "100%";
|
|
1537
|
-
container.style.width = "100%";
|
|
1538
|
-
container.style.overflow = "hidden";
|
|
1539
|
-
container.style.position = "fixed";
|
|
1540
|
-
// scroll page-container to scrollTop position
|
|
1541
|
-
container.scrollTop = scrollTop;
|
|
1542
|
-
}
|
|
1543
|
-
// add modal class
|
|
1544
|
-
document.body.classList.add(actualClassName);
|
|
1545
|
-
// attempt to scroll top fixed position
|
|
1546
|
-
window.requestAnimationFrame(function () {
|
|
1547
|
-
window.scrollTo(0, scrollTop);
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
}, {
|
|
1551
|
-
key: "unlockBody",
|
|
1552
|
-
value: function unlockBody(className, root) {
|
|
1553
|
-
var _a, _b;
|
|
1554
|
-
var actualClassName = className || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.classModalIsOpenBody);
|
|
1555
|
-
var actualRoot = root || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.root);
|
|
1556
|
-
var container = document.querySelector(actualRoot);
|
|
1557
|
-
var scrollTop = document.body.getAttribute("data-lock-scrolltop") || "0";
|
|
1558
|
-
// remove locking styles from body
|
|
1559
|
-
document.body.style.height = "";
|
|
1560
|
-
document.body.style.width = "";
|
|
1561
|
-
document.body.style.overflow = "";
|
|
1562
|
-
document.body.style.position = "";
|
|
1563
|
-
// add modal class
|
|
1564
|
-
document.body.classList.remove(actualClassName);
|
|
1565
|
-
// remove locking styles from page-container
|
|
1566
|
-
if (container) {
|
|
1567
|
-
container.style.height = "";
|
|
1568
|
-
container.style.width = "";
|
|
1569
|
-
container.style.overflow = "";
|
|
1570
|
-
container.style.position = "";
|
|
1571
|
-
}
|
|
1572
|
-
// set scroll position back
|
|
1573
|
-
window.requestAnimationFrame(function () {
|
|
1574
|
-
window.scrollTo({
|
|
1575
|
-
left: 0,
|
|
1576
|
-
top: parseInt(scrollTop, 10),
|
|
1577
|
-
behavior: "instant"
|
|
1578
|
-
});
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
}]);
|
|
1582
|
-
}();
|
|
1583
|
-
|
|
1584
|
-
// we use array to include old browser key names like IE11
|
|
1585
|
-
// ie. navigation keys https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#navigation_keys
|
|
1586
|
-
var keys = {
|
|
1587
|
-
TAB: ['Tab'],
|
|
1588
|
-
ARROWLEFT: ['Left', 'ArrowLeft'],
|
|
1589
|
-
ARROWUP: ['Up', 'ArrowUp'],
|
|
1590
|
-
ARROWRIGHT: ['Right', 'ArrowRight'],
|
|
1591
|
-
ARROWDOWN: ['Down', 'ArrowDown']
|
|
1592
|
-
};
|
|
1593
|
-
|
|
1594
|
-
var RovingTabindex = /*#__PURE__*/function () {
|
|
1595
|
-
function RovingTabindex(elems) {
|
|
1596
|
-
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
1597
|
-
direction: 'horizontal'
|
|
1598
|
-
};
|
|
1599
|
-
_classCallCheck(this, RovingTabindex);
|
|
1600
|
-
this.elems = elems;
|
|
1601
|
-
this.config = config;
|
|
1602
|
-
this.isActive = false;
|
|
1603
|
-
this.onKeydown = this.onKeydown.bind(this);
|
|
1604
|
-
}
|
|
1605
|
-
return _createClass(RovingTabindex, [{
|
|
1606
|
-
key: "init",
|
|
1607
|
-
value: function init() {
|
|
1608
|
-
document.addEventListener('keydown', this.onKeydown);
|
|
1609
|
-
this.isActive = true;
|
|
1610
|
-
}
|
|
1611
|
-
}, {
|
|
1612
|
-
key: "destroy",
|
|
1613
|
-
value: function destroy() {
|
|
1614
|
-
document.removeEventListener('keydown', this.onKeydown);
|
|
1615
|
-
this.isActive = false;
|
|
1616
|
-
}
|
|
1617
|
-
}, {
|
|
1618
|
-
key: "update",
|
|
1619
|
-
value: function update(elems) {
|
|
1620
|
-
this.elems = elems;
|
|
1621
|
-
}
|
|
1622
|
-
}, {
|
|
1623
|
-
key: "onKeydown",
|
|
1624
|
-
value: function onKeydown(e) {
|
|
1625
|
-
var activeElemIndex = this.elems.indexOf(document.activeElement);
|
|
1626
|
-
if ((keys.ARROWUP.includes(e.key) || keys.ARROWDOWN.includes(e.key)) && this.config.direction === 'horizontal') {
|
|
1627
|
-
return;
|
|
1628
|
-
}
|
|
1629
|
-
if ((keys.ARROWLEFT.includes(e.key) || keys.ARROWRIGHT.includes(e.key)) && this.config.direction === 'vertical') {
|
|
1630
|
-
return;
|
|
1631
|
-
}
|
|
1632
|
-
if (keys.ARROWDOWN.includes(e.key) || keys.ARROWRIGHT.includes(e.key)) {
|
|
1633
|
-
e.preventDefault();
|
|
1634
|
-
if (activeElemIndex >= 0 && activeElemIndex < this.elems.length - 1) {
|
|
1635
|
-
this.elems[activeElemIndex + 1].focus();
|
|
1636
|
-
} else {
|
|
1637
|
-
this.elems[0].focus();
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
if (keys.ARROWUP.includes(e.key) || keys.ARROWLEFT.includes(e.key)) {
|
|
1641
|
-
e.preventDefault();
|
|
1642
|
-
if (activeElemIndex >= 1) {
|
|
1643
|
-
this.elems[activeElemIndex - 1].focus();
|
|
1644
|
-
} else {
|
|
1645
|
-
this.elems[this.elems.length - 1].focus();
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
if (keys.TAB.includes(e.key)) {
|
|
1649
|
-
this.destroy();
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
}]);
|
|
1653
|
-
}();
|
|
1654
|
-
|
|
1655
|
-
var defaultConfig$1 = {
|
|
1656
|
-
tabSelector: '[role="tab"]'
|
|
1657
|
-
};
|
|
1658
|
-
var Tabs = /*#__PURE__*/function () {
|
|
1659
|
-
function Tabs(element, config) {
|
|
1660
|
-
_classCallCheck(this, Tabs);
|
|
1661
|
-
this.isActive = function (el) {
|
|
1662
|
-
return el ? !el.hasAttribute("hidden") : false;
|
|
1663
|
-
};
|
|
1664
|
-
this.isSelected = function (el) {
|
|
1665
|
-
return el.getAttribute("aria-selected") === "true";
|
|
1666
|
-
};
|
|
1667
|
-
this.element = element;
|
|
1668
|
-
this.config = Object.assign(Object.assign({}, defaultConfig$1), config);
|
|
1669
|
-
this.tabs = [];
|
|
1670
|
-
this.tabPanels = [];
|
|
1671
|
-
this.activeTabIndex = null;
|
|
1672
|
-
this.rovingTabindex = null;
|
|
1673
|
-
this.handleClick = this.handleClick.bind(this);
|
|
1674
|
-
this.handleTabFocus = this.handleTabFocus.bind(this);
|
|
1675
|
-
this.element.ODS_Tabs = this;
|
|
1676
|
-
this.init();
|
|
1677
|
-
return this;
|
|
1678
|
-
}
|
|
1679
|
-
return _createClass(Tabs, [{
|
|
1680
|
-
key: "init",
|
|
1681
|
-
value: function init() {
|
|
1682
|
-
var _this = this;
|
|
1683
|
-
this.tabs = Array.from(this.element.querySelectorAll(this.config.tabSelector));
|
|
1684
|
-
this.tabs.map(function (tab, index) {
|
|
1685
|
-
var controlId = tab.getAttribute("aria-controls");
|
|
1686
|
-
_this.tabPanels.push(controlId ? document.getElementById(controlId) : null);
|
|
1687
|
-
tab.addEventListener("click", _this.handleClick);
|
|
1688
|
-
tab.addEventListener("focus", _this.handleTabFocus);
|
|
1689
|
-
if (_this.isSelected(tab)) {
|
|
1690
|
-
_this.activeTabIndex = index;
|
|
1691
|
-
}
|
|
1692
|
-
return tab;
|
|
1693
|
-
});
|
|
1694
|
-
if (!this.rovingTabindex) {
|
|
1695
|
-
this.rovingTabindex = new RovingTabindex(this.tabs, {
|
|
1696
|
-
direction: "any"
|
|
1697
|
-
});
|
|
1698
|
-
} else {
|
|
1699
|
-
this.rovingTabindex.update(this.tabs);
|
|
1700
|
-
}
|
|
1701
|
-
if (this.activeTabIndex !== null) {
|
|
1702
|
-
this.toggleTabPanel(this.tabPanels[this.activeTabIndex], "on");
|
|
1703
|
-
} else if (this.tabs.length > 0) {
|
|
1704
|
-
this.activateNthTab(0);
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
}, {
|
|
1708
|
-
key: "destroy",
|
|
1709
|
-
value: function destroy() {
|
|
1710
|
-
var _this2 = this;
|
|
1711
|
-
this.tabs.map(function (tab) {
|
|
1712
|
-
tab.removeEventListener("click", _this2.handleClick);
|
|
1713
|
-
tab.removeEventListener("focus", _this2.handleTabFocus);
|
|
1714
|
-
return tab;
|
|
1715
|
-
});
|
|
1716
|
-
this.tabs = [];
|
|
1717
|
-
this.tabPanels = [];
|
|
1718
|
-
if (this.rovingTabindex) {
|
|
1719
|
-
this.rovingTabindex.destroy();
|
|
1720
|
-
}
|
|
1721
|
-
this.element.ODS_Tabs = null;
|
|
1722
|
-
}
|
|
1723
|
-
}, {
|
|
1724
|
-
key: "update",
|
|
1725
|
-
value: function update() {
|
|
1726
|
-
this.destroy();
|
|
1727
|
-
this.init();
|
|
1728
|
-
}
|
|
1729
|
-
}, {
|
|
1730
|
-
key: "handleClick",
|
|
1731
|
-
value: function handleClick(e) {
|
|
1732
|
-
var _this3 = this;
|
|
1733
|
-
var clickedTab = e.currentTarget;
|
|
1734
|
-
if (clickedTab.hasAttribute("aria-disabled")) {
|
|
1735
|
-
e.preventDefault();
|
|
1736
|
-
return;
|
|
1737
|
-
}
|
|
1738
|
-
this.tabs.map(function (tab, i) {
|
|
1739
|
-
if (tab === clickedTab) {
|
|
1740
|
-
_this3.activeTabIndex = i;
|
|
1741
|
-
return _this3.toggleTab(tab, "on");
|
|
1742
|
-
}
|
|
1743
|
-
return _this3.toggleTab(tab, "off");
|
|
1744
|
-
});
|
|
1745
|
-
this.tabPanels.map(function (tabPanel) {
|
|
1746
|
-
if (tabPanel && tabPanel.getAttribute("id") === clickedTab.getAttribute("aria-controls")) {
|
|
1747
|
-
return _this3.toggleTabPanel(tabPanel, "on");
|
|
1748
|
-
}
|
|
1749
|
-
return _this3.toggleTabPanel(tabPanel, "off");
|
|
1750
|
-
});
|
|
1751
|
-
}
|
|
1752
|
-
}, {
|
|
1753
|
-
key: "toggleTab",
|
|
1754
|
-
value: function toggleTab(el, state) {
|
|
1755
|
-
var isActive = this.isSelected(el);
|
|
1756
|
-
if (state === "on" && !isActive) {
|
|
1757
|
-
el.setAttribute("aria-selected", "true");
|
|
1758
|
-
el.setAttribute("tabindex", "0");
|
|
1759
|
-
}
|
|
1760
|
-
if (state === "off" && isActive) {
|
|
1761
|
-
el.setAttribute("aria-selected", "false");
|
|
1762
|
-
el.setAttribute("tabindex", "-1");
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
}, {
|
|
1766
|
-
key: "toggleTabPanel",
|
|
1767
|
-
value: function toggleTabPanel(el, state) {
|
|
1768
|
-
if (!el) return;
|
|
1769
|
-
var isActive = this.isActive(el);
|
|
1770
|
-
if (state === "on" && !isActive) {
|
|
1771
|
-
el.removeAttribute("hidden");
|
|
1772
|
-
}
|
|
1773
|
-
if (state === "off" && isActive) {
|
|
1774
|
-
el.setAttribute("hidden", "");
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
}, {
|
|
1778
|
-
key: "activateNthTab",
|
|
1779
|
-
value: function activateNthTab(index) {
|
|
1780
|
-
var _this4 = this;
|
|
1781
|
-
this.tabs.map(function (tab, i) {
|
|
1782
|
-
if (i === index) {
|
|
1783
|
-
_this4.activeTabIndex = i;
|
|
1784
|
-
return _this4.toggleTab(tab, "on");
|
|
1785
|
-
}
|
|
1786
|
-
return _this4.toggleTab(tab, "off");
|
|
1787
|
-
});
|
|
1788
|
-
this.tabPanels.map(function (tabPanel, i) {
|
|
1789
|
-
if (i === index) {
|
|
1790
|
-
return _this4.toggleTabPanel(tabPanel, "on");
|
|
1791
|
-
}
|
|
1792
|
-
return _this4.toggleTabPanel(tabPanel, "off");
|
|
1793
|
-
});
|
|
1794
|
-
}
|
|
1795
|
-
}, {
|
|
1796
|
-
key: "handleTabFocus",
|
|
1797
|
-
value: function handleTabFocus() {
|
|
1798
|
-
if (this.rovingTabindex && !this.rovingTabindex.isActive) {
|
|
1799
|
-
this.rovingTabindex.init();
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
}], [{
|
|
1803
|
-
key: "getInstance",
|
|
1804
|
-
value: function getInstance(el) {
|
|
1805
|
-
return el && el.ODS_Tabs ? el.ODS_Tabs : null;
|
|
1806
|
-
}
|
|
1807
|
-
}]);
|
|
1808
|
-
}();
|
|
1809
|
-
|
|
1810
|
-
function moduleFactory(Module, selector) {
|
|
1811
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1812
|
-
var elements = Array.from(document.querySelectorAll(selector));
|
|
1813
|
-
return elements.map(function (element) {
|
|
1814
|
-
return new Module(element, options);
|
|
1815
|
-
});
|
|
1816
|
-
}
|
|
1817
|
-
function destroyModulesWithin(container) {
|
|
1818
|
-
var removeOrphanedNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1819
|
-
var destroyedInstances = {};
|
|
1820
|
-
Object.keys(window.ODS.instances).forEach(function (moduleName) {
|
|
1821
|
-
window.ODS.instances[moduleName].forEach(function (instance) {
|
|
1822
|
-
if (_typeof(destroyedInstances[moduleName]) !== "object") {
|
|
1823
|
-
destroyedInstances[moduleName] = [];
|
|
1824
|
-
}
|
|
1825
|
-
var isInContainer = container.contains(instance.element);
|
|
1826
|
-
if (moduleName === "modal") {
|
|
1827
|
-
var _instance$instance;
|
|
1828
|
-
isInContainer = (_instance$instance = instance.instance) === null || _instance$instance === void 0 ? void 0 : _instance$instance._openers.every(function (opener) {
|
|
1829
|
-
return container.contains(opener);
|
|
1830
|
-
});
|
|
1831
|
-
} else if (moduleName === "tooltip") {
|
|
1832
|
-
isInContainer = container.contains(instance.trigger);
|
|
1833
|
-
}
|
|
1834
|
-
if (isInContainer) {
|
|
1835
|
-
instance.destroy();
|
|
1836
|
-
destroyedInstances[moduleName].push(instance);
|
|
1837
|
-
}
|
|
1838
|
-
if (isInContainer && removeOrphanedNodes && ["modal", "tooltip"].includes(moduleName)) {
|
|
1839
|
-
instance.element.remove();
|
|
1840
|
-
}
|
|
1841
|
-
});
|
|
1842
|
-
window.ODS.instances[moduleName] = window.ODS.instances[moduleName].filter(function (instance) {
|
|
1843
|
-
return !destroyedInstances[moduleName].includes(instance);
|
|
1844
|
-
});
|
|
1845
|
-
});
|
|
1846
|
-
return destroyedInstances;
|
|
1847
|
-
}
|
|
1848
|
-
function initModulesWithin(container) {
|
|
1849
|
-
var instances = {};
|
|
1850
|
-
window.ODS.moduleSelectorPairs.forEach(function (module) {
|
|
1851
|
-
var name = lowerCamelCase(module.name);
|
|
1852
|
-
var elements = Array.from(container.querySelectorAll(module.selector));
|
|
1853
|
-
if (window && window.ODS && window.ODS.instances[name]) {
|
|
1854
|
-
window.ODS.instances[name].forEach(function (instance) {
|
|
1855
|
-
elements.forEach(function (element, index) {
|
|
1856
|
-
if (element.isSameNode(instance.element)) {
|
|
1857
|
-
elements.splice(index, 1);
|
|
1858
|
-
}
|
|
1859
|
-
});
|
|
1860
|
-
});
|
|
1861
|
-
}
|
|
1862
|
-
if (elements.length) {
|
|
1863
|
-
if (!Array.isArray(window.ODS.instances[name])) {
|
|
1864
|
-
window.ODS.instances[name] = [];
|
|
1865
|
-
}
|
|
1866
|
-
instances[name] = elements.map(function (element) {
|
|
1867
|
-
return new module.Module(element);
|
|
1868
|
-
});
|
|
1869
|
-
window.ODS.instances[name] = [].concat(_toConsumableArray(window.ODS.instances[name]), _toConsumableArray(instances[name]));
|
|
1870
|
-
}
|
|
1871
|
-
});
|
|
1872
|
-
return instances;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
function toggle(props) {
|
|
1876
|
-
var element = props.element,
|
|
1877
|
-
attribute = props.attribute,
|
|
1878
|
-
action = props.action,
|
|
1879
|
-
value = props.value,
|
|
1880
|
-
_props$dispatchEvent = props.dispatchEvent,
|
|
1881
|
-
dispatchEvent = _props$dispatchEvent === void 0 ? true : _props$dispatchEvent,
|
|
1882
|
-
eventDetail = props.eventDetail;
|
|
1883
|
-
var returnValue = null;
|
|
1884
|
-
if (!element || !(element instanceof Element)) {
|
|
1885
|
-
return returnValue;
|
|
1886
|
-
}
|
|
1887
|
-
if (action === 'focus') {
|
|
1888
|
-
setTimeout(element.focus(), 20);
|
|
1889
|
-
}
|
|
1890
|
-
if (action === 'click') {
|
|
1891
|
-
element.click();
|
|
1892
|
-
}
|
|
1893
|
-
if (attribute === 'class') {
|
|
1894
|
-
element.classList.toggle(value);
|
|
1895
|
-
returnValue = value;
|
|
1896
|
-
}
|
|
1897
|
-
if (attribute === 'text') {
|
|
1898
|
-
var oldText = element.textContent;
|
|
1899
|
-
element.textContent = value;
|
|
1900
|
-
returnValue = oldText;
|
|
1901
|
-
}
|
|
1902
|
-
if (attribute !== 'class' && attribute !== 'text' && typeof action === 'undefined') {
|
|
1903
|
-
returnValue = element.getAttribute(attribute);
|
|
1904
|
-
if (attribute === 'hidden') {
|
|
1905
|
-
if (element.hasAttribute(attribute)) {
|
|
1906
|
-
element.removeAttribute(attribute);
|
|
1907
|
-
} else {
|
|
1908
|
-
element.setAttribute(attribute, '');
|
|
1909
|
-
}
|
|
1910
|
-
} else if (!value) {
|
|
1911
|
-
element.setAttribute(attribute, !(returnValue === 'true'));
|
|
1912
|
-
} else {
|
|
1913
|
-
element.setAttribute(attribute, value);
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
if (dispatchEvent) {
|
|
1917
|
-
element.dispatchEvent(new CustomEvent(TOGGLE_EVT, {
|
|
1918
|
-
detail: eventDetail,
|
|
1919
|
-
bubbles: true
|
|
1920
|
-
}));
|
|
1921
|
-
}
|
|
1922
|
-
return returnValue;
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
var TRIGGER_EVT = 'toggleTrigger';
|
|
1926
|
-
var TOGGLE_EVT = 'toggle';
|
|
1927
|
-
var defaultConfig = {
|
|
1928
|
-
activeClass: 'is-active',
|
|
1929
|
-
settingsAttr: 'data-toggle'
|
|
1930
|
-
};
|
|
1931
|
-
var Toggle = /*#__PURE__*/function () {
|
|
1932
|
-
function Toggle(element, config) {
|
|
1933
|
-
_classCallCheck(this, Toggle);
|
|
1934
|
-
this.element = element;
|
|
1935
|
-
this.config = _objectSpread2(_objectSpread2({}, defaultConfig), config);
|
|
1936
|
-
this.settings = {};
|
|
1937
|
-
this.targets = [];
|
|
1938
|
-
this.handleClick = this.handleClick.bind(this);
|
|
1939
|
-
this.element.ODS_Toggle = this;
|
|
1940
|
-
this.init();
|
|
1941
|
-
return this;
|
|
1942
|
-
}
|
|
1943
|
-
return _createClass(Toggle, [{
|
|
1944
|
-
key: "doToggle",
|
|
1945
|
-
value: function doToggle(props) {
|
|
1946
|
-
var _props$dispatchEvent = props.dispatchEvent,
|
|
1947
|
-
dispatchEvent = _props$dispatchEvent === void 0 ? true : _props$dispatchEvent;
|
|
1948
|
-
var element = props.element,
|
|
1949
|
-
attribute = props.attribute,
|
|
1950
|
-
value = props.value,
|
|
1951
|
-
action = props.action;
|
|
1952
|
-
var returnProps = _objectSpread2({}, props);
|
|
1953
|
-
var eventDetail = {
|
|
1954
|
-
trigger: this.element,
|
|
1955
|
-
element: element
|
|
1956
|
-
};
|
|
1957
|
-
if (attribute === 'icon') {
|
|
1958
|
-
attribute = 'xlink:href';
|
|
1959
|
-
element = element.querySelector('use');
|
|
1960
|
-
}
|
|
1961
|
-
if (attribute === 'text') {
|
|
1962
|
-
element = element.querySelector('[data-toggle-text-target]') || element;
|
|
1963
|
-
}
|
|
1964
|
-
if (typeof value === 'undefined') {
|
|
1965
|
-
value = false;
|
|
1966
|
-
}
|
|
1967
|
-
returnProps.value = toggle({
|
|
1968
|
-
element: element,
|
|
1969
|
-
attribute: attribute,
|
|
1970
|
-
action: action,
|
|
1971
|
-
value: value,
|
|
1972
|
-
dispatchEvent: dispatchEvent,
|
|
1973
|
-
eventDetail: eventDetail
|
|
1974
|
-
});
|
|
1975
|
-
return returnProps;
|
|
1976
|
-
}
|
|
1977
|
-
}, {
|
|
1978
|
-
key: "init",
|
|
1979
|
-
value: function init() {
|
|
1980
|
-
this.settings = this.parseSettings();
|
|
1981
|
-
this.targets = this.setupTargets();
|
|
1982
|
-
this.element.addEventListener('click', this.handleClick);
|
|
1983
|
-
return this.targets;
|
|
1984
|
-
}
|
|
1985
|
-
}, {
|
|
1986
|
-
key: "handleClick",
|
|
1987
|
-
value: function handleClick() {
|
|
1988
|
-
var _this = this;
|
|
1989
|
-
this.targets = this.targets.map(function (target) {
|
|
1990
|
-
return _this.doToggle(target);
|
|
1991
|
-
});
|
|
1992
|
-
this.element.dispatchEvent(new CustomEvent(TRIGGER_EVT, {
|
|
1993
|
-
bubbles: true
|
|
1994
|
-
}));
|
|
1995
|
-
}
|
|
1996
|
-
}, {
|
|
1997
|
-
key: "destroy",
|
|
1998
|
-
value: function destroy() {
|
|
1999
|
-
this.element.removeEventListener('click', this.handleClick);
|
|
2000
|
-
this.settings = [];
|
|
2001
|
-
this.targets = [];
|
|
2002
|
-
}
|
|
2003
|
-
}, {
|
|
2004
|
-
key: "update",
|
|
2005
|
-
value: function update() {
|
|
2006
|
-
this.removeNonExistentTargets();
|
|
2007
|
-
this.addNewTargets();
|
|
2008
|
-
}
|
|
2009
|
-
}, {
|
|
2010
|
-
key: "parseSettings",
|
|
2011
|
-
value: function parseSettings() {
|
|
2012
|
-
var jsonSettings = this.element.getAttribute(this.config.settingsAttr);
|
|
2013
|
-
var ariaControls = this.element.getAttribute('aria-controls');
|
|
2014
|
-
var settings = JSON.parse(jsonSettings);
|
|
2015
|
-
if (ariaControls) {
|
|
2016
|
-
var ariaExpanded = this.element.getAttribute('aria-expanded');
|
|
2017
|
-
settings = [].concat(_toConsumableArray(ariaExpanded ? [{
|
|
2018
|
-
target: 'self',
|
|
2019
|
-
attribute: 'aria-expanded'
|
|
2020
|
-
}] : []), [{
|
|
2021
|
-
target: ariaControls.split(' ').map(function (a) {
|
|
2022
|
-
return "#".concat(a);
|
|
2023
|
-
}).join(','),
|
|
2024
|
-
attribute: 'hidden'
|
|
2025
|
-
}], _toConsumableArray(Array.isArray(settings) ? settings : []));
|
|
2026
|
-
}
|
|
2027
|
-
return settings;
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
// get all the possible settings for all target elements
|
|
2031
|
-
}, {
|
|
2032
|
-
key: "setupTargets",
|
|
2033
|
-
value: function setupTargets() {
|
|
2034
|
-
var trigger = this.element;
|
|
2035
|
-
return this.settings.reduce(function (allSettings, setting) {
|
|
2036
|
-
return [].concat(_toConsumableArray(allSettings), _toConsumableArray(setting === null || setting === void 0 ? void 0 : setting.target.split(',') // separate target selectors
|
|
2037
|
-
.reduce(function (targetSettings, target) {
|
|
2038
|
-
return [].concat(_toConsumableArray(targetSettings), _toConsumableArray(Toggle
|
|
2039
|
-
// get target elements from DOM
|
|
2040
|
-
.getTargetElementsFromString({
|
|
2041
|
-
target: target,
|
|
2042
|
-
trigger: trigger
|
|
2043
|
-
})
|
|
2044
|
-
// duplicate setting for each DOM element
|
|
2045
|
-
.map(function (element) {
|
|
2046
|
-
return _objectSpread2(_objectSpread2({}, setting), {}, {
|
|
2047
|
-
element: element
|
|
2048
|
-
});
|
|
2049
|
-
})));
|
|
2050
|
-
}, [])));
|
|
2051
|
-
}, []);
|
|
2052
|
-
}
|
|
2053
|
-
}, {
|
|
2054
|
-
key: "removeNonExistentTargets",
|
|
2055
|
-
value: function removeNonExistentTargets() {
|
|
2056
|
-
this.targets = this.targets.filter(function (target) {
|
|
2057
|
-
return document.contains(target.element);
|
|
2058
|
-
});
|
|
2059
|
-
}
|
|
2060
|
-
}, {
|
|
2061
|
-
key: "addNewTargets",
|
|
2062
|
-
value: function addNewTargets() {
|
|
2063
|
-
var _this2 = this;
|
|
2064
|
-
var allTargets = this.setupTargets();
|
|
2065
|
-
var newTargets = allTargets.filter(function (newTarget) {
|
|
2066
|
-
return !_this2.targets.find(function (target) {
|
|
2067
|
-
return target.element === newTarget.element && target.action === newTarget.action;
|
|
2068
|
-
});
|
|
2069
|
-
});
|
|
2070
|
-
this.targets = [].concat(_toConsumableArray(this.targets), _toConsumableArray(newTargets));
|
|
2071
|
-
}
|
|
2072
|
-
}], [{
|
|
2073
|
-
key: "getTargetElementsFromString",
|
|
2074
|
-
value: function getTargetElementsFromString(_ref) {
|
|
2075
|
-
var target = _ref.target,
|
|
2076
|
-
trigger = _ref.trigger;
|
|
2077
|
-
var selector = target.trim();
|
|
2078
|
-
if (selector === 'self') {
|
|
2079
|
-
return [trigger];
|
|
2080
|
-
}
|
|
2081
|
-
if (selector === 'parent') {
|
|
2082
|
-
return [trigger.parentNode];
|
|
2083
|
-
}
|
|
2084
|
-
if (selector === 'previous') {
|
|
2085
|
-
return [trigger.previousElementSibling];
|
|
2086
|
-
}
|
|
2087
|
-
if (selector === 'next') {
|
|
2088
|
-
return [trigger.nextElementSibling];
|
|
2089
|
-
}
|
|
2090
|
-
if (typeof selector === 'string') {
|
|
2091
|
-
// don't be tempted to remove this querySelectorAll
|
|
2092
|
-
// selector like '.target-elements' whould not work as expected
|
|
2093
|
-
return Array.from(document.querySelectorAll(selector));
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
// add log why we endup here
|
|
2097
|
-
return selector;
|
|
2098
|
-
}
|
|
2099
|
-
}, {
|
|
2100
|
-
key: "getInstance",
|
|
2101
|
-
value: function getInstance(el) {
|
|
2102
|
-
return el && el.ODS_Toggle ? el.ODS_Toggle : null;
|
|
2103
|
-
}
|
|
2104
|
-
}]);
|
|
2105
|
-
}();
|
|
2106
|
-
Toggle.getTargetElements;
|
|
2107
|
-
Toggle.setTargets;
|
|
2108
|
-
|
|
2109
|
-
var SameHeight = /*#__PURE__*/function () {
|
|
2110
|
-
function SameHeight(element) {
|
|
2111
|
-
_classCallCheck(this, SameHeight);
|
|
2112
|
-
this.element = element;
|
|
2113
|
-
this.children = null;
|
|
2114
|
-
this.updateHeight = this.updateHeight.bind(this);
|
|
2115
|
-
this.element.ODS_SameHeight = this;
|
|
2116
|
-
this.intervalId = null; // Add this line to store interval ID
|
|
2117
|
-
this.init();
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
// This method temporarily shows hidden elements by changing their display style to 'block' and removing the 'hidden' attribute.
|
|
2121
|
-
return _createClass(SameHeight, [{
|
|
2122
|
-
key: "temporarilyShowHiddenElements",
|
|
2123
|
-
value: function temporarilyShowHiddenElements() {
|
|
2124
|
-
var _this = this;
|
|
2125
|
-
// Initialize an array to store the original display states of the elements.
|
|
2126
|
-
this.originalDisplayStates = [];
|
|
2127
|
-
|
|
2128
|
-
// Iterate over each child element.
|
|
2129
|
-
this.children.forEach(function (child) {
|
|
2130
|
-
// Find the closest ancestor with the role 'tabpanel'.
|
|
2131
|
-
var tabPanel = child.closest('[role="tabpanel"]');
|
|
2132
|
-
// Find the closest ancestor with the role 'dialog'.
|
|
2133
|
-
var modal = child.closest('[role="dialog"]');
|
|
2134
|
-
|
|
2135
|
-
// If the tabPanel exists and has the 'hidden' attribute.
|
|
2136
|
-
if (tabPanel && tabPanel.hasAttribute("hidden")) {
|
|
2137
|
-
// Store the original display state of the tabPanel.
|
|
2138
|
-
_this.originalDisplayStates.push({
|
|
2139
|
-
element: tabPanel,
|
|
2140
|
-
display: tabPanel.style.display
|
|
2141
|
-
});
|
|
2142
|
-
// Change the display style to 'block' and remove the 'hidden' attribute.
|
|
2143
|
-
tabPanel.style.display = "block";
|
|
2144
|
-
tabPanel.removeAttribute("hidden");
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
// If the modal exists and has the 'aria-hidden' attribute.
|
|
2148
|
-
if (modal && modal.hasAttribute("aria-hidden")) {
|
|
2149
|
-
// Store the original display state of the modal.
|
|
2150
|
-
_this.originalDisplayStates.push({
|
|
2151
|
-
element: modal,
|
|
2152
|
-
display: modal.style.display
|
|
2153
|
-
});
|
|
2154
|
-
// Change the display style to 'block' and remove the 'aria-hidden' attribute.
|
|
2155
|
-
modal.style.display = "block";
|
|
2156
|
-
modal.removeAttribute("aria-hidden");
|
|
2157
|
-
}
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
// This method restores the hidden elements to their original display states.
|
|
2162
|
-
}, {
|
|
2163
|
-
key: "restoreHiddenElements",
|
|
2164
|
-
value: function restoreHiddenElements() {
|
|
2165
|
-
// Iterate over each stored original display state.
|
|
2166
|
-
this.originalDisplayStates.forEach(function (_ref) {
|
|
2167
|
-
var element = _ref.element,
|
|
2168
|
-
display = _ref.display;
|
|
2169
|
-
// Restore the original display style.
|
|
2170
|
-
element.style.display = display;
|
|
2171
|
-
|
|
2172
|
-
// Check if the element has the role 'tabpanel'.
|
|
2173
|
-
if (element.getAttribute("role") === "tabpanel") {
|
|
2174
|
-
// If so, set the 'hidden' attribute to true.
|
|
2175
|
-
element.setAttribute("hidden", true);
|
|
2176
|
-
}
|
|
2177
|
-
// Check if the element has the role 'dialog'.
|
|
2178
|
-
else if (element.getAttribute("role") === "dialog") {
|
|
2179
|
-
// If so, set the 'aria-hidden' attribute to true.
|
|
2180
|
-
element.setAttribute("aria-hidden", true);
|
|
2181
|
-
}
|
|
2182
|
-
});
|
|
2183
|
-
}
|
|
2184
|
-
}, {
|
|
2185
|
-
key: "updateHeight",
|
|
2186
|
-
value: function updateHeight() {
|
|
2187
|
-
// Temporarily show hidden elements to ensure they are included in the height calculations.
|
|
2188
|
-
this.temporarilyShowHiddenElements();
|
|
2189
|
-
|
|
2190
|
-
// Get all elements with data-same-height-child attribute
|
|
2191
|
-
var allSameHeightChildren = this.element.querySelectorAll('[data-same-height-child="true"]');
|
|
2192
|
-
|
|
2193
|
-
// Group elements by their "type" (using data-same-height-group if available)
|
|
2194
|
-
var groupedElements = this.groupElementsByTypeAndPosition(allSameHeightChildren);
|
|
2195
|
-
|
|
2196
|
-
// Process each group separately
|
|
2197
|
-
|
|
2198
|
-
for (var _i = 0, _Object$entries = Object.entries(groupedElements); _i < _Object$entries.length; _i++) {
|
|
2199
|
-
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
2200
|
-
elements = _Object$entries$_i[1];
|
|
2201
|
-
var rows = [];
|
|
2202
|
-
var newRow = [];
|
|
2203
|
-
if (elements.length) {
|
|
2204
|
-
var lastOffset = elements[0].getBoundingClientRect().top;
|
|
2205
|
-
var _iterator = _createForOfIteratorHelper(elements),
|
|
2206
|
-
_step;
|
|
2207
|
-
try {
|
|
2208
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2209
|
-
var child = _step.value;
|
|
2210
|
-
if (child.getBoundingClientRect().top === lastOffset) {
|
|
2211
|
-
newRow.push(child);
|
|
2212
|
-
} else {
|
|
2213
|
-
rows.push(_toConsumableArray(newRow));
|
|
2214
|
-
newRow = [];
|
|
2215
|
-
newRow.push(child);
|
|
2216
|
-
}
|
|
2217
|
-
lastOffset = child.getBoundingClientRect().top;
|
|
2218
|
-
}
|
|
2219
|
-
} catch (err) {
|
|
2220
|
-
_iterator.e(err);
|
|
2221
|
-
} finally {
|
|
2222
|
-
_iterator.f();
|
|
2223
|
-
}
|
|
2224
|
-
rows.push(_toConsumableArray(newRow));
|
|
2225
|
-
rows.forEach(function (row) {
|
|
2226
|
-
if (row.length > 1) {
|
|
2227
|
-
var maxHeight = 0;
|
|
2228
|
-
row.forEach(function (child) {
|
|
2229
|
-
if (child) {
|
|
2230
|
-
if (child.style.height) {
|
|
2231
|
-
child.style.height = "";
|
|
2232
|
-
}
|
|
2233
|
-
if (child.offsetHeight > maxHeight) {
|
|
2234
|
-
maxHeight = child.offsetHeight;
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
});
|
|
2238
|
-
row.forEach(function (child) {
|
|
2239
|
-
child.style.height = maxHeight + "px";
|
|
2240
|
-
});
|
|
2241
|
-
} else {
|
|
2242
|
-
row.forEach(function (child) {
|
|
2243
|
-
if (child.style.height) {
|
|
2244
|
-
child.style.height = null;
|
|
2245
|
-
}
|
|
2246
|
-
});
|
|
2247
|
-
}
|
|
2248
|
-
});
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
|
-
// Restore the hidden elements to their original display states after height calculations are done.
|
|
2253
|
-
this.restoreHiddenElements();
|
|
2254
|
-
}
|
|
2255
|
-
}, {
|
|
2256
|
-
key: "groupElementsByTypeAndPosition",
|
|
2257
|
-
value: function groupElementsByTypeAndPosition(elements) {
|
|
2258
|
-
var groups = {};
|
|
2259
|
-
elements.forEach(function (element) {
|
|
2260
|
-
// Get group identifier - either from data-same-height-group attribute or default to 'default'
|
|
2261
|
-
var groupKey = element.getAttribute("data-same-height-group") || "default";
|
|
2262
|
-
if (!groups[groupKey]) {
|
|
2263
|
-
groups[groupKey] = [];
|
|
2264
|
-
}
|
|
2265
|
-
groups[groupKey].push(element);
|
|
2266
|
-
});
|
|
2267
|
-
return groups;
|
|
2268
|
-
}
|
|
2269
|
-
}, {
|
|
2270
|
-
key: "init",
|
|
2271
|
-
value: function init() {
|
|
2272
|
-
var _this2 = this;
|
|
2273
|
-
var imgLoaded = [];
|
|
2274
|
-
// Instead of finding one child per parent element, we find all elements with the attribute
|
|
2275
|
-
this.children = this.element.querySelectorAll('[data-same-height-child="true"]');
|
|
2276
|
-
|
|
2277
|
-
// Check if any of the data-same-height-child elements contain images
|
|
2278
|
-
this.children.forEach(function (child) {
|
|
2279
|
-
var images = child.querySelectorAll("img");
|
|
2280
|
-
images.forEach(function (img) {
|
|
2281
|
-
if (!img.complete) {
|
|
2282
|
-
imgLoaded.push(img);
|
|
2283
|
-
}
|
|
2284
|
-
});
|
|
2285
|
-
});
|
|
2286
|
-
|
|
2287
|
-
// Function executed on init when there are no img children or all img are loaded
|
|
2288
|
-
if (imgLoaded.length === 0) {
|
|
2289
|
-
this.updateHeight();
|
|
2290
|
-
}
|
|
2291
|
-
// If there are unloaded images we check if they did load every 400ms
|
|
2292
|
-
else {
|
|
2293
|
-
var x = 0;
|
|
2294
|
-
this.intervalId = setInterval(function () {
|
|
2295
|
-
var completed = false;
|
|
2296
|
-
imgLoaded.forEach(function (img, index, array) {
|
|
2297
|
-
if (img.complete) {
|
|
2298
|
-
array.splice(index, 1);
|
|
2299
|
-
completed = true;
|
|
2300
|
-
}
|
|
2301
|
-
});
|
|
2302
|
-
if (completed && _this2.updateHeight) {
|
|
2303
|
-
_this2.updateHeight();
|
|
2304
|
-
}
|
|
2305
|
-
if (++x >= 15 || imgLoaded.length === 0) {
|
|
2306
|
-
if (imgLoaded.length && _this2.updateHeight) {
|
|
2307
|
-
_this2.updateHeight();
|
|
2308
|
-
}
|
|
2309
|
-
window.clearInterval(_this2.intervalId);
|
|
2310
|
-
}
|
|
2311
|
-
}, 400);
|
|
2312
|
-
}
|
|
2313
|
-
window.addEventListener("resize", this.updateHeight);
|
|
2314
|
-
}
|
|
2315
|
-
}, {
|
|
2316
|
-
key: "update",
|
|
2317
|
-
value: function update() {
|
|
2318
|
-
this.destroy();
|
|
2319
|
-
this.init();
|
|
2320
|
-
}
|
|
2321
|
-
}, {
|
|
2322
|
-
key: "destroy",
|
|
2323
|
-
value: function destroy() {
|
|
2324
|
-
window.removeEventListener("resize", this.updateHeight);
|
|
2325
|
-
if (this.intervalId) {
|
|
2326
|
-
clearInterval(this.intervalId);
|
|
2327
|
-
this.intervalId = null;
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
}], [{
|
|
2331
|
-
key: "getInstance",
|
|
2332
|
-
value: function getInstance(el) {
|
|
2333
|
-
return el && el.ODS_SameHeight ? el.ODS_SameHeight : null;
|
|
2334
|
-
}
|
|
2335
|
-
}]);
|
|
2336
|
-
}();
|
|
2337
|
-
|
|
2338
|
-
var moduleSelectorPairs = [
|
|
2339
|
-
// {
|
|
2340
|
-
// Module: Accordion,
|
|
2341
|
-
// name: 'Accordion',
|
|
2342
|
-
// selector: '[data-accordion]',
|
|
2343
|
-
// },
|
|
2344
|
-
// {
|
|
2345
|
-
// Module: Autocomplete,
|
|
2346
|
-
// name: 'Autocomplete',
|
|
2347
|
-
// selector: '[data-autocomplete]',
|
|
2348
|
-
// },
|
|
2349
|
-
// {
|
|
2350
|
-
// Module: DatePicker,
|
|
2351
|
-
// name: 'DatePicker',
|
|
2352
|
-
// selector: '[data-datepicker]',
|
|
2353
|
-
// },
|
|
2354
|
-
// {
|
|
2355
|
-
// Module: Dropdown,
|
|
2356
|
-
// name: 'Dropdown',
|
|
2357
|
-
// selector: '[data-dropdown]',
|
|
2358
|
-
// },
|
|
2359
|
-
// {
|
|
2360
|
-
// Module: Expander,
|
|
2361
|
-
// name: 'Expander',
|
|
2362
|
-
// selector: '[data-expander]',
|
|
2363
|
-
// },
|
|
2364
|
-
// {
|
|
2365
|
-
// Module: BlockAction,
|
|
2366
|
-
// name: 'BlockAction',
|
|
2367
|
-
// selector: '[data-block-action]',
|
|
2368
|
-
// },
|
|
2369
|
-
// {
|
|
2370
|
-
// Module: Carousel,
|
|
2371
|
-
// name: 'Carousel',
|
|
2372
|
-
// selector: '[data-carousel]',
|
|
2373
|
-
// },
|
|
2374
|
-
// {
|
|
2375
|
-
// Module: CarouselPromotions,
|
|
2376
|
-
// name: 'CarouselPromotions',
|
|
2377
|
-
// selector: '[data-carousel-promotions]',
|
|
2378
|
-
// },
|
|
2379
|
-
// {
|
|
2380
|
-
// Module: File,
|
|
2381
|
-
// name: 'File',
|
|
2382
|
-
// selector: '[data-file-input]',
|
|
2383
|
-
// },
|
|
2384
|
-
// {
|
|
2385
|
-
// Module: Loader,
|
|
2386
|
-
// name: 'Loader',
|
|
2387
|
-
// selector: '[data-loader]',
|
|
2388
|
-
// },
|
|
2389
|
-
{
|
|
2390
|
-
Module: Modal,
|
|
2391
|
-
name: "Modal",
|
|
2392
|
-
selector: "[data-modal]"
|
|
2393
|
-
}, {
|
|
2394
|
-
Module: SameHeight,
|
|
2395
|
-
name: "SameHeight",
|
|
2396
|
-
selector: "[data-same-height]"
|
|
2397
|
-
},
|
|
2398
|
-
// {
|
|
2399
|
-
// Module: RangeSlider,
|
|
2400
|
-
// name: 'RangeSlider',
|
|
2401
|
-
// selector: '[data-rangeslider]',
|
|
2402
|
-
// },
|
|
2403
|
-
// {
|
|
2404
|
-
// Module: InputStepper,
|
|
2405
|
-
// name: 'InputStepper',
|
|
2406
|
-
// selector: '[data-inputstepper]',
|
|
2407
|
-
// },
|
|
2408
|
-
// {
|
|
2409
|
-
// Module: Table,
|
|
2410
|
-
// name: 'Table',
|
|
2411
|
-
// selector: '[data-table]',
|
|
2412
|
-
// },
|
|
2413
|
-
{
|
|
2414
|
-
Module: Tabs,
|
|
2415
|
-
name: "Tabs",
|
|
2416
|
-
selector: "[data-tabs]"
|
|
2417
|
-
}, {
|
|
2418
|
-
Module: Toggle,
|
|
2419
|
-
name: "Toggle",
|
|
2420
|
-
selector: "[data-toggle]"
|
|
2421
|
-
}
|
|
2422
|
-
// {
|
|
2423
|
-
// Module: Tooltip,
|
|
2424
|
-
// name: 'Tooltip',
|
|
2425
|
-
// selector: '[data-tooltip]',
|
|
2426
|
-
// },
|
|
2427
|
-
];
|
|
2428
|
-
window.ODS = window.ODS || {
|
|
2429
|
-
modules: {},
|
|
2430
|
-
instances: {},
|
|
2431
|
-
moduleSelectorPairs: {}
|
|
2432
|
-
};
|
|
2433
|
-
window.ODS.initModulesWithin = initModulesWithin;
|
|
2434
|
-
window.ODS.destroyModulesWithin = destroyModulesWithin;
|
|
2435
|
-
window.ODS.moduleSelectorPairs = moduleSelectorPairs;
|
|
2436
|
-
window.addEventListener("DOMContentLoaded", function () {
|
|
2437
|
-
console.log("ODS modules loaded");
|
|
2438
|
-
moduleSelectorPairs.forEach(function (module) {
|
|
2439
|
-
window.ODS.modules[module.name] = module.Module;
|
|
2440
|
-
window.ODS.instances[lowerCamelCase(module.name)] = moduleFactory(module.Module, module.selector);
|
|
2441
|
-
});
|
|
2442
|
-
window.dispatchEvent(new Event("ODSLoaded"));
|
|
2443
|
-
});
|
|
2444
|
-
|
|
2445
|
-
export { moduleSelectorPairs };
|
|
7
|
+
*/var Fn,Hn,Vn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Wn="undefined"==typeof Element,zn=Wn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,qn=!Wn&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},$n=function e(t,n){var i;void 0===n&&(n=!0);var o=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Kn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))}(e)?0:e.tabIndex},Gn=function(e){return"INPUT"===e.tagName},Yn=function(e){return function(e){return Gn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||qn(e),i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Xn=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},Jn=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=zn.call(e,"details>summary:first-of-type")?e.parentElement:e;if(zn.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Xn(e)}else{if("function"==typeof i){for(var r=e;e;){var a=e.parentElement,s=qn(e);if(a&&!a.shadowRoot&&!0===i(a))return Xn(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=r}if(function(e){var t,n,i,o,r=e&&qn(e),a=null===(t=r)||void 0===t?void 0:t.host,s=!1;if(r&&r!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(i=n.ownerDocument)&&void 0!==i&&i.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,u,c;s=!(null===(u=a=null===(l=r=qn(a))||void 0===l?void 0:l.host)||void 0===u||null===(c=u.ownerDocument)||void 0===c||!c.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Qn=function(e,t){return!(t.disabled||$n(t)||function(e){return Gn(e)&&"hidden"===e.type}(t)||Jn(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if("LEGEND"===i.tagName)return!!zn.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},Zn=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==zn.call(e,Vn)&&function(e,t){return!(Yn(t)||Kn(t)<0||!Qn(e,t))}(t,e)},ei=function(){function e(n,i){return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},{classModalIsOpen:"is-active",classModalIsOpenBody:"has-modal",root:"#root",modalsRoot:"#root-modals"}),i),this.handleShow=this.handleShow.bind(this),this.handleHide=this.handleHide.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.headerFirstItemSpacing=this.headerFirstItemSpacing.bind(this),e.moveToModalRoot=e.moveToModalRoot.bind(this),e.lockBody=e.lockBody.bind(this),e.unlockBody=e.unlockBody.bind(this),this.element.ODS_Modal=this,this.init(),this}return i(e,[{key:"handleShow",value:function(t){e.lockBody(),t&&t.classList.add(this.config.classModalIsOpen);var n=t.querySelector("[data-a11y-dialog-initial-focus]");n&&(Zn(n)||n.setAttribute("tabindex","-1"),n.focus())}},{key:"handleHide",value:function(t){e.unlockBody(),t&&t.classList.remove(this.config.classModalIsOpen)}},{key:"show",value:function(){this.instance.show()}},{key:"hide",value:function(){this.instance.hide()}},{key:"headerFirstItemSpacing",value:function(){var e=this.element.querySelector(".modal__header");if(e){var t=Array.from(e.children).find(function(e){return!e.classList.contains("btn")});t&&(t.style.marginRight="40px")}}},{key:"init",value:function(){var t=this;this.config.modalsRoot&&e.moveToModalRoot(this.element,document.querySelector(this.config.modalsRoot)),this.instance=new Bn(this.element),this.instance.on("show",function(e){var n=e.currentTarget;t.handleShow(n)}),this.instance.on("hide",function(e){var n=e.currentTarget;t.handleHide(n)}),this.headerFirstItemSpacing()}},{key:"destroy",value:function(){this.instance.destroy(),this.element.ODS_Modal=this}},{key:"update",value:function(){this.destroy(),this.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Modal||null}},{key:"moveToModalRoot",value:function(e,t){var n;t?t.appendChild(e):console.warn("`modalsRoot: ".concat(null===(n=this.config)||void 0===n?void 0:n.modalsRoot,"` element is not present in DOM. Modal will be placed inside content which can affect it's styling. Please provide `modalsRoot` selector (should be placed outside of main contant, usualy in end of <body /> tag)"))}},{key:"lockBody",value:function(e,t){var n,i,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),r=t||(null===(i=this.config)||void 0===i?void 0:i.root),a=document.querySelector(r),s=document.documentElement.scrollTop||document.body.scrollTop;document.body.setAttribute("data-lock-scrolltop",s.toString()),document.body.style.height="100%",document.body.style.width="100%",document.body.style.overflow="hidden",document.body.style.position="fixed",a&&(a.style.height="100%",a.style.width="100%",a.style.overflow="hidden",a.style.position="fixed",a.scrollTop=s),document.body.classList.add(o),window.requestAnimationFrame(function(){window.scrollTo(0,s)})}},{key:"unlockBody",value:function(e,t){var n,i,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),r=t||(null===(i=this.config)||void 0===i?void 0:i.root),a=document.querySelector(r),s=document.body.getAttribute("data-lock-scrolltop")||"0";document.body.style.height="",document.body.style.width="",document.body.style.overflow="",document.body.style.position="",document.body.classList.remove(o),a&&(a.style.height="",a.style.width="",a.style.overflow="",a.style.position=""),window.requestAnimationFrame(function(){window.scrollTo({left:0,top:parseInt(s,10),behavior:"instant"})})}}])}();function ti(e){return"object"==typeof e&&"function"==typeof e.to}function ni(e){e.parentElement.removeChild(e)}function ii(e){return null!=e}function oi(e){e.preventDefault()}function ri(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ai(e,t,n){n>0&&(ci(e,t),setTimeout(function(){di(e,t)},n))}function si(e){return Math.max(Math.min(e,100),0)}function li(e){return Array.isArray(e)?e:[e]}function ui(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function ci(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function di(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function hi(e){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop}}function fi(e,t){return 100/(t-e)}function pi(e,t,n){return 100*t/(e[n+1]-e[n])}function mi(e,t){for(var n=1;e>=t[n];)n+=1;return n}function vi(e,t,n){if(n>=e.slice(-1)[0])return 100;var i=mi(n,e),o=e[i-1],r=e[i],a=t[i-1],s=t[i];return a+function(e,t){return pi(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}([o,r],n)/fi(a,s)}function gi(e,t,n,i){if(100===i)return i;var o=mi(i,e),r=e[o-1],a=e[o];return n?i-r>(a-r)/2?a:r:t[o-1]?e[o-1]+function(e,t){return Math.round(e/t)*t}(i-e[o-1],t[o-1]):i}!function(e){e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values"}(Fn||(Fn={})),function(e){e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue"}(Hn||(Hn={}));var bi=function(){function e(e,t,n){var i;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.snap=t;var o=[];for(Object.keys(e).forEach(function(t){o.push([li(e[t]),t])}),o.sort(function(e,t){return e[0][0]-t[0][0]}),i=0;i<o.length;i++)this.handleEntryPoint(o[i][1],o[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(e){for(var t=[],n=0;n<this.xNumSteps.length-1;n++)t[n]=pi(this.xVal,e,n);return t},e.prototype.getAbsoluteDistance=function(e,t,n){var i,o=0;if(e<this.xPct[this.xPct.length-1])for(;e>this.xPct[o+1];)o++;else e===this.xPct[this.xPct.length-1]&&(o=this.xPct.length-2);n||e!==this.xPct[o+1]||o++,null===t&&(t=[]);var r=1,a=t[o],s=0,l=0,u=0,c=0;for(i=n?(e-this.xPct[o])/(this.xPct[o+1]-this.xPct[o]):(this.xPct[o+1]-e)/(this.xPct[o+1]-this.xPct[o]);a>0;)s=this.xPct[o+1+c]-this.xPct[o+c],t[o+c]*r+100-100*i>100?(l=s*i,r=(a-100*i)/t[o+c],i=1):(l=t[o+c]*s/100*r,r=0),n?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=t[o+c]*r;return e+u},e.prototype.toStepping=function(e){return e=vi(this.xVal,this.xPct,e)},e.prototype.fromStepping=function(e){return function(e,t,n){if(n>=100)return e.slice(-1)[0];var i=mi(n,t),o=e[i-1],r=e[i],a=t[i-1];return function(e,t){return t*(e[1]-e[0])/100+e[0]}([o,r],(n-a)*fi(a,t[i]))}(this.xVal,this.xPct,e)},e.prototype.getStep=function(e){return e=gi(this.xPct,this.xSteps,this.snap,e)},e.prototype.getDefaultStep=function(e,t,n){var i=mi(e,this.xPct);return(100===e||t&&e===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/n},e.prototype.getNearbySteps=function(e){var t=mi(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(ui);return Math.max.apply(null,e)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(e){return this.getStep(this.toStepping(e))},e.prototype.handleEntryPoint=function(e,t){var n;if(!ri(n="min"===e?0:"max"===e?100:parseFloat(e))||!ri(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(n),this.xVal.push(t[0]);var i=Number(t[1]);n?this.xSteps.push(!isNaN(i)&&i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(e,t){if(t)if(this.xVal[e]!==this.xVal[e+1]){this.xSteps[e]=pi([this.xVal[e],this.xVal[e+1]],t,0)/fi(this.xPct[e],this.xPct[e+1]);var n=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e],i=Math.ceil(Number(n.toFixed(3))-1),o=this.xVal[e]+this.xNumSteps[e]*i;this.xHighestCompleteStep[e]=o}else this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e]},e}(),yi={to:function(e){return void 0===e?"":e.toFixed(2)},from:Number},wi={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},Si=".__tooltips",Ei=".__aria";function xi(e,t){if(!ri(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function ki(e,t){if(!ri(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function Ai(e,t){if(!ri(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function Oi(e,t){if(!ri(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function _i(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new bi(t,e.snap||!1,e.singleStep)}function Ci(e,t){if(t=li(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function Ti(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function Di(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function Li(e,t){if("number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function Ni(e,t){var n,i=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(n=1;n<e.handles;n++)i.push(t);i.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");i=t}e.connect=i}function Mi(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Ii(e,t){if(!ri(t))throw new Error("noUiSlider: 'margin' option must be numeric.");0!==t&&(e.margin=e.spectrum.getDistance(t))}function Ri(e,t){if(!ri(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(t),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Pi(e,t){var n;if(!ri(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&2!==t.length&&!ri(t[0])&&!ri(t[1]))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==t){for(Array.isArray(t)||(t=[t,t]),e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])],n=0;n<e.spectrum.xNumSteps.length-1;n++)if(e.padding[0][n]<0||e.padding[1][n]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var i=t[0]+t[1],o=e.spectrum.xVal[0];if(i/(e.spectrum.xVal[e.spectrum.xVal.length-1]-o)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function ji(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Bi(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,o=t.indexOf("fixed")>=0,r=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,s=t.indexOf("unconstrained")>=0,l=t.indexOf("invert-connects")>=0,u=t.indexOf("drag-all")>=0,c=t.indexOf("smooth-steps")>=0;if(o){if(2!==e.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Ii(e,e.start[1]-e.start[0])}if(l&&2!==e.handles)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(s&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:n||r,drag:i,dragAll:u,smoothSteps:c,fixed:o,snap:r,hover:a,unconstrained:s,invertConnects:l}}function Ui(e,t){if(!1!==t)if(!0===t||ti(t)){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(t)}else{if((t=li(t)).length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(e){if("boolean"!=typeof e&&!ti(e))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=t}}function Fi(e,t){if(t.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=t}function Hi(e,t){if(!ti(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=t}function Vi(e,t){if(!function(e){return ti(e)&&"function"==typeof e.from}(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=t}function Wi(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=t}function zi(e,t){e.documentElement=t}function qi(e,t){if("string"!=typeof t&&!1!==t)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function $i(e,t){if("object"!=typeof t)throw new Error("noUiSlider: 'cssClasses' must be an object.");"string"==typeof e.cssPrefix?(e.cssClasses={},Object.keys(t).forEach(function(n){e.cssClasses[n]=e.cssPrefix+t[n]})):e.cssClasses=t}function Ki(e){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:yi,format:yi},n={step:{r:!1,t:xi},keyboardPageMultiplier:{r:!1,t:ki},keyboardMultiplier:{r:!1,t:Ai},keyboardDefaultStep:{r:!1,t:Oi},start:{r:!0,t:Ci},connect:{r:!0,t:Ni},direction:{r:!0,t:ji},snap:{r:!1,t:Ti},animate:{r:!1,t:Di},animationDuration:{r:!1,t:Li},range:{r:!0,t:_i},orientation:{r:!1,t:Mi},margin:{r:!1,t:Ii},limit:{r:!1,t:Ri},padding:{r:!1,t:Pi},behaviour:{r:!0,t:Bi},ariaFormat:{r:!1,t:Hi},format:{r:!1,t:Vi},tooltips:{r:!1,t:Ui},keyboardSupport:{r:!0,t:Wi},documentElement:{r:!1,t:zi},cssPrefix:{r:!0,t:qi},cssClasses:{r:!0,t:$i},handleAttributes:{r:!1,t:Fi}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:wi,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(o){if(ii(e[o])||void 0!==i[o])n[o].t(t,ii(e[o])?e[o]:i[o]);else if(n[o].r)throw new Error("noUiSlider: '"+o+"' is required.")}),t.pips=e.pips;var o=document.createElement("div"),r=void 0!==o.style.msTransform,a=void 0!==o.style.transform;t.transformRule=a?"transform":r?"msTransform":"webkitTransform";return t.style=[["left","top"],["right","bottom"]][t.dir][t.ort],t}function Gi(e,t,n){var i,o,r,a,s,l,u,c=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},d=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}(),h=e,f=t.spectrum,p=[],m=[],v=[],g=0,b={},y=!1,w=e.ownerDocument,S=t.documentElement||w.documentElement,E=w.body,x="rtl"===w.dir||1===t.ort?0:100;function k(e,t){var n=w.createElement("div");return t&&ci(n,t),e.appendChild(n),n}function A(e,n){var i=k(e,t.cssClasses.origin),o=k(i,t.cssClasses.handle);if(k(o,t.cssClasses.touchArea),o.setAttribute("data-handle",String(n)),t.keyboardSupport&&(o.setAttribute("tabindex","0"),o.addEventListener("keydown",function(e){return function(e,n){if(C()||T(n))return!1;var i=["Left","Right"],o=["Down","Up"],r=["PageDown","PageUp"],a=["Home","End"];t.dir&&!t.ort?i.reverse():t.ort&&!t.dir&&(o.reverse(),r.reverse());var s,l=e.key.replace("Arrow",""),u=l===r[0],c=l===r[1],d=l===o[0]||l===i[0]||u,h=l===o[1]||l===i[1]||c,v=l===a[0],g=l===a[1];if(!(d||h||v||g))return!0;if(e.preventDefault(),h||d){var b=d?0:1,y=se(n)[b];if(null===y)return!1;!1===y&&(y=f.getDefaultStep(m[n],d,t.keyboardDefaultStep)),y*=c||u?t.keyboardPageMultiplier:t.keyboardMultiplier,y=Math.max(y,1e-7),y*=d?-1:1,s=p[n]+y}else s=g?t.spectrum.xVal[t.spectrum.xVal.length-1]:t.spectrum.xVal[0];return ne(n,f.toStepping(s),!0,!0),Y("slide",n),Y("update",n),Y("change",n),Y("set",n),!1}(e,n)})),void 0!==t.handleAttributes){var r=t.handleAttributes[n];Object.keys(r).forEach(function(e){o.setAttribute(e,r[e])})}return o.setAttribute("role","slider"),o.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),0===n?ci(o,t.cssClasses.handleLower):n===t.handles-1&&ci(o,t.cssClasses.handleUpper),i.handle=o,i}function O(e,n){return!!n&&k(e,t.cssClasses.connect)}function _(e,n){return!(!t.tooltips||!t.tooltips[n])&&k(e.firstChild,t.cssClasses.tooltip)}function C(){return h.hasAttribute("disabled")}function T(e){return r[e].hasAttribute("disabled")}function D(){l&&(G("update"+Si),l.forEach(function(e){e&&ni(e)}),l=null)}function L(){D(),l=r.map(_),K("update"+Si,function(e,n,i){if(l&&t.tooltips&&!1!==l[n]){var o=e[n];!0!==t.tooltips[n]&&(o=t.tooltips[n].to(i[n])),l[n].innerHTML=o}})}function N(e,t){return e.map(function(e){return f.fromStepping(t?f.getStep(e):e)})}function M(e){function t(e,t){return Number((e+t).toFixed(7))}var n,i=function(e){if(e.mode===Fn.Range||e.mode===Fn.Steps)return f.xVal;if(e.mode===Fn.Count){if(e.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var t=e.values-1,n=100/t,i=[];t--;)i[t]=t*n;return i.push(100),N(i,e.stepped)}return e.mode===Fn.Positions?N(e.values,e.stepped):e.mode===Fn.Values?e.stepped?e.values.map(function(e){return f.fromStepping(f.getStep(f.toStepping(e)))}):e.values:[]}(e),o={},r=f.xVal[0],a=f.xVal[f.xVal.length-1],s=!1,l=!1,u=0;return n=i.slice().sort(function(e,t){return e-t}),(i=n.filter(function(e){return!this[e]&&(this[e]=!0)},{}))[0]!==r&&(i.unshift(r),s=!0),i[i.length-1]!==a&&(i.push(a),l=!0),i.forEach(function(n,r){var a,c,d,h,p,m,v,g,b,y,w=n,S=i[r+1],E=e.mode===Fn.Steps;for(E&&(a=f.xNumSteps[r]),a||(a=S-w),void 0===S&&(S=w),a=Math.max(a,1e-7),c=w;c<=S;c=t(c,a)){for(g=(p=(h=f.toStepping(c))-u)/(e.density||1),y=p/(b=Math.round(g)),d=1;d<=b;d+=1)o[(m=u+d*y).toFixed(5)]=[f.fromStepping(m),0];v=i.indexOf(c)>-1?Hn.LargeValue:E?Hn.SmallValue:Hn.NoValue,!r&&s&&c!==S&&(v=0),c===S&&l||(o[h.toFixed(5)]=[c,v]),u=h}}),o}function I(e,n,i){var o,r,a=w.createElement("div"),s=((o={})[Hn.None]="",o[Hn.NoValue]=t.cssClasses.valueNormal,o[Hn.LargeValue]=t.cssClasses.valueLarge,o[Hn.SmallValue]=t.cssClasses.valueSub,o),l=((r={})[Hn.None]="",r[Hn.NoValue]=t.cssClasses.markerNormal,r[Hn.LargeValue]=t.cssClasses.markerLarge,r[Hn.SmallValue]=t.cssClasses.markerSub,r),u=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],c=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];function d(e,n){var i=n===t.cssClasses.value,o=i?s:l;return n+" "+(i?u:c)[t.ort]+" "+o[e]}return ci(a,t.cssClasses.pips),ci(a,0===t.ort?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical),Object.keys(e).forEach(function(o){!function(e,o,r){if((r=n?n(o,r):r)!==Hn.None){var s=k(a,!1);s.className=d(r,t.cssClasses.marker),s.style[t.style]=e+"%",r>Hn.NoValue&&((s=k(a,!1)).className=d(r,t.cssClasses.value),s.setAttribute("data-value",String(o)),s.style[t.style]=e+"%",s.innerHTML=String(i.to(o)))}}(o,e[o][0],e[o][1])}),a}function R(){s&&(ni(s),s=null)}function P(e){R();var t=M(e),n=e.filter,i=e.format||{to:function(e){return String(Math.round(e))}};return s=h.appendChild(I(t,n,i))}function j(){var e=i.getBoundingClientRect(),n="offset"+["Width","Height"][t.ort];return 0===t.ort?e.width||i[n]:e.height||i[n]}function B(e,n,i,o){var r=function(r){var a,s,l=function(e,t,n){var i=0===e.type.indexOf("touch"),o=0===e.type.indexOf("mouse"),r=0===e.type.indexOf("pointer"),a=0,s=0;0===e.type.indexOf("MSPointer")&&(r=!0);if("mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(i){var l=function(t){var i=t.target;return i===n||n.contains(i)||e.composed&&e.composedPath().shift()===n};if("touchstart"===e.type){var u=Array.prototype.filter.call(e.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(e.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}t=t||hi(w),(o||r)&&(a=e.clientX+t.x,s=e.clientY+t.y);return e.pageOffset=t,e.points=[a,s],e.cursor=o||r,e}(r,o.pageOffset,o.target||n);return!!l&&(!(C()&&!o.doNotReject)&&(a=h,s=t.cssClasses.tap,!((a.classList?a.classList.contains(s):new RegExp("\\b"+s+"\\b").test(a.className))&&!o.doNotReject)&&(!(e===c.start&&void 0!==l.buttons&&l.buttons>1)&&((!o.hover||!l.buttons)&&(d||l.preventDefault(),l.calcPoint=l.points[t.ort],void i(l,o))))))},a=[];return e.split(" ").forEach(function(e){n.addEventListener(e,r,!!d&&{passive:!0}),a.push([e,r])}),a}function U(e){var n,o,r,a,s,l,u=100*(e-(n=i,o=t.ort,r=n.getBoundingClientRect(),a=n.ownerDocument,s=a.documentElement,l=hi(a),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),o?r.top+l.y-s.clientTop:r.left+l.x-s.clientLeft))/j();return u=si(u),t.dir?100-u:u}function F(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&V(e,t)}function H(e,n){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==n.buttonsProperty)return V(e,n);var i=(t.dir?-1:1)*(e.calcPoint-n.startCalcPoint);Q(i>0,100*i/n.baseSize,n.locations,n.handleNumbers,n.connect)}function V(e,n){n.handle&&(di(n.handle,t.cssClasses.active),g-=1),n.listeners.forEach(function(e){S.removeEventListener(e[0],e[1])}),0===g&&(di(h,t.cssClasses.drag),te(),e.cursor&&(E.style.cursor="",E.removeEventListener("selectstart",oi))),t.events.smoothSteps&&(n.handleNumbers.forEach(function(e){ne(e,m[e],!0,!0,!1,!1)}),n.handleNumbers.forEach(function(e){Y("update",e)})),n.handleNumbers.forEach(function(e){Y("change",e),Y("set",e),Y("end",e)})}function W(e,n){if(!n.handleNumbers.some(T)){var i;if(1===n.handleNumbers.length)i=r[n.handleNumbers[0]].children[0],g+=1,ci(i,t.cssClasses.active);e.stopPropagation();var o=[],a=B(c.move,S,H,{target:e.target,handle:i,connect:n.connect,listeners:o,startCalcPoint:e.calcPoint,baseSize:j(),pageOffset:e.pageOffset,handleNumbers:n.handleNumbers,buttonsProperty:e.buttons,locations:m.slice()}),s=B(c.end,S,V,{target:e.target,handle:i,listeners:o,doNotReject:!0,handleNumbers:n.handleNumbers}),l=B("mouseout",S,F,{target:e.target,handle:i,listeners:o,doNotReject:!0,handleNumbers:n.handleNumbers});o.push.apply(o,a.concat(s,l)),e.cursor&&(E.style.cursor=getComputedStyle(e.target).cursor,r.length>1&&ci(h,t.cssClasses.drag),E.addEventListener("selectstart",oi,!1)),n.handleNumbers.forEach(function(e){Y("start",e)})}}function z(e){e.stopPropagation();var n=U(e.calcPoint),i=function(e){var t=100,n=!1;return r.forEach(function(i,o){if(!T(o)){var r=m[o],a=Math.abs(r-e);(a<t||a<=t&&e>r||100===a&&100===t)&&(n=o,t=a)}}),n}(n);!1!==i&&(t.events.snap||ai(h,t.cssClasses.tap,t.animationDuration),ne(i,n,!0,!0),te(),Y("slide",i,!0),Y("update",i,!0),t.events.snap?W(e,{handleNumbers:[i]}):(Y("change",i,!0),Y("set",i,!0)))}function q(e){var t=U(e.calcPoint),n=f.getStep(t),i=f.fromStepping(n);Object.keys(b).forEach(function(e){"hover"===e.split(".")[0]&&b[e].forEach(function(e){e.call(ue,i)})})}function $(e){e.fixed||r.forEach(function(e,t){B(c.start,e.children[0],W,{handleNumbers:[t]})}),e.tap&&B(c.start,i,z,{}),e.hover&&B(c.move,i,q,{hover:!0}),e.drag&&a.forEach(function(n,i){if(!1!==n&&0!==i&&i!==a.length-1){var o=r[i-1],s=r[i],l=[n],u=[o,s],d=[i-1,i];ci(n,t.cssClasses.draggable),e.fixed&&(l.push(o.children[0]),l.push(s.children[0])),e.dragAll&&(u=r,d=v),l.forEach(function(e){B(c.start,e,W,{handles:u,handleNumbers:d,connect:n})})}})}function K(e,t){b[e]=b[e]||[],b[e].push(t),"update"===e.split(".")[0]&&r.forEach(function(e,t){Y("update",t)})}function G(e){var t=e&&e.split(".")[0],n=t?e.substring(t.length):e;Object.keys(b).forEach(function(e){var i=e.split(".")[0],o=e.substring(i.length);t&&t!==i||n&&n!==o||function(e){return e===Ei||e===Si}(o)&&n!==o||delete b[e]})}function Y(e,n,i){Object.keys(b).forEach(function(o){var r=o.split(".")[0];e===r&&b[o].forEach(function(e){e.call(ue,p.map(t.format.to),n,p.slice(),i||!1,m.slice(),ue)})})}function X(e,n,i,o,a,s,l){var u;return r.length>1&&!t.events.unconstrained&&(o&&n>0&&(u=f.getAbsoluteDistance(e[n-1],t.margin,!1),i=Math.max(i,u)),a&&n<r.length-1&&(u=f.getAbsoluteDistance(e[n+1],t.margin,!0),i=Math.min(i,u))),r.length>1&&t.limit&&(o&&n>0&&(u=f.getAbsoluteDistance(e[n-1],t.limit,!1),i=Math.min(i,u)),a&&n<r.length-1&&(u=f.getAbsoluteDistance(e[n+1],t.limit,!0),i=Math.max(i,u))),t.padding&&(0===n&&(u=f.getAbsoluteDistance(0,t.padding[0],!1),i=Math.max(i,u)),n===r.length-1&&(u=f.getAbsoluteDistance(100,t.padding[1],!0),i=Math.min(i,u))),l||(i=f.getStep(i)),!((i=si(i))===e[n]&&!s)&&i}function J(e,n){var i=t.ort;return(i?n:e)+", "+(i?e:n)}function Q(e,n,i,o,r){var a=i.slice(),s=o[0],l=t.events.smoothSteps,u=[!e,e],c=[e,!e];o=o.slice(),e&&o.reverse(),o.length>1?o.forEach(function(e,t){var i=X(a,e,a[e]+n,u[t],c[t],!1,l);!1===i?n=0:(n=i-a[e],a[e]=i)}):u=c=[!0];var d=!1;o.forEach(function(e,t){d=ne(e,i[e]+n,u[t],c[t],!1,l)||d}),d&&(o.forEach(function(e){Y("update",e),Y("slide",e)}),null!=r&&Y("drag",s))}function Z(e,n){return t.dir?100-e-n:e}function ee(e,n){m[e]=n,p[e]=f.fromStepping(n);var i="translate("+J(Z(n,0)-x+"%","0")+")";if(r[e].style[t.transformRule]=i,t.events.invertConnects&&m.length>1){var o=m.every(function(e,t,n){return 0===t||e>=n[t-1]});if(y!==!o)return y=!y,Ni(t,t.connect.map(function(e){return!e})),void le()}ie(e),ie(e+1),y&&(ie(e-1),ie(e+2))}function te(){v.forEach(function(e){var t=m[e]>50?-1:1,n=3+(r.length+t*e);r[e].style.zIndex=String(n)})}function ne(e,t,n,i,o,r){return o||(t=X(m,e,t,n,i,!1,r)),!1!==t&&(ee(e,t),!0)}function ie(e){if(a[e]){var n=m.slice();y&&n.sort(function(e,t){return e-t});var i=0,o=100;0!==e&&(i=n[e-1]),e!==a.length-1&&(o=n[e]);var r=o-i,s="translate("+J(Z(i,r)+"%","0")+")",l="scale("+J(r/100,"1")+")";a[e].style[t.transformRule]=s+" "+l}}function oe(e,n){return null===e||!1===e||void 0===e?m[n]:("number"==typeof e&&(e=String(e)),!1!==(e=t.format.from(e))&&(e=f.toStepping(e)),!1===e||isNaN(e)?m[n]:e)}function re(e,n,i){var o=li(e),r=void 0===m[0];n=void 0===n||n,t.animate&&!r&&ai(h,t.cssClasses.tap,t.animationDuration),v.forEach(function(e){ne(e,oe(o[e],e),!0,!1,i)});var a=1===v.length?0:1;if(r&&f.hasNoSize()&&(i=!0,m[0]=0,v.length>1)){var s=100/(v.length-1);v.forEach(function(e){m[e]=e*s})}for(;a<v.length;++a)v.forEach(function(e){ne(e,m[e],!0,!0,i)});te(),v.forEach(function(e){Y("update",e),null!==o[e]&&n&&Y("set",e)})}function ae(e){if(void 0===e&&(e=!1),e)return 1===p.length?p[0]:p.slice(0);var n=p.map(t.format.to);return 1===n.length?n[0]:n}function se(e){var n=m[e],i=f.getNearbySteps(n),o=p[e],r=i.thisStep.step,a=null;if(t.snap)return[o-i.stepBefore.startValue||null,i.stepAfter.startValue-o||null];!1!==r&&o+r>i.stepAfter.startValue&&(r=i.stepAfter.startValue-o),a=o>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&o-i.stepBefore.highestStep,100===n?r=null:0===n&&(a=null);var s=f.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,r]}function le(){for(;o.firstChild;)o.removeChild(o.firstChild);for(var e=0;e<=t.handles;e++)a[e]=O(o,t.connect[e]),ie(e);$({drag:t.events.drag,fixed:!0})}ci(u=h,t.cssClasses.target),0===t.dir?ci(u,t.cssClasses.ltr):ci(u,t.cssClasses.rtl),0===t.ort?ci(u,t.cssClasses.horizontal):ci(u,t.cssClasses.vertical),ci(u,"rtl"===getComputedStyle(u).direction?t.cssClasses.textDirectionRtl:t.cssClasses.textDirectionLtr),i=k(u,t.cssClasses.base),function(e,n){o=k(n,t.cssClasses.connects),r=[],(a=[]).push(O(o,e[0]));for(var i=0;i<t.handles;i++)r.push(A(n,i)),v[i]=i,a.push(O(o,e[i+1]))}(t.connect,i),$(t.events),re(t.start),t.pips&&P(t.pips),t.tooltips&&L(),G("update"+Ei),K("update"+Ei,function(e,n,i,o,a){v.forEach(function(e){var n=r[e],o=X(m,e,0,!0,!0,!0),s=X(m,e,100,!0,!0,!0),l=a[e],u=String(t.ariaFormat.to(i[e]));o=f.fromStepping(o).toFixed(1),s=f.fromStepping(s).toFixed(1),l=f.fromStepping(l).toFixed(1),n.children[0].setAttribute("aria-valuemin",o),n.children[0].setAttribute("aria-valuemax",s),n.children[0].setAttribute("aria-valuenow",l),n.children[0].setAttribute("aria-valuetext",u)})});var ue={destroy:function(){for(G(Ei),G(Si),Object.keys(t.cssClasses).forEach(function(e){di(h,t.cssClasses[e])});h.firstChild;)h.removeChild(h.firstChild);delete h.noUiSlider},steps:function(){return v.map(se)},on:K,off:G,get:ae,set:re,setHandle:function(e,t,n,i){if(!((e=Number(e))>=0&&e<v.length))throw new Error("noUiSlider: invalid handle number, got: "+e);ne(e,oe(t,e),!0,!0,i),Y("update",e),n&&Y("set",e)},reset:function(e){re(t.start,e)},disable:function(e){null!=e?(r[e].setAttribute("disabled",""),r[e].handle.removeAttribute("tabindex")):(h.setAttribute("disabled",""),r.forEach(function(e){e.handle.removeAttribute("tabindex")}))},enable:function(e){null!=e?(r[e].removeAttribute("disabled"),r[e].handle.setAttribute("tabindex","0")):(h.removeAttribute("disabled"),r.forEach(function(e){e.removeAttribute("disabled"),e.handle.setAttribute("tabindex","0")}))},__moveHandles:function(e,t,n){Q(e,t,m,n)},options:n,updateOptions:function(e,i){var o=ae(),r=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];r.forEach(function(t){void 0!==e[t]&&(n[t]=e[t])});var a=Ki(n);r.forEach(function(n){void 0!==e[n]&&(t[n]=a[n])}),f=a.spectrum,t.margin=a.margin,t.limit=a.limit,t.padding=a.padding,t.pips?P(t.pips):R(),t.tooltips?L():D(),m=[],re(ii(e.start)?e.start:o,i),e.connect&&le()},target:h,removePips:R,removeTooltips:D,getPositions:function(){return m.slice()},getTooltips:function(){return l},getOrigins:function(){return r},pips:P};return ue}var Yi={__spectrum:bi,cssClasses:wi,create:function(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var n=Gi(e,Ki(t),t);return e.noUiSlider=n,n}},Xi={start:[0],connect:!1,range:{min:0,max:100},cssPrefix:"range-slider",cssClasses:{target:"__target",base:"__base",origin:"__origin",handle:"__handle",handleLower:"__handle--lower",handleUpper:"__handle--upper",touchArea:"__touch-area",horizontal:"--horizontal",vertical:"--vertical",background:"__background",connect:"__connect",connects:"__connects",ltr:"--ltr",rtl:"--rtl",draggable:"--draggable",drag:"--state-drag",tap:"--state-tap",active:"--active",tooltip:"__tooltip",pips:"__pips",pipsHorizontal:"__pips--horizontal",pipsVertical:"__pips--vertical",marker:"__marker",markerHorizontal:"__marker--horizontal",markerVertical:"__marker--vertical",markerNormal:"__marker--normal",markerLarge:"__marker--large",markerSub:"__marker--sub",value:"__value",valueHorizontal:"__value--horizontal",valueVertical:"__value--vertical",valueNormal:"__value--normal",valueLarge:"__value--large",valueSub:"__value--sub"},format:{decimals:0}},Ji=function(){return i(function e(n,i){var o=this;return t(this,e),this.handleSliderUpdate=function(e,t){var n=e[t];if(o.inputs[t]&&(o.inputs[t].value=n),o.outputs[t]){var i=o.outputs[t];i&&i.format?i.element.innerText=i.format.to(o.config.format.from(n)):i&&(i.element.innerText=n)}},this.element=n,this.config=Object.assign(Object.assign({},Xi),i),this.inputs=[],this.outputs=[],this.handleSliderUpdate=this.handleSliderUpdate.bind(this),this.element.ODS_RangeSlider=this,this.init(),this},[{key:"init",value:function(){var e,t=this,n=this.element.getAttribute("data-rangeslider-config"),i={};if(n)try{i=JSON.parse(n)}catch(e){}if(this.config=Object.assign(Object.assign({},this.config),i),this.config.format=f(this.config.format),this.element.noUiSlider&&(this.element.noUiSlider=void 0,(null===(e=this.instance)||void 0===e?void 0:e.destroy)&&this.instance.destroy()),!this.config.range)throw new Error("RangeSlider config must include 'range'.");this.instance=Yi.create(this.element,this.config),this.inputs=Array.from(document.querySelectorAll("input[name^=".concat(this.element.getAttribute("id"),"-]"))),this.outputs=this.inputs.map(function(e){var t=document.getElementById("".concat(e.getAttribute("id"),"-output"));if(t){var n=t.getAttribute("data-format");return{element:t,format:t.hasAttribute("data-format")&&n?f(JSON.parse(n)):void 0}}return!1}),this.instance.on("update",function(e,n){t.handleSliderUpdate(e.map(String),n)})}},{key:"update",value:function(){var e;null===(e=this.instance)||void 0===e||e.destroy(),this.init()}},{key:"destroy",value:function(){var e,t;null===(e=this.instance)||void 0===e||e.off("update"),null===(t=this.instance)||void 0===t||t.destroy(),this.element.ODS_RangeSlider=null}}],[{key:"getInstance",value:function(e){return e&&e.ODS_RangeSlider?e.ODS_RangeSlider:null}}])}(),Qi={expandButtonSelector:"[data-subrow-toggle]",scrollableContainerSelector:".table-scrollable",responsiveTableSelector:'[data-table="responsive"]'},Zi=function(){return i(function e(n,i){var o=this;return t(this,e),this.element=n,this.config=Object.assign(Object.assign({},Qi),i),this.addRole=this.addRole.bind(this),this.addARIA=this.addARIA.bind(this),this.onExpandClick=this.onExpandClick.bind(this),this.expandButtons=[],this.scrollableContainer=null,this.element.ODS_Table=this,this.resizeObserver=new ResizeObserver(function(e){if(o.scrollableContainer){var t=o.scrollableContainer.getBoundingClientRect();e.forEach(function(e){var n,i;e.contentRect.width>t.width?null===(n=o.scrollableContainer)||void 0===n||n.setAttribute("tabindex","0"):null===(i=o.scrollableContainer)||void 0===i||i.removeAttribute("tabindex")})}}),this.init(),this},[{key:"addRole",value:function(e,t){Array.from(this.element.querySelectorAll(e)).forEach(function(e){e.setAttribute("role",t)})}},{key:"addARIA",value:function(){try{this.element.setAttribute("role","table"),this.addRole("thead, tbody, tfoot","rowgroup"),this.addRole("tr","row"),this.addRole("td","cell"),this.addRole("th","columnheader"),this.addRole("th[scope=row]","rowheader")}catch(e){console.log("Table.addARIA(): "+e)}}},{key:"onExpandClick",value:function(e){var t,n=e.currentTarget,i=null!==(t=n.getAttribute("aria-controls"))&&void 0!==t?t:"",o=this.element.querySelectorAll(i.split(" ").map(function(e){return"#".concat(e)}).join(","));y({element:n,attribute:"aria-expanded"}),o.forEach(function(e){y({element:e,attribute:"hidden"})})}},{key:"init",value:function(){var e=this;this.expandButtons=Array.from(this.element.querySelectorAll(this.config.expandButtonSelector)),this.expandButtons.forEach(function(t){t.addEventListener("click",e.onExpandClick)}),this.element.matches(this.config.responsiveTableSelector)&&this.addARIA(),this.maybeInitScrollable()}},{key:"maybeInitScrollable",value:function(){if(this.scrollableContainer=this.element.closest(this.config.scrollableContainerSelector),this.scrollableContainer)return this.resizeObserver.observe(this.element),!0}},{key:"destroy",value:function(){var e=this;this.expandButtons.forEach(function(t){t.removeEventListener("click",e.onExpandClick)}),this.resizeObserver.disconnect(),this.expandButtons=[]}},{key:"update",value:function(){this.destroy(),this.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Table?e.ODS_Table:null}}])}(),eo={tabSelector:'[role="tab"]'},to=function(){return i(function e(n,i){return t(this,e),this.isActive=function(e){return!!e&&!e.hasAttribute("hidden")},this.isSelected=function(e){return"true"===e.getAttribute("aria-selected")},this.element=n,this.config=Object.assign(Object.assign({},eo),i),this.tabs=[],this.tabPanels=[],this.activeTabIndex=null,this.rovingTabindex=null,this.handleClick=this.handleClick.bind(this),this.handleTabFocus=this.handleTabFocus.bind(this),this.element.ODS_Tabs=this,this.init(),this},[{key:"init",value:function(){var e=this;this.tabs=Array.from(this.element.querySelectorAll(this.config.tabSelector)),this.tabs.map(function(t,n){var i=t.getAttribute("aria-controls");return e.tabPanels.push(i?document.getElementById(i):null),t.addEventListener("click",e.handleClick),t.addEventListener("focus",e.handleTabFocus),e.isSelected(t)&&(e.activeTabIndex=n),t}),this.rovingTabindex?this.rovingTabindex.update(this.tabs):this.rovingTabindex=new v(this.tabs,{direction:"any"}),null!==this.activeTabIndex?this.toggleTabPanel(this.tabPanels[this.activeTabIndex],"on"):this.tabs.length>0&&this.activateNthTab(0)}},{key:"destroy",value:function(){var e=this;this.tabs.map(function(t){return t.removeEventListener("click",e.handleClick),t.removeEventListener("focus",e.handleTabFocus),t}),this.tabs=[],this.tabPanels=[],this.rovingTabindex&&this.rovingTabindex.destroy(),this.element.ODS_Tabs=null}},{key:"update",value:function(){this.destroy(),this.init()}},{key:"handleClick",value:function(e){var t=this,n=e.currentTarget;n.hasAttribute("aria-disabled")?e.preventDefault():(this.tabs.map(function(e,i){return e===n?(t.activeTabIndex=i,t.toggleTab(e,"on")):t.toggleTab(e,"off")}),this.tabPanels.map(function(e){return e&&e.getAttribute("id")===n.getAttribute("aria-controls")?t.toggleTabPanel(e,"on"):t.toggleTabPanel(e,"off")}))}},{key:"toggleTab",value:function(e,t){var n=this.isSelected(e);"on"!==t||n||(e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0")),"off"===t&&n&&(e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1"))}},{key:"toggleTabPanel",value:function(e,t){if(e){var n=this.isActive(e);"on"!==t||n||e.removeAttribute("hidden"),"off"===t&&n&&e.setAttribute("hidden","")}}},{key:"activateNthTab",value:function(e){var t=this;this.tabs.map(function(n,i){return i===e?(t.activeTabIndex=i,t.toggleTab(n,"on")):t.toggleTab(n,"off")}),this.tabPanels.map(function(n,i){return i===e?t.toggleTabPanel(n,"on"):t.toggleTabPanel(n,"off")})}},{key:"handleTabFocus",value:function(){this.rovingTabindex&&!this.rovingTabindex.isActive&&this.rovingTabindex.init()}}],[{key:"getInstance",value:function(e){return e&&e.ODS_Tabs?e.ODS_Tabs:null}}])}(),no={nonEditableInput:!1,min:1,max:999,defaultValue:1},io=function(){return i(function e(n,i){t(this,e),this.element=n,this.config=Object.assign(Object.assign({},no),i),this.input=null,this.numberDisplay=null,this.add=null,this.remove=null,this.element.ODS_InputStepper=this,this.handleButtonClick=this.handleButtonClick.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleButtonState=this.handleButtonState.bind(this),this.init()},[{key:"handleInputClick",value:function(){this.input&&this.input.select()}},{key:"handleButtonState",value:function(){var e,t,n,i,o=this.config,r=o.min,a=o.max,s=this.config.nonEditableInput?parseInt(null!==(i=null===(n=this.numberDisplay)||void 0===n?void 0:n.textContent)&&void 0!==i?i:"0",10):parseInt(null!==(t=null===(e=this.input)||void 0===e?void 0:e.value)&&void 0!==t?t:"0",10);this.add&&"number"==typeof a&&s>=a?(this.add.setAttribute("aria-disabled","true"),this.add.setAttribute("disabled","true")):this.add&&(this.add.removeAttribute("aria-disabled"),this.add.removeAttribute("disabled")),this.remove&&"number"==typeof r&&s<=r?(this.remove.setAttribute("aria-disabled","true"),this.remove.setAttribute("disabled","true")):this.remove&&(this.remove.removeAttribute("aria-disabled"),this.remove.removeAttribute("disabled"))}},{key:"handleInputChange",value:function(e){var t=this.config,n=t.min,i=t.max,o=e.target;o&&(n&&Number(o.value)<=n&&(o.value=String(n)),i&&Number(o.value)>=i&&(o.value=String(i)))}},{key:"handleButtonClick",value:function(e){var t,n,i,o,r=this.config,a=r.min,s=r.max,l=e.target,u=this.config.nonEditableInput?parseInt(null!==(o=null===(i=this.numberDisplay)||void 0===i?void 0:i.textContent)&&void 0!==o?o:"0",10):parseInt(null!==(n=null===(t=this.input)||void 0===t?void 0:t.value)&&void 0!==n?n:"0",10);if(l.classList.contains("input-stepper__button--minus")){if(a&&u<=a){if("true"===l.getAttribute("disabled"))return;return l.setAttribute("aria-disabled","true"),void l.setAttribute("disabled","true")}u-=1}if(l.classList.contains("input-stepper__button--plus")){if(s&&u>=s){if("true"===l.getAttribute("disabled"))return;return l.setAttribute("aria-disabled","true"),void l.setAttribute("disabled","true")}u+=1}!this.config.nonEditableInput&&this.input?this.input.value=String(u):this.numberDisplay&&(this.numberDisplay.textContent=String(u)),this.handleButtonState()}},{key:"init",value:function(){var e=this.element.getAttribute("data-inputstepper"),t={};try{e&&e.trim().startsWith("{")&&(t=JSON.parse(e))}catch(e){t={}}this.config=Object.assign(Object.assign({},this.config),t),this.config.nonEditableInput?(this.numberDisplay=this.element.querySelector(".input-stepper__number"),this.numberDisplay&&(this.numberDisplay.textContent=String(this.config.defaultValue))):(this.input=this.element.querySelector(".input-stepper__field"),this.input&&(this.input.value=String(this.config.defaultValue))),this.add=this.element.querySelector(".input-stepper__button--plus"),this.remove=this.element.querySelector(".input-stepper__button--minus");var n=this.config.defaultValue;void 0!==n&&(!this.config.nonEditableInput&&this.input?this.input.value=String(n):this.numberDisplay&&(this.numberDisplay.textContent=String(n))),this.element.classList.contains("input-stepper--disabled")||(this.add&&this.add.addEventListener("click",this.handleButtonClick),this.remove&&this.remove.addEventListener("click",this.handleButtonClick),!this.config.nonEditableInput&&this.input&&(this.input.addEventListener("click",this.handleInputClick),this.input.addEventListener("change",this.handleInputChange)),this.handleButtonState())}},{key:"update",value:function(){this.destroy(),this.init()}},{key:"destroy",value:function(){!this.config.nonEditableInput&&this.input&&(this.input.removeEventListener("click",this.handleInputClick),this.input.removeEventListener("change",this.handleInputChange)),this.add&&this.add.removeEventListener("click",this.handleButtonClick),this.remove&&this.remove.removeEventListener("click",this.handleButtonClick)}}],[{key:"getInstance",value:function(e){return e&&e.ODS_InputStepper?e.ODS_InputStepper:null}}])}();var oo=[{Module:E,name:"Accordion",selector:"[data-accordion]"},{Module:_,name:"Autocomplete",selector:"[data-autocomplete]"},{Module:dt,name:"Dropdown",selector:"[data-dropdown]"},{Module:T,name:"BlockAction",selector:"[data-block-action]"},{Module:ut,name:"Carousel",selector:"[data-carousel]"},{Module:ft,name:"FeatureAccordion",selector:"[data-feature-accordion]"},{Module:Sn,name:"File",selector:"[data-file-input]"},{Module:xn,name:"Loader",selector:"[data-loader]"},{Module:ei,name:"Modal",selector:"[data-modal]"},{Module:function(){return i(function e(n){t(this,e),this.element=n,this.children=null,this.updateHeight=this.updateHeight.bind(this),this.element.ODS_SameHeight=this,this.intervalId=null,this.init()},[{key:"temporarilyShowHiddenElements",value:function(){var e=this;this.originalDisplayStates=[],this.children.forEach(function(t){var n=t.closest('[role="tabpanel"]'),i=t.closest('[role="dialog"]');n&&n.hasAttribute("hidden")&&(e.originalDisplayStates.push({element:n,display:n.style.display}),n.style.display="block",n.removeAttribute("hidden")),i&&i.hasAttribute("aria-hidden")&&(e.originalDisplayStates.push({element:i,display:i.style.display}),i.style.display="block",i.removeAttribute("aria-hidden"))})}},{key:"restoreHiddenElements",value:function(){this.originalDisplayStates.forEach(function(e){var t=e.element,n=e.display;t.style.display=n,"tabpanel"===t.getAttribute("role")?t.setAttribute("hidden",!0):"dialog"===t.getAttribute("role")&&t.setAttribute("aria-hidden",!0)})}},{key:"updateHeight",value:function(){this.temporarilyShowHiddenElements();for(var e=this.element.querySelectorAll('[data-same-height-child="true"]'),t=this.groupElementsByTypeAndPosition(e),n=0,i=Object.entries(t);n<i.length;n++){var s=r(i[n],2)[1],l=[],u=[];if(s.length){var c,d=s[0].getBoundingClientRect().top,h=o(s);try{for(h.s();!(c=h.n()).done;){var f=c.value;f.getBoundingClientRect().top===d?u.push(f):(l.push(a(u)),(u=[]).push(f)),d=f.getBoundingClientRect().top}}catch(e){h.e(e)}finally{h.f()}l.push(a(u)),l.forEach(function(e){if(e.length>1){var t=0;e.forEach(function(e){e&&(e.style.height&&(e.style.height=""),e.offsetHeight>t&&(t=e.offsetHeight))}),e.forEach(function(e){e.style.height=t+"px"})}else e.forEach(function(e){e.style.height&&(e.style.height=null)})})}}this.restoreHiddenElements()}},{key:"groupElementsByTypeAndPosition",value:function(e){var t={};return e.forEach(function(e){var n=e.getAttribute("data-same-height-group")||"default";t[n]||(t[n]=[]),t[n].push(e)}),t}},{key:"init",value:function(){var e=this,t=[];if(this.children=this.element.querySelectorAll('[data-same-height-child="true"]'),this.children.forEach(function(e){e.querySelectorAll("img").forEach(function(e){e.complete||t.push(e)})}),0===t.length)this.updateHeight();else{var n=0;this.intervalId=setInterval(function(){var i=!1;t.forEach(function(e,t,n){e.complete&&(n.splice(t,1),i=!0)}),i&&e.updateHeight&&e.updateHeight(),(++n>=15||0===t.length)&&(t.length&&e.updateHeight&&e.updateHeight(),window.clearInterval(e.intervalId))},400)}window.addEventListener("resize",this.updateHeight)}},{key:"update",value:function(){this.destroy(),this.init()}},{key:"destroy",value:function(){window.removeEventListener("resize",this.updateHeight),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}],[{key:"getInstance",value:function(e){return e&&e.ODS_SameHeight?e.ODS_SameHeight:null}}])}(),name:"SameHeight",selector:"[data-same-height]"},{Module:Ji,name:"RangeSlider",selector:"[data-rangeslider]"},{Module:io,name:"InputStepper",selector:"[data-inputstepper]"},{Module:Zi,name:"Table",selector:"[data-table]"},{Module:to,name:"Tabs",selector:"[data-tabs]"},{Module:b,name:"Toggle",selector:"[data-toggle]"},{Module:Xe,name:"Tooltip",selector:"[data-tooltip]"}];window.ODS=window.ODS||{modules:{},instances:{},moduleSelectorPairs:{}},window.ODS.initModulesWithin=function(e){var t={};return window.ODS.moduleSelectorPairs.forEach(function(n){var i=p(n.name),o=Array.from(e.querySelectorAll(n.selector));window&&window.ODS&&window.ODS.instances[i]&&window.ODS.instances[i].forEach(function(e){o.forEach(function(t,n){t.isSameNode(e.element)&&o.splice(n,1)})}),o.length&&(Array.isArray(window.ODS.instances[i])||(window.ODS.instances[i]=[]),t[i]=o.map(function(e){return new n.Module(e)}),window.ODS.instances[i]=[].concat(a(window.ODS.instances[i]),a(t[i])))}),t},window.ODS.destroyModulesWithin=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return Object.keys(window.ODS.instances).forEach(function(i){window.ODS.instances[i].forEach(function(o){"object"!==l(n[i])&&(n[i]=[]);var r,a=e.contains(o.element);"modal"===i?a=null===(r=o.instance)||void 0===r?void 0:r._openers.every(function(t){return e.contains(t)}):"tooltip"===i&&(a=e.contains(o.trigger));a&&(o.destroy(),n[i].push(o)),a&&t&&["modal","tooltip"].includes(i)&&o.element.remove()}),window.ODS.instances[i]=window.ODS.instances[i].filter(function(e){return!n[i].includes(e)})}),n},window.ODS.moduleSelectorPairs=oo,window.addEventListener("DOMContentLoaded",function(){console.log("ODS modules loaded"),oo.forEach(function(e){window.ODS.modules[e.name]=e.Module,window.ODS.instances[p(e.name)]=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Array.from(document.querySelectorAll(t)).map(function(t){return new e(t,n)})}(e.Module,e.selector)}),window.dispatchEvent(new Event("ODSLoaded"))});export{oo as moduleSelectorPairs};
|
|
2446
8
|
//# sourceMappingURL=scripts.js.map
|