From dd7d563e7991775b8c3999e727d947a9484ee98b Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 22 Nov 2026 22:40:17 +1100 Subject: [PATCH] Zensical Refactor (#300) * refactor into zensical * adjust nav layout * more nav changes * update features page * open external hero links in new tab * consolidate small pages * add legacy page redirects * tweak content * further cleanup * adjust netlify config * disable redirect * remove redirect script * fix tag splitting for plugins * Display plugin metadata on left-hand side * revert icon changes * move gallery to index page * Add page deascriptions * fix image size for carousel * adjust theme --- .github/collect_plugin.py | 11 +- .github/get_stats.py | 12 +- .github/workflows/deploy.yml | 30 +- .gitignore | 22 +- 404.md | 13 - Gemfile | 13 - Gemfile.lock | 187 - README.md | 77 +- _config.yml | 88 - _data/ctas/end.yml | 4 - _data/ctas/learn.yml | 5 - _data/ctas/newsletter.yml | 5 - _data/for_business.yml | 12 - _data/for_edu.yml | 12 - _data/for_maker.yml | 12 - _data/functions/extras.yml | 10 - _data/functions/general.yml | 19 - _data/general/footer.yml | 38 - _data/general/stats.yml | 16 - _drafts/2022-12-30-release-highlights.md | 9 - .../_news/2022-12-30-new-features-in-0.9.0.md | 7 - _includes/base/footer.html | 48 - _includes/base/head.html | 18 - _includes/base/header.html | 23 - _includes/block/cta.html | 17 - _includes/block/features.html | 39 - _includes/block/functions.html | 34 - _includes/block/hero.html | 60 - _includes/block/plugins.html | 19 - _includes/block/stats.html | 19 - _includes/block/team.html | 37 - _includes/fnc/link.html | 18 - _includes/partial/alert.html | 11 - _includes/partial/publisher_link.html | 3 - _includes/partial/publisher_ref.html | 7 - _includes/plugin_card.html | 20 - _includes/testimonials.html | 37 - _layouts/alternatives.html | 20 - _layouts/collection/collection_base.html | 21 - _layouts/collection/collection_index.html | 22 - _layouts/collection/collection_refpage.html | 53 - _layouts/collection/news.html | 5 - _layouts/collection/post.html | 5 - _layouts/content.html | 10 - _layouts/default.html | 19 - _layouts/empty.html | 1 - _layouts/plugin.html | 109 - _layouts/publisher.html | 57 - _layouts/user.html | 19 - _news/2023-06-26-0.12.0.md | 8 - _news/2023-07-13-0.12.1.md | 8 - _news/2023-09-26-kicad-integration.md | 0 _news/2023-12-15-0.13.0.md | 11 - _news/2026-04-07-1.2.7.md | 8 - _plugins/LICENSE | 21 - _plugins/author_permalink.rb | 9 - _plugins/hook-add-last-modified-date.rb | 22 - _plugins/humanize.rb | 258 -- _posts/2021-10-25-starting.md | 7 - _publishers/lippoliv.md | 7 - _publishers/matmair.md | 7 - _publishers/melektron.md | 7 - _publishers/piramja.md | 6 - about/index.md | 30 - about/team.html | 33 - alternatives/index.md | 17 - assets/back.svg | 1 - assets/github.svg | 1 - assets/index.css | 119 - assets/info.svg | 1 - assets/learn.svg | 1 - assets/mastodon.svg | 10 - assets/reddit.svg | 1 - assets/rss.svg | 74 - assets/splide/css/splide-core.min.css | 1 - .../splide/css/themes/splide-default.min.css | 1 - .../css/themes/splide-sea-green.min.css | 1 - .../splide/css/themes/splide-skyblue.min.css | 1 - assets/splide/js/splide-renderer.min.js | 2 - assets/splide/js/splide-renderer.min.js.map | 1 - assets/splide/js/splide.cjs.js | 3721 ----------------- assets/splide/js/splide.esm.js | 3644 ---------------- assets/splide/js/splide.js | 3122 -------------- assets/splide/js/splide.min.js.gz | Bin 12685 -> 0 bytes assets/splide/js/splide.min.js.map | 1 - assets/splide/js/utils/splide-utils.cjs.js | 379 -- assets/splide/js/utils/splide-utils.esm.js | 312 -- assets/splide/types/index.d.ts | 1674 -------- assets/twitter.svg | 10 - blog.html | 7 - categories.html | 7 - contribute.md | 65 - data/functions.yml | 133 + data/stats.yml | 16 + {_data => data}/team.yml | 3 +- demo.md | 27 - deploy.md | 30 - digitalocean.md | 20 - docs/.authors.yml | 13 + CNAME => docs/CNAME | 0 docs/about.md | 42 + docs/about/team.md | 26 + docs/alternatives.md | 33 + .../assets}/appgallery/screen_1.png | Bin .../assets}/appgallery/screen_10.jpg | Bin .../assets}/appgallery/screen_11.jpg | Bin .../assets}/appgallery/screen_12.jpg | Bin .../assets}/appgallery/screen_13.jpg | Bin .../assets}/appgallery/screen_14.jpg | Bin .../assets}/appgallery/screen_15.png | Bin .../assets}/appgallery/screen_2.jpg | Bin .../assets}/appgallery/screen_3.jpg | Bin .../assets}/appgallery/screen_4.jpg | Bin .../assets}/appgallery/screen_5.jpg | Bin .../assets}/appgallery/screen_6.jpg | Bin .../assets}/appgallery/screen_7.jpg | Bin .../assets}/appgallery/screen_8.jpg | Bin .../assets}/appgallery/screen_9.jpg | Bin .../assets}/blog/2022-11-22-translation.png | Bin .../assets}/blog/barcode_po_actions.png | Bin .../assets}/blog/barcode_scanner.jpeg | Bin {assets => docs/assets}/blog/bom-pricing.png | Bin .../assets}/blog/db_update_compose.png | Bin .../assets}/blog/db_update_data.png | Bin .../assets}/blog/db_update_docker.png | Bin .../assets}/blog/db_update_env.png | Bin .../assets}/blog/db_update_new_inventree.png | Bin .../assets}/blog/db_update_new_postgres.png | Bin .../assets}/blog/db_update_new_versions.png | Bin .../assets}/blog/db_update_old_versions.png | Bin .../assets}/blog/digikey-barcode.png | Bin .../assets}/blog/docker-a-record.png | Bin .../assets}/blog/docker-access.png | Bin .../assets}/blog/docker-compose-ps.png | Bin .../assets}/blog/docker-compose-up.png | Bin .../assets}/blog/docker-droplet.png | Bin {assets => docs/assets}/blog/docker-env.png | Bin {assets => docs/assets}/blog/docker-in.png | Bin {assets => docs/assets}/blog/docker-login.png | Bin .../assets}/blog/docker-success.png | Bin {assets => docs/assets}/blog/news-reader.png | Bin {assets => docs/assets}/blog/print-labels.png | Bin .../assets}/blog/printer-dialog.png | Bin .../assets}/blog/select-labels.png | Bin {assets => docs/assets}/blog/world-map.png | Bin {assets/icon => docs/assets}/favicon.ico | Bin {assets => docs/assets}/front.png | Bin .../assets}/icon/android-chrome-192x192.png | Bin .../assets}/icon/android-chrome-512x512.png | Bin .../assets}/icon/apple-touch-icon.png | Bin .../assets}/icon/favicon-16x16.png | Bin .../assets}/icon/favicon-32x32.png | Bin {assets => docs/assets}/icon/site.webmanifest | 0 {assets => docs/assets}/logo.png | Bin .../2022-04-23-news-are-starting/media1.png | Bin .../assets}/plugins/example_label.png | Bin .../plugins/inventree_order_history.png | Bin .../plugins/inventree_test_statistics.png | Bin .../assets}/plugins/inventree_wireviz.png | Bin .../assets}/plugins/mouser_api.png | Bin .../assets}/plugins/mouser_panel.png | Bin {assets => docs/assets}/plugins/plugin.png | Bin .../assets}/plugins/plugin_dataflow.svg | 0 .../assets}/plugins/printer_info.png | Bin {assets => docs/assets}/plugins/qr.png | Bin docs/assets/social-card.png | Bin 0 -> 134711 bytes .../assets}/webgallery/bom_add_item.png | Bin .../assets}/webgallery/build_details.png | Bin .../assets}/webgallery/build_orders.png | Bin .../assets}/webgallery/build_outputs.png | Bin .../assets}/webgallery/category_params.png | Bin .../assets}/webgallery/category_subcats.png | Bin .../assets}/webgallery/part_category.png | Bin .../assets}/webgallery/part_stock.png | Bin .../assets}/webgallery/part_suppliers.png | Bin .../assets}/webgallery/purchase_orders.png | Bin .../assets}/webgallery/stock_item.png | Bin .../assets}/webgallery/stock_item_2.png | Bin .../assets}/webgallery/stock_location.png | Bin .../assets}/webgallery/stock_location_2.png | Bin .../assets}/webgallery/suppliers.png | Bin docs/blog/index.md | 10 + docs/blog/posts/2021-10-25-starting.md | 13 + .../blog/posts}/2021-11-22-translation.md | 15 +- .../blog/posts}/2022-12-12-0.9.0.md | 9 +- .../blog/posts}/2023-01-02-upcoming.md | 11 +- .../blog/posts}/2023-01-30-plugin-list.md | 24 +- .../blog/posts}/2023-02-06-0.10.0.md | 9 +- .../blog/posts}/2023-02-25-0.10.1.md | 9 +- .../blog/posts}/2023-04-17-0.11.0.md | 9 +- .../blog/posts}/2023-06-26-0.12.0.md | 13 +- .../blog/posts}/2023-08-28-react.md | 9 +- .../blog/posts}/2023-09-26-kicad.md | 9 +- .../blog/posts}/2023-10-03-0.12.8.md | 11 +- .../blog/posts}/2023-10-29-barcodes.md | 11 +- .../blog/posts}/2023-12-06-label-printing.md | 9 +- .../blog/posts}/2023-12-15-0.13.0.md | 11 +- .../blog/posts}/2024-01-13-upcoming.md | 9 +- .../blog/posts}/2024-03-02-0.14.0.md | 11 +- .../blog/posts}/2024-03-13-docker.md | 9 +- .../blog/posts}/2024-05-14-0.15.0.md | 11 +- .../blog/posts}/2024-05-26-0.15.2.md | 9 +- .../blog/posts}/2024-08-25-0.16.0.md | 15 +- .../blog/posts}/2024-09-23-ui-roadmap.md | 9 +- .../blog/posts}/2024-11-07-0.16.8.md | 9 +- .../blog/posts}/2024-11-30-0.16.9.md | 9 +- .../blog/posts}/2024-12-17-0.17.0.md | 11 +- .../blog/posts}/2024-12-27-0.17.1.md | 9 +- {_posts => docs/blog/posts}/2025-05-22-5k.md | 9 +- .../posts}/2025-08-21-machine-refactor.md | 9 +- .../blog/posts}/2025-09-15-1.0.0.md | 9 +- .../posts}/2025-10-15-rolling-stocktake.md | 11 +- .../blog/posts}/2025-11-02-1.1.0.md | 11 +- .../blog/posts}/2026-02-12-1.2.0.md | 11 +- .../blog/posts}/2026-02-12-db-update.md | 11 +- .../posts}/2026-03-25-security-release.md | 10 +- .../blog/posts}/2026-04-07-1.2.7.md | 9 +- .../blog/posts}/2026-04-11-1.3.0.md | 9 +- .../blog/posts}/2026-06-16-1.4.0.md | 9 +- .../blog/posts}/2026-08-09-1.5.0.md | 9 +- .../blog/posts}/2026-09-09-package-repo.md | 9 +- .../blog/posts}/2026-09-17-inventree-mcp.md | 9 +- .../blog/posts}/2026-10-18-1.6.0.md | 9 +- .../blog/posts}/2026-11-03-1.7.0.md | 9 +- .../posts}/2026-11-03-security-release.md | 10 +- docs/contribute.md | 54 + docs/demo.md | 29 + docs/deploy.md | 50 + docs/extend/app.md | 26 + docs/extend/index.md | 43 + docs/features.md | 21 + fund.md => docs/fund.md | 3 +- docs/index.md | 46 + docs/javascripts/extra.js | 14 + .../js => docs/javascripts}/splide.min.js | 0 docs/news/index.md | 10 + .../posts}/2022-04-23-news-are-starting.md | 10 +- .../news/posts}/2022-11-14-website.md | 9 +- .../news/posts}/2022-12-12-0.9.0.md | 7 +- .../2023-01-30-introducing-the-plugin-list.md | 8 +- docs/news/posts/2023-06-26-0.12.0.md | 11 + docs/news/posts/2023-07-13-0.12.1.md | 11 + .../posts/2023-09-26-kicad-integration.md | 6 + docs/news/posts/2023-12-15-0.13.0.md | 14 + .../news/posts}/2024-01-13-0.13.1.md | 7 +- .../news/posts}/2024-01-17-0.13.2.md | 7 +- .../news/posts}/2024-01-22-0.13.3.md | 7 +- .../news/posts}/2024-03-13-0.14.2.md | 7 +- .../news/posts}/2024-05-14-0.15.0.md | 7 +- .../news/posts}/2024-05-26-0.15.2.md | 7 +- .../news/posts}/2024-08-25-0.16.0.md | 7 +- .../news/posts}/2024-09-23-ui-roadmap.md | 7 +- .../news/posts}/2024-11-07-0.16.8.md | 7 +- .../news/posts}/2024-11-30-0.16.9.md | 7 +- .../news/posts}/2024-12-17-0.17.0.md | 7 +- .../news/posts}/2024-12-27-0.17.1.md | 7 +- .../2025-03-25-governance_and_security.md | 7 +- {_news => docs/news/posts}/2025-05-22-5k.md | 7 +- .../news/posts}/2025-06-02-0.17.13.md | 7 +- .../news/posts}/2025-09-15-1.0.0.md | 7 +- .../news/posts}/2025-10-02-1.1.0.md | 7 +- .../news/posts}/2026-02-12-1.2.0.md | 7 +- .../news/posts}/2026-03-25-security.md | 7 +- docs/news/posts/2026-04-07-1.2.7.md | 11 + .../news/posts}/2026-04-11-1.3.0.md | 7 +- .../news/posts}/2026-06-16-1.4.0.md | 7 +- .../news/posts}/2026-08-09-1.5.0.md | 7 +- .../news/posts}/2026-09-09-package.md | 7 +- .../news/posts}/2026-10-18-1.6.0.md | 7 +- .../news/posts}/2026-11-03-1.7.0.md | 7 +- .../news/posts}/2026-11-03-security.md | 7 +- .../newsletter.html => docs/newsletter.md | 24 +- docs/plugins/.meta.yml | 2 + docs/plugins/categories.md | 12 + docs/plugins/community.md | 16 + docs/plugins/index.md | 30 + .../plugins}/inventree-adv-sheet-label.md | 4 +- {_repo => docs/plugins}/inventree-apprise.md | 1 - .../plugins}/inventree-brother-plugin.md | 10 +- .../plugins}/inventree-bulk-plugin.md | 9 +- .../inventree-consolidated-shipping.md | 8 +- .../plugins}/inventree-cups-plugin.md | 9 +- .../inventree-default-salesorder-items.md | 0 .../plugins}/inventree-dymo-plugin.md | 8 +- .../plugins}/inventree-harmonized-codes.md | 8 +- .../plugins}/inventree-ipn-generator.md | 3 + {_repo => docs/plugins}/inventree-kicad.md | 8 +- {_repo => docs/plugins}/inventree-mcp.md | 3 +- .../plugins}/inventree-niimbot-plugin.md | 0 .../plugins}/inventree-order-history.md | 8 +- {_repo => docs/plugins}/inventree-rapidoc.md | 6 +- .../plugins}/inventree-report-lsp-plugin.md | 0 .../plugins}/inventree-rolling-stocktake.md | 8 +- .../plugins}/inventree-stock-forecasting.md | 8 +- .../plugins}/inventree-supplier-panel.md | 0 .../plugins}/inventree-test-statistics.md | 8 +- {_repo => docs/plugins}/inventree-wireviz.md | 8 +- {_repo => docs/plugins}/inventree-zapier.md | 8 +- .../plugins}/inventree-zebra-plugin.md | 23 +- {_repo => docs/plugins}/inventree-zebra.md | 8 +- docs/plugins/publishers.md | 10 + docs/plugins/tags.md | 12 + docs/stylesheets/extra.css | 502 +++ .../css => docs/stylesheets}/splide.min.css | 0 support.md => docs/support.md | 19 +- extend/api.md | 12 - extend/app.md | 46 - extend/index.md | 11 - extend/integrate/index.md | 16 - extend/plugin/index.md | 20 - functions.md | 10 - index.md | 25 - main.py | 386 ++ mkdocs.yml | 232 + netlify.toml | 13 + news.html | 8 - newsletter.md | 8 - overrides/404.html | 11 + overrides/home.html | 51 + overrides/main.html | 41 + overrides/partials/header.html | 71 + overrides/partials/tabs-item.html | 50 + overrides/plugin.html | 128 + package-lock.json | 2279 ---------- package.json | 11 - plugins.html | 22 - plugins.json | 43 - postcss.config.js | 8 - publishers.html | 15 - .../LavissaWoW.yml | 4 +- .../SergeoLacruz.yml | 4 +- .../afwkiers.md => publishers/afwkiers.yml | 2 - publishers/lippoliv.yml | 5 + publishers/matmair.yml | 5 + publishers/melektron.yml | 5 + publishers/piramja.yml | 4 + .../schrodingersgat.yml | 4 +- .../wolflu05.md => publishers/wolflu05.yml | 3 - requirements.txt | 2 + scripts/post_build.py | 92 + tags.html | 7 - tailwind.config.js | 24 - _repo/_template.md => templates/plugin.md | 0 .../_template.md => templates/publisher.yml | 4 +- use/business.md | 6 - use/education.md | 6 - use/maker.md | 6 - 347 files changed, 3009 insertions(+), 17807 deletions(-) delete mode 100644 404.md delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 _config.yml delete mode 100644 _data/ctas/end.yml delete mode 100644 _data/ctas/learn.yml delete mode 100644 _data/ctas/newsletter.yml delete mode 100644 _data/for_business.yml delete mode 100644 _data/for_edu.yml delete mode 100644 _data/for_maker.yml delete mode 100644 _data/functions/extras.yml delete mode 100644 _data/functions/general.yml delete mode 100644 _data/general/footer.yml delete mode 100644 _data/general/stats.yml delete mode 100644 _drafts/2022-12-30-release-highlights.md delete mode 100644 _drafts/_news/2022-12-30-new-features-in-0.9.0.md delete mode 100644 _includes/base/footer.html delete mode 100644 _includes/base/head.html delete mode 100644 _includes/base/header.html delete mode 100644 _includes/block/cta.html delete mode 100644 _includes/block/features.html delete mode 100644 _includes/block/functions.html delete mode 100644 _includes/block/hero.html delete mode 100644 _includes/block/plugins.html delete mode 100644 _includes/block/stats.html delete mode 100644 _includes/block/team.html delete mode 100644 _includes/fnc/link.html delete mode 100644 _includes/partial/alert.html delete mode 100644 _includes/partial/publisher_link.html delete mode 100644 _includes/partial/publisher_ref.html delete mode 100644 _includes/plugin_card.html delete mode 100644 _includes/testimonials.html delete mode 100644 _layouts/alternatives.html delete mode 100644 _layouts/collection/collection_base.html delete mode 100644 _layouts/collection/collection_index.html delete mode 100644 _layouts/collection/collection_refpage.html delete mode 100644 _layouts/collection/news.html delete mode 100644 _layouts/collection/post.html delete mode 100644 _layouts/content.html delete mode 100644 _layouts/default.html delete mode 100644 _layouts/empty.html delete mode 100644 _layouts/plugin.html delete mode 100644 _layouts/publisher.html delete mode 100644 _layouts/user.html delete mode 100644 _news/2023-06-26-0.12.0.md delete mode 100644 _news/2023-07-13-0.12.1.md delete mode 100644 _news/2023-09-26-kicad-integration.md delete mode 100644 _news/2023-12-15-0.13.0.md delete mode 100644 _news/2026-04-07-1.2.7.md delete mode 100644 _plugins/LICENSE delete mode 100644 _plugins/author_permalink.rb delete mode 100644 _plugins/hook-add-last-modified-date.rb delete mode 100644 _plugins/humanize.rb delete mode 100644 _posts/2021-10-25-starting.md delete mode 100644 _publishers/lippoliv.md delete mode 100644 _publishers/matmair.md delete mode 100644 _publishers/melektron.md delete mode 100644 _publishers/piramja.md delete mode 100644 about/index.md delete mode 100644 about/team.html delete mode 100644 alternatives/index.md delete mode 100644 assets/back.svg delete mode 100644 assets/github.svg delete mode 100644 assets/index.css delete mode 100644 assets/info.svg delete mode 100644 assets/learn.svg delete mode 100644 assets/mastodon.svg delete mode 100644 assets/reddit.svg delete mode 100644 assets/rss.svg delete mode 100644 assets/splide/css/splide-core.min.css delete mode 100644 assets/splide/css/themes/splide-default.min.css delete mode 100644 assets/splide/css/themes/splide-sea-green.min.css delete mode 100644 assets/splide/css/themes/splide-skyblue.min.css delete mode 100644 assets/splide/js/splide-renderer.min.js delete mode 100644 assets/splide/js/splide-renderer.min.js.map delete mode 100644 assets/splide/js/splide.cjs.js delete mode 100644 assets/splide/js/splide.esm.js delete mode 100644 assets/splide/js/splide.js delete mode 100644 assets/splide/js/splide.min.js.gz delete mode 100644 assets/splide/js/splide.min.js.map delete mode 100644 assets/splide/js/utils/splide-utils.cjs.js delete mode 100644 assets/splide/js/utils/splide-utils.esm.js delete mode 100644 assets/splide/types/index.d.ts delete mode 100644 assets/twitter.svg delete mode 100644 blog.html delete mode 100644 categories.html delete mode 100644 contribute.md create mode 100644 data/functions.yml create mode 100644 data/stats.yml rename {_data => data}/team.yml (79%) delete mode 100644 demo.md delete mode 100644 deploy.md delete mode 100644 digitalocean.md create mode 100644 docs/.authors.yml rename CNAME => docs/CNAME (100%) create mode 100644 docs/about.md create mode 100644 docs/about/team.md create mode 100644 docs/alternatives.md rename {assets => docs/assets}/appgallery/screen_1.png (100%) rename {assets => docs/assets}/appgallery/screen_10.jpg (100%) rename {assets => docs/assets}/appgallery/screen_11.jpg (100%) rename {assets => docs/assets}/appgallery/screen_12.jpg (100%) rename {assets => docs/assets}/appgallery/screen_13.jpg (100%) rename {assets => docs/assets}/appgallery/screen_14.jpg (100%) rename {assets => docs/assets}/appgallery/screen_15.png (100%) rename {assets => docs/assets}/appgallery/screen_2.jpg (100%) rename {assets => docs/assets}/appgallery/screen_3.jpg (100%) rename {assets => docs/assets}/appgallery/screen_4.jpg (100%) rename {assets => docs/assets}/appgallery/screen_5.jpg (100%) rename {assets => docs/assets}/appgallery/screen_6.jpg (100%) rename {assets => docs/assets}/appgallery/screen_7.jpg (100%) rename {assets => docs/assets}/appgallery/screen_8.jpg (100%) rename {assets => docs/assets}/appgallery/screen_9.jpg (100%) rename {assets => docs/assets}/blog/2022-11-22-translation.png (100%) rename {assets => docs/assets}/blog/barcode_po_actions.png (100%) rename {assets => docs/assets}/blog/barcode_scanner.jpeg (100%) rename {assets => docs/assets}/blog/bom-pricing.png (100%) rename {assets => docs/assets}/blog/db_update_compose.png (100%) rename {assets => docs/assets}/blog/db_update_data.png (100%) rename {assets => docs/assets}/blog/db_update_docker.png (100%) rename {assets => docs/assets}/blog/db_update_env.png (100%) rename {assets => docs/assets}/blog/db_update_new_inventree.png (100%) rename {assets => docs/assets}/blog/db_update_new_postgres.png (100%) rename {assets => docs/assets}/blog/db_update_new_versions.png (100%) rename {assets => docs/assets}/blog/db_update_old_versions.png (100%) rename {assets => docs/assets}/blog/digikey-barcode.png (100%) rename {assets => docs/assets}/blog/docker-a-record.png (100%) rename {assets => docs/assets}/blog/docker-access.png (100%) rename {assets => docs/assets}/blog/docker-compose-ps.png (100%) rename {assets => docs/assets}/blog/docker-compose-up.png (100%) rename {assets => docs/assets}/blog/docker-droplet.png (100%) rename {assets => docs/assets}/blog/docker-env.png (100%) rename {assets => docs/assets}/blog/docker-in.png (100%) rename {assets => docs/assets}/blog/docker-login.png (100%) rename {assets => docs/assets}/blog/docker-success.png (100%) rename {assets => docs/assets}/blog/news-reader.png (100%) rename {assets => docs/assets}/blog/print-labels.png (100%) rename {assets => docs/assets}/blog/printer-dialog.png (100%) rename {assets => docs/assets}/blog/select-labels.png (100%) rename {assets => docs/assets}/blog/world-map.png (100%) rename {assets/icon => docs/assets}/favicon.ico (100%) rename {assets => docs/assets}/front.png (100%) rename {assets => docs/assets}/icon/android-chrome-192x192.png (100%) rename {assets => docs/assets}/icon/android-chrome-512x512.png (100%) rename {assets => docs/assets}/icon/apple-touch-icon.png (100%) rename {assets => docs/assets}/icon/favicon-16x16.png (100%) rename {assets => docs/assets}/icon/favicon-32x32.png (100%) rename {assets => docs/assets}/icon/site.webmanifest (100%) rename {assets => docs/assets}/logo.png (100%) rename {assets => docs/assets}/news/2022-04-23-news-are-starting/media1.png (100%) rename {assets => docs/assets}/plugins/example_label.png (100%) rename {assets => docs/assets}/plugins/inventree_order_history.png (100%) rename {assets => docs/assets}/plugins/inventree_test_statistics.png (100%) rename {assets => docs/assets}/plugins/inventree_wireviz.png (100%) rename {assets => docs/assets}/plugins/mouser_api.png (100%) rename {assets => docs/assets}/plugins/mouser_panel.png (100%) rename {assets => docs/assets}/plugins/plugin.png (100%) rename {assets => docs/assets}/plugins/plugin_dataflow.svg (100%) rename {assets => docs/assets}/plugins/printer_info.png (100%) rename {assets => docs/assets}/plugins/qr.png (100%) create mode 100644 docs/assets/social-card.png rename {assets => docs/assets}/webgallery/bom_add_item.png (100%) rename {assets => docs/assets}/webgallery/build_details.png (100%) rename {assets => docs/assets}/webgallery/build_orders.png (100%) rename {assets => docs/assets}/webgallery/build_outputs.png (100%) rename {assets => docs/assets}/webgallery/category_params.png (100%) rename {assets => docs/assets}/webgallery/category_subcats.png (100%) rename {assets => docs/assets}/webgallery/part_category.png (100%) rename {assets => docs/assets}/webgallery/part_stock.png (100%) rename {assets => docs/assets}/webgallery/part_suppliers.png (100%) rename {assets => docs/assets}/webgallery/purchase_orders.png (100%) rename {assets => docs/assets}/webgallery/stock_item.png (100%) rename {assets => docs/assets}/webgallery/stock_item_2.png (100%) rename {assets => docs/assets}/webgallery/stock_location.png (100%) rename {assets => docs/assets}/webgallery/stock_location_2.png (100%) rename {assets => docs/assets}/webgallery/suppliers.png (100%) create mode 100644 docs/blog/index.md create mode 100644 docs/blog/posts/2021-10-25-starting.md rename {_posts => docs/blog/posts}/2021-11-22-translation.md (87%) rename {_posts => docs/blog/posts}/2022-12-12-0.9.0.md (97%) rename {_posts => docs/blog/posts}/2023-01-02-upcoming.md (92%) rename {_posts => docs/blog/posts}/2023-01-30-plugin-list.md (84%) rename {_posts => docs/blog/posts}/2023-02-06-0.10.0.md (93%) rename {_posts => docs/blog/posts}/2023-02-25-0.10.1.md (65%) rename {_posts => docs/blog/posts}/2023-04-17-0.11.0.md (95%) rename {_posts => docs/blog/posts}/2023-06-26-0.12.0.md (93%) rename {_posts => docs/blog/posts}/2023-08-28-react.md (96%) rename {_posts => docs/blog/posts}/2023-09-26-kicad.md (93%) rename {_posts => docs/blog/posts}/2023-10-03-0.12.8.md (85%) rename {_posts => docs/blog/posts}/2023-10-29-barcodes.md (93%) rename {_posts => docs/blog/posts}/2023-12-06-label-printing.md (93%) rename {_posts => docs/blog/posts}/2023-12-15-0.13.0.md (96%) rename {_posts => docs/blog/posts}/2024-01-13-upcoming.md (96%) rename {_posts => docs/blog/posts}/2024-03-02-0.14.0.md (97%) rename {_posts => docs/blog/posts}/2024-03-13-docker.md (97%) rename {_posts => docs/blog/posts}/2024-05-14-0.15.0.md (95%) rename {_posts => docs/blog/posts}/2024-05-26-0.15.2.md (80%) rename {_posts => docs/blog/posts}/2024-08-25-0.16.0.md (96%) rename {_posts => docs/blog/posts}/2024-09-23-ui-roadmap.md (94%) rename {_posts => docs/blog/posts}/2024-11-07-0.16.8.md (74%) rename {_posts => docs/blog/posts}/2024-11-30-0.16.9.md (58%) rename {_posts => docs/blog/posts}/2024-12-17-0.17.0.md (96%) rename {_posts => docs/blog/posts}/2024-12-27-0.17.1.md (58%) rename {_posts => docs/blog/posts}/2025-05-22-5k.md (75%) rename {_posts => docs/blog/posts}/2025-08-21-machine-refactor.md (89%) rename {_posts => docs/blog/posts}/2025-09-15-1.0.0.md (99%) rename {_posts => docs/blog/posts}/2025-10-15-rolling-stocktake.md (63%) rename {_posts => docs/blog/posts}/2025-11-02-1.1.0.md (94%) rename {_posts => docs/blog/posts}/2026-02-12-1.2.0.md (96%) rename {_posts => docs/blog/posts}/2026-02-12-db-update.md (93%) rename {_posts => docs/blog/posts}/2026-03-25-security-release.md (87%) rename {_posts => docs/blog/posts}/2026-04-07-1.2.7.md (88%) rename {_posts => docs/blog/posts}/2026-04-11-1.3.0.md (97%) rename {_posts => docs/blog/posts}/2026-06-16-1.4.0.md (98%) rename {_posts => docs/blog/posts}/2026-08-09-1.5.0.md (98%) rename {_posts => docs/blog/posts}/2026-09-09-package-repo.md (93%) rename {_posts => docs/blog/posts}/2026-09-17-inventree-mcp.md (94%) rename {_posts => docs/blog/posts}/2026-10-18-1.6.0.md (98%) rename {_posts => docs/blog/posts}/2026-11-03-1.7.0.md (97%) rename {_posts => docs/blog/posts}/2026-11-03-security-release.md (87%) create mode 100644 docs/contribute.md create mode 100644 docs/demo.md create mode 100644 docs/deploy.md create mode 100644 docs/extend/app.md create mode 100644 docs/extend/index.md create mode 100644 docs/features.md rename fund.md => docs/fund.md (91%) create mode 100644 docs/index.md create mode 100644 docs/javascripts/extra.js rename {assets/splide/js => docs/javascripts}/splide.min.js (100%) create mode 100644 docs/news/index.md rename {_news => docs/news/posts}/2022-04-23-news-are-starting.md (91%) rename {_news => docs/news/posts}/2022-11-14-website.md (79%) rename {_news => docs/news/posts}/2022-12-12-0.9.0.md (84%) rename {_news => docs/news/posts}/2023-01-30-introducing-the-plugin-list.md (93%) create mode 100644 docs/news/posts/2023-06-26-0.12.0.md create mode 100644 docs/news/posts/2023-07-13-0.12.1.md create mode 100644 docs/news/posts/2023-09-26-kicad-integration.md create mode 100644 docs/news/posts/2023-12-15-0.13.0.md rename {_news => docs/news/posts}/2024-01-13-0.13.1.md (51%) rename {_news => docs/news/posts}/2024-01-17-0.13.2.md (56%) rename {_news => docs/news/posts}/2024-01-22-0.13.3.md (56%) rename {_news => docs/news/posts}/2024-03-13-0.14.2.md (56%) rename {_news => docs/news/posts}/2024-05-14-0.15.0.md (56%) rename {_news => docs/news/posts}/2024-05-26-0.15.2.md (57%) rename {_news => docs/news/posts}/2024-08-25-0.16.0.md (56%) rename {_news => docs/news/posts}/2024-09-23-ui-roadmap.md (55%) rename {_news => docs/news/posts}/2024-11-07-0.16.8.md (58%) rename {_news => docs/news/posts}/2024-11-30-0.16.9.md (58%) rename {_news => docs/news/posts}/2024-12-17-0.17.0.md (56%) rename {_news => docs/news/posts}/2024-12-27-0.17.1.md (57%) rename {_news => docs/news/posts}/2025-03-25-governance_and_security.md (67%) rename {_news => docs/news/posts}/2025-05-22-5k.md (54%) rename {_news => docs/news/posts}/2025-06-02-0.17.13.md (51%) rename {_news => docs/news/posts}/2025-09-15-1.0.0.md (56%) rename {_news => docs/news/posts}/2025-10-02-1.1.0.md (57%) rename {_news => docs/news/posts}/2026-02-12-1.2.0.md (57%) rename {_news => docs/news/posts}/2026-03-25-security.md (57%) create mode 100644 docs/news/posts/2026-04-07-1.2.7.md rename {_news => docs/news/posts}/2026-04-11-1.3.0.md (52%) rename {_news => docs/news/posts}/2026-06-16-1.4.0.md (52%) rename {_news => docs/news/posts}/2026-08-09-1.5.0.md (60%) rename {_news => docs/news/posts}/2026-09-09-package.md (62%) rename {_news => docs/news/posts}/2026-10-18-1.6.0.md (60%) rename {_news => docs/news/posts}/2026-11-03-1.7.0.md (61%) rename {_news => docs/news/posts}/2026-11-03-security.md (57%) rename _includes/partial/newsletter.html => docs/newsletter.md (82%) create mode 100644 docs/plugins/.meta.yml create mode 100644 docs/plugins/categories.md create mode 100644 docs/plugins/community.md create mode 100644 docs/plugins/index.md rename {_repo => docs/plugins}/inventree-adv-sheet-label.md (99%) rename {_repo => docs/plugins}/inventree-apprise.md (99%) rename {_repo => docs/plugins}/inventree-brother-plugin.md (93%) rename {_repo => docs/plugins}/inventree-bulk-plugin.md (97%) rename {_repo => docs/plugins}/inventree-consolidated-shipping.md (93%) rename {_repo => docs/plugins}/inventree-cups-plugin.md (95%) rename {_repo => docs/plugins}/inventree-default-salesorder-items.md (100%) rename {_repo => docs/plugins}/inventree-dymo-plugin.md (97%) rename {_repo => docs/plugins}/inventree-harmonized-codes.md (92%) rename {_repo => docs/plugins}/inventree-ipn-generator.md (99%) rename {_repo => docs/plugins}/inventree-kicad.md (89%) rename {_repo => docs/plugins}/inventree-mcp.md (96%) rename {_repo => docs/plugins}/inventree-niimbot-plugin.md (100%) rename {_repo => docs/plugins}/inventree-order-history.md (92%) rename {_repo => docs/plugins}/inventree-rapidoc.md (95%) rename {_repo => docs/plugins}/inventree-report-lsp-plugin.md (100%) rename {_repo => docs/plugins}/inventree-rolling-stocktake.md (92%) rename {_repo => docs/plugins}/inventree-stock-forecasting.md (92%) rename {_repo => docs/plugins}/inventree-supplier-panel.md (100%) rename {_repo => docs/plugins}/inventree-test-statistics.md (92%) rename {_repo => docs/plugins}/inventree-wireviz.md (89%) rename {_repo => docs/plugins}/inventree-zapier.md (95%) rename {_repo => docs/plugins}/inventree-zebra-plugin.md (97%) rename {_repo => docs/plugins}/inventree-zebra.md (94%) create mode 100644 docs/plugins/publishers.md create mode 100644 docs/plugins/tags.md create mode 100644 docs/stylesheets/extra.css rename {assets/splide/css => docs/stylesheets}/splide.min.css (100%) rename support.md => docs/support.md (52%) delete mode 100644 extend/api.md delete mode 100644 extend/app.md delete mode 100644 extend/index.md delete mode 100644 extend/integrate/index.md delete mode 100644 extend/plugin/index.md delete mode 100644 functions.md delete mode 100644 index.md create mode 100644 main.py create mode 100644 mkdocs.yml create mode 100644 netlify.toml delete mode 100644 news.html delete mode 100644 newsletter.md create mode 100644 overrides/404.html create mode 100644 overrides/home.html create mode 100644 overrides/main.html create mode 100644 overrides/partials/header.html create mode 100644 overrides/partials/tabs-item.html create mode 100644 overrides/plugin.html delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 plugins.html delete mode 100644 plugins.json delete mode 100644 postcss.config.js delete mode 100644 publishers.html rename _publishers/LavissaWoW.md => publishers/LavissaWoW.yml (70%) rename _publishers/SergeoLacruz.md => publishers/SergeoLacruz.yml (63%) rename _publishers/afwkiers.md => publishers/afwkiers.yml (87%) create mode 100644 publishers/lippoliv.yml create mode 100644 publishers/matmair.yml create mode 100644 publishers/melektron.yml create mode 100644 publishers/piramja.yml rename _publishers/schrodingersgat.md => publishers/schrodingersgat.yml (73%) rename _publishers/wolflu05.md => publishers/wolflu05.yml (74%) create mode 100644 requirements.txt create mode 100644 scripts/post_build.py delete mode 100644 tags.html delete mode 100644 tailwind.config.js rename _repo/_template.md => templates/plugin.md (100%) rename _publishers/_template.md => templates/publisher.yml (76%) delete mode 100644 use/business.md delete mode 100644 use/education.md delete mode 100644 use/maker.md diff --git a/.github/collect_plugin.py b/.github/collect_plugin.py index 3e9122a67..12e6b866e 100644 --- a/.github/collect_plugin.py +++ b/.github/collect_plugin.py @@ -5,7 +5,7 @@ from urllib.request import urlopen, Request inp_project = os.environ.get('PROJECT').strip() inp_author = os.environ.get('AUTHOR').strip() -file_name = Path(f'_repo/{inp_project}.md') +file_name = Path(f'docs/plugins/{inp_project}.md') crowdin_projet_id = 452300 print(f'Collecting {inp_project} with {inp_author}...') @@ -39,7 +39,8 @@ except: stable = False bugtracker = pypi_data['info']['bugtrack_url'] or pypi_data['info']['project_urls'].get('Bug Tracker') or '' homepage = pypi_data['info']['home_page'] or pypi_data['info']['project_urls'].get('Homepage') -keywords = pypi_data['info']['keywords'] +keywords = pypi_data['info']['keywords'] or '' +tags = ''.join(f'\n - {k.strip()}' for k in keywords.replace(',', ' ').split() if k.strip()) readme = pypi_data['info']['description'] # Write data @@ -49,17 +50,17 @@ name: {name} author: {author} license: {license} open_source: true -stable: {stable} +stable: {str(stable).lower()} maintained: true pypi: true package_name: {name} github: {homepage} gitlab: source: -issue_tracker:{bugtracker} +issue_tracker: {bugtracker} website: categories: -tags: {keywords} +tags:{tags} --- {tagline} diff --git a/.github/get_stats.py b/.github/get_stats.py index 1c7d08b5d..f256fa6a4 100644 --- a/.github/get_stats.py +++ b/.github/get_stats.py @@ -4,7 +4,7 @@ import os from pathlib import Path from urllib.request import urlopen, Request -file_name = Path('_data/general/stats.yml') +file_name = Path('data/stats.yml') github_project = "inventree/inventree" crowdin_projet_id = 452300 @@ -49,18 +49,18 @@ file_name.write_text( f"""stats: - name: Docker pulls number: {docker} - icon: fa-brands fa-docker + icon: ti-brand-docker - name: GitHub Stars number: {stars} - icon: fa-solid fa-star + icon: ti-star - name: Forks number: {forks} - icon: fa-solid fa-code-branch + icon: ti-git-fork - name: Contributors number: {contributors} - icon: fa-solid fa-hands-helping + icon: ti-users - name: Languages number: {languages} - icon: fa-solid fa fa-language + icon: ti-language """ ) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ee3cca0d..49ac1d875 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,30 +3,32 @@ name: Build pages and publish on: push +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest + permissions: + contents: write # required to push to the gh-pages branch steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 + - uses: actions/checkout@v4 with: - ruby-version: 3.4.9 - bundler-cache: true - - name: Setup Node - uses: actions/setup-node@v2 + fetch-depth: 0 # full history - used for the "last modified" date of plugins + - uses: actions/setup-python@v5 with: - node-version: '14' - - run: npm install + python-version: '3.12' + cache: pip + - run: pip install -r requirements.txt - name: Build site - uses: limjh16/jekyll-action-ts@v2 - with: - enable_cache: true - - run: bundle exec htmlproofer ./_site --no-check-external-hash --no-enforce-https --ignore-urls "/localhost/,/www.linkedin.com/,digitalocean.com,/cloud.digitalocean.com/,/dnschecker.org/,/npmjs.com/,/reddit.com/r/inventree/,/twitter.com/inventreedb/,/github.com/,/developer.digikey.com/,/patreon.com/,/partkeepr.org/,/download.dymo.com/,brother.com.au,/marketplace.digitalocean.com,/chaos.social" - name: Check links + # strict mode (set in mkdocs.yml) fails the build on broken internal links + run: zensical build --clean + - name: Generate plugins.json and legacy feeds + run: python scripts/post_build.py - name: Deploy if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}} uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: 'gh-pages' - publish_dir: ./_site + publish_dir: ./site diff --git a/.gitignore b/.gitignore index c4f9b394a..900a3a506 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,15 @@ -_site/ -.parcel-cache/ +# Build output +site/ .cache/ -.jekyll-cache/ -dist/ -node_modules/ -.jekyll-metadata -.docusaurus/ -yarn-error.log +__pycache__/ +*.pyc -build/ \ No newline at end of file +# Local virtual environments +.venv/ +venv/ + +# Old Jekyll build artifacts +_site/ +.jekyll-cache/ +.jekyll-metadata +node_modules/ diff --git a/404.md b/404.md deleted file mode 100644 index ccc5e898b..000000000 --- a/404.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: content -permalink: /404 -backLink: False ---- - -## 404 - Page not found - - -This page is unkown! - - -Please go back to the last working page. diff --git a/Gemfile b/Gemfile deleted file mode 100644 index e2e4a2369..000000000 --- a/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' -gem 'jekyll' - -group :jekyll_plugins do - gem 'jekyll-postcss-v2' - gem 'jekyll-seo-tag' - gem 'jekyll-sitemap' - gem 'jekyll-feed' - gem 'jekyll-mentions' - gem 'jekyll_custom_permalink' -end -gem "webrick", "~> 1.8" -gem 'html-proofer' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 128044f8d..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,187 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - Ascii85 (2.0.1) - activesupport (8.1.4.1) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - json - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - uri (>= 0.13.1) - addressable (2.9.1) - public_suffix (>= 2.0.2, < 8.0) - afm (1.0.0) - async (2.38.1) - console (~> 1.29) - fiber-annotation - io-event (~> 1.11) - metrics (~> 0.12) - traces (~> 0.18) - base64 (0.3.0) - benchmark (0.5.0) - bigdecimal (4.1.3) - colorator (1.1.0) - concurrent-ruby (1.3.8) - connection_pool (3.0.2) - console (1.34.3) - fiber-annotation - fiber-local (~> 1.1) - json - csv (3.3.5) - drb (2.2.3) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - ethon (0.18.0) - ffi (>= 1.15.0) - logger - eventmachine (1.2.7) - ffi (1.17.3-arm64-darwin) - ffi (1.17.3-x86_64-linux-gnu) - fiber-annotation (0.2.0) - fiber-local (1.1.0) - fiber-storage - fiber-storage (1.0.1) - forwardable-extended (2.6.0) - google-protobuf (4.34.1-arm64-darwin) - bigdecimal - rake (~> 13.3) - google-protobuf (4.34.1-x86_64-linux-gnu) - bigdecimal - rake (~> 13.3) - hashery (2.1.2) - html-pipeline (2.14.3) - activesupport (>= 2) - nokogiri (>= 1.4) - html-proofer (5.2.0) - addressable (~> 2.3) - async (~> 2.1) - benchmark (~> 0.5) - nokogiri (~> 1.13) - pdf-reader (~> 2.11) - rainbow (~> 3.0) - typhoeus (~> 1.3) - yell (~> 2.0) - zeitwerk (~> 2.5) - http_parser.rb (0.8.1) - i18n (1.15.2) - concurrent-ruby (~> 1.0) - io-event (1.14.5) - jekyll (4.4.1) - addressable (~> 2.4) - base64 (~> 0.2) - colorator (~> 1.0) - csv (~> 3.0) - em-websocket (~> 0.5) - i18n (~> 1.0) - jekyll-sass-converter (>= 2.0, < 4.0) - jekyll-watch (~> 2.0) - json (~> 2.6) - kramdown (~> 2.3, >= 2.3.1) - kramdown-parser-gfm (~> 1.0) - liquid (~> 4.0) - mercenary (~> 0.3, >= 0.3.6) - pathutil (~> 0.9) - rouge (>= 3.0, < 5.0) - safe_yaml (~> 1.0) - terminal-table (>= 1.8, < 4.0) - webrick (~> 1.7) - jekyll-feed (0.17.0) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-postcss-v2 (1.0.2) - jekyll-sass-converter (3.1.0) - sass-embedded (~> 1.75) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) - jekyll-sitemap (1.4.0) - jekyll (>= 3.7, < 5.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - jekyll_custom_permalink (0.0.1) - json (2.21.2) - kramdown (2.5.2) - rexml (>= 3.4.4) - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.4) - listen (3.10.0) - logger - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - logger (1.7.0) - mercenary (0.4.0) - metrics (0.15.0) - minitest (6.1.0) - drb (~> 2.0) - prism (>= 1.5, < 3) - nokogiri (1.19.5-arm64-darwin) - racc (~> 1.4) - nokogiri (1.19.5-x86_64-linux-gnu) - racc (~> 1.4) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - pdf-reader (2.15.1) - Ascii85 (>= 1.0, < 3.0, != 2.0.0) - afm (>= 0.2.1, < 2) - hashery (~> 2.0) - ruby-rc4 - ttfunk - prism (2.1.0-arm64-darwin) - prism (2.1.0-x86_64-linux-gnu) - public_suffix (7.0.5) - racc (1.8.1) - rainbow (3.1.1) - rake (13.3.1) - rb-fsevent (0.11.2) - rb-inotify (0.11.1) - ffi (~> 1.0) - rexml (3.4.4) - rouge (4.7.0) - ruby-rc4 (0.1.5) - safe_yaml (1.0.5) - sass-embedded (1.98.0-arm64-darwin) - google-protobuf (~> 4.31) - sass-embedded (1.98.0-x86_64-linux-gnu) - google-protobuf (~> 4.31) - securerandom (0.4.1) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - traces (0.18.2) - ttfunk (1.7.0) - typhoeus (1.6.0) - ethon (>= 0.18.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) - uri (1.1.2) - webrick (1.9.2) - yell (2.2.2) - zeitwerk (2.7.5) - -PLATFORMS - arm64-darwin-25 - x86_64-linux - -DEPENDENCIES - html-proofer - jekyll - jekyll-feed - jekyll-mentions - jekyll-postcss-v2 - jekyll-seo-tag - jekyll-sitemap - jekyll_custom_permalink - webrick (~> 1.8) - -BUNDLED WITH - 2.4.6 diff --git a/README.md b/README.md index e05af31df..dd54efb9d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # InvenTree website This project contains the source for InvenTree's website. -It is built on Jekyll and GitHub pages for backend / hosting, tailwindcss for design and Netlify for preview builds. +It is built with [Zensical](https://zensical.org) (using the same theme setup as the [InvenTree documentation](https://docs.inventree.org)), hosted on GitHub Pages, with Netlify for preview builds. [![Netlify Status](https://api.netlify.com/api/v1/badges/f84340d0-bc2f-4f7f-ad4c-877c50b33a27/deploy-status)](https://app.netlify.com/sites/inventree-org-preview/deploys) @@ -11,12 +11,12 @@ Any maintainer of a plugin can add their plugin to the list. The plugin will be To add a plugin the following steps are required: - Fork the repository - Create a new branch. We recommend `plugin/` as the branch name. -- Create a new file in `_repo`. We recommend using the package name as the file name. -- Copy the content from `_repo/template.md` into the new file. +- Create a new file in `docs/plugins`. We recommend using the package name as the file name. +- Copy the content from `templates/plugin.md` into the new file. - Fill out the details. Please make sure to use the correct format for the fields. -- If this is your first contribution to the list, please add yourself to the `_publishers` folder. - - Use your GitHub username as the file name. - - Copy the content from `_publishers/_template.md` into the new file. +- If this is your first contribution to the list, please add yourself to the `publishers` folder. + - Use your GitHub username as the file name, e.g. `publishers/octocat.yml`. + - Copy the content from `templates/publisher.yml` into the new file. - Fill out the details. Please make sure to use the correct format for the fields. - Commit your changes and create a pull request. We recommend using the title `[REPO] Add plugin `. @@ -27,63 +27,52 @@ The plugin list is just getting started as a static collection, we might enhance ## Architecture and development -The website consists of content, layouts and assets. Jekyll runs and builds out of these files static html files - that are then hosted on GitHub pages. +The site configuration is in `mkdocs.yml` (Zensical reads the mkdocs configuration format). Zensical builds static HTML from the Markdown files in `docs/`, which is then hosted on GitHub Pages. ### Folders and files -Folders with an underscore prefixed are internal folders for Jekyll, folders without are rendered as subdirectories in the output. -Structure: -`_data` contains data that is references on pages -`_drafts` contains drafts for blog pages and news items -`_news` contains news entries -`_posts` contains blog entries -`_publishers` contains authors/publishers of blog entries, news items and plugins -`_repo` contains plugin repo entries +Content: +`docs/` contains all pages, rendered as the site structure (e.g. `docs/deploy.md` is served at `/deploy/`) +`docs/blog/posts` contains blog entries - the file name is `YYYY-MM-DD-.md`, and `date`, `slug`, `title` and `authors` are set in the front matter +`docs/news/posts` contains news entries (same format as blog entries) +`docs/.authors.yml` contains the authors of blog and news entries +`docs/plugins` contains plugin list entries (plus the index pages for the list) +`publishers/` contains publishers of plugins +`data/` contains data that is referenced on pages (`stats.yml` is updated daily by a bot) +`templates/` contains templates for new plugins and publishers -Layouts: -`_includes` contains partials that can be used in layouts -`_layouts` contains the page definitions +Theme and generated content: +`overrides/` contains theme template overrides (home page hero, plugin detail page) +`main.py` provides macros which render the plugin list, tag/category/publisher indexes, stats and team lists. Macros are only rendered on pages that set `render_macros: true` in their front matter +`scripts/post_build.py` generates `plugins.json` and the legacy `feed.atom` feed URLs after the build +`docs/stylesheets/extra.css` contains custom styles (shared with the documentation where possible) -Assets: -`assets` contains static assets for the pages - -The site configuration is saved in `config.yaml`, required gems in `Gemfile` and npm packages in `package.json`. - -The CSS stylesheet uses tailwindcss and is built with postcss on demand. NodeJs is needed for this. The main css file is located in `assets/index.css`. Rebuilds are handled by the workflows automatically. +Old Jekyll URLs (plugin and publisher pages) are kept working via redirects in `mkdocs.yml`. ### Preview builds -Once a PR is created, a preview build is created on Netlify. The preview build is available at `https://-inventree-org-preview.netlify.app/`. The preview build is automatically updated when the PR is updated. +Once a PR is created, a preview build is created on Netlify (configured in `netlify.toml`). The preview build is available at `https://-inventree-org-preview.netlify.app/`. The preview build is automatically updated when the PR is updated. A bot will comment on the PR with the link to the preview build. - ### Common commands for local development -Install packages for ruby and nodejs. + +Install the build requirements (Python 3.10+), ideally in a virtual environment: ```bash -sudo apt-get install rubygems ruby-dev nodejs npm -npm install -sudo gem install bundler -bundle install +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt ``` -Build site locally +Run a local server that automatically rebuilds on changes: ```bash -bundle exec jekyll build +zensical serve ``` -Run debug server that automatically updates. This does not recompile the tailwindcss stylesheet. If you change something in the css file, you need to build the site fully with the command above. +Build the site (output in `site/`): ```bash -bundle exec jekyll serve --incremental -``` - -### Update dependencies - -If the above commands fail, you may have outdated ruby gems, or node packages. Update with the following commands: - -```bash -bundle update -ncu -u +zensical build --clean +python scripts/post_build.py ``` diff --git a/_config.yml b/_config.yml deleted file mode 100644 index edb23d642..000000000 --- a/_config.yml +++ /dev/null @@ -1,88 +0,0 @@ -# Metadata -title: InvenTree -tagline: Intuitive Inventory Management -description: >- - InvenTree is an open-source inventory management system which provides intuitive parts management and stock control. - It is at the center of an ecosystem of addins for EDA tools, API wrapper, deeply integrated plugins and 3rd party tools. - -# Links -demo-link: - internal: demo.md -doc-link: https://docs.inventree.org/en/stable/ -deploy-link: - internal: deploy.md -blog-link: - internal: blog.html - -# Hosting parameters -baseurl: "" -url: "" - -# Allow building/publishing posts and collection entries dated "in the future" -# (CI runners build in UTC, so a post authored later in the day in other timezones -# can otherwise appear future-dated and get silently excluded from the build) -future: true - -# Rendering settings - do not touch -collections: - publishers: - output: true - permalink: "/:title" - repo: - output: true - permalink: ":doc_author/:title" - news: - output: true - permalink: /news/:year/:month/:day/:title - posts: - permalink: /blog/:year/:month/:day/:title - -defaults: - - scope: - path: "" - type: "publishers" - values: - layout: "publisher" - - scope: - path: "" - type: "repo" - values: - layout: "plugin" - - scope: - path: "" - type: "posts" - values: - layout: "collection/post" - - scope: - path: "" - type: "news" - values: - layout: "collection/news" - - scope: - path: "" - values: - layout: "content" - -feed: - path: /blog/feed.atom - - collections: - news: - path: "/news/feed.atom" - -plugins: - - jekyll-seo-tag - - jekyll-postcss-v2 - - jekyll-sitemap - - jekyll-feed - - jekyll-mentions - - jekyll_custom_permalink - -exclude: [ - package.json, - package-lock.json, - postcss.config.js, - README.md, - tailwind.config.js, - LICENSE, -] diff --git a/_data/ctas/end.yml b/_data/ctas/end.yml deleted file mode 100644 index d8e99ca66..000000000 --- a/_data/ctas/end.yml +++ /dev/null @@ -1,4 +0,0 @@ -text: Ready for a glimpse into the future?
Together we make InvenTree better, faster and more helpful each day. -btn: - - text: Open the roadmap - link: https://github.com/inventree/InvenTree/labels/roadmap diff --git a/_data/ctas/learn.yml b/_data/ctas/learn.yml deleted file mode 100644 index 8e057ba9e..000000000 --- a/_data/ctas/learn.yml +++ /dev/null @@ -1,5 +0,0 @@ -text: InvenTree provides functions for all kinds of users, parts and organisations -btn: - - text: Learn More - link: - home: true diff --git a/_data/ctas/newsletter.yml b/_data/ctas/newsletter.yml deleted file mode 100644 index 4b0aa9e5a..000000000 --- a/_data/ctas/newsletter.yml +++ /dev/null @@ -1,5 +0,0 @@ -text: Join the newsletter to stay up to date. -btn: - - text: Sign up - link: - internal: newsletter.md diff --git a/_data/for_business.yml b/_data/for_business.yml deleted file mode 100644 index 272c6ba70..000000000 --- a/_data/for_business.yml +++ /dev/null @@ -1,12 +0,0 @@ -ref: business -link: - internal: use/business.md -title: For Business -text: | - lorem ipsum text - -features: - - title: lorem ipsum title - subtitle: lorem ipsum subtitle - text: lorem ipsum description - link: https://example.com/ diff --git a/_data/for_edu.yml b/_data/for_edu.yml deleted file mode 100644 index e10eaec64..000000000 --- a/_data/for_edu.yml +++ /dev/null @@ -1,12 +0,0 @@ -ref: edu -link: - internal: use/education.md -title: For Education -text: | - Electronic Labs are creative places. Whether your institution works with K12 or post-grads - organisation and tooling is challenging. Let InvenTree at least do the inventory reliably for you! - -features: - - title: Open Source - Open Knowledge - subtitle: Stay independed of big vendors - text: Free software of big vendors helps the budget. But how about your students? - extend: Don’t teach tools – teach process and competence. InvenTree is MIT licensed and free forever.
Also, we are open to contribution from all ages! diff --git a/_data/for_maker.yml b/_data/for_maker.yml deleted file mode 100644 index 928bf1cc2..000000000 --- a/_data/for_maker.yml +++ /dev/null @@ -1,12 +0,0 @@ -ref: maker -link: - internal: use/maker.md -title: For Maker -text: | - lorem ipsum text - -features: - - title: lorem ipsum title - subtitle: lorem ipsum subtitle - text: lorem ipsum description - link: https://example.com/ diff --git a/_data/functions/extras.yml b/_data/functions/extras.yml deleted file mode 100644 index cd0fb1e18..000000000 --- a/_data/functions/extras.yml +++ /dev/null @@ -1,10 +0,0 @@ -functions: - - title: Build Parts - text: Inventree features a build management system to help you track the progress of your builds. Builds consume stock items to make new parts, you can decide to automatically or manually allocate parts from your current inventory. - link: https://docs.inventree.org/en/stable/part - - title: Report - text: Generate a wide range of reports using custom templates. - link: https://docs.inventree.org/en/stable/report - - title: Extend and Customize - text: InvenTree is designed to be highly extensible. If the core InvenTree functionality does not meet your particular need, InvenTree provides a RESTful API, a native Python library, and a powerful plugin system. - link: https://docs.inventree.org/en/stable/api/ diff --git a/_data/functions/general.yml b/_data/functions/general.yml deleted file mode 100644 index 86e15bb97..000000000 --- a/_data/functions/general.yml +++ /dev/null @@ -1,19 +0,0 @@ -title: InvenTree builds its vast functions on top of a few core workflows -link: - internal: functions.md -text: -functions: - - title: Organize Parts - text: Parts are the fundamental element of any inventory. InvenTree groups parts into structured categories which allow you to arrange parts to meet your particular needs. - link: https://docs.inventree.org/en/stable/part - - title: Manage Suppliers - text: InvenTree allows you to easily create, modify or delete suppliers and supplier items linked to any part in your inventory. - link: https://docs.inventree.org/en/stable/concepts/company/#suppliers - - title: Instant Stock Knowledge - text: Instantly view current stock for a certain part, in a particular location, or required for an individual build. - extend: Stock items are organized in cascading locations and sub-locations, allowing flexible inspection of stock under any location. Stock items can be serialized for tracking of individual items, and test results can be stored against a serialized stock item for the purpose of acceptance testing and commissioning. - link: https://docs.inventree.org/en/stable/stock - - title: BOM Management - text: Intelligent Bill of Material management provides a clear understanding of the sub-parts required to make a new part. - extend: InvenTree allows you to upload simple BOM files in multiple formats, and download a detailed BOM with all the information stored in its database. - link: https://docs.inventree.org/en/stable/manufacturing/bom/ diff --git a/_data/general/footer.yml b/_data/general/footer.yml deleted file mode 100644 index b00d14b41..000000000 --- a/_data/general/footer.yml +++ /dev/null @@ -1,38 +0,0 @@ -- title: Quick - cats: - - name: Demo - internal: demo.md - - name: Deploy - internal: deploy.md - - name: Docs - site: doc-link - - name: News - internal: news.html - - name: Plugin List - internal: plugins.html - -- title: Ecosystem - link: - internal: extend/index.md - cats: - - name: API - internal: extend/api.md - - name: App - internal: extend/app.md - - name: Plugins - internal: extend/plugin/index.md - - name: Integrations - internal: extend/integrate/index.md - -- title: Sitemap - cats: - - name: About - internal: about/index.md - - name: Alternatives - internal: alternatives/index.md - - name: Blog - internal: blog.html - - name: Contribute - internal: contribute.md - - name: Support - internal: support.md diff --git a/_data/general/stats.yml b/_data/general/stats.yml deleted file mode 100644 index f138bff97..000000000 --- a/_data/general/stats.yml +++ /dev/null @@ -1,16 +0,0 @@ -stats: - - name: Docker pulls - number: 3910244 - icon: fa-brands fa-docker - - name: GitHub Stars - number: 7890 - icon: fa-solid fa-star - - name: Forks - number: 1631 - icon: fa-solid fa-code-branch - - name: Contributors - number: 188 - icon: fa-solid fa-hands-helping - - name: Languages - number: 39 - icon: fa-solid fa fa-language diff --git a/_drafts/2022-12-30-release-highlights.md b/_drafts/2022-12-30-release-highlights.md deleted file mode 100644 index 90f2e08f1..000000000 --- a/_drafts/2022-12-30-release-highlights.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -author: matmair -title: Release highlights 0.9.0 ---- -InvenTree 0.9.0 is here! - -While there are full release notes listing all included patches we want to pick out a few of the major changes in this highlight. - -TODO diff --git a/_drafts/_news/2022-12-30-new-features-in-0.9.0.md b/_drafts/_news/2022-12-30-new-features-in-0.9.0.md deleted file mode 100644 index 57fd19deb..000000000 --- a/_drafts/_news/2022-12-30-new-features-in-0.9.0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -author: matmair -title: Release highlight 0.9.0 ---- -We recently released 0.9.0! - -Find the release highlights [in the blog]({% post_url 2022-12-30-release-highlights %}). diff --git a/_includes/base/footer.html b/_includes/base/footer.html deleted file mode 100644 index 63221e99d..000000000 --- a/_includes/base/footer.html +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/_includes/base/head.html b/_includes/base/head.html deleted file mode 100644 index 686ddb7a8..000000000 --- a/_includes/base/head.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - -{{ site.title }}{% if page.title %} - {{ page.title }}{% endif %} - - -{% seo %} \ No newline at end of file diff --git a/_includes/base/header.html b/_includes/base/header.html deleted file mode 100644 index 50c4eb22b..000000000 --- a/_includes/base/header.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
- - logo - {{ site.title }} - - -
- - - - {% if page.main_page %} - -   - Open demo - - {% endif %} -
-
\ No newline at end of file diff --git a/_includes/block/cta.html b/_includes/block/cta.html deleted file mode 100644 index 497c44803..000000000 --- a/_includes/block/cta.html +++ /dev/null @@ -1,17 +0,0 @@ -
- {% unless include.no_container %} -
- {% endunless %} -
-

{{ include.cta.text|default:include.text }}

- {% for item in include.cta.btn %} - {{ item.text }} - {% endfor %} - {% if include.link %} - {{ include.link_text }} - {% endif %} -
- {% unless include.no_container %} -
- {% endunless %} -
\ No newline at end of file diff --git a/_includes/block/features.html b/_includes/block/features.html deleted file mode 100644 index f4ad00e73..000000000 --- a/_includes/block/features.html +++ /dev/null @@ -1,39 +0,0 @@ -
-
-
-
-
-
-

{{ include.data.title }}

- {% if include.link %} - {% assign link=include.data.link|default:include.link %} - Arrow pointing right - {% endif %} -
-
-
-

{{ include.data.text }}

-
- -
- {% for item in include.data.features %} -
-
-

{{ item.subtitle }}

-

{{ item.title }}

-

{{ item.text }} - {% if include.extend and item.extend %}

{{ item.extend }}{% endif %} -

- {% if item.link %} - Learn More Arrow pointing right - {% endif %} -
-
- {% endfor %} -
- - {% if include.data.cta %} - {% include cta.html no_container=true cta=include.data.cta %} - {% endif %} -
-
\ No newline at end of file diff --git a/_includes/block/functions.html b/_includes/block/functions.html deleted file mode 100644 index aa53da3b4..000000000 --- a/_includes/block/functions.html +++ /dev/null @@ -1,34 +0,0 @@ -{% if include.padding != nil and include.padding != true %} - {% assign padding = false %} -{% else %} - {% assign padding = true %} -{% endif %} - -
-
- {% if include.data.title or include.data.text or include.data.link %} -
- {% if include.data.title %}

{{ include.data.title }}

{% endif %} - {% if include.data.text %}

{{ include.data.text }}

{% endif %} - {% if include.data.link and include.no_link != true %} - Learn More Arrow pointing right - {% endif %} -
- {% endif %} -
- {% assign function_len = include.data.functions | size %} - {% for item in include.data.functions %} -
-

{{ item.title }}

-

- {{ item.text }} - {% if include.extend and item.extend %}

{{ item.extend }}{% endif %} -

- {% if item.link %} - Learn More Arrow pointing right - {% endif %} -
- {% endfor %} -
-
-
\ No newline at end of file diff --git a/_includes/block/hero.html b/_includes/block/hero.html deleted file mode 100644 index c82458583..000000000 --- a/_includes/block/hero.html +++ /dev/null @@ -1,60 +0,0 @@ -
-
-
-

{{ include.title }} - {% if include.title_2 %} - {{ include.title_2 }} - {% endif %} - {% if include.color %} - {{ include.color }} - {% endif %} -

- {% if include.detail %} -

{{ include.detail }}

- {% endif %} - {% if include.buttons %} -
- {% for item in include.buttons %} - - {% endfor %} -
- {% endif %} -
-
- {% if include.image %} - hero - {% endif %} - {% if include.gallery %} - - {% endif %} -
-
-
- -{% if include.gallery %} - -{% endif %} diff --git a/_includes/block/plugins.html b/_includes/block/plugins.html deleted file mode 100644 index 97cdc027a..000000000 --- a/_includes/block/plugins.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
-

Plugin List

-

- Explore plugins provided by the community. - Learn More Arrow pointing right -

-
-
- {% assign filtered_repo = site.repo | sort: 'last-modified-date' | reverse %} - {% for plugin in filtered_repo limit:2 %} -
- {% include plugin_card.html plugin=plugin %} -
- {% endfor %} -
-
-
\ No newline at end of file diff --git a/_includes/block/stats.html b/_includes/block/stats.html deleted file mode 100644 index 46f5c6f5c..000000000 --- a/_includes/block/stats.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
- - {% assign stats = stats|default:site.data.general.stats.stats %} - {% for item in stats %} -
-

- {% if item.icon %} -   - {% endif %} - {{ item.number | intword }} -

-

{{ item.name }}

-
- {% endfor %} -
-
-
\ No newline at end of file diff --git a/_includes/block/team.html b/_includes/block/team.html deleted file mode 100644 index 96f6fe4dc..000000000 --- a/_includes/block/team.html +++ /dev/null @@ -1,37 +0,0 @@ -
-
- -
-

OUR TEAM

-

{{ include.data.text }}

-
-
-
- - {% for item in include.data.team %} -
-
-
-
-
- mdo -
-
-

{{ item.tag }}

-

{{ item.name }}

-
-
-

{{ item.text }}

- - {% for link in item.links %} - {{ link.text }} - {% endfor %} - -
-
-
- {% endfor %} - -
-
-
\ No newline at end of file diff --git a/_includes/fnc/link.html b/_includes/fnc/link.html deleted file mode 100644 index ae3fe3451..000000000 --- a/_includes/fnc/link.html +++ /dev/null @@ -1,18 +0,0 @@ -{% capture link %} -{% if include.internal %} - {% link include.internal %} -{% endif %} -{% if include.item.site %} - {{ site[include.item.site] }} -{% elsif include.item.internal %} - {% link {{ include.item.internal }} %} -{% elsif include.item.link %} - {{ include.item.link | include fnc/link.html }} -{% elsif include.item.home %} - {{ '/' | relative_url }} -{% elsif include.item %} - {{ include.item }} -{% endif %} -{% endcapture %} - -{{ link | strip }} \ No newline at end of file diff --git a/_includes/partial/alert.html b/_includes/partial/alert.html deleted file mode 100644 index 1040d9bc3..000000000 --- a/_includes/partial/alert.html +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/_includes/partial/publisher_link.html b/_includes/partial/publisher_link.html deleted file mode 100644 index edf6fc97b..000000000 --- a/_includes/partial/publisher_link.html +++ /dev/null @@ -1,3 +0,0 @@ -{% assign pub_small = include.pub %} -{% assign publisher_ref = site.publishers | where: 'short_name', pub_small | first %} -{{ publisher_ref.name }} \ No newline at end of file diff --git a/_includes/partial/publisher_ref.html b/_includes/partial/publisher_ref.html deleted file mode 100644 index c1da41f18..000000000 --- a/_includes/partial/publisher_ref.html +++ /dev/null @@ -1,7 +0,0 @@ -{% assign publisher_ref = site.publishers | where: 'short_name', include.pub | first %} - - - mdo -

 {{ include.pub }}

-
-
\ No newline at end of file diff --git a/_includes/plugin_card.html b/_includes/plugin_card.html deleted file mode 100644 index 17edf73e6..000000000 --- a/_includes/plugin_card.html +++ /dev/null @@ -1,20 +0,0 @@ - -
-
-
- {% for cat in plugin.categories %} - {{ cat }} - {% endfor %} - {% for tag in plugin.tags %} - {{ tag }} - {% endfor %} -
-

{{ plugin.name }}

-
- {% if plugin.published_on %}{{ plugin.published_on | date_to_string }} - {% endif %} - {% include partial/publisher_ref.html pub=plugin.author %} -
-

{{ plugin.excerpt | mardownify | remove: '

' | remove: '

' }}

-
-
-
\ No newline at end of file diff --git a/_includes/testimonials.html b/_includes/testimonials.html deleted file mode 100644 index efeb36aaf..000000000 --- a/_includes/testimonials.html +++ /dev/null @@ -1,37 +0,0 @@ -
-
-

Testimonials

-
-
-
- - - -

Synth chartreuse iPhone lomo cray raw denim brunch everyday carry neutra before they sold out fixie 90's microdosing. Tacos pinterest fanny pack venmo, post-ironic heirloom try-hard pabst authentic iceland.

- - testimonial - - Holden Caulfield - UI DEVELOPER - - -
-
-
-
- - - -

Synth chartreuse iPhone lomo cray raw denim brunch everyday carry neutra before they sold out fixie 90's microdosing. Tacos pinterest fanny pack venmo, post-ironic heirloom try-hard pabst authentic iceland.

- - testimonial - - Alper Kamu - DESIGNER - - -
-
-
-
-
\ No newline at end of file diff --git a/_layouts/alternatives.html b/_layouts/alternatives.html deleted file mode 100644 index 98213ada0..000000000 --- a/_layouts/alternatives.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: content ---- -
- {% include partial/alert.html - style='info' - title='caveat' - desc='Please keep in mind that this is the view of one or more devs of InvenTree. So there is an elemenet of bias involved.' - %} - {{ content }} - - {% if page.oss %} - {% include partial/alert.html - style='info' - title='(F)OSS' - desc="This alternative is (F)OSS - let's celebrate this by heading over, giving it a good look and staring the project! Motiviation keeps projects and maintainers going." - %} - {% endif %} - View other Alternatives. -
diff --git a/_layouts/collection/collection_base.html b/_layouts/collection/collection_base.html deleted file mode 100644 index dee1d4bd7..000000000 --- a/_layouts/collection/collection_base.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -layout: default ---- - -
- {% if page.backLink or page.backLink == nil %} - - go back - Back - - {% endif %} -
- -
-

{{ page.title }}

-

- {{ page.date | date_to_string }} - {% include partial/publisher_link.html pub=page.author %} -

- {{ content }} -
\ No newline at end of file diff --git a/_layouts/collection/collection_index.html b/_layouts/collection/collection_index.html deleted file mode 100644 index e0a2397e0..000000000 --- a/_layouts/collection/collection_index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: default ---- -
-
-

{{ page.title_text }}RSS symbol

-
- - {% assign cols = site[page.collection] %} - {% if page.collection_reverse == true %}{% assign cols = cols | reverse %}{% endif %} - {% for item in cols %} -
-

- {{ item.title }} -

- {{ item.excerpt | strip_html | strip_newlines | truncate: 156 }} - {{ item.date | date_to_string }} | {% include partial/publisher_link.html pub=item.author %} -
- {% endfor %} -
-
-
diff --git a/_layouts/collection/collection_refpage.html b/_layouts/collection/collection_refpage.html deleted file mode 100644 index 461960e46..000000000 --- a/_layouts/collection/collection_refpage.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -layout: default ---- - -
-

{{page.title}}

- - -{% assign all_items = "" | split: "/" %} -{% for col_item in site[page.collection] %} - {% for item in col_item[page.reference] %} - {% assign preprocessed = item | strip %} - {% unless preprocessed == "" %} - {% assign all_items = all_items | push: preprocessed %} - {% endunless %} - {% endfor %} -{% endfor %} -{% assign all_items = all_items | uniq | sort %} - -

The full list of plugins is available on the main plugin list page.


-

Click on a name to jump to the plugins that are marked with it.

- -{% for item in all_items %} - {% unless tag == "" %} - - {{ item }} - - {% endunless %} -{% endfor %} -
-

- -{% for item in all_items %} - {% unless item == "" %} -
-

{{ item }}

- -
- {% for plugin in site[page.collection] %} - {% assign col_items = "" | split: "/" %} - {% for item in plugin[page.reference] %} - {% assign lower_item = item %} - {% assign col_items = col_items | push: lower_item %} - {% endfor %} - {% if col_items contains item %} -
{% include plugin_card.html plugin=plugin %}
- {% endif %} - {% endfor %} -
- {% endunless %} -{% endfor %} - -
\ No newline at end of file diff --git a/_layouts/collection/news.html b/_layouts/collection/news.html deleted file mode 100644 index 2f89785d2..000000000 --- a/_layouts/collection/news.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: collection/collection_base -base_link: '/news' ---- -{{ content }} diff --git a/_layouts/collection/post.html b/_layouts/collection/post.html deleted file mode 100644 index 83746349b..000000000 --- a/_layouts/collection/post.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: collection/collection_base -base_link: '/blog' ---- -{{ content }} diff --git a/_layouts/content.html b/_layouts/content.html deleted file mode 100644 index 52d7c0c07..000000000 --- a/_layouts/content.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -layout: default ---- - - - {% if layout.notitle != true %} -

{{ page.title }}

- {% endif %} - {{ content }} - diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index 5a679b82d..000000000 --- a/_layouts/default.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - {% include base/head.html %} - - - -
- {% include base/header.html %} {{ content }} -
- -
-
- {% include base/footer.html %} -
- - - diff --git a/_layouts/empty.html b/_layouts/empty.html deleted file mode 100644 index e02a27c0d..000000000 --- a/_layouts/empty.html +++ /dev/null @@ -1 +0,0 @@ -{{ content }} \ No newline at end of file diff --git a/_layouts/plugin.html b/_layouts/plugin.html deleted file mode 100644 index 750a583f4..000000000 --- a/_layouts/plugin.html +++ /dev/null @@ -1,109 +0,0 @@ ---- -layout: content -notitle: true -fullwith: true ---- -

{{ page.name }} -{% include partial/publisher_ref.html pub=page.author %} -last modified: {{ page.last-modified-date | date_to_string }} -

- -
-
- {{ content }} -
- -
-

Detail section

-
-

License: - - {% if page.open_source %}{% else %}{% endif %} - {{ page.license }}
-
-

- Status:
-
- - {% if page.stable %} - Stable - {% else %} - Unstable - {% endif %} - -
-
- - {% if page.maintained %} - Maintained - {% else %} - Unmaintained - {% endif %} - -
-
- {% if page.pypi and page.package_name %}Package on PyPI:
{{ page.package_name }}
{% endif %} -

- - {% if page.website %} - -
- -

{{ page.website }}

-
-
- {% endif %} - - {% if page.issue_tracker %} - -
- -
-
- {% endif %} - - {% if page.github %} - -
- -

{{ page.github | remove: "https://github.com/" }}

-
-
- {% endif %} - {% if page.gitlab %} - -
- -

{{ page.gitlab | remove: "https://gitlab.com/" }}

-
-
- {% endif %} - {% if page.source %} - -
- -

{{ page.source }}

-
-
- {% endif %} - -
- -
- {% for categorie in page.categories %} - {{ categorie }} - {% endfor %} -
-
- -
- -
- {% for tag in page.tags %} - {{ tag }} - {% endfor %} -
-
-
-
-
diff --git a/_layouts/publisher.html b/_layouts/publisher.html deleted file mode 100644 index 27c88e2d9..000000000 --- a/_layouts/publisher.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: content -notitle: true ---- -

-
- {% if page.github %} -
- mdo -
- {% endif %} - {{ page.name }} -
-

- -
-{% if page.github %} -GitHub -{% endif %} - -{% if page.website %} -Website -{% endif %} - -{% assign filtered_team = site.data.team.team | where: 'tag', page.short_name %} -{% if filtered_team and filtered_team.size != 0 %} -Team Member -{% endif %} -
- -
- {{ content }} -
- -{% assign filtered_posts = site.posts | where: 'author', page.short_name %} -{% if filtered_posts and filtered_posts.size != 0 %} -

Posts

-
    - {% for post in filtered_posts %} -
  • {{ post.date | date_to_string }} {{ post.title }}
  • - {% endfor %} -
-{% endif %} - -{% assign filtered_plugins = site.repo | where: 'author', page.short_name %} -{% if filtered_plugins and filtered_plugins.size != 0 %} -

Plugins

- -{% endif %} \ No newline at end of file diff --git a/_layouts/user.html b/_layouts/user.html deleted file mode 100644 index f161b780e..000000000 --- a/_layouts/user.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -layout: default ---- - -{% include block/hero.html - title=site.tagline - title_2=page.title_2 - image='https://dummyimage.com/860x600' - color='with InvenTree' - detail=page.long_text - buttons=page.buttons -%} - -{% assign data = site.data[page.data] %} -{% include block/features.html data=data extend=true %} - -{% include block/cta.html cta=site.data.ctas.learn %} -{% include block/functions.html data=site.data.functions.general extend=true %} -{% include block/cta.html cta=site.data.ctas.end %} diff --git a/_news/2023-06-26-0.12.0.md b/_news/2023-06-26-0.12.0.md deleted file mode 100644 index 1b3249669..000000000 --- a/_news/2023-06-26-0.12.0.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -author: SchrodingersGat -title: 0.12.0 Release ---- - -### 0.12.0 Release - -We are pleased to announce the 0.12.0 stable release, which represents a major upgrade to the InvenTree software! Read more about it in our [blog post]({% post_url 2023-06-26-0.12.0 %}) diff --git a/_news/2023-07-13-0.12.1.md b/_news/2023-07-13-0.12.1.md deleted file mode 100644 index 28351c217..000000000 --- a/_news/2023-07-13-0.12.1.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -author: SchrodingersGat -title: 0.12.1 Release ---- - -### 0.12.1 Release - -The 0.12.1 bugfix release is now available diff --git a/_news/2023-09-26-kicad-integration.md b/_news/2023-09-26-kicad-integration.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/_news/2023-12-15-0.13.0.md b/_news/2023-12-15-0.13.0.md deleted file mode 100644 index 61d593baa..000000000 --- a/_news/2023-12-15-0.13.0.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -author: SchrodingersGat -title: 0.13.0 Release ---- - -### 0.13.0 Release - -We are pleased to announce the 0.13.0 stable release, which represents a major upgrade to the InvenTree software! - -- Read more about it in our [blog post]({% post_url 2023-12-15-0.13.0 %}) -- View the [release notes](https://github.com/inventree/InvenTree/releases/tag/0.13.0) \ No newline at end of file diff --git a/_news/2026-04-07-1.2.7.md b/_news/2026-04-07-1.2.7.md deleted file mode 100644 index 6fce77875..000000000 --- a/_news/2026-04-07-1.2.7.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -author: SchrodingersGat -title: 1.2.7 Release ---- - -### Action Required - Security Update - -The InvenTree has published the [1.2.7 release](/blog/2026/04/07/1.2.7) which includes a number of security fixes. We recommend all users to update to this version as soon as possible. \ No newline at end of file diff --git a/_plugins/LICENSE b/_plugins/LICENSE deleted file mode 100644 index c8588ff5a..000000000 --- a/_plugins/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ryan Morrissey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/_plugins/author_permalink.rb b/_plugins/author_permalink.rb deleted file mode 100644 index 81febb1b0..000000000 --- a/_plugins/author_permalink.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Jekyll - module Drops - class UrlDrop < Drop - def doc_author - @obj.data['author'] - end - end - end - end \ No newline at end of file diff --git a/_plugins/hook-add-last-modified-date.rb b/_plugins/hook-add-last-modified-date.rb deleted file mode 100644 index 834d39f37..000000000 --- a/_plugins/hook-add-last-modified-date.rb +++ /dev/null @@ -1,22 +0,0 @@ -# see https://stackoverflow.com/a/36769049/17860466 - -Jekyll::Hooks.register :posts, :pre_render do |post| - - # get the current post last modified time - modification_time = File.mtime( post.path ) - - # inject modification_time in post's datas. - post.data['last-modified-date'] = modification_time - -end - - -Jekyll::Hooks.register :repo, :pre_render do |repo| - - # get the current post last modified time - modification_time = File.mtime( repo.path ) - - # inject modification_time in post's datas. - repo.data['last-modified-date'] = modification_time - -end \ No newline at end of file diff --git a/_plugins/humanize.rb b/_plugins/humanize.rb deleted file mode 100644 index 349e7e428..000000000 --- a/_plugins/humanize.rb +++ /dev/null @@ -1,258 +0,0 @@ -module Jekyll - - module Humanize - ## - # This is a port of the Django app `humanize` which adds a "human touch" - # to data. Given that Jekyll produces static sites, some of the original - # methods do not make logical sense (e.g. naturaltime). - # - # Source code can be viewed here: - # https://github.com/django/django - # - # Copyright (c) Django Software Foundation and individual contributors. - # All rights reserved. - - #################### - # PUBLIC METHODS # - #################### - - def ordinal(value, flag=nil) - ## - # Converts an integer to its ordinal as a string. 1 is '1st', 2 is '2nd', - # 3 is '3rd', etc. Works for any integer. - # - # Usage: - # {{ somenum }} >>> 3 - # {{ somenum | ordinal }} >>> '3rd' - # {{ somenum | ordinal: "super" }} >>> '3rd' - - begin - value = value.to_i - flag.to_s.downcase! - rescue Exception => e - puts "#{e.class} #{e}" - return value - end - - suffix = "" - suffixes = ["th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"] - unless [11, 12, 13].include? value % 100 then - suffix = suffixes[value % 10] - else - suffix = suffixes[0] - end - - unless flag and flag == "super" - return "#{value}%s" % suffix - else - return "#{value}%s" % suffix - end - - end - - def intcomma(value, delimiter=",") - ## - # Converts an integer to a string containing commas every three digits. - # For example, 3000 becomes '3,000' and 45000 becomes '45,000'. - # Optionally supports a delimiter override for commas. - # - # Usage: - # {{ post.content | number_of_words }} >>> 12345 - # {{ post.content | number_of_words | intcomma }} >>> '12,345' - # {{ post.content | number_of_words | intcomma: '.' }} >>> '12.345' - - begin - orig = value.to_s - delimiter = delimiter.to_s - rescue Exception => e - puts "#{e.class} #{e}" - return value - end - - copy = orig.strip - copy = orig.gsub(/^(-?\d+)(\d{3})/, "\\1#{delimiter}\\2") - orig == copy ? copy : intcomma(copy, delimiter) - end - - INTWORD_HELPERS = [ - [6, "million"], - [9, "billion"], - [12, "trillion"], - [15, "quadrillion"], - [18, "quintillion"], - [21, "sextillion"], - [24, "septillion"], - [27, "octillion"], - [30, "nonillion"], - [33, "decillion"], - [100, "googol"], - ] - - def intword(value) - ## - # Converts a large integer to a friendly text representation. Works best - # for numbers over 1 million. For example, 1000000 becomes '1.0 million', - # 1200000 becomes '1.2 million' and 1200000000 becomes '1.2 billion'. - # - # Usage: - # {{ largenum }} >>> 1200000 - # {{ largenum | intword }} >>> '1.2 million' - - begin - value = value.to_i - rescue Exception => e - puts "#{e.class} #{e}" - return value - end - - if value < 1000000 - return value - end - - for exponent, text in INTWORD_HELPERS - large_number = 10 ** exponent - - if value < large_number * 1000 - return "%#{value}.1f #{text}" % (value / large_number.to_f) - end - - end - - return value - end - - def apnumber(value) - ## - # For numbers 0-9, returns the number spelled out. Otherwise, returns the - # number. This follows Associated Press style. - # - # Usage: - # {{ num }} >>> 6 - # {{ num | apnumber }} >>> six - - begin - value = value.to_i - rescue Exception => e - puts "#{e.class} #{e}" - return value - end - - unless value >= 0 and value < 10 then - return value - else - return ["zero", "one", "two", "three", "four", "five", "six", - "seven", "eight", "nine"][value] - end - - end - - def naturalday(date) - ## - # For date values that are within a 9 day stretch from present day, this - # will attempt to return the string representation in the format of today, - # tomorrow, yesterday, "in # days" or "# days ago". Otherwise, returns a - # string formatted according to the "date_format" setting in your - # _config.yml file using strftime format (if not defined, it will default - # to "%m/%d/%Y"). - # - # Usage: - # TODAY == 01/26/2014 - # {{ post.updated }} >>> 01/25/2014 - # {{ post.updated | naturalday }} >>> 'yesterday' - # {{ post.date }} >>> 01/19/2014 - # {{ post.date | naturalday }} >>> 'seven days ago' - - begin - site = @context.registers[:site] - date_format = site.config['humanize']['date_format'] - date = time(date).to_date - rescue Exception => e - puts "#{e.class} #{e}" - return date - end - - unless date_format then - date_format = "%m/%d/%Y" - end - - today = time(Time.now).to_date - delta = (date - today).to_i - - case delta - when 0 - return "today" - when 1 - return "tomorrow" - when 2..9 - delta = apnumber(delta) - return "in #{delta} days" - when -1 - return "yesterday" - when -9..-2 - delta = apnumber(delta * -1) - return "#{delta} days ago" - else - return date.strftime("#{date_format}") - end - - end - - def filesize(value) - ## - # For filesize values in bytes, returns the number rounded to 3 - # decimal places with the correct suffix. - # - # Usage: - # {{ bytes }} >>> 123456789 - # {{ bytes | filesize }} >>> 117.738 MB - filesize_tb = 1099511627776.0 - filesize_gb = 1073741824.0 - filesize_mb = 1048576.0 - filesize_kb = 1024.0 - - begin - value = value.to_f - rescue Exception => e - puts "#{e.class} #{e}" - return value - end - - if value >= filesize_tb - return "%s TB" % (value / filesize_tb).to_f.round(3) - elsif value >= filesize_gb - return "%s GB" % (value / filesize_gb).to_f.round(3) - elsif value >= filesize_mb - return "%s MB" % (value / filesize_mb).to_f.round(3) - elsif value >= filesize_kb - return "%s KB" % (value / filesize_kb).to_f.round(0) - elsif value == 1 - return "1 byte" - else - return "%s bytes" % value.to_f.round(0) - end - - end - - ##################### - # PRIVATE METHODS # - ##################### - - private - def time(input) - case input - when Time - input - when String - Time.parse(input) - else - Jekyll.logger.error "Invalid Date:", "'#{input}' not valid datetime." - exit(1) - end - end - - end - - end - - Liquid::Template.register_filter(Jekyll::Humanize) - \ No newline at end of file diff --git a/_posts/2021-10-25-starting.md b/_posts/2021-10-25-starting.md deleted file mode 100644 index 1c405aa1e..000000000 --- a/_posts/2021-10-25-starting.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -author: matmair -title: Starting with templates ---- -A good starting-point for developing your own plugin is taking a look at the [documentation](https://docs.inventree.org/en/stable/plugins/). - -You could also use one of the current plugins as a sample. \ No newline at end of file diff --git a/_publishers/lippoliv.md b/_publishers/lippoliv.md deleted file mode 100644 index 930e797ef..000000000 --- a/_publishers/lippoliv.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -short_name: lippoliv # GitHub username - must be the same as the filename -name: Oliver Lippert # The name/alias/whatever you want to be displayed -github: lippoliv # Your GitHub username - if you switch to a new account, please update this -website: https://www.linkedin.com/in/oliver-lippert-730b9927/ # Your website, twitter, reddit - optional ---- -With over 15 years of experience and big big passion I learned to take care about the details. They build up to the big picture we have in mind. I'm planning ahead & act early to prevent a big bang. \ No newline at end of file diff --git a/_publishers/matmair.md b/_publishers/matmair.md deleted file mode 100644 index 86f793c01..000000000 --- a/_publishers/matmair.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -short_name: matmair -name: Matthias Mair -github: matmair -website: https://mjmair.com ---- -I try to build an ecosystem of reusable plugins and integrations for InvenTree. Code once and KISS! diff --git a/_publishers/melektron.md b/_publishers/melektron.md deleted file mode 100644 index f3d75afb7..000000000 --- a/_publishers/melektron.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -short_name: melektron # GitHub username - must be the same as the filename -name: melektron # The name/alias/whatever you want to be displayed -github: melektron # Your GitHub username - if you switch to a new account, please update this -website: https://elektron.work/ # Your website, twitter, reddit - optional ---- -Juggling with bits and bytes for fun and profit ;) (and also electrons if I feel like it) \ No newline at end of file diff --git a/_publishers/piramja.md b/_publishers/piramja.md deleted file mode 100644 index dc5eadeda..000000000 --- a/_publishers/piramja.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -short_name: piramja -name: Martin P. -github: piramja ---- -And in the end, we have no choice but to embrace the chaos and laugh about it. diff --git a/about/index.md b/about/index.md deleted file mode 100644 index 5263c3281..000000000 --- a/about/index.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: About ---- -InvenTree is an open-source inventory management system which provides intuitive parts management and stock control. -It is at the center of an ecosystem of addins for EDA tools, API wrapper, deeply integrated plugins and 3rd party tools. - -### Open Source -We are open source all the way. Webserver, Docs, App and Website are MIT licensed. Please check the [source directory](https://github.com/inventree/InvenTree/) if you want to look at the source code. - -### Open governance -The roadmap for InvenTree is created by the [contributors](team). There is no solid roadmap but the team has general areas of interest and [milestones](https://github.com/inventree/InvenTree/milestones) to provide an outlook to what is to come. As this project is done in spare/free time; there is no set release timeline. - -Big ticket items that have the interest of the maintainer or a dedicated developer get the label `roadmap`: those projects are likely to be worked on in the assigned milestones. [Take a peek](https://github.com/inventree/InvenTree/issues?q=is%3Aissue+is%3Aopen+label%3Aroadmap)! - -### Goals - -The **main goal** is to keep existing instances **stable** and provide a transparent way to migrate to newer versions - no matter how old the install. This does not absolve the deployers from reading the changelogs! - -We are also actively working on: -- **raising the profile** of InvenTree to get a wider developer base -- supporting **translation** into every wanted language - [learn more]({% link contribute.md %}) -- creating [integrations]({% link extend/plugin/index.md %}) into other business and EE-systems via the **plugin system** - -### Motivations - -InvenTree is built and maintained by users who are passionate about the project. The core team members use InvenTree in their companies, laboratories and organisations to make their life easier. - -The InvenTree project is driven by the support of its developers and users. We all want to see the project grow and be embraced by others, who may in turn be inspired to contribute themselves. - -There is no inherent monetary interest but if you would like to [support the project]({% link contribute.md %}) - we appreciate it. diff --git a/about/team.html b/about/team.html deleted file mode 100644 index 1a20c703f..000000000 --- a/about/team.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Team ---- - -{{site.data.team.text}} -
- -

Maintainer

- -

SchrodingersGat

-

Oliver is an Australian EE. He started InvenTree in 2017 and is the maintainer. - GitHub -

- -

Active Team

- -{% for item in site.data.team.team %} -

{{ item.tag }}

-

{{ item.text }} - - {% for link in item.links %} - {{ link.text }} - {% endfor %} - -

-{% endfor %} - -

Contributors

-

ToDo / Looking for suggestions.

- - -

Disclaimer

-

The list is in no way complete and only contains the most active devs when the website was created. If you feel someone is missing feel free to open an issue in the GitHub repo.

\ No newline at end of file diff --git a/alternatives/index.md b/alternatives/index.md deleted file mode 100644 index ae7a2609b..000000000 --- a/alternatives/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Alternatives ---- - -InvenTree is by far not the only software for managing 'things'™, there are even a few in the OSS space that may address all your possible needs. We have compiled a list with several competitors, and why they might be a better fit. - -PLMs: -- [Partkeepr](https://partkeepr.org/) - one of the OG OSS inventory solutions -- [Partsbox](https://partsbox.com/) `for profit` nice interface and reasonable priced for SMEs -- [Bomist](https://bomist.com/) `for profit` free version with limited function - -Asset Management: -- [SnipeIt](https://snipeitapp.com/) - battleproven stable in the PHP scene -- [Odoo](https://github.com/odoo) - full open source ERP - -Other: -- [Excel](https://de.wikipedia.org/wiki/Microsoft_Excel) `for profit` be honest to yourself - could you handle it with a spreadsheet? diff --git a/assets/back.svg b/assets/back.svg deleted file mode 100644 index 943b03f11..000000000 --- a/assets/back.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/github.svg b/assets/github.svg deleted file mode 100644 index dee6ea38c..000000000 --- a/assets/github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/index.css b/assets/index.css deleted file mode 100644 index a53370339..000000000 --- a/assets/index.css +++ /dev/null @@ -1,119 +0,0 @@ ---- -layout: empty ---- - -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; - - -@layer components { - article { - @apply prose prose-sm sm:prose lg:prose-lg xl:prose-xl m-5 sm:mx-auto - } - - .custom-underline-blue { - @apply border-b-4 border-blue-400; - } - - .section-container { - @apply container px-5 py-24 mx-auto - } - - .header-text{ - @apply sm:text-3xl text-2xl font-medium - } - - .footer-link { - @apply text-gray-600 hover:text-gray-800 - } - - .footer-categorie { - @apply font-medium text-gray-900 tracking-widest text-sm mb-3 - } - - .cm-hvr-btn { - @apply text-gray-700 bg-gray-100 hover:bg-gray-200 rounded - } - - .cm-hvr-btn-primary { - @apply text-white bg-secondary hover:bg-primary rounded - } - - .cm-gray-1 { - @apply text-gray-900 - } - - .cm-gray-2 { - @apply text-gray-600 - } - - .cm-gray-3 { - @apply text-gray-500 - } - - a.anchor { - display: block; - position: relative; - top: -72px; - visibility: hidden; - } - - .content a { - color:#111827; - font-weight:500; - text-decoration:underline; - } - - .color-link { - @apply text-secondary - } - - .badge { - @apply py-1 px-2.5 rounded-full - } - - .list-unstyled { - padding-left: 0px; - position: initial; - @apply list-none - } - - .list-unstyled li { - padding-left: 0px; - position: initial; - @apply list-none - } - - .plugin_cat { - @apply badge bg-yellow-500 whitespace-nowrap - } - - .plugin_tag { - @apply badge bg-blue-400 whitespace-nowrap - } - - .max-w-p90 { - max-width: 90% - } - - img + em { - display: block; - text-align: center; - } - - .plugin_links { - @apply mb-0 italic - } - - .success { - color: #155724; - } - - .anchor { - display: block; - position: relative; - top: -4.5rem; - visibility: hidden; - } -} diff --git a/assets/info.svg b/assets/info.svg deleted file mode 100644 index ad68a4b8f..000000000 --- a/assets/info.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/learn.svg b/assets/learn.svg deleted file mode 100644 index a431d23f6..000000000 --- a/assets/learn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/mastodon.svg b/assets/mastodon.svg deleted file mode 100644 index 508a31126..000000000 --- a/assets/mastodon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/assets/reddit.svg b/assets/reddit.svg deleted file mode 100644 index 222028aa8..000000000 --- a/assets/reddit.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/rss.svg b/assets/rss.svg deleted file mode 100644 index 309e346c4..000000000 --- a/assets/rss.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/splide/css/splide-core.min.css b/assets/splide/css/splide-core.min.css deleted file mode 100644 index 62ab40e70..000000000 --- a/assets/splide/css/splide-core.min.css +++ /dev/null @@ -1 +0,0 @@ -@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list{display:block}.splide__track--fade>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0} \ No newline at end of file diff --git a/assets/splide/css/themes/splide-default.min.css b/assets/splide/css/themes/splide-default.min.css deleted file mode 100644 index 00ddcc3b8..000000000 --- a/assets/splide/css/themes/splide-default.min.css +++ /dev/null @@ -1 +0,0 @@ -.splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list{display:block}.splide__track--fade>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__arrow{-ms-flex-align:center;align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:2em;-ms-flex-pack:center;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover:not(:disabled){opacity:.9}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #0bf;outline-offset:3px}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;position:relative;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4);z-index:1}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #0bf;outline-offset:3px}.splide__progress__bar{background:#ccc;height:3px}.splide__slide{-webkit-tap-highlight-color:transparent}.splide__slide:focus{outline:0}@supports(outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #0bf}}@supports(outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #0bf}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#0bf}}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #0bf;outline-offset:3px}.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0} \ No newline at end of file diff --git a/assets/splide/css/themes/splide-sea-green.min.css b/assets/splide/css/themes/splide-sea-green.min.css deleted file mode 100644 index 8ef16ef12..000000000 --- a/assets/splide/css/themes/splide-sea-green.min.css +++ /dev/null @@ -1 +0,0 @@ -.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;border-radius:4px;cursor:pointer;opacity:.7}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #20b2aa;opacity:1}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:1em;top:0}.splide__pagination--ttb .splide__pagination__page{height:20px;width:5px}.splide__arrow{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:0;cursor:pointer;display:-ms-flexbox;display:flex;height:2.5em;-ms-flex-pack:center;justify-content:center;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2.5em;z-index:1}.splide__arrow svg{fill:#20b2aa;height:2.5em;transition:fill .2s linear;width:2.5em}.splide__arrow:hover:not(:disabled) svg{fill:#57e1d9}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #20b2aa;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #20b2aa;outline-offset:3px}.splide__pagination{bottom:1em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:2.5px;display:inline-block;height:5px;margin:3px;padding:0;position:relative;transition:background-color .2s linear;width:20px}.splide__pagination__page.is-active{background:#20b2aa;z-index:1}.splide__pagination__page:hover{background:#57e1d9;cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #20b2aa;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #20b2aa;outline-offset:3px}.splide__slide{-webkit-tap-highlight-color:transparent;border-radius:4px}.splide__slide:focus{outline:0}@supports(outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #20b2aa;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #20b2aa}}@supports(outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #20b2aa;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #20b2aa}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#20b2aa}}.splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #20b2aa;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list{display:block}.splide__track--fade>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__progress__bar{background:#ccc;height:3px}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #20b2aa;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #20b2aa;outline-offset:3px}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__slider>.splide__arrows .splide__arrow--prev{left:-2.5em}.splide__slider>.splide__arrows .splide__arrow--next{right:-2.5em}.splide{padding:3em} \ No newline at end of file diff --git a/assets/splide/css/themes/splide-skyblue.min.css b/assets/splide/css/themes/splide-skyblue.min.css deleted file mode 100644 index 7b0b229a6..000000000 --- a/assets/splide/css/themes/splide-skyblue.min.css +++ /dev/null @@ -1 +0,0 @@ -.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer;opacity:.7}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #00bfff;opacity:1}.splide__arrow{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:0;cursor:pointer;display:-ms-flexbox;display:flex;height:2.5em;-ms-flex-pack:center;justify-content:center;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2.5em;z-index:1}.splide__arrow svg{fill:#00bfff;height:2.5em;transition:fill .2s linear;width:2.5em}.splide__arrow:hover:not(:disabled) svg{fill:#66d9ff}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #00bfff;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #00bfff;outline-offset:3px}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:10px;margin:3px;padding:0;position:relative;transition:background-color .2s linear,transform .2s linear;width:10px}.splide__pagination__page.is-active{background:#00bfff;transform:scale(1.4);z-index:1}.splide__pagination__page:hover{background:#66d9ff;cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #00bfff;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #00bfff;outline-offset:3px}.splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #00bfff;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list{display:block}.splide__track--fade>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__progress__bar{background:#ccc;height:3px}.splide__slide{-webkit-tap-highlight-color:transparent}.splide__slide:focus{outline:0}@supports(outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #00bfff;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #00bfff}}@supports(outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #00bfff;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #00bfff}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#00bfff}}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #00bfff;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #00bfff;outline-offset:3px}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0} \ No newline at end of file diff --git a/assets/splide/js/splide-renderer.min.js b/assets/splide/js/splide-renderer.min.js deleted file mode 100644 index 3ac16e149..000000000 --- a/assets/splide/js/splide-renderer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SplideRenderer=e()}(this,function(){"use strict";var r="rtl",o="ttb",a={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]};function n(t,e,n){return{resolve:function(t,e,i){var s=(i=i||n.direction)!==r||e?i===o?0:-1:1;return a[t]&&a[t][s]||t.replace(/width|left|right/i,function(t,e){t=a[t.toLowerCase()][s]||t;return 0 img","display",t.cover?"none":"inline",e)})},e.buildTranslate=function(t){var e=this.Direction,i=e.resolve,s=e.orient,e=[];return e.push(this.cssOffsetClones(t)),e.push(this.cssOffsetGaps(t)),this.isCenter(t)&&(e.push(this.buildCssValue(s(-50),"%")),e.push.apply(e,this.cssOffsetCenter(t))),e.filter(Boolean).map(function(t){return"translate"+i("X")+"("+t+")"}).join(" ")},e.cssOffsetClones=function(t){var e=this.Direction,i=e.resolve,s=e.orient,n=this.getCloneCount();if(this.isFixedWidth(t)){e=this.parseCssValue(t[i("fixedWidth")]),i=e.value,e=e.unit;return this.buildCssValue(s(i)*n,e)}return s(100*n/t.perPage)+"%"},e.cssOffsetCenter=function(t){var e=this.Direction,i=e.resolve,e=e.orient;if(this.isFixedWidth(t)){var s=this.parseCssValue(t[i("fixedWidth")]),n=s.value,r=s.unit;return[this.buildCssValue(e(n/2),r)]}var s=[],n=t.perPage,r=t.gap;return s.push(e(50/n)+"%"),r&&(r=(t=this.parseCssValue(r)).value,t=t.unit,s.push(this.buildCssValue(e((r/n-r)/2),t))),s},e.cssOffsetGaps=function(t){var e=this.getCloneCount();if(e&&t.gap){var i=this.Direction.orient,s=this.parseCssValue(t.gap),n=s.value,s=s.unit;if(this.isFixedWidth(t))return this.buildCssValue(i(n*e),s);t=t.perPage;return this.buildCssValue(i(e/t*n),s)}return""},e.resolve=function(t){return W(this.Direction.resolve(t))},e.cssPadding=function(t,e){t=t.padding,e=this.Direction.resolve(e?"right":"left",!0);return t&&V(t[e]||(y(t)?0:t))||"0px"},e.cssTrackHeight=function(t){var e="";return this.isVertical()&&(T(e=this.cssHeight(t),'"height" is missing.'),e="calc("+e+" - "+this.cssPadding(t,!1)+" - "+this.cssPadding(t,!0)+")"),e},e.cssHeight=function(t){return V(t.height)},e.cssSlideWidth=function(t){return t.autoWidth?"":V(t.fixedWidth)||(this.isVertical()?"":this.cssSlideSize(t))},e.cssSlideHeight=function(t){return V(t.fixedHeight)||(this.isVertical()?t.autoHeight?"":this.cssSlideSize(t):this.cssHeight(t))},e.cssSlideSize=function(t){var e=V(t.gap);return"calc((100%"+(e&&" + "+e)+")/"+(t.perPage||1)+(e&&" - "+e)+")"},e.cssAspectRatio=function(t){t=t.heightRatio;return t?""+1/t:""},e.buildCssValue=function(t,e){return""+t+e},e.parseCssValue=function(t){return m(t)?{value:parseFloat(t)||0,unit:t.replace(/\d*(\.\d*)?/,"")||"px"}:{value:t,unit:"px"}},e.parseBreakpoints=function(){var i=this,t=this.options.breakpoints;this.breakpoints.push(["default",this.options]),t&&E(t,function(t,e){i.breakpoints.push([e,L(L({},i.options),t)])})},e.isFixedWidth=function(t){return!!t[this.Direction.resolve("fixedWidth")]},e.isLoop=function(){return"loop"===this.options.type},e.isCenter=function(t){if("center"===t.focus){if(this.isLoop())return!0;if("slide"===this.options.type)return!this.options.trimSpace}return!1},e.isVertical=function(){return this.options.direction===o},e.buildClasses=function(){var t=this.options;return[s,s+"--"+t.type,s+"--"+t.direction,t.drag&&s+"--draggable",t.isNavigation&&s+"--nav",d,!this.config.hidden&&"is-rendered"].filter(Boolean).join(" ")},e.buildAttrs=function(t){var i="";return E(t,function(t,e){i+=t?" "+W(e)+'="'+t+'"':""}),i.trim()},e.buildStyles=function(t){var i="";return E(t,function(t,e){i+=" "+W(e)+":"+t+";"}),i.trim()},e.renderSlides=function(){var e=this,i=this.config.slideTag;return this.slides.map(function(t){return"<"+i+" "+e.buildAttrs(t.attrs)+">"+(t.html||"")+""}).join("")},e.cover=function(t){var e=t.styles,t=t.html,t=void 0===t?"":t;!this.options.cover||this.options.lazyLoad||(t=t.match(//))&&t[2]&&(e.background="center/cover no-repeat url('"+t[2]+"')")},e.generateClones=function(s){for(var n=this.options.classes,r=this.getCloneCount(),t=s.slice();t.length',t+=this.renderArrow(!0),t+=this.renderArrow(!1),t+=""},e.renderArrow=function(t){var e=this.options,i=e.classes,e=e.i18n,e={class:i.arrow+" "+(t?i.prev:i.next),type:"button",ariaLabel:t?e.prev:e.next};return"'},e.html=function(){var t=this.config,e=t.rootClass,i=t.listTag,s=t.arrows,n=t.beforeTrack,r=t.afterTrack,o=t.slider,a=t.beforeSlider,u=t.afterSlider,t="";return t+='
',t+="",o&&(t+=a||"",t+='
'),t+=n||"",s&&(t+=this.renderArrows()),t+='
',t+="<"+i+' class="splide__list">',t+=this.renderSlides(),t+="",t+="
",t+=r||"",o&&(t+="
",t+=u||""),t+="
"},t}()}); -//# sourceMappingURL=splide-renderer.min.js.map diff --git a/assets/splide/js/splide-renderer.min.js.map b/assets/splide/js/splide-renderer.min.js.map deleted file mode 100644 index 6e92fb058..000000000 --- a/assets/splide/js/splide-renderer.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"splide-renderer.min.js","sources":["../../src/js/constants/directions.ts","../../src/js/components/Direction/Direction.ts","../../src/js/constants/arrows.ts","../../src/js/constants/project.ts","../../src/js/constants/classes.ts","../../src/js/constants/defaults.ts","../../src/js/constants/i18n.ts","../../src/js/utils/arrayLike/slice/slice.ts","../../src/js/utils/function/apply/apply.ts","../../src/js/utils/type/type.ts","../../src/js/utils/array/toArray/toArray.ts","../../src/js/utils/array/forEach/forEach.ts","../../src/js/utils/array/push/push.ts","../../src/js/utils/dom/matches/matches.ts","../../src/js/utils/dom/child/child.ts","../../src/js/utils/dom/children/children.ts","../../src/js/utils/object/ownKeys/ownKeys.ts","../../src/js/utils/object/forOwn/forOwn.ts","../../src/js/utils/object/assign/assign.ts","../../src/js/utils/object/merge/merge.ts","../../src/js/utils/dom/remove/remove.ts","../../src/js/utils/dom/unit/unit.ts","../../src/js/utils/error/assert/assert.ts","../../src/js/utils/math/math/math.ts","../../src/js/utils/string/camelToKebab/camelToKebab.ts","../../src/js/utils/string/uniqueId/uniqueId.ts","../../src/js/constructors/EventBinder/EventBinder.ts","../../src/js/utils/array/empty/empty.ts","../../src/js/constructors/EventInterface/EventInterface.ts","../../src/js/constants/events.ts","../../src/js/renderer/constants/defaults.ts","../../src/js/renderer/Style/Style.ts","../../src/js/renderer/SplideRenderer/SplideRenderer.ts","../../src/js/utils/string/pad/pad.ts","../../src/js/utils/dom/queryAll/queryAll.ts","../../src/js/constants/types.ts","../../src/js/renderer/constants/classes.ts","../../src/js/components/Arrows/path.ts"],"sourcesContent":["/**\r\n * Enumerates slides from left to right.\r\n */\r\nexport const LTR = 'ltr';\r\n\r\n/**\r\n * Enumerates slides from right to left.\r\n */\r\nexport const RTL = 'rtl';\r\n\r\n/**\r\n * Enumerates slides in a col.\r\n */\r\nexport const TTB = 'ttb';\r\n","import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from '../../constants/arrows';\r\nimport { RTL, TTB } from '../../constants/directions';\r\nimport { Splide } from '../../core/Splide/Splide';\r\nimport { BaseComponent, Components, Options } from '../../types';\r\n\r\n\r\n/**\r\n * The interface for the Direction component.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport interface DirectionComponent extends BaseComponent {\r\n resolve( prop: string, axisOnly?: boolean, direction?: Options['direction'] ): string;\r\n orient( value: number ): number;\r\n}\r\n\r\n/**\r\n * The translation map for directions.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const ORIENTATION_MAP = {\r\n width : [ 'height' ],\r\n left : [ 'top', 'right' ],\r\n right : [ 'bottom', 'left' ],\r\n x : [ 'y' ],\r\n X : [ 'Y' ],\r\n Y : [ 'X' ],\r\n ArrowLeft : [ ARROW_UP, ARROW_RIGHT ],\r\n ArrowRight: [ ARROW_DOWN, ARROW_LEFT ],\r\n};\r\n\r\n/**\r\n * The component that absorbs the difference among directions.\r\n *\r\n * @since 3.0.0\r\n *\r\n * @param Splide - A Splide instance.\r\n * @param Components - A collection of components.\r\n * @param options - Options.\r\n *\r\n * @return A Direction component object.\r\n */\r\nexport function Direction( Splide: Splide, Components: Components, options: Options ): DirectionComponent {\r\n /**\r\n * Resolves the provided property name.\r\n *\r\n * @param prop - A property name to translate.\r\n * @param axisOnly - Optional. If `ture`, returns the same property for LTR and RTL.\r\n * @param direction - Optional. Specify the direction. The default value is the `direction` option.\r\n */\r\n function resolve( prop: string, axisOnly?: boolean, direction?: Options['direction'] ): string {\r\n direction = direction || options.direction;\r\n const index = direction === RTL && ! axisOnly ? 1 : direction === TTB ? 0 : -1;\r\n\r\n return ORIENTATION_MAP[ prop ] && ORIENTATION_MAP[ prop ][ index ]\r\n || prop.replace( /width|left|right/i, ( match, offset ) => {\r\n const replacement = ORIENTATION_MAP[ match.toLowerCase() ][ index ] || match;\r\n return offset > 0 ? replacement.charAt( 0 ).toUpperCase() + replacement.slice( 1 ) : replacement;\r\n } );\r\n }\r\n\r\n /**\r\n * Orients the value towards the current direction.\r\n *\r\n * @param value - A value to orient.\r\n *\r\n * @return The oriented value.\r\n */\r\n function orient( value: number ): number {\r\n return value * ( options.direction === RTL ? 1 : -1 );\r\n }\r\n\r\n return {\r\n resolve,\r\n orient,\r\n };\r\n}\r\n","const ARROW = 'Arrow';\r\nexport const ARROW_LEFT = `${ ARROW }Left`;\r\nexport const ARROW_RIGHT = `${ ARROW }Right`;\r\nexport const ARROW_UP = `${ ARROW }Up`;\r\nexport const ARROW_DOWN = `${ ARROW }Down`;","/**\r\n * The project code.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const PROJECT_CODE = 'splide';\r\n\r\n/**\r\n * The data attribute prefix.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const DATA_ATTRIBUTE = `data-${ PROJECT_CODE }`;\r\n","import { PROJECT_CODE } from './project';\r\n\r\n\r\nexport const CLASS_ROOT = PROJECT_CODE;\r\nexport const CLASS_TRACK = `${ PROJECT_CODE }__track`;\r\nexport const CLASS_LIST = `${ PROJECT_CODE }__list`;\r\nexport const CLASS_SLIDE = `${ PROJECT_CODE }__slide`;\r\nexport const CLASS_CLONE = `${ CLASS_SLIDE }--clone`;\r\nexport const CLASS_CONTAINER = `${ CLASS_SLIDE }__container`;\r\nexport const CLASS_ARROWS = `${ PROJECT_CODE }__arrows`;\r\nexport const CLASS_ARROW = `${ PROJECT_CODE }__arrow`;\r\nexport const CLASS_ARROW_PREV = `${ CLASS_ARROW }--prev`;\r\nexport const CLASS_ARROW_NEXT = `${ CLASS_ARROW }--next`;\r\nexport const CLASS_PAGINATION = `${ PROJECT_CODE }__pagination`;\r\nexport const CLASS_PAGINATION_PAGE = `${ CLASS_PAGINATION }__page`;\r\nexport const CLASS_PROGRESS = `${ PROJECT_CODE }__progress`;\r\nexport const CLASS_PROGRESS_BAR = `${ CLASS_PROGRESS }__bar`;\r\nexport const CLASS_TOGGLE = `${ PROJECT_CODE }__toggle`;\r\nexport const CLASS_TOGGLE_PLAY = `${ CLASS_TOGGLE }__play`;\r\nexport const CLASS_TOGGLE_PAUSE = `${ CLASS_TOGGLE }__pause`;\r\nexport const CLASS_SPINNER = `${ PROJECT_CODE }__spinner`;\r\nexport const CLASS_SR = `${ PROJECT_CODE }__sr`;\r\nexport const CLASS_INITIALIZED = 'is-initialized';\r\nexport const CLASS_ACTIVE = 'is-active';\r\nexport const CLASS_PREV = 'is-prev';\r\nexport const CLASS_NEXT = 'is-next';\r\nexport const CLASS_VISIBLE = 'is-visible';\r\nexport const CLASS_LOADING = 'is-loading';\r\nexport const CLASS_FOCUS_IN = 'is-focus-in';\r\n\r\n\r\n/**\r\n * The array with all status classes.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const STATUS_CLASSES = [\r\n CLASS_ACTIVE,\r\n CLASS_VISIBLE,\r\n CLASS_PREV,\r\n CLASS_NEXT,\r\n CLASS_LOADING,\r\n CLASS_FOCUS_IN,\r\n];\r\n\r\n/**\r\n * The collection of classes for elements that Splide dynamically creates.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const CLASSES = {\r\n slide : CLASS_SLIDE,\r\n clone : CLASS_CLONE,\r\n arrows : CLASS_ARROWS,\r\n arrow : CLASS_ARROW,\r\n prev : CLASS_ARROW_PREV,\r\n next : CLASS_ARROW_NEXT,\r\n pagination: CLASS_PAGINATION,\r\n page : CLASS_PAGINATION_PAGE,\r\n spinner : CLASS_SPINNER,\r\n};\r\n","import { Options } from '../types';\r\nimport { CLASSES } from './classes';\r\nimport { I18N } from './i18n';\r\n\r\n\r\n/**\r\n * The collection of default options.\r\n * Note that this collection does not contain all options.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const DEFAULTS: Options = {\r\n type : 'slide',\r\n role : 'region',\r\n speed : 400,\r\n perPage : 1,\r\n cloneStatus : true,\r\n arrows : true,\r\n pagination : true,\r\n paginationKeyboard: true,\r\n interval : 5000,\r\n pauseOnHover : true,\r\n pauseOnFocus : true,\r\n resetProgress : true,\r\n easing : 'cubic-bezier(0.25, 1, 0.5, 1)',\r\n drag : true,\r\n direction : 'ltr',\r\n trimSpace : true,\r\n focusableNodes : 'a, button, textarea, input, select, iframe',\r\n live : true,\r\n classes : CLASSES,\r\n i18n : I18N,\r\n reducedMotion: {\r\n speed : 0,\r\n rewindSpeed: 0,\r\n autoplay : 'pause',\r\n },\r\n};","/**\r\n * The collection of i18n strings.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const I18N = {\r\n prev : 'Previous slide',\r\n next : 'Next slide',\r\n first : 'Go to first slide',\r\n last : 'Go to last slide',\r\n slideX : 'Go to slide %s',\r\n pageX : 'Go to page %s',\r\n play : 'Start autoplay',\r\n pause : 'Pause autoplay',\r\n carousel : 'carousel',\r\n slide : 'slide',\r\n select : 'Select a slide to show',\r\n slideLabel: '%s of %s', // [ slide number ] / [ slide size ]\r\n};\r\n","/**\r\n * The slice method for an array-like object.\r\n *\r\n * @param arrayLike - An array-like object.\r\n * @param start - Optional. A start index.\r\n * @param end - Optional. A end index.\r\n *\r\n * @return An array with sliced elements.\r\n */\r\nexport function slice( arrayLike: ArrayLike, start?: number, end?: number ): T[] {\r\n return Array.prototype.slice.call( arrayLike, start, end );\r\n}\r\n","import { AnyFunction, ShiftN } from '../../../types';\r\nimport { slice } from '../../arrayLike';\r\n\r\n\r\n/**\r\n * Create a function where provided arguments are bound.\r\n * `this` parameter will be always null.\r\n *\r\n * @param func - A function.\r\n * @param args - Arguments to bind to the function.\r\n *\r\n * @return A function where arguments are bound.\r\n */\r\nexport function apply(\r\n func: F,\r\n ...args: A\r\n): ( ...args: ShiftN, A[\"length\"]> ) => ReturnType;\r\n\r\n/**\r\n * Create a function where provided arguments are bound.\r\n * `this` parameter will be always null.\r\n *\r\n * @param func - A function.\r\n */\r\nexport function apply( func: AnyFunction ): any {\r\n // eslint-disable-next-line prefer-rest-params, prefer-spread\r\n return func.bind( null, ...slice( arguments, 1 ) );\r\n}\r\n","import { AnyFunction } from '../../types';\r\nimport { apply } from '../function';\r\n\r\n\r\n/**\r\n * The alias of the type check function.\r\n *\r\n * @param type - A type.\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is the specified type.\r\n */\r\nfunction typeOf( type: string, subject: unknown ): boolean {\r\n return typeof subject === type;\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an object or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an object, or otherwise `false`.\r\n */\r\nexport function isObject( subject: unknown ): subject is object {\r\n return ! isNull( subject ) && typeOf( 'object', subject );\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an array or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an array, or otherwise `false`.\r\n */\r\nexport const isArray: ( subject: unknown ) => subject is T[] = Array.isArray;\r\n\r\n/**\r\n * Checks if the given subject is a function or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is a function, or otherwise `false`.\r\n */\r\nexport const isFunction = <( subject: unknown ) => subject is AnyFunction>apply( typeOf, 'function' );\r\n\r\n/**\r\n * Checks if the given subject is a string or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is a string, or otherwise `false`.\r\n */\r\nexport const isString = <( subject: unknown ) => subject is string>apply( typeOf, 'string' );\r\n\r\n/**\r\n * Checks if the given subject is `undefined` or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is `undefined`, or otherwise `false`.\r\n */\r\nexport const isUndefined = <( subject: unknown ) => subject is undefined>apply( typeOf, 'undefined' );\r\n\r\n/**\r\n * Checks if the given subject is `null` or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is `null`, or otherwise `false`.\r\n */\r\nexport function isNull( subject: unknown ): subject is null {\r\n return subject === null;\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an HTMLElement or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an HTMLElement instance, or otherwise `false`.\r\n */\r\nexport function isHTMLElement( subject: unknown ): subject is HTMLElement {\r\n return subject instanceof HTMLElement;\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an HTMLButtonElement or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an HTMLButtonElement, or otherwise `false`.\r\n */\r\nexport function isHTMLButtonElement( subject: unknown ): subject is HTMLButtonElement {\r\n return subject instanceof HTMLButtonElement;\r\n}\r\n","import { isArray } from '../../type/type';\r\n\r\n\r\n/**\r\n * Push the provided value to an array if the value is not an array.\r\n *\r\n * @param value - A value to push.\r\n *\r\n * @return An array containing the value, or the value itself if it is already an array.\r\n */\r\nexport function toArray( value: T | T[] ): T[] {\r\n return isArray( value ) ? value : [ value ];\r\n}\r\n","import { toArray } from '../toArray/toArray';\r\n\r\n\r\n/**\r\n * The extended `Array#forEach` method that accepts a single value as an argument.\r\n *\r\n * @param values - A value or values to iterate over.\r\n * @param iteratee - An iteratee function.\r\n */\r\nexport function forEach( values: T | T[], iteratee: ( value: T, index: number, array: T[] ) => void ): void {\r\n toArray( values ).forEach( iteratee );\r\n}\r\n","import { toArray } from '../toArray/toArray';\r\n\r\n\r\n/**\r\n * Extended `Array#push()` that accepts an item or an array with items.\r\n *\r\n * @param array - An array to push items.\r\n * @param items - An item or items to push.\r\n *\r\n * @return A provided array itself.\r\n */\r\nexport function push( array: T[], items: T | T[] ): T[] {\r\n array.push( ...toArray( items ) );\r\n return array;\r\n}\r\n","import { isHTMLElement } from '../../type/type';\r\n\r\n\r\n/**\r\n * Checks if the element can be selected by the provided selector or not.\r\n *\r\n * @param elm - An element to check.\r\n * @param selector - A selector to test.\r\n *\r\n * @return `true` if the selector matches the element, or otherwise `false`.\r\n */\r\nexport function matches( elm: Element | EventTarget, selector: string ): boolean {\r\n return isHTMLElement( elm ) && ( elm[ 'msMatchesSelector' ] || elm.matches ).call( elm, selector );\r\n}\r\n","import { children } from '../children/children';\r\n\r\n\r\n/**\r\n * Returns a child element that matches the specified tag or class name.\r\n *\r\n * @param parent - A parent element.\r\n * @param selector - A selector to filter children.\r\n *\r\n * @return A matched child element if available, or otherwise `undefined`.\r\n */\r\nexport function child( parent: HTMLElement, selector?: string ): E | undefined {\r\n return selector ? children( parent, selector )[ 0 ] : parent.firstElementChild as E;\r\n}\r\n","import { slice } from '../../arrayLike';\r\nimport { matches } from '../matches/matches';\r\n\r\n\r\n/**\r\n * Finds children that has the specified tag or class name.\r\n *\r\n * @param parent - A parent element.\r\n * @param selector - Optional. A selector to filter children.\r\n *\r\n * @return An array with filtered children.\r\n */\r\nexport function children( parent: HTMLElement, selector?: string ): E[] {\r\n const children = parent ? slice( parent.children ) as E[] : [];\r\n return selector ? children.filter( child => matches( child, selector ) ) : children;\r\n}\r\n","/**\r\n * An alias of Object.keys\r\n */\r\nexport const ownKeys = Object.keys;","import { ownKeys } from '../ownKeys/ownKeys';\r\n\r\n\r\n/**\r\n * Iterates over the provided object by own enumerable keys with calling the iteratee function.\r\n *\r\n * @param object - An object to iterate over.\r\n * @param iteratee - An iteratee function that takes the value and key as arguments.\r\n * @param right - If `true`, the method iterates over the object from the end like `forEachRight()`.\r\n *\r\n * @return A provided object itself.\r\n */\r\nexport function forOwn(\r\n object: T,\r\n iteratee: ( value: T[ keyof T ], key: string ) => boolean | void,\r\n right?: boolean\r\n): T {\r\n if ( object ) {\r\n let keys = ownKeys( object );\r\n keys = right ? keys.reverse() : keys;\r\n\r\n for ( let i = 0; i < keys.length; i++ ) {\r\n const key = keys[ i ];\r\n\r\n if ( key !== '__proto__' ) {\r\n if ( iteratee( object[ key ], key ) === false ) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return object;\r\n}\r\n","import { Cast, Head, Push, Resolve, Shift } from '../../../types';\r\nimport { slice } from '../../arrayLike';\r\nimport { forOwn } from '../forOwn/forOwn';\r\n\r\n\r\n/**\r\n * Assigns U to T.\r\n *\r\n * @typeParam T - An object to assign to.\r\n * @typeParam U - An object to assign.\r\n *\r\n * @return An assigned object type.\r\n */\r\nexport type Assign = Omit & U;\r\n\r\n/**\r\n * Recursively assigns U[] to T.\r\n *\r\n * @typeParam T - An object to assign to.\r\n * @typeParam U - A tuple contains objects.\r\n *\r\n * @return An assigned object type.\r\n */\r\nexport type Assigned = {\r\n 0: T,\r\n 1: Assigned>, Shift, N, Push>,\r\n}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast : never;\r\n\r\nexport function assign( object: T ): T;\r\n\r\nexport function assign(\r\n object: T,\r\n ...sources: U\r\n): Resolve>\r\n\r\n/**\r\n * Assigns all own enumerable properties of all source objects to the provided object.\r\n * `undefined` in source objects will be skipped.\r\n *\r\n * @param object - An object to assign properties to.\r\n *\r\n * @return An object assigned properties of the sources to.\r\n */\r\nexport function assign( object: T ): any {\r\n // eslint-disable-next-line prefer-rest-params, prefer-spread\r\n slice( arguments, 1 ).forEach( source => {\r\n forOwn( source, ( value, key ) => {\r\n object[ key ] = source[ key ];\r\n } );\r\n } );\r\n\r\n return object;\r\n}\r\n","import { Cast, Head, Push, Resolve, Shift } from '../../../types';\r\nimport { slice } from '../../arrayLike';\r\nimport { isArray, isObject } from '../../type/type';\r\nimport { forOwn } from '../forOwn/forOwn';\r\n\r\n\r\n/**\r\n * Merges U to T.\r\n *\r\n * @typeParam T - An object to merge U into.\r\n * @typeParam U - An object to merge properties from.\r\n *\r\n * @return A merged object type.\r\n */\r\nexport type Merge = Omit & {\r\n [ K in ( keyof T & keyof U ) ]: U[ K ] extends object\r\n ? U[ K ] extends any[]\r\n ? U[ K ]\r\n : T[ K ] extends object\r\n ? Merge extends infer A ? Resolve> : never\r\n : U[ K ]\r\n : U[ K ];\r\n} & Omit;\r\n\r\n/**\r\n * Recursively merges U[] to T.\r\n *\r\n * @typeParam T - An object to assign to.\r\n * @typeParam U - A tuple contains objects.\r\n *\r\n * @return An assigned object type.\r\n */\r\nexport type Merged = {\r\n 0: T,\r\n 1: Merged>, Shift, N, Push>,\r\n}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast : never;\r\n\r\nexport function merge( object: T ): T;\r\n\r\nexport function merge(\r\n object: T,\r\n ...sources: U\r\n): Resolve>\r\n\r\n/**\r\n * Recursively merges source properties to the object.\r\n * Be aware that this method does not merge arrays. They are just duplicated by `slice()`.\r\n *\r\n * @param object - An object to merge properties to.\r\n *\r\n * @return A new object with merged properties.\r\n */\r\nexport function merge( object: T ): any {\r\n // eslint-disable-next-line prefer-rest-params\r\n slice( arguments, 1 ).forEach( source => {\r\n forOwn( source, ( value, key ) => {\r\n if ( isArray( value ) ) {\r\n object[ key ] = value.slice();\r\n } else if ( isObject( value ) ) {\r\n object[ key ] = merge( {}, isObject( object[ key ] ) ? object[ key ] : {}, value );\r\n } else {\r\n object[ key ] = value;\r\n }\r\n } );\r\n } );\r\n\r\n return object;\r\n}\r\n","import { forEach } from '../../array';\r\n\r\n\r\n/**\r\n * Removes the provided node from its parent.\r\n *\r\n * @param nodes - A node or nodes to remove.\r\n */\r\nexport function remove( nodes: Node | Node[] ): void {\r\n forEach( nodes, node => {\r\n if ( node && node.parentNode ) {\r\n node.parentNode.removeChild( node );\r\n }\r\n } );\r\n}\r\n","import { isString } from '../../type/type';\r\n\r\n\r\n/**\r\n * Appends `px` to the provided number.\r\n * If the value is already string, just returns it.\r\n *\r\n * @param value - A value to append `px` to.\r\n *\r\n * @return A string with the CSS unit.\r\n */\r\nexport function unit( value: number | string ): string {\r\n return isString( value ) ? value : value ? `${ value }px` : '';\r\n}\r\n","import { PROJECT_CODE } from '../../../constants/project';\r\n\r\n\r\n/**\r\n * Throws an error if the provided condition is falsy.\r\n *\r\n * @param condition - If falsy, an error is thrown.\r\n * @param message - Optional. A message to display.\r\n */\r\nexport function assert( condition: any, message?: string ): void {\r\n if ( ! condition ) {\r\n throw new Error( `[${ PROJECT_CODE }] ${ message || '' }` );\r\n }\r\n}\r\n","export const { min, max, floor, ceil, abs } = Math;\r\n","/**\r\n * Converts the provided string in the camel case to the kebab case.\r\n *\r\n * @param string - A string to convert.\r\n */\r\nexport function camelToKebab( string: string ): string {\r\n return string.replace( /([a-z0-9])([A-Z])/g, '$1-$2' ).toLowerCase();\r\n}\r\n","import { pad } from '../pad/pad';\r\n\r\n\r\n/**\r\n * Stores unique IDs.\r\n *\r\n * @since 3.0.0\r\n */\r\nconst ids: Record = {};\r\n\r\n/**\r\n * Returns a sequential unique ID as \"{ prefix }-{ number }\".\r\n *\r\n * @param prefix - A prefix for the ID.\r\n */\r\nexport function uniqueId( prefix: string ): string {\r\n return `${ prefix }${ pad( ( ids[ prefix ] = ( ids[ prefix ] || 0 ) + 1 ) ) }`;\r\n}\r\n","import { AnyFunction } from '../../types';\r\nimport { empty, forEach } from '../../utils';\r\n\r\n\r\n/**\r\n * The type for an EventTarget or an array with EventTarget objects.\r\n *\r\n * @since 4.0.0\r\n */\r\ntype EventTargets = EventTarget | EventTarget[];\r\n\r\n/**\r\n * The interface for the EventBinder object.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport interface EventBinderObject {\r\n bind( target: EventTargets, events: string | string[], callback: AnyFunction, options?: AddEventListenerOptions ): void\r\n unbind( target: EventTarget | EventTarget[], events: string | string[], callback?: AnyFunction ): void;\r\n dispatch( target: EventTarget, event: string, detail?: T ): void;\r\n destroy(): void;\r\n}\r\n\r\n/**\r\n * The constructor function to provide methods to subscribe native events.\r\n *\r\n * @since 4.0.0\r\n * @constructor\r\n *\r\n * @return An EventBinder object.\r\n */\r\nexport function EventBinder(): EventBinderObject {\r\n /**\r\n * Stores all handlers that listen to native events.\r\n * `[ target, event, namespace, callback, remover ]`\r\n */\r\n let listeners: [ EventTarget, string, string | undefined, AnyFunction, () => void ][] = [];\r\n\r\n /**\r\n * Listens to native events.\r\n * - `destroy()` can unsubscribe all events.\r\n * - In IE, mediaQueryList does not inherit EventTarget,\r\n * and only supports deprecated `addListener` and `removeListener`.\r\n *\r\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener\r\n *\r\n * @param targets - A target element, the window object or the document object.\r\n * @param events - An event or events to listen to.\r\n * @param callback - A callback function.\r\n * @param options - Optional. The options to pass to the `addEventListener` function.\r\n */\r\n function bind(\r\n targets: EventTargets,\r\n events: string | string[],\r\n callback: AnyFunction,\r\n options?: AddEventListenerOptions\r\n ): void {\r\n forEachEvent( targets, events, ( target, event, namespace ) => {\r\n const isEventTarget = 'addEventListener' in target;\r\n const remover = isEventTarget\r\n ? target.removeEventListener.bind( target, event, callback, options )\r\n : target[ 'removeListener' ].bind( target, callback );\r\n\r\n isEventTarget ? target.addEventListener( event, callback, options ) : target[ 'addListener' ]( callback );\r\n listeners.push( [ target, event, namespace, callback, remover ] );\r\n } );\r\n }\r\n\r\n /**\r\n * Removes the event handler.\r\n *\r\n * @param targets - A target element, the window object or the document object.\r\n * @param events - An event name or names to remove.\r\n * @param callback - Optional. Specify the callback to remove.\r\n */\r\n function unbind( targets: EventTargets, events: string | string[], callback?: AnyFunction ): void {\r\n forEachEvent( targets, events, ( target, event, namespace ) => {\r\n listeners = listeners.filter( listener => {\r\n if ( listener[ 0 ] === target\r\n && listener[ 1 ] === event\r\n && listener[ 2 ] === namespace\r\n && ( ! callback || listener[ 3 ] === callback )\r\n ) {\r\n listener[ 4 ]();\r\n return false;\r\n }\r\n\r\n return true;\r\n } );\r\n } );\r\n }\r\n\r\n /**\r\n * Dispatches a custom event of the target.\r\n *\r\n * @param target - An event target.\r\n * @param type - An event type.\r\n * @param detail - Optional. The `detail` object of the event.\r\n *\r\n * @return An event object.\r\n */\r\n function dispatch( target: EventTarget, type: string, detail?: T ): CustomEvent {\r\n let e: CustomEvent;\r\n const bubbles = true;\r\n\r\n if ( typeof CustomEvent === 'function' ) {\r\n e = new CustomEvent( type, { bubbles, detail } );\r\n } else {\r\n e = document.createEvent( 'CustomEvent' );\r\n e.initCustomEvent( type, bubbles, false, detail );\r\n }\r\n\r\n target.dispatchEvent( e );\r\n return e;\r\n }\r\n\r\n /**\r\n * Iterates over each target and event.\r\n *\r\n * @param targets - A target element, the window object or the document object.\r\n * @param events - An event name or names.\r\n * @param iteratee - An iteratee function.\r\n */\r\n function forEachEvent(\r\n targets: EventTargets,\r\n events: string | string[],\r\n iteratee: ( target: EventTarget, event: string, namespace: string | undefined ) => void\r\n ): void {\r\n forEach( targets, target => {\r\n target && forEach( events, events => {\r\n events.split( ' ' ).forEach( eventNS => {\r\n const fragment = eventNS.split( '.' );\r\n iteratee( target, fragment[ 0 ], fragment[ 1 ] );\r\n } );\r\n } );\r\n } );\r\n }\r\n\r\n /**\r\n * Removes all listeners.\r\n */\r\n function destroy(): void {\r\n listeners.forEach( data => { data[ 4 ]() } );\r\n empty( listeners );\r\n }\r\n\r\n return {\r\n bind,\r\n unbind,\r\n dispatch,\r\n destroy,\r\n };\r\n}\r\n","/**\r\n * Empties the array.\r\n *\r\n * @param array - A array to empty.\r\n */\r\nexport function empty( array: any[] ): void {\r\n array.length = 0;\r\n}\r\n","import { EVENT_DESTROY } from '../../constants/events';\r\nimport { Splide } from '../../core/Splide/Splide';\r\nimport { AnyFunction, EventMap } from '../../types';\r\nimport { apply, assign, isArray, slice, toArray } from '../../utils';\r\nimport { EventBinder, EventBinderObject } from '../EventBinder/EventBinder';\r\n\r\n\r\n/**\r\n * The interface for the EventInterface object.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport interface EventInterfaceObject extends EventBinderObject {\r\n on( event: K, callback: EventMap[ K ] ): void;\r\n on( events: string | string[], callback: AnyFunction ): void;\r\n off( events: K | K[] | string | string[] ): void;\r\n emit( event: K, ...args: Parameters ): void\r\n emit( event: string, ...args: any[] ): void;\r\n\r\n /** @internal */\r\n bus: DocumentFragment;\r\n}\r\n\r\n/**\r\n * The constructor function that provides interface for internal and native events.\r\n *\r\n * @since 3.0.0\r\n * @constructor\r\n *\r\n * @param Splide - A Splide instance.\r\n *\r\n * @return A collection of interface functions.\r\n */\r\nexport function EventInterface( Splide?: Splide ): EventInterfaceObject {\r\n /**\r\n * The document fragment for internal events.\r\n * Provide the Splide instance to share the bus.\r\n */\r\n const bus = Splide ? Splide.event.bus : document.createDocumentFragment();\r\n\r\n /**\r\n * An event binder object.\r\n */\r\n const binder = EventBinder();\r\n\r\n /**\r\n * Listens to an internal event or events.\r\n *\r\n * @param events - An event name or names separated by spaces. Use a dot(.) to add a namespace.\r\n * @param callback - A callback function to register.\r\n */\r\n function on( events: string | string[], callback: AnyFunction ): void {\r\n binder.bind( bus, toArray( events ).join( ' ' ), e => {\r\n callback.apply( callback, isArray( e.detail ) ? e.detail : [] );\r\n } );\r\n }\r\n\r\n /**\r\n * Triggers callback functions.\r\n * This accepts additional arguments and passes them to callbacks.\r\n *\r\n * @param event - An event name.\r\n */\r\n function emit( event: string ): void {\r\n // eslint-disable-next-line prefer-rest-params, prefer-spread\r\n binder.dispatch( bus, event, slice( arguments, 1 ) );\r\n }\r\n\r\n if ( Splide ) {\r\n Splide.event.on( EVENT_DESTROY, binder.destroy );\r\n }\r\n\r\n return assign( binder, {\r\n bus,\r\n on,\r\n off: apply( binder.unbind, bus ),\r\n emit,\r\n } );\r\n}","export const EVENT_MOUNTED = 'mounted';\r\nexport const EVENT_READY = 'ready';\r\nexport const EVENT_MOVE = 'move';\r\nexport const EVENT_MOVED = 'moved';\r\nexport const EVENT_SHIFTED = 'shifted';\r\nexport const EVENT_CLICK = 'click';\r\nexport const EVENT_ACTIVE = 'active';\r\nexport const EVENT_INACTIVE = 'inactive';\r\nexport const EVENT_VISIBLE = 'visible';\r\nexport const EVENT_HIDDEN = 'hidden';\r\nexport const EVENT_SLIDE_KEYDOWN = 'slide:keydown';\r\nexport const EVENT_REFRESH = 'refresh';\r\nexport const EVENT_UPDATED = 'updated';\r\nexport const EVENT_RESIZE = 'resize';\r\nexport const EVENT_RESIZED = 'resized';\r\nexport const EVENT_DRAG = 'drag';\r\nexport const EVENT_DRAGGING = 'dragging';\r\nexport const EVENT_DRAGGED = 'dragged';\r\nexport const EVENT_SCROLL = 'scroll';\r\nexport const EVENT_SCROLLED = 'scrolled';\r\nexport const EVENT_DESTROY = 'destroy';\r\nexport const EVENT_ARROWS_MOUNTED = 'arrows:mounted';\r\nexport const EVENT_ARROWS_UPDATED = 'arrows:updated';\r\nexport const EVENT_PAGINATION_MOUNTED = 'pagination:mounted';\r\nexport const EVENT_PAGINATION_UPDATED = 'pagination:updated';\r\nexport const EVENT_NAVIGATION_MOUNTED = 'navigation:mounted';\r\nexport const EVENT_AUTOPLAY_PLAY = 'autoplay:play';\r\nexport const EVENT_AUTOPLAY_PLAYING = 'autoplay:playing';\r\nexport const EVENT_AUTOPLAY_PAUSE = 'autoplay:pause';\r\nexport const EVENT_LAZYLOAD_LOADED = 'lazyload:loaded';\r\n\r\n","import { RendererConfig } from '../types/types';\r\n\r\n\r\n/**\r\n * Default options for generating static HTML.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const RENDERER_DEFAULT_CONFIG: RendererConfig = {\r\n listTag : 'ul',\r\n slideTag: 'li',\r\n};\r\n","import { Options } from '../../types';\r\nimport { forOwn } from '../../utils';\r\n\r\n\r\ninterface Styles {\r\n [ breakpoint: string ]: {\r\n [ selector: string ]: Record\r\n };\r\n}\r\n\r\n/**\r\n * The class for generating styles as a string.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport class Style {\r\n /**\r\n * The collection of registered styles categorized by each breakpoint.\r\n */\r\n private readonly styles: Styles = {};\r\n\r\n /**\r\n * The ID of the slider.\r\n */\r\n private readonly id: string;\r\n\r\n /**\r\n * Holds options.\r\n */\r\n private readonly options: Options;\r\n\r\n /**\r\n * The Style constructor.\r\n *\r\n * @param id - A slider ID.\r\n * @param options - Options.\r\n */\r\n constructor( id: string, options: Options ) {\r\n this.id = id;\r\n this.options = options;\r\n }\r\n\r\n /**\r\n * Registers a CSS rule.\r\n *\r\n * @param selector - A selector.\r\n * @param prop\r\n * @param value\r\n * @param breakpoint\r\n */\r\n rule( selector: string, prop: string, value: string | number, breakpoint?: string ): void {\r\n breakpoint = breakpoint || 'default';\r\n const selectors = ( this.styles[ breakpoint ] = this.styles[ breakpoint ] || {} );\r\n const styles = ( selectors[ selector ] = selectors[ selector ] || {} );\r\n styles[ prop ] = value;\r\n }\r\n\r\n /**\r\n * Builds styles as a single string.\r\n *\r\n * @return Built styles.\r\n */\r\n build(): string {\r\n let css = '';\r\n\r\n if ( this.styles.default ) {\r\n css += this.buildSelectors( this.styles.default );\r\n }\r\n\r\n Object.keys( this.styles )\r\n .sort( ( n, m ) => this.options.mediaQuery === 'min' ? +n - +m : +m - +n )\r\n .forEach( breakpoint => {\r\n if ( breakpoint !== 'default' ) {\r\n css += `@media screen and (max-width: ${ breakpoint }px) {`;\r\n css += this.buildSelectors( this.styles[ breakpoint ] );\r\n css += `}`;\r\n }\r\n } );\r\n\r\n return css;\r\n }\r\n\r\n /**\r\n * Builds styles for each breakpoint.\r\n *\r\n * @param selectors - An object with styles.\r\n *\r\n * @return Built styles.\r\n */\r\n private buildSelectors( selectors: Record> ): string {\r\n let css = '';\r\n\r\n forOwn( selectors, ( styles, selector ) => {\r\n selector = `#${ this.id } ${ selector }`.trim();\r\n css += `${ selector } {`;\r\n\r\n forOwn( styles, ( value, prop ) => {\r\n if ( value || value === 0 ) {\r\n css += `${ prop }: ${ value };`;\r\n }\r\n } );\r\n\r\n css += '}';\r\n } );\r\n\r\n return css;\r\n }\r\n}\r\n","import { PATH, SIZE, XML_NAME_SPACE } from '../../components/Arrows/path';\r\nimport { Direction, DirectionComponent } from '../../components/Direction/Direction';\r\nimport { CLASS_ACTIVE, CLASS_CLONE, CLASS_LIST, CLASS_ROOT, CLASS_SLIDE, CLASS_TRACK } from '../../constants/classes';\r\nimport { DEFAULTS } from '../../constants/defaults';\r\nimport { TTB } from '../../constants/directions';\r\nimport { EVENT_MOUNTED } from '../../constants/events';\r\nimport { LOOP, SLIDE } from '../../constants/types';\r\nimport { EventInterface } from '../../constructors';\r\nimport { Splide } from '../../core/Splide/Splide';\r\nimport { Options } from '../../types';\r\nimport {\r\n assert,\r\n assign,\r\n camelToKebab,\r\n child,\r\n forOwn,\r\n isObject,\r\n isString,\r\n max,\r\n merge,\r\n push,\r\n queryAll,\r\n remove,\r\n uniqueId,\r\n unit,\r\n} from '../../utils';\r\nimport { CLASS_RENDERED } from '../constants/classes';\r\nimport { RENDERER_DEFAULT_CONFIG } from '../constants/defaults';\r\nimport { Style } from '../Style/Style';\r\nimport { RendererConfig, SlideContent } from '../types/types';\r\n\r\n\r\n/**\r\n * The class to generate static HTML of the slider for the first view.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport class SplideRenderer {\r\n /**\r\n * Removes a style element and clones.\r\n *\r\n * @param splide - A Splide instance.\r\n */\r\n static clean( splide: Splide ): void {\r\n const { on } = EventInterface( splide );\r\n const { root } = splide;\r\n const clones = queryAll( root, `.${ CLASS_CLONE }` );\r\n\r\n on( EVENT_MOUNTED, () => {\r\n remove( child( root, 'style' ) );\r\n } );\r\n\r\n remove( clones );\r\n }\r\n\r\n /**\r\n * Holds slide contents.\r\n */\r\n private readonly contents: string[] | SlideContent[];\r\n\r\n /**\r\n * Stores data of slides.\r\n */\r\n private readonly slides: SlideContent[] = [];\r\n\r\n /**\r\n * The Direction component.\r\n */\r\n private readonly Direction: DirectionComponent;\r\n\r\n /**\r\n * Holds the Style instance.\r\n */\r\n private readonly Style: Style;\r\n\r\n /**\r\n * Holds options.\r\n */\r\n private readonly options: Options = {};\r\n\r\n /**\r\n * Holds options for this instance.\r\n */\r\n private readonly config: RendererConfig;\r\n\r\n /**\r\n * The slider ID.\r\n */\r\n private readonly id: string;\r\n\r\n /**\r\n * An array with options for each breakpoint.\r\n */\r\n private readonly breakpoints: [ string, Options ][] = [];\r\n\r\n /**\r\n * The SplideRenderer constructor.\r\n *\r\n * @param contents - An array with slide contents. Each item must be an HTML or a plain text.\r\n * @param options - Optional. Slider options.\r\n * @param config - Static default options.\r\n * @param defaults - Default options for the slider. Pass `Splide.defaults` if you are using it.\r\n */\r\n constructor( contents: string[] | SlideContent[], options?: Options, config?: RendererConfig, defaults?: Options ) {\r\n merge( DEFAULTS, defaults || {} );\r\n merge( merge( this.options, DEFAULTS ), options || {} );\r\n\r\n this.contents = contents;\r\n this.config = assign( {}, RENDERER_DEFAULT_CONFIG, config || {} );\r\n this.id = this.config.id || uniqueId( 'splide' );\r\n this.Style = new Style( this.id, this.options );\r\n this.Direction = Direction( null, null, this.options );\r\n\r\n assert( this.contents.length, 'Provide at least 1 content.' );\r\n\r\n this.init();\r\n }\r\n\r\n /**\r\n * Initializes the instance.\r\n */\r\n private init(): void {\r\n this.parseBreakpoints();\r\n this.initSlides();\r\n this.registerRootStyles();\r\n this.registerTrackStyles();\r\n this.registerSlideStyles();\r\n this.registerListStyles();\r\n }\r\n\r\n /**\r\n * Initializes slides.\r\n */\r\n private initSlides(): void {\r\n push( this.slides, this.contents.map( ( content, index ) => {\r\n content = isString( content ) ? { html: content } : content;\r\n content.styles = content.styles || {};\r\n content.attrs = content.attrs || {};\r\n\r\n this.cover( content );\r\n\r\n const classes = `${ this.options.classes.slide } ${ index === 0 ? CLASS_ACTIVE : '' }`;\r\n\r\n assign( content.attrs, {\r\n class: `${ classes } ${ content.attrs.class || '' }`.trim(),\r\n style: this.buildStyles( content.styles ),\r\n } );\r\n\r\n return content;\r\n } ) );\r\n\r\n if ( this.isLoop() ) {\r\n this.generateClones( this.slides );\r\n }\r\n }\r\n\r\n /**\r\n * Registers styles for the root element.\r\n */\r\n private registerRootStyles(): void {\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n this.Style.rule( ' ', 'max-width', unit( options.width ), width );\r\n } );\r\n }\r\n\r\n /**\r\n * Registers styles for the track element.\r\n */\r\n private registerTrackStyles(): void {\r\n const { Style } = this;\r\n const selector = `.${ CLASS_TRACK }`;\r\n\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n Style.rule( selector, this.resolve( 'paddingLeft' ), this.cssPadding( options, false ), width );\r\n Style.rule( selector, this.resolve( 'paddingRight' ), this.cssPadding( options, true ), width );\r\n Style.rule( selector, 'height', this.cssTrackHeight( options ), width );\r\n } );\r\n }\r\n\r\n /**\r\n * Registers styles for the list element.\r\n */\r\n private registerListStyles(): void {\r\n const { Style } = this;\r\n const selector = `.${ CLASS_LIST }`;\r\n\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n Style.rule( selector, 'transform', this.buildTranslate( options ), width );\r\n\r\n if ( ! this.cssSlideHeight( options ) ) {\r\n Style.rule( selector, 'aspect-ratio', this.cssAspectRatio( options ), width );\r\n }\r\n } );\r\n }\r\n\r\n /**\r\n * Registers styles for slides and clones.\r\n */\r\n private registerSlideStyles(): void {\r\n const { Style } = this;\r\n const selector = `.${ CLASS_SLIDE }`;\r\n\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n Style.rule( selector, 'width', this.cssSlideWidth( options ), width );\r\n Style.rule( selector, 'height', this.cssSlideHeight( options ) || '100%', width );\r\n Style.rule( selector, this.resolve( 'marginRight' ), unit( options.gap ) || '0px', width );\r\n Style.rule( `${ selector } > img`, 'display', options.cover ? 'none' : 'inline', width );\r\n } );\r\n }\r\n\r\n /**\r\n * Builds multiple `translateX` for the list element.\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return A string with multiple translate functions.\r\n */\r\n private buildTranslate( options: Options ): string {\r\n const { resolve, orient } = this.Direction;\r\n const values = [];\r\n\r\n values.push( this.cssOffsetClones( options ) );\r\n values.push( this.cssOffsetGaps( options ) );\r\n\r\n if ( this.isCenter( options ) ) {\r\n values.push( this.buildCssValue( orient( -50 ), '%' ) );\r\n values.push( ...this.cssOffsetCenter( options ) );\r\n }\r\n\r\n return values\r\n .filter( Boolean )\r\n .map( value => `translate${ resolve( 'X' ) }(${ value })` )\r\n .join( ' ' );\r\n }\r\n\r\n /**\r\n * Returns offset for the list element.\r\n * This does not include gaps because it can not be converted into percent.\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return The offset.\r\n */\r\n private cssOffsetClones( options: Options ): string {\r\n const { resolve, orient } = this.Direction;\r\n const cloneCount = this.getCloneCount();\r\n\r\n if ( this.isFixedWidth( options ) ) {\r\n const { value, unit } = this.parseCssValue( options[ resolve( 'fixedWidth' ) ] );\r\n return this.buildCssValue( orient( value ) * cloneCount, unit );\r\n }\r\n\r\n const percent = 100 * cloneCount / options.perPage;\r\n return `${ orient( percent ) }%`;\r\n }\r\n\r\n /**\r\n * Returns offset for centering the active slide.\r\n *\r\n * Note:\r\n * ( 100% + gap ) / perPage - gap\r\n * 100% / perPage + gap / perPage - gap;\r\n * 50% / perPage + ( gap / perPage - gap ) / 2;\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return The offset.\r\n */\r\n private cssOffsetCenter( options: Options ): string[] {\r\n const { resolve, orient } = this.Direction;\r\n\r\n if ( this.isFixedWidth( options ) ) {\r\n const { value, unit } = this.parseCssValue( options[ resolve( 'fixedWidth' ) ] );\r\n return [ this.buildCssValue( orient( value / 2 ), unit ) ];\r\n }\r\n\r\n const values = [];\r\n const { perPage, gap } = options;\r\n\r\n values.push( `${ orient( 50 / perPage ) }%` );\r\n\r\n if ( gap ) {\r\n const { value, unit } = this.parseCssValue( gap );\r\n const gapOffset = ( value / perPage - value ) / 2;\r\n values.push( this.buildCssValue( orient( gapOffset ), unit ) );\r\n }\r\n\r\n return values;\r\n }\r\n\r\n /**\r\n * Returns offset for gaps.\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return The offset as `calc()`.\r\n */\r\n private cssOffsetGaps( options: Options ): string {\r\n const cloneCount = this.getCloneCount();\r\n\r\n if ( cloneCount && options.gap ) {\r\n const { orient } = this.Direction;\r\n const { value, unit } = this.parseCssValue( options.gap );\r\n\r\n if ( this.isFixedWidth( options ) ) {\r\n return this.buildCssValue( orient( value * cloneCount ), unit );\r\n }\r\n\r\n const { perPage } = options;\r\n const gaps = cloneCount / perPage;\r\n return this.buildCssValue( orient( gaps * value ), unit );\r\n }\r\n\r\n return '';\r\n }\r\n\r\n /**\r\n * Resolves the prop for the current direction and converts it into the Kebab case.\r\n *\r\n * @param prop - A property name to resolve.\r\n *\r\n * @return A resolved property name in the Kebab case.\r\n */\r\n private resolve( prop: string ): string {\r\n return camelToKebab( this.Direction.resolve( prop ) );\r\n }\r\n\r\n /**\r\n * Returns padding in the CSS format.\r\n *\r\n * @param options - Options.\r\n * @param right - Determines whether to get padding right or left.\r\n *\r\n * @return Padding in the CSS format.\r\n */\r\n private cssPadding( options: Options, right: boolean ): string {\r\n const { padding } = options;\r\n const prop = this.Direction.resolve( right ? 'right' : 'left', true );\r\n return padding && unit( padding[ prop ] || ( isObject( padding ) ? 0 : padding ) ) || '0px';\r\n }\r\n\r\n /**\r\n * Returns height of the track element in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Height in the CSS format.\r\n */\r\n private cssTrackHeight( options: Options ): string {\r\n let height = '';\r\n\r\n if ( this.isVertical() ) {\r\n height = this.cssHeight( options );\r\n assert( height, '\"height\" is missing.' );\r\n height = `calc(${ height } - ${ this.cssPadding( options, false ) } - ${ this.cssPadding( options, true ) })`;\r\n }\r\n\r\n return height;\r\n }\r\n\r\n /**\r\n * Returns height provided though options in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Height in the CSS format.\r\n */\r\n private cssHeight( options: Options ): string {\r\n return unit( options.height );\r\n }\r\n\r\n /**\r\n * Returns width of each slide in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Width in the CSS format.\r\n */\r\n private cssSlideWidth( options: Options ): string {\r\n return options.autoWidth\r\n ? ''\r\n : unit( options.fixedWidth ) || ( this.isVertical() ? '' : this.cssSlideSize( options ) );\r\n }\r\n\r\n /**\r\n * Returns height of each slide in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Height in the CSS format.\r\n */\r\n private cssSlideHeight( options: Options ): string {\r\n return unit( options.fixedHeight )\r\n || ( this.isVertical()\r\n ? ( options.autoHeight ? '' : this.cssSlideSize( options ) )\r\n : this.cssHeight( options )\r\n );\r\n }\r\n\r\n /**\r\n * Returns width or height of each slide in the CSS format, considering the current direction.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Width or height in the CSS format.\r\n */\r\n private cssSlideSize( options: Options ): string {\r\n const gap = unit( options.gap );\r\n return `calc((100%${ gap && ` + ${ gap }` })/${ options.perPage || 1 }${ gap && ` - ${ gap }` })`;\r\n }\r\n\r\n /**\r\n * Returns the aspectRatio value to simulate the `heightRatio` option.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return aspectRatio in the CSS format.\r\n */\r\n private cssAspectRatio( options: Options ): string {\r\n const { heightRatio } = options;\r\n return heightRatio ? `${ 1 / heightRatio }` : '';\r\n }\r\n\r\n /**\r\n * Builds the css value by the provided value and unit.\r\n *\r\n * @param value - A value.\r\n * @param unit - A CSS unit.\r\n *\r\n * @return A built value for a CSS value.\r\n */\r\n private buildCssValue( value: number, unit: string ): string {\r\n return `${ value }${ unit }`;\r\n }\r\n\r\n /**\r\n * Parses the CSS value into number and unit.\r\n *\r\n * @param value - A value to parse.\r\n *\r\n * @return An object with value and unit.\r\n */\r\n private parseCssValue( value: string | number ): { value: number, unit: string } {\r\n if ( isString( value ) ) {\r\n const number = parseFloat( value ) || 0;\r\n const unit = value.replace( /\\d*(\\.\\d*)?/, '' ) || 'px';\r\n return { value: number, unit };\r\n }\r\n\r\n return { value, unit: 'px' };\r\n }\r\n\r\n /**\r\n * Parses breakpoints and generate options for each breakpoint.\r\n */\r\n private parseBreakpoints(): void {\r\n const { breakpoints } = this.options;\r\n\r\n this.breakpoints.push( [ 'default', this.options ] );\r\n\r\n if ( breakpoints ) {\r\n forOwn( breakpoints, ( options, width ) => {\r\n this.breakpoints.push( [ width, merge( merge( {}, this.options ), options ) ] );\r\n } );\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the slide width is fixed or not.\r\n *\r\n * @return `true` if the slide width is fixed, or otherwise `false`.\r\n */\r\n private isFixedWidth( options: Options ): boolean {\r\n return !! options[ this.Direction.resolve( 'fixedWidth' ) ];\r\n }\r\n\r\n /**\r\n * Checks if the slider type is loop or not.\r\n *\r\n * @return `true` if the slider type is loop, or otherwise `false`.\r\n */\r\n private isLoop(): boolean {\r\n return this.options.type === LOOP;\r\n }\r\n\r\n /**\r\n * Checks if the active slide should be centered or not.\r\n *\r\n * @return `true` if the slide should be centered, or otherwise `false`.\r\n */\r\n private isCenter( options: Options ): boolean {\r\n if( options.focus === 'center' ) {\r\n if ( this.isLoop() ) {\r\n return true;\r\n }\r\n\r\n if ( this.options.type === SLIDE ) {\r\n return ! this.options.trimSpace;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if the direction is TTB or not.\r\n *\r\n * @return `true` if the direction is TTB, or otherwise `false`.\r\n */\r\n private isVertical(): boolean {\r\n return this.options.direction === TTB;\r\n }\r\n\r\n /**\r\n * Builds classes of the root element.\r\n *\r\n * @return Classes for the root element as a single string.\r\n */\r\n private buildClasses(): string {\r\n const { options } = this;\r\n\r\n return [\r\n CLASS_ROOT,\r\n `${ CLASS_ROOT }--${ options.type }`,\r\n `${ CLASS_ROOT }--${ options.direction }`,\r\n options.drag && `${ CLASS_ROOT }--draggable`,\r\n options.isNavigation && `${ CLASS_ROOT }--nav`,\r\n CLASS_ACTIVE,\r\n ! this.config.hidden && CLASS_RENDERED,\r\n ].filter( Boolean ).join( ' ' );\r\n }\r\n\r\n /**\r\n * Converts provided attributes into a single string.\r\n *\r\n * @param attrs - An object with attributes.\r\n *\r\n * @return A built string.\r\n */\r\n private buildAttrs( attrs: Record ): string {\r\n let attr = '';\r\n\r\n forOwn( attrs, ( value, key ) => {\r\n attr += value ? ` ${ camelToKebab( key ) }=\"${ value }\"` : '';\r\n } );\r\n\r\n return attr.trim();\r\n }\r\n\r\n /**\r\n * Converts provided styles into a single string.\r\n *\r\n * @param styles - An object with styles.\r\n *\r\n * @return A built string.\r\n */\r\n private buildStyles( styles: Record ): string {\r\n let style = '';\r\n\r\n forOwn( styles, ( value, key ) => {\r\n style += ` ${ camelToKebab( key ) }:${ value };`;\r\n } );\r\n\r\n return style.trim();\r\n }\r\n\r\n /**\r\n * Generates HTML of slides with inserting provided contents.\r\n *\r\n * @return The HTML for all slides and clones.\r\n */\r\n private renderSlides(): string {\r\n const { slideTag: tag } = this.config;\r\n\r\n return this.slides.map( content => {\r\n return `<${ tag } ${ this.buildAttrs( content.attrs ) }>${ content.html || '' }`;\r\n } ).join( '' );\r\n }\r\n\r\n /**\r\n * Add the `background` style for the cover mode.\r\n *\r\n * @param content - A slide content.\r\n */\r\n private cover( content: SlideContent ): void {\r\n const { styles, html = '' } = content;\r\n\r\n if ( this.options.cover && ! this.options.lazyLoad ) {\r\n const src = html.match( // );\r\n\r\n if ( src && src[ 2 ] ) {\r\n styles.background = `center/cover no-repeat url('${ src[ 2 ] }')`;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Generates clones.\r\n *\r\n * @param contents - An array with SlideContent objects.\r\n */\r\n private generateClones( contents: SlideContent[] ): void {\r\n const { classes } = this.options;\r\n const count = this.getCloneCount();\r\n const slides = contents.slice();\r\n\r\n while ( slides.length < count ) {\r\n push( slides, slides );\r\n }\r\n\r\n push( slides.slice( -count ).reverse(), slides.slice( 0, count ) ).forEach( ( content, index ) => {\r\n const attrs = assign( {}, content.attrs, { class: `${ content.attrs.class } ${ classes.clone }` } );\r\n const clone = assign( {}, content, { attrs } );\r\n index < count ? contents.unshift( clone ) : contents.push( clone );\r\n } );\r\n }\r\n\r\n /**\r\n * Returns the number of clones to generate.\r\n *\r\n * @return A number of clones.\r\n */\r\n private getCloneCount(): number {\r\n if ( this.isLoop() ) {\r\n const { options } = this;\r\n\r\n if ( options.clones ) {\r\n return options.clones;\r\n }\r\n\r\n const perPage = max( ...this.breakpoints.map( ( [ , options ] ) => options.perPage ) );\r\n return perPage * ( ( options.flickMaxPages || 1 ) + 1 );\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n /**\r\n * Generates arrows and the wrapper element.\r\n *\r\n * @return The HTML for arrows.\r\n */\r\n private renderArrows(): string {\r\n let html = '';\r\n\r\n html += `
`;\r\n html += this.renderArrow( true );\r\n html += this.renderArrow( false );\r\n html += `
`;\r\n\r\n return html;\r\n }\r\n\r\n /**\r\n * Generates an arrow HTML.\r\n * Some attributes are temporary, and Splide changes them after mount.\r\n *\r\n * @param prev - Options for each breakpoint.\r\n *\r\n * @return The HTML for the prev or next arrow.\r\n */\r\n private renderArrow( prev: boolean ): string {\r\n const { classes, i18n } = this.options;\r\n const attrs = {\r\n class : `${ classes.arrow } ${ prev ? classes.prev : classes.next }`,\r\n type : 'button',\r\n ariaLabel: prev ? i18n.prev : i18n.next,\r\n };\r\n\r\n return ``;\r\n }\r\n\r\n /**\r\n * Returns the HTML of the slider.\r\n *\r\n * @return The generated HTML.\r\n */\r\n html(): string {\r\n const { rootClass, listTag, arrows, beforeTrack, afterTrack, slider, beforeSlider, afterSlider } = this.config;\r\n\r\n let html = '';\r\n\r\n html += `
`;\r\n html += ``;\r\n\r\n if ( slider ) {\r\n html += beforeSlider || '';\r\n html += `
`;\r\n }\r\n\r\n html += beforeTrack || '';\r\n\r\n if ( arrows ) {\r\n html += this.renderArrows();\r\n }\r\n\r\n html += `
`;\r\n html += `<${ listTag } class=\"splide__list\">`;\r\n\r\n html += this.renderSlides();\r\n\r\n html += ``;\r\n html += `
`; // .track\r\n\r\n html += afterTrack || '';\r\n\r\n if ( slider ) {\r\n html += `
`;\r\n html += afterSlider || '';\r\n }\r\n\r\n html += `
`; // .splide\r\n\r\n return html;\r\n }\r\n}\r\n","/**\r\n * Pads the number with 0.\r\n *\r\n * @param number - A number to pad.\r\n *\r\n * @return string - Padded number.\r\n */\r\nexport function pad( number: number ): string {\r\n return number < 10 ? `0${ number }` : `${ number }`;\r\n}\r\n","import { slice } from '../../arrayLike';\r\n\r\n\r\n/**\r\n * Returns elements that match the provided selector.\r\n *\r\n * @param parent - A parent element to start searching from.\r\n * @param selector - A selector to query.\r\n *\r\n * @return An array with matched elements.\r\n */\r\nexport function queryAll( parent: Element | Document, selector?: string ): E[] {\r\n return selector ? slice( parent.querySelectorAll( selector ) ) : [];\r\n}\r\n","/**\r\n * The type for the regular slider.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const SLIDE = 'slide';\r\n\r\n/**\r\n * The type for the carousel slider.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const LOOP = 'loop';\r\n\r\n/**\r\n * The type for the fade slider that can not have multiple slides in a page.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const FADE = 'fade';\r\n","export const CLASS_RENDERED = 'is-rendered';\r\n","/**\r\n * The namespace for SVG elements.\r\n */\r\nexport const XML_NAME_SPACE = 'http://www.w3.org/2000/svg';\r\n\r\n/**\r\n * The arrow path.\r\n */\r\nexport const PATH = 'm15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z';\r\n\r\n/**\r\n * SVG width and height.\r\n */\r\nexport const SIZE = 40;\r\n"],"names":["RTL","TTB","ORIENTATION_MAP","width","left","right","x","X","Y","ArrowLeft","ARROW","ArrowRight","Direction","Splide2","Components2","options","resolve","prop","axisOnly","direction","index","replace","match","offset","replacement","toLowerCase","charAt","toUpperCase","slice","orient","value","PROJECT_CODE","CLASS_ROOT","CLASS_TRACK","CLASS_LIST","CLASS_SLIDE","CLASS_CLONE","CLASS_ARROW","CLASS_PAGINATION","CLASS_ACTIVE","DEFAULTS","type","role","speed","perPage","cloneStatus","arrows","pagination","paginationKeyboard","interval","pauseOnHover","pauseOnFocus","resetProgress","easing","drag","trimSpace","focusableNodes","live","classes","slide","clone","arrow","prev","next","page","spinner","i18n","first","last","slideX","pageX","play","pause","carousel","select","slideLabel","reducedMotion","rewindSpeed","autoplay","arrayLike","start","end","Array","prototype","call","apply","func","bind","arguments","typeOf","subject","isObject","isArray","isString","toArray","forEach","values","iteratee","push","array","items","matches","elm","selector","HTMLElement","child","parent","children2","children","filter","firstElementChild","ownKeys","Object","keys","forOwn","object","reverse","i","length","key","assign","source","merge","remove","nodes","node","parentNode","removeChild","unit","assert","condition","message","Error","Math","min","max","floor","ceil","abs","camelToKebab","string","ids","EventBinder","listeners","forEachEvent","targets","events","target","events2","split","eventNS","fragment","callback","event","namespace","isEventTarget","remover","removeEventListener","addEventListener","unbind","listener","dispatch","detail","e","CustomEvent","bubbles","document","createEvent","initCustomEvent","dispatchEvent","destroy","data","EventInterface","bus","createDocumentFragment","binder","on","join","off","emit","RENDERER_DEFAULT_CONFIG","listTag","slideTag","Style","id","styles","rule","breakpoint","selectors","this","build","css","default","buildSelectors","sort","n","m","_this","mediaQuery","_this2","trim","contents","config","defaults","slides","breakpoints","prefix","number","init","clean","splide","root","clones","querySelectorAll","parseBreakpoints","initSlides","registerRootStyles","registerTrackStyles","registerSlideStyles","registerListStyles","map","content","html","attrs","_this3","cover","class","style","buildStyles","isLoop","generateClones","_this4","Style2","_this5","cssPadding","cssTrackHeight","_this6","buildTranslate","cssSlideHeight","cssAspectRatio","_this7","cssSlideWidth","gap","cssOffsetClones","cssOffsetGaps","isCenter","buildCssValue","cssOffsetCenter","Boolean","cloneCount","getCloneCount","isFixedWidth","parseCssValue","unit2","padding","height","isVertical","cssHeight","autoWidth","fixedWidth","cssSlideSize","fixedHeight","autoHeight","heightRatio","parseFloat","_this8","focus","buildClasses","isNavigation","hidden","buildAttrs","attr","renderSlides","tag","_this9","lazyLoad","src","background","count","unshift","flickMaxPages","renderArrows","renderArrow","ariaLabel","arrowPath","rootClass","beforeTrack","afterTrack","slider","beforeSlider","afterSlider"],"mappings":"kPACaA,EAAM,MACNC,EAAM,MCANC,EAAkB,CAC7BC,MAAO,CAAC,UACRC,KAAM,CAAC,MAAO,SACdC,MAAO,CAAC,SAAU,QAClBC,EAAG,CAAC,KACJC,EAAG,CAAC,KACJC,EAAG,CAAC,KACJC,UAAW,CCNcC,UADGA,cDQ5BC,WAAY,CCNeD,YAHAA,uBDWbE,EAAUC,EAASC,EAAaC,SAYvC,CACLC,iBAZeC,EAAMC,EAAUC,OAEzBC,GADND,EAAYA,GAAaJ,EAAQI,aACLnB,GAAQkB,EAAeC,IAAclB,EAAM,GAAK,EAA7B,SACxCC,EAAgBe,IAASf,EAAgBe,GAAMG,IAAUH,EAAKI,QAAQ,oBAAqB,SAACC,EAAOC,GAClGC,EAActB,EAAgBoB,EAAMG,eAAeL,IAAUE,SACnD,EAATC,EAAaC,EAAYE,OAAO,GAAGC,cAAgBH,EAAYI,MAAM,GAAKJ,KAQnFK,gBALcC,UACPA,GAASf,EAAQI,YAAcnB,EAAM,GAAK,SEtBxC+B,EAAe,SCCfC,EAAaD,EACbE,EAAiBF,YACjBG,EAAgBH,WAChBI,EAAiBJ,YACjBK,EAAiBD,YAGjBE,EAAiBN,YAGjBO,EAAsBP,iBAUtBQ,EAAe,YCnBfC,EAAW,CACtBC,KAAM,QACNC,KAAM,SACNC,MAAO,IACPC,QAAS,EACTC,aAAa,EACbC,QAAQ,EACRC,YAAY,EACZC,oBAAoB,EACpBC,SAAU,IACVC,cAAc,EACdC,cAAc,EACdC,eAAe,EACfC,OAAQ,gCACRC,MAAM,EACNnC,UAAW,MACXoC,WAAW,EACXC,eAAgB,6CAChBC,MAAM,EACNC,QDcqB,CACrBC,MAAOxB,EACPyB,MAAOxB,EACPU,OA/B6Bf,aAgC7B8B,MAAOxB,EACPyB,KA/BiCzB,WAgCjC0B,KA/BiC1B,WAgCjCU,WAAYT,EACZ0B,KA/BsC1B,WAgCtC2B,QA1B8BlC,eCI9BmC,KCtBkB,CAClBJ,KAAM,iBACNC,KAAM,aACNI,MAAO,oBACPC,KAAM,mBACNC,OAAQ,iBACRC,MAAO,gBACPC,KAAM,iBACNC,MAAO,iBACPC,SAAU,WACVd,MAAO,QACPe,OAAQ,yBACRC,WAAY,YDWZC,cAAe,CACbjC,MAAO,EACPkC,YAAa,EACbC,SAAU,mBE1BElD,EAAMmD,EAAWC,EAAOC,UAC/BC,MAAMC,UAAUvD,MAAMwD,KAAKL,EAAWC,EAAOC,YCAtCI,EAAMC,UACbA,EAAKC,WAALD,GAAU,aAAS1D,EAAM4D,UAAW,cCDpCC,EAAOhD,EAAMiD,iBACNA,IAAYjD,WAEZkD,EAASD,UAQJ,OAPJA,GAAYD,EAAO,SAAUC,OAEjCE,EAAUV,MAAMU,QACHP,EAAMI,EAAQ,gBAC3BI,EAAWR,EAAMI,EAAQ,mBCRtBK,EAAQhE,UACf8D,EAAQ9D,GAASA,EAAQ,CAACA,YCDnBiE,EAAQC,EAAQC,GAC9BH,EAAQE,GAAQD,QAAQE,YCDVC,EAAKC,EAAOC,UAC1BD,EAAMD,WAANC,EAAcL,EAAQM,IACfD,WCFOE,EAAQC,EAAKC,UACND,aJaKE,cIbIF,EAAG,mBAAyBA,EAAID,SAASjB,KAAKkB,EAAKC,YCDnEE,EAAMC,EAAQH,UACrBA,GCAwBA,EDAIA,ECC7BI,GADiBD,EDAIA,GCCA9E,EAAM8E,EAAOE,UAAY,IAC7CL,EAAWI,EAAUE,OAAO,SAACJ,UAAUJ,EAAQI,EAAOF,KAAaI,GDF7B,IAAKD,EAAOI,sBCA1BP,ENQNlB,EAAMI,EAAQ,iBOV5BsB,EAAUC,OAAOC,cCCdC,EAAOC,EAAQlB,EAAU5F,MACnC8G,UACEF,EAAOF,EAAQI,GACnBF,EAAO5G,EAAQ4G,EAAKG,UAAYH,EACvBI,EAAI,EAAGA,EAAIJ,EAAKK,OAAQD,IAAK,KAC9BE,EAAMN,EAAKI,MACL,cAARE,IACiC,IAA/BtB,EAASkB,EAAOI,GAAMA,gBAMzBJ,WCZOK,EAAOL,UACrBvF,EAAM4D,UAAW,GAAGO,QAAQ,SAAC0B,GAC3BP,EAAOO,EAAQ,SAAC3F,EAAOyF,GACrBJ,EAAOI,GAAOE,EAAOF,OAGlBJ,WCLOO,EAAMP,UACpBvF,EAAM4D,UAAW,GAAGO,QAAQ,SAAC0B,GAC3BP,EAAOO,EAAQ,SAAC3F,EAAOyF,GACjB3B,EAAQ9D,GACVqF,EAAOI,GAAOzF,EAAMF,QACX+D,EAAS7D,GAClBqF,EAAOI,GAAOG,EAAM,GAAI/B,EAASwB,EAAOI,IAAQJ,EAAOI,GAAO,GAAIzF,GAElEqF,EAAOI,GAAOzF,MAIbqF,WCdOQ,EAAOC,GACrB7B,EAAQ6B,EAAO,SAACC,GACVA,GAAQA,EAAKC,YACfD,EAAKC,WAAWC,YAAYF,cCHlBG,EAAKlG,UACZ+D,EAAS/D,GAASA,EAAQA,EAAWA,OAAY,YCD1CmG,EAAOC,EAAWC,OAC3BD,QACG,IAAIE,UAAUrG,QAAiBoG,GAAW,KCHNE,KAA/BC,QAAKC,EAA0BF,KAA1BE,IAA0BF,KAArBG,MAAqBH,KAAdI,KAAcJ,KAARK,aCAtBC,EAAaC,UACpBA,EAAOvH,QAAQ,qBAAsB,SAASI,kBCAjDoH,EAAM,YCAIC,QACVC,EAAY,YAgCPC,EAAaC,EAASC,EAAQjD,GACrCF,EAAQkD,EAAS,SAACE,GAChBA,GAAUpD,EAAQmD,EAAQ,SAACE,GACzBA,EAAQC,MAAM,KAAKtD,QAAQ,SAACuD,GACpBC,EAAWD,EAAQD,MAAM,KAC/BpD,EAASkD,EAAQI,EAAS,GAAIA,EAAS,gBAWxC,CACLhE,cAhDY0D,EAASC,EAAQM,EAAUzI,GACvCiI,EAAaC,EAASC,EAAQ,SAACC,EAAQM,EAAOC,OACtCC,EAAgB,qBAAsBR,EACtCS,EAAUD,EAAgBR,EAAOU,oBAAoBtE,KAAK4D,EAAQM,EAAOD,EAAUzI,GAAWoI,EAAM,eAAmB5D,KAAK4D,EAAQK,GAC1IG,EAAgBR,EAAOW,iBAAiBL,EAAOD,EAAUzI,GAAWoI,EAAM,YAAgBK,GAC1FT,EAAU7C,KAAK,CAACiD,EAAQM,EAAOC,EAAWF,EAAUI,OA4CtDG,gBAzCcd,EAASC,EAAQM,GAC/BR,EAAaC,EAASC,EAAQ,SAACC,EAAQM,EAAOC,GAC5CX,EAAYA,EAAUlC,OAAO,SAACmD,YACxBA,EAAS,KAAOb,GAAUa,EAAS,KAAOP,GAASO,EAAS,KAAON,GAAeF,GAAYQ,EAAS,KAAOR,KAChHQ,EAAS,MACF,QAqCbC,kBA/BgBd,EAAQ1G,EAAMyH,OAC1BC,QAEuB,mBAAhBC,YACTD,EAAI,IAAIC,YAAY3H,EAAM,CAAE4H,SAFd,EAEuBH,OAAAA,KAErCC,EAAIG,SAASC,YAAY,gBACvBC,gBAAgB/H,GALJ,GAKmB,EAAOyH,GAE1Cf,EAAOsB,cAAcN,GACdA,GAsBPO,mBATA3B,EAAUhD,QAAQ,SAAC4E,GACjBA,EAAK,OAED5B,EC/CFzB,OAAS,aCEDsD,EAAe/J,OACvBgK,EAAMhK,EAAUA,EAAQ4I,MAAMoB,IAAMP,SAASQ,yBAC7CC,EAASjC,WASXjI,GACFA,EAAQ4I,MAAMuB,GCKW,UDLOD,EAAOL,SAElClD,EAAOuD,EAAQ,CACpBF,IAAAA,EACAG,YAbU9B,EAAQM,GAClBuB,EAAOxF,KAAKsF,EAAK/E,EAAQoD,GAAQ+B,KAAK,KAAM,SAACd,GAC3CX,EAASnE,MAAMmE,EAAU5D,EAAQuE,EAAED,QAAUC,EAAED,OAAS,OAY1DgB,IAAK7F,EAAM0F,EAAOhB,OAAQc,GAC1BM,cAVY1B,GACZsB,EAAOd,SAASY,EAAKpB,EAAO7H,EAAM4D,UAAW,WEZpC4F,EAA0B,CACrCC,QAAS,KACTC,SAAU,MCDCC,wBACCC,EAAIzK,QACT0K,OAAS,QACTD,GAAKA,OACLzK,QAAUA,6BAEjB2K,KAAA,SAAKnF,EAAUtF,EAAMa,EAAO6J,GAEpBC,EAAYC,KAAKJ,OADvBE,EAAaA,GAAc,WACiBE,KAAKJ,OAAOE,IAAe,IACxDC,EAAUrF,GAAYqF,EAAUrF,IAAa,IACrDtF,GAAQa,KAEjBgK,MAAA,sBACMC,EAAM,UACNF,KAAKJ,OAAOO,UACdD,GAAOF,KAAKI,eAAeJ,KAAKJ,OAAOO,UAEzChF,OAAOC,KAAK4E,KAAKJ,QAAQS,KAAK,SAACC,EAAGC,SAAkC,QAA5BC,EAAKtL,QAAQuL,YAAwBH,GAAKC,GAAKA,GAAKD,IAAGpG,QAAQ,SAAC4F,GACnF,YAAfA,IACFI,oCAAwCJ,UACxCI,GAAOM,EAAKJ,eAAeI,EAAKZ,OAAOE,IACvCI,UAGGA,KAETE,eAAA,SAAeL,cACTG,EAAM,UACV7E,EAAO0E,EAAW,SAACH,EAAQlF,GACzBA,OAAegG,EAAKf,OAAMjF,GAAWiG,OACrCT,GAAUxF,OACVW,EAAOuE,EAAQ,SAAC3J,EAAOb,IACjBa,GAAmB,IAAVA,IACXiK,GAAU9K,OAASa,SAGvBiK,GAAO,MAEFA,qCCXGU,EAAU1L,EAAS2L,EAAQC,QAChCC,OAAS,QACT7L,QAAU,QACV8L,YAAc,GACnBnF,EAAMlF,EAAUmK,GAAY,IAC5BjF,EAAMA,EAAMmE,KAAK9K,QAASyB,GAAWzB,GAAW,SAC3C0L,SAAWA,OACXC,OAASlF,EAAO,GAAI4D,EAAyBsB,GAAU,SACvDlB,GAAKK,KAAKa,OAAOlB,QPlCDsB,EOkCgB,YCpCrBC,ERGKlE,EAAIiE,IAAWjE,EAAIiE,IAAW,GAAK,GQF1C,OAASC,KAAcA,QDoChCxB,MAAQ,IAAIA,EAAMM,KAAKL,GAAIK,KAAK9K,cAChCH,UAAYA,EAAU,EAAM,EAAMiL,KAAK9K,SAC5CkH,EAAO4D,KAAKY,SAASnF,OAAQ,oCACxB0F,SAEAC,MAAP,SAAaC,OEzCUxG,EF0CbsE,EAAOJ,EAAesC,GAAtBlC,GACAmC,EAASD,EAATC,KACFC,GE5Ce1G,EF4CGyG,GE5CK5G,MF4CKnE,GE3ClBR,EAAM8E,EAAO2G,iBAAiB9G,IAAa,IF4C3DyE,EH9CyB,UG8CP,WAChBrD,EAAOlB,EAAM0G,EAAM,YAErBxF,EAAOyF,+BAETJ,KAAA,gBACOM,wBACAC,kBACAC,0BACAC,2BACAC,2BACAC,wBAEPJ,WAAA,sBACErH,EAAK2F,KAAKe,OAAQf,KAAKY,SAASmB,IAAI,SAACC,EAASzM,IAC5CyM,EAAUhI,EAASgI,GAAW,CAAEC,KAAMD,GAAYA,GAC1CpC,OAASoC,EAAQpC,QAAU,GACnCoC,EAAQE,MAAQF,EAAQE,OAAS,GACjCC,EAAKC,MAAMJ,GACLnK,EAAasK,EAAKjN,QAAQ2C,QAAQC,WAAmB,IAAVvC,EAAcmB,EAAe,WAC9EiF,EAAOqG,EAAQE,MAAO,CACpBG,OAAUxK,OAAWmK,EAAQE,MAAMG,OAAS,KAAK1B,OACjD2B,MAAOH,EAAKI,YAAYP,EAAQpC,UAE3BoC,KAELhC,KAAKwC,eACFC,eAAezC,KAAKe,WAG7BY,mBAAA,2BACOX,YAAY9G,QAAQ,gBAAE5F,OAAOY,OAChCwN,EAAKhD,MAAMG,KAAK,IAAK,YAAa1D,EAAKjH,EAAQZ,OAAQA,QAG3DsN,oBAAA,sBACiBe,EAAW3C,KAAlBN,MACFhF,MAAetE,OAChB4K,YAAY9G,QAAQ,gBAAE5F,OAAOY,OAChCyN,EAAO9C,KAAKnF,EAAUkI,EAAKzN,QAAQ,eAAgByN,EAAKC,WAAW3N,GAAS,GAAQZ,GACpFqO,EAAO9C,KAAKnF,EAAUkI,EAAKzN,QAAQ,gBAAiByN,EAAKC,WAAW3N,GAAS,GAAOZ,GACpFqO,EAAO9C,KAAKnF,EAAU,SAAUkI,EAAKE,eAAe5N,GAAUZ,QAGlEwN,mBAAA,sBACiBa,EAAW3C,KAAlBN,MACFhF,MAAerE,OAChB2K,YAAY9G,QAAQ,gBAAE5F,OAAOY,OAChCyN,EAAO9C,KAAKnF,EAAU,YAAaqI,EAAKC,eAAe9N,GAAUZ,GAC5DyO,EAAKE,eAAe/N,IACvByN,EAAO9C,KAAKnF,EAAU,eAAgBqI,EAAKG,eAAehO,GAAUZ,QAI1EuN,oBAAA,sBACiBc,EAAW3C,KAAlBN,MACFhF,MAAepE,OAChB0K,YAAY9G,QAAQ,gBAAE5F,OAAOY,OAChCyN,EAAO9C,KAAKnF,EAAU,QAASyI,EAAKC,cAAclO,GAAUZ,GAC5DqO,EAAO9C,KAAKnF,EAAU,SAAUyI,EAAKF,eAAe/N,IAAY,OAAQZ,GACxEqO,EAAO9C,KAAKnF,EAAUyI,EAAKhO,QAAQ,eAAgBgH,EAAKjH,EAAQmO,MAAQ,MAAO/O,GAC/EqO,EAAO9C,KAAQnF,WAAkB,UAAWxF,EAAQkN,MAAQ,OAAS,SAAU9N,QAGnF0O,eAAA,SAAe9N,SACe8K,KAAKjL,UAAzBI,IAAAA,QAASa,IAAAA,OACXmE,EAAS,UACfA,EAAOE,KAAK2F,KAAKsD,gBAAgBpO,IACjCiF,EAAOE,KAAK2F,KAAKuD,cAAcrO,IAC3B8K,KAAKwD,SAAStO,KAChBiF,EAAOE,KAAK2F,KAAKyD,cAAczN,GAAQ,IAAK,MAC5CmE,EAAOE,WAAPF,EAAe6F,KAAK0D,gBAAgBxO,KAE/BiF,EAAOa,OAAO2I,SAAS5B,IAAI,SAAC9L,qBAAsBd,EAAQ,SAAQc,QAAUmJ,KAAK,QAE1FkE,gBAAA,SAAgBpO,SACc8K,KAAKjL,UAAzBI,IAAAA,QAASa,IAAAA,OACX4N,EAAa5D,KAAK6D,mBACpB7D,KAAK8D,aAAa5O,GAAU,GACC8K,KAAK+D,cAAc7O,EAAQC,EAAQ,gBAA1Dc,IAAAA,MAAa+N,IAAN7H,YACR6D,KAAKyD,cAAczN,EAAOC,GAAS2N,EAAYI,UAG9ChO,EADM,IAAM4N,EAAa1O,EAAQ6B,gBAG7C2M,gBAAA,SAAgBxO,SACc8K,KAAKjL,UAAzBI,IAAAA,QAASa,IAAAA,UACbgK,KAAK8D,aAAa5O,GAAU,OACC8K,KAAK+D,cAAc7O,EAAQC,EAAQ,gBAA1Dc,IAAAA,MAAa+N,IAAN7H,WACR,CAAC6D,KAAKyD,cAAczN,EAAOC,EAAQ,GAAI+N,QAE1C7J,EAAS,GACPpD,EAAiB7B,EAAjB6B,QAASsM,EAAQnO,EAARmO,WACjBlJ,EAAOE,KAAQrE,EAAO,GAAKe,QACvBsM,IACMpN,KAAuB+J,KAAK+D,cAAcV,IAA1CpN,MAAa+N,IAAN7H,KAEfhC,EAAOE,KAAK2F,KAAKyD,cAAczN,GADZC,EAAQc,EAAUd,GAAS,GACI+N,KAE7C7J,KAEToJ,cAAA,SAAcrO,OACN0O,EAAa5D,KAAK6D,mBACpBD,GAAc1O,EAAQmO,IAAK,KACrBrN,EAAWgK,KAAKjL,UAAhBiB,SACuBgK,KAAK+D,cAAc7O,EAAQmO,KAAlDpN,IAAAA,MAAa+N,IAAN7H,QACX6D,KAAK8D,aAAa5O,UACb8K,KAAKyD,cAAczN,EAAOC,EAAQ2N,GAAaI,GAEhDjN,EAAY7B,EAAZ6B,eAEDiJ,KAAKyD,cAAczN,EADb4N,EAAa7M,EACcd,GAAQ+N,SAE3C,MAET7O,QAAA,SAAQC,UACC0H,EAAakD,KAAKjL,UAAUI,QAAQC,OAE7CyN,WAAA,SAAW3N,EAASV,GACVyP,EAAY/O,EAAZ+O,QACF7O,EAAO4K,KAAKjL,UAAUI,QAAQX,EAAQ,QAAU,QAAQ,UACvDyP,GAAW9H,EAAK8H,EAAQ7O,KAAU0E,EAASmK,GAAW,EAAIA,KAAa,SAEhFnB,eAAA,SAAe5N,OACTgP,EAAS,UACTlE,KAAKmE,eAEP/H,EADA8H,EAASlE,KAAKoE,UAAUlP,GACT,wBACfgP,UAAiBA,QAAYlE,KAAK6C,WAAW3N,GAAS,SAAY8K,KAAK6C,WAAW3N,GAAS,QAEtFgP,KAETE,UAAA,SAAUlP,UACDiH,EAAKjH,EAAQgP,WAEtBd,cAAA,SAAclO,UACLA,EAAQmP,UAAY,GAAKlI,EAAKjH,EAAQoP,cAAgBtE,KAAKmE,aAAe,GAAKnE,KAAKuE,aAAarP,OAE1G+N,eAAA,SAAe/N,UACNiH,EAAKjH,EAAQsP,eAAiBxE,KAAKmE,aAAejP,EAAQuP,WAAa,GAAKzE,KAAKuE,aAAarP,GAAW8K,KAAKoE,UAAUlP,OAEjIqP,aAAA,SAAarP,OACLmO,EAAMlH,EAAKjH,EAAQmO,yBACLA,SAAaA,SAAUnO,EAAQ6B,SAAW,IAAIsM,SAAaA,UAEjFH,eAAA,SAAehO,GACLwP,EAAgBxP,EAAhBwP,mBACDA,KAAiB,EAAIA,EAAgB,MAE9CjB,cAAA,SAAcxN,EAAO+N,YACT/N,EAAQ+N,KAEpBD,cAAA,SAAc9N,UACR+D,EAAS/D,GAGJ,CAAEA,MAFM0O,WAAW1O,IAAU,EAEZkG,KADVlG,EAAMT,QAAQ,cAAe,KAAO,MAG7C,CAAES,MAAAA,EAAOkG,KAAM,SAExBsF,iBAAA,sBACUT,EAAgBhB,KAAK9K,QAArB8L,iBACHA,YAAY3G,KAAK,CAAC,UAAW2F,KAAK9K,UACnC8L,GACF3F,EAAO2F,EAAa,SAAC9L,EAASZ,GAC5BsQ,EAAK5D,YAAY3G,KAAK,CAAC/F,EAAOuH,EAAMA,EAAM,GAAI+I,EAAK1P,SAAUA,UAInE4O,aAAA,SAAa5O,WACFA,EAAQ8K,KAAKjL,UAAUI,QAAQ,kBAE1CqN,OAAA,iBGzNkB,SH0NTxC,KAAK9K,QAAQ0B,QAEtB4M,SAAA,SAAStO,MACe,WAAlBA,EAAQ2P,MAAoB,IAC1B7E,KAAKwC,gBACA,KGhOM,UHkOXxC,KAAK9K,QAAQ0B,YACPoJ,KAAK9K,QAAQwC,iBAGlB,KAETyM,WAAA,kBACSnE,KAAK9K,QAAQI,YAAclB,KAEpC0Q,aAAA,eACU5P,EAAY8K,KAAZ9K,cACD,CACLiB,EACGA,OAAejB,EAAQ0B,KACvBT,OAAejB,EAAQI,UAC1BJ,EAAQuC,MAAWtB,gBACnBjB,EAAQ6P,cAAmB5O,UAC3BO,GACCsJ,KAAKa,OAAOmE,QIpPW,eJqPxBhK,OAAO2I,SAASvE,KAAK,QAEzB6F,WAAA,SAAW/C,OACLgD,EAAO,UACX7J,EAAO6G,EAAO,SAACjM,EAAOyF,GACpBwJ,GAAQjP,MAAY6G,EAAapB,QAASzF,MAAW,KAEhDiP,EAAKvE,UAEd4B,YAAA,SAAY3C,OACN0C,EAAQ,UACZjH,EAAOuE,EAAQ,SAAC3J,EAAOyF,GACrB4G,OAAaxF,EAAapB,OAAQzF,QAE7BqM,EAAM3B,UAEfwE,aAAA,sBACoBC,EAAQpF,KAAKa,OAAvBpB,gBACDO,KAAKe,OAAOgB,IAAI,SAACC,aACXoD,MAAOC,EAAKJ,WAAWjD,EAAQE,YAAUF,EAAQC,MAAQ,SAAOmD,QAC1EhG,KAAK,OAEVgD,MAAA,SAAMJ,OACIpC,EAAsBoC,EAAtBpC,SAAsBoC,EAAdC,KAAAA,aAAO,MACnBjC,KAAK9K,QAAQkN,OAAUpC,KAAK9K,QAAQoQ,WAChCC,EAAMtD,EAAKxM,MAAM,wCACZ8P,EAAI,KACb3F,EAAO4F,0CAA4CD,EAAI,YAI7D9C,eAAA,SAAe7B,WACL/I,EAAYmI,KAAK9K,QAAjB2C,QACF4N,EAAQzF,KAAK6D,gBACb9C,EAASH,EAAS7K,QACjBgL,EAAOtF,OAASgK,GACrBpL,EAAK0G,EAAQA,GAEf1G,EAAK0G,EAAOhL,OAAO0P,GAAOlK,UAAWwF,EAAOhL,MAAM,EAAG0P,IAAQvL,QAAQ,SAAC8H,EAASzM,OACvE2M,EAAQvG,EAAO,GAAIqG,EAAQE,MAAO,CAAEG,MAAUL,EAAQE,MAAMG,UAASxK,EAAQE,QAC7EA,EAAQ4D,EAAO,GAAIqG,EAAS,CAAEE,MAAAA,IACpC3M,EAAQkQ,EAAQ7E,EAAS8E,QAAQ3N,GAAS6I,EAASvG,KAAKtC,QAG5D8L,cAAA,cACM7D,KAAKwC,SAAU,KACTtN,EAAY8K,KAAZ9K,eACJA,EAAQqM,OACHrM,EAAQqM,OAED7E,eAAOsD,KAAKgB,YAAYe,IAAI,wBAA2BhL,aACpD7B,EAAQyQ,eAAiB,GAAK,UAE5C,KAETC,aAAA,eACM3D,EAAO,UACXA,kBAAuBjC,KAAK9K,QAAQ2C,QAAQZ,YAC5CgL,GAAQjC,KAAK6F,aAAY,GACzB5D,GAAQjC,KAAK6F,aAAY,GACzB5D,eAGF4D,YAAA,SAAY5N,SACgB+H,KAAK9K,QAAvB2C,IAAAA,QAASQ,IAAAA,KACX6J,EAAQ,CACZG,MAAUxK,EAAQG,WAASC,EAAOJ,EAAQI,KAAOJ,EAAQK,MACzDtB,KAAM,SACNkP,UAAW7N,EAAOI,EAAKJ,KAAOI,EAAKH,uBAEnB8H,KAAKiF,WAAW/C,oGAAiHlC,KAAK9K,QAAQ6Q,WK1ThJ,kHL4TlB9D,KAAA,iBACqGjC,KAAKa,OAAhGmF,IAAAA,UAAWxG,IAAAA,QAASvI,IAAAA,OAAQgP,IAAAA,YAAaC,IAAAA,WAAYC,IAAAA,OAAQC,IAAAA,aAAcC,IAAAA,YAC/EpE,EAAO,UACXA,eAAoBjC,KAAKL,eAAcK,KAAK8E,oBAAkBkB,GAAa,SAC3E/D,aAAkBjC,KAAKN,MAAMO,mBACzBkG,IACFlE,GAAQmE,GAAgB,GACxBnE,mCAEFA,GAAQgE,GAAe,GACnBhP,IACFgL,GAAQjC,KAAK4F,gBAEf3D,iCACAA,OAAYzC,2BACZyC,GAAQjC,KAAKmF,eACblD,QAAazC,MACbyC,YACAA,GAAQiE,GAAc,GAClBC,IACFlE,YACAA,GAAQoE,GAAe,IAEzBpE"} \ No newline at end of file diff --git a/assets/splide/js/splide.cjs.js b/assets/splide/js/splide.cjs.js deleted file mode 100644 index baef62748..000000000 --- a/assets/splide/js/splide.cjs.js +++ /dev/null @@ -1,3721 +0,0 @@ -/*! - * Splide.js - * Version : 4.0.7 - * License : MIT - * Copyright: 2022 Naotoshi Fujita - */ -'use strict'; - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -Object.defineProperty(exports, '__esModule', { - value: true -}); -var MEDIA_PREFERS_REDUCED_MOTION = "(prefers-reduced-motion: reduce)"; -var CREATED = 1; -var MOUNTED = 2; -var IDLE = 3; -var MOVING = 4; -var SCROLLING = 5; -var DRAGGING = 6; -var DESTROYED = 7; -var STATES = { - CREATED: CREATED, - MOUNTED: MOUNTED, - IDLE: IDLE, - MOVING: MOVING, - SCROLLING: SCROLLING, - DRAGGING: DRAGGING, - DESTROYED: DESTROYED -}; - -function empty(array) { - array.length = 0; -} - -function slice(arrayLike, start, end) { - return Array.prototype.slice.call(arrayLike, start, end); -} - -function apply(func) { - return func.bind.apply(func, [null].concat(slice(arguments, 1))); -} - -var nextTick = setTimeout; - -var noop = function noop() {}; - -function raf(func) { - return requestAnimationFrame(func); -} - -function typeOf(type, subject) { - return typeof subject === type; -} - -function isObject(subject) { - return !isNull(subject) && typeOf("object", subject); -} - -var isArray = Array.isArray; -var isFunction = apply(typeOf, "function"); -var isString = apply(typeOf, "string"); -var isUndefined = apply(typeOf, "undefined"); - -function isNull(subject) { - return subject === null; -} - -function isHTMLElement(subject) { - return subject instanceof HTMLElement; -} - -function toArray(value) { - return isArray(value) ? value : [value]; -} - -function forEach(values, iteratee) { - toArray(values).forEach(iteratee); -} - -function includes(array, value) { - return array.indexOf(value) > -1; -} - -function push(array, items) { - array.push.apply(array, toArray(items)); - return array; -} - -function toggleClass(elm, classes, add) { - if (elm) { - forEach(classes, function (name) { - if (name) { - elm.classList[add ? "add" : "remove"](name); - } - }); - } -} - -function addClass(elm, classes) { - toggleClass(elm, isString(classes) ? classes.split(" ") : classes, true); -} - -function append(parent, children) { - forEach(children, parent.appendChild.bind(parent)); -} - -function before(nodes, ref) { - forEach(nodes, function (node) { - var parent = (ref || node).parentNode; - - if (parent) { - parent.insertBefore(node, ref); - } - }); -} - -function matches(elm, selector) { - return isHTMLElement(elm) && (elm["msMatchesSelector"] || elm.matches).call(elm, selector); -} - -function children(parent, selector) { - var children2 = parent ? slice(parent.children) : []; - return selector ? children2.filter(function (child) { - return matches(child, selector); - }) : children2; -} - -function child(parent, selector) { - return selector ? children(parent, selector)[0] : parent.firstElementChild; -} - -var ownKeys = Object.keys; - -function forOwn(object, iteratee, right) { - if (object) { - var keys = ownKeys(object); - keys = right ? keys.reverse() : keys; - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== "__proto__") { - if (iteratee(object[key], key) === false) { - break; - } - } - } - } - - return object; -} - -function assign(object) { - slice(arguments, 1).forEach(function (source) { - forOwn(source, function (value, key) { - object[key] = source[key]; - }); - }); - return object; -} - -function merge(object) { - slice(arguments, 1).forEach(function (source) { - forOwn(source, function (value, key) { - if (isArray(value)) { - object[key] = value.slice(); - } else if (isObject(value)) { - object[key] = merge({}, isObject(object[key]) ? object[key] : {}, value); - } else { - object[key] = value; - } - }); - }); - return object; -} - -function omit(object, keys) { - toArray(keys || ownKeys(object)).forEach(function (key) { - delete object[key]; - }); -} - -function removeAttribute(elms, attrs) { - forEach(elms, function (elm) { - forEach(attrs, function (attr) { - elm && elm.removeAttribute(attr); - }); - }); -} - -function setAttribute(elms, attrs, value) { - if (isObject(attrs)) { - forOwn(attrs, function (value2, name) { - setAttribute(elms, name, value2); - }); - } else { - forEach(elms, function (elm) { - isNull(value) || value === "" ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value)); - }); - } -} - -function create(tag, attrs, parent) { - var elm = document.createElement(tag); - - if (attrs) { - isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs); - } - - parent && append(parent, elm); - return elm; -} - -function style(elm, prop, value) { - if (isUndefined(value)) { - return getComputedStyle(elm)[prop]; - } - - if (!isNull(value)) { - elm.style[prop] = "" + value; - } -} - -function display(elm, display2) { - style(elm, "display", display2); -} - -function focus(elm) { - elm["setActive"] && elm["setActive"]() || elm.focus({ - preventScroll: true - }); -} - -function getAttribute(elm, attr) { - return elm.getAttribute(attr); -} - -function hasClass(elm, className) { - return elm && elm.classList.contains(className); -} - -function rect(target) { - return target.getBoundingClientRect(); -} - -function remove(nodes) { - forEach(nodes, function (node) { - if (node && node.parentNode) { - node.parentNode.removeChild(node); - } - }); -} - -function parseHtml(html) { - return child(new DOMParser().parseFromString(html, "text/html").body); -} - -function prevent(e, stopPropagation) { - e.preventDefault(); - - if (stopPropagation) { - e.stopPropagation(); - e.stopImmediatePropagation(); - } -} - -function query(parent, selector) { - return parent && parent.querySelector(selector); -} - -function queryAll(parent, selector) { - return selector ? slice(parent.querySelectorAll(selector)) : []; -} - -function removeClass(elm, classes) { - toggleClass(elm, classes, false); -} - -function timeOf(e) { - return e.timeStamp; -} - -function unit(value) { - return isString(value) ? value : value ? value + "px" : ""; -} - -var PROJECT_CODE = "splide"; -var DATA_ATTRIBUTE = "data-" + PROJECT_CODE; - -function assert(condition, message) { - if (!condition) { - throw new Error("[" + PROJECT_CODE + "] " + (message || "")); - } -} - -var min = Math.min, - max = Math.max, - floor = Math.floor, - ceil = Math.ceil, - abs = Math.abs; - -function approximatelyEqual(x, y, epsilon) { - return abs(x - y) < epsilon; -} - -function between(number, minOrMax, maxOrMin, exclusive) { - var minimum = min(minOrMax, maxOrMin); - var maximum = max(minOrMax, maxOrMin); - return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum; -} - -function clamp(number, x, y) { - var minimum = min(x, y); - var maximum = max(x, y); - return min(max(minimum, number), maximum); -} - -function sign(x) { - return +(x > 0) - +(x < 0); -} - -function camelToKebab(string) { - return string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); -} - -function format(string, replacements) { - forEach(replacements, function (replacement) { - string = string.replace("%s", "" + replacement); - }); - return string; -} - -function pad(number) { - return number < 10 ? "0" + number : "" + number; -} - -var ids = {}; - -function uniqueId(prefix) { - return "" + prefix + pad(ids[prefix] = (ids[prefix] || 0) + 1); -} - -function EventBinder() { - var listeners = []; - - function bind(targets, events, callback, options) { - forEachEvent(targets, events, function (target, event, namespace) { - var isEventTarget = ("addEventListener" in target); - var remover = isEventTarget ? target.removeEventListener.bind(target, event, callback, options) : target["removeListener"].bind(target, callback); - isEventTarget ? target.addEventListener(event, callback, options) : target["addListener"](callback); - listeners.push([target, event, namespace, callback, remover]); - }); - } - - function unbind(targets, events, callback) { - forEachEvent(targets, events, function (target, event, namespace) { - listeners = listeners.filter(function (listener) { - if (listener[0] === target && listener[1] === event && listener[2] === namespace && (!callback || listener[3] === callback)) { - listener[4](); - return false; - } - - return true; - }); - }); - } - - function dispatch(target, type, detail) { - var e; - var bubbles = true; - - if (typeof CustomEvent === "function") { - e = new CustomEvent(type, { - bubbles: bubbles, - detail: detail - }); - } else { - e = document.createEvent("CustomEvent"); - e.initCustomEvent(type, bubbles, false, detail); - } - - target.dispatchEvent(e); - return e; - } - - function forEachEvent(targets, events, iteratee) { - forEach(targets, function (target) { - target && forEach(events, function (events2) { - events2.split(" ").forEach(function (eventNS) { - var fragment = eventNS.split("."); - iteratee(target, fragment[0], fragment[1]); - }); - }); - }); - } - - function destroy() { - listeners.forEach(function (data) { - data[4](); - }); - empty(listeners); - } - - return { - bind: bind, - unbind: unbind, - dispatch: dispatch, - destroy: destroy - }; -} - -var EVENT_MOUNTED = "mounted"; -var EVENT_READY = "ready"; -var EVENT_MOVE = "move"; -var EVENT_MOVED = "moved"; -var EVENT_SHIFTED = "shifted"; -var EVENT_CLICK = "click"; -var EVENT_ACTIVE = "active"; -var EVENT_INACTIVE = "inactive"; -var EVENT_VISIBLE = "visible"; -var EVENT_HIDDEN = "hidden"; -var EVENT_SLIDE_KEYDOWN = "slide:keydown"; -var EVENT_REFRESH = "refresh"; -var EVENT_UPDATED = "updated"; -var EVENT_RESIZE = "resize"; -var EVENT_RESIZED = "resized"; -var EVENT_DRAG = "drag"; -var EVENT_DRAGGING = "dragging"; -var EVENT_DRAGGED = "dragged"; -var EVENT_SCROLL = "scroll"; -var EVENT_SCROLLED = "scrolled"; -var EVENT_DESTROY = "destroy"; -var EVENT_ARROWS_MOUNTED = "arrows:mounted"; -var EVENT_ARROWS_UPDATED = "arrows:updated"; -var EVENT_PAGINATION_MOUNTED = "pagination:mounted"; -var EVENT_PAGINATION_UPDATED = "pagination:updated"; -var EVENT_NAVIGATION_MOUNTED = "navigation:mounted"; -var EVENT_AUTOPLAY_PLAY = "autoplay:play"; -var EVENT_AUTOPLAY_PLAYING = "autoplay:playing"; -var EVENT_AUTOPLAY_PAUSE = "autoplay:pause"; -var EVENT_LAZYLOAD_LOADED = "lazyload:loaded"; - -function EventInterface(Splide2) { - var bus = Splide2 ? Splide2.event.bus : document.createDocumentFragment(); - var binder = EventBinder(); - - function on(events, callback) { - binder.bind(bus, toArray(events).join(" "), function (e) { - callback.apply(callback, isArray(e.detail) ? e.detail : []); - }); - } - - function emit(event) { - binder.dispatch(bus, event, slice(arguments, 1)); - } - - if (Splide2) { - Splide2.event.on(EVENT_DESTROY, binder.destroy); - } - - return assign(binder, { - bus: bus, - on: on, - off: apply(binder.unbind, bus), - emit: emit - }); -} - -function RequestInterval(interval, onInterval, onUpdate, limit) { - var now = Date.now; - var startTime; - var rate = 0; - var id; - var paused = true; - var count = 0; - - function update() { - if (!paused) { - rate = interval ? min((now() - startTime) / interval, 1) : 1; - onUpdate && onUpdate(rate); - - if (rate >= 1) { - onInterval(); - startTime = now(); - - if (limit && ++count >= limit) { - return pause(); - } - } - - raf(update); - } - } - - function start(resume) { - !resume && cancel(); - startTime = now() - (resume ? rate * interval : 0); - paused = false; - raf(update); - } - - function pause() { - paused = true; - } - - function rewind() { - startTime = now(); - rate = 0; - - if (onUpdate) { - onUpdate(rate); - } - } - - function cancel() { - id && cancelAnimationFrame(id); - rate = 0; - id = 0; - paused = true; - } - - function set(time) { - interval = time; - } - - function isPaused() { - return paused; - } - - return { - start: start, - rewind: rewind, - pause: pause, - cancel: cancel, - set: set, - isPaused: isPaused - }; -} - -function State(initialState) { - var state = initialState; - - function set(value) { - state = value; - } - - function is(states) { - return includes(toArray(states), state); - } - - return { - set: set, - is: is - }; -} - -function Throttle(func, duration) { - var interval; - - function throttled() { - if (!interval) { - interval = RequestInterval(duration || 0, function () { - func(); - interval = null; - }, null, 1); - interval.start(); - } - } - - return throttled; -} - -function Media(Splide2, Components2, options) { - var state = Splide2.state; - var breakpoints = options.breakpoints || {}; - var reducedMotion = options.reducedMotion || {}; - var binder = EventBinder(); - var queries = []; - - function setup() { - var isMin = options.mediaQuery === "min"; - ownKeys(breakpoints).sort(function (n, m) { - return isMin ? +n - +m : +m - +n; - }).forEach(function (key) { - register(breakpoints[key], "(" + (isMin ? "min" : "max") + "-width:" + key + "px)"); - }); - register(reducedMotion, MEDIA_PREFERS_REDUCED_MOTION); - update(); - } - - function destroy(completely) { - if (completely) { - binder.destroy(); - } - } - - function register(options2, query) { - var queryList = matchMedia(query); - binder.bind(queryList, "change", update); - queries.push([options2, queryList]); - } - - function update() { - var destroyed = state.is(DESTROYED); - var direction = options.direction; - var merged = queries.reduce(function (merged2, entry) { - return merge(merged2, entry[1].matches ? entry[0] : {}); - }, {}); - omit(options); - set(merged); - - if (options.destroy) { - Splide2.destroy(options.destroy === "completely"); - } else if (destroyed) { - destroy(true); - Splide2.mount(); - } else { - direction !== options.direction && Splide2.refresh(); - } - } - - function reduce(enable) { - if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) { - enable ? merge(options, reducedMotion) : omit(options, ownKeys(reducedMotion)); - } - } - - function set(opts, user) { - merge(options, opts); - user && merge(Object.getPrototypeOf(options), opts); - - if (!state.is(CREATED)) { - Splide2.emit(EVENT_UPDATED, options); - } - } - - return { - setup: setup, - destroy: destroy, - reduce: reduce, - set: set - }; -} - -var ARROW = "Arrow"; -var ARROW_LEFT = ARROW + "Left"; -var ARROW_RIGHT = ARROW + "Right"; -var ARROW_UP = ARROW + "Up"; -var ARROW_DOWN = ARROW + "Down"; -var LTR = "ltr"; -var RTL = "rtl"; -var TTB = "ttb"; -var ORIENTATION_MAP = { - width: ["height"], - left: ["top", "right"], - right: ["bottom", "left"], - x: ["y"], - X: ["Y"], - Y: ["X"], - ArrowLeft: [ARROW_UP, ARROW_RIGHT], - ArrowRight: [ARROW_DOWN, ARROW_LEFT] -}; - -function Direction(Splide2, Components2, options) { - function resolve(prop, axisOnly, direction) { - direction = direction || options.direction; - var index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1; - return ORIENTATION_MAP[prop] && ORIENTATION_MAP[prop][index] || prop.replace(/width|left|right/i, function (match, offset) { - var replacement = ORIENTATION_MAP[match.toLowerCase()][index] || match; - return offset > 0 ? replacement.charAt(0).toUpperCase() + replacement.slice(1) : replacement; - }); - } - - function orient(value) { - return value * (options.direction === RTL ? 1 : -1); - } - - return { - resolve: resolve, - orient: orient - }; -} - -var ROLE = "role"; -var TAB_INDEX = "tabindex"; -var DISABLED = "disabled"; -var ARIA_PREFIX = "aria-"; -var ARIA_CONTROLS = ARIA_PREFIX + "controls"; -var ARIA_CURRENT = ARIA_PREFIX + "current"; -var ARIA_SELECTED = ARIA_PREFIX + "selected"; -var ARIA_LABEL = ARIA_PREFIX + "label"; -var ARIA_LABELLEDBY = ARIA_PREFIX + "labelledby"; -var ARIA_HIDDEN = ARIA_PREFIX + "hidden"; -var ARIA_ORIENTATION = ARIA_PREFIX + "orientation"; -var ARIA_ROLEDESCRIPTION = ARIA_PREFIX + "roledescription"; -var ARIA_LIVE = ARIA_PREFIX + "live"; -var ARIA_BUSY = ARIA_PREFIX + "busy"; -var ARIA_ATOMIC = ARIA_PREFIX + "atomic"; -var ALL_ATTRIBUTES = [ROLE, TAB_INDEX, DISABLED, ARIA_CONTROLS, ARIA_CURRENT, ARIA_LABEL, ARIA_LABELLEDBY, ARIA_HIDDEN, ARIA_ORIENTATION, ARIA_ROLEDESCRIPTION]; -var CLASS_ROOT = PROJECT_CODE; -var CLASS_TRACK = PROJECT_CODE + "__track"; -var CLASS_LIST = PROJECT_CODE + "__list"; -var CLASS_SLIDE = PROJECT_CODE + "__slide"; -var CLASS_CLONE = CLASS_SLIDE + "--clone"; -var CLASS_CONTAINER = CLASS_SLIDE + "__container"; -var CLASS_ARROWS = PROJECT_CODE + "__arrows"; -var CLASS_ARROW = PROJECT_CODE + "__arrow"; -var CLASS_ARROW_PREV = CLASS_ARROW + "--prev"; -var CLASS_ARROW_NEXT = CLASS_ARROW + "--next"; -var CLASS_PAGINATION = PROJECT_CODE + "__pagination"; -var CLASS_PAGINATION_PAGE = CLASS_PAGINATION + "__page"; -var CLASS_PROGRESS = PROJECT_CODE + "__progress"; -var CLASS_PROGRESS_BAR = CLASS_PROGRESS + "__bar"; -var CLASS_TOGGLE = PROJECT_CODE + "__toggle"; -var CLASS_TOGGLE_PLAY = CLASS_TOGGLE + "__play"; -var CLASS_TOGGLE_PAUSE = CLASS_TOGGLE + "__pause"; -var CLASS_SPINNER = PROJECT_CODE + "__spinner"; -var CLASS_SR = PROJECT_CODE + "__sr"; -var CLASS_INITIALIZED = "is-initialized"; -var CLASS_ACTIVE = "is-active"; -var CLASS_PREV = "is-prev"; -var CLASS_NEXT = "is-next"; -var CLASS_VISIBLE = "is-visible"; -var CLASS_LOADING = "is-loading"; -var CLASS_FOCUS_IN = "is-focus-in"; -var STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING, CLASS_FOCUS_IN]; -var CLASSES = { - slide: CLASS_SLIDE, - clone: CLASS_CLONE, - arrows: CLASS_ARROWS, - arrow: CLASS_ARROW, - prev: CLASS_ARROW_PREV, - next: CLASS_ARROW_NEXT, - pagination: CLASS_PAGINATION, - page: CLASS_PAGINATION_PAGE, - spinner: CLASS_SPINNER -}; - -function closest(from, selector) { - if (isFunction(from.closest)) { - return from.closest(selector); - } - - var elm = from; - - while (elm && elm.nodeType === 1) { - if (matches(elm, selector)) { - break; - } - - elm = elm.parentElement; - } - - return elm; -} - -var FRICTION = 5; -var LOG_INTERVAL = 200; -var POINTER_DOWN_EVENTS = "touchstart mousedown"; -var POINTER_MOVE_EVENTS = "touchmove mousemove"; -var POINTER_UP_EVENTS = "touchend touchcancel mouseup click"; - -function Elements(Splide2, Components2, options) { - var _EventInterface = EventInterface(Splide2), - on = _EventInterface.on, - bind = _EventInterface.bind; - - var root = Splide2.root; - var i18n = options.i18n; - var elements = {}; - var slides = []; - var rootClasses = []; - var trackClasses = []; - var track; - var list; - var isUsingKey; - - function setup() { - collect(); - init(); - update(); - } - - function mount() { - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, setup); - on(EVENT_UPDATED, update); - bind(document, POINTER_DOWN_EVENTS + " keydown", function (e) { - isUsingKey = e.type === "keydown"; - }, { - capture: true - }); - bind(root, "focusin", function () { - toggleClass(root, CLASS_FOCUS_IN, !!isUsingKey); - }); - } - - function destroy(completely) { - var attrs = ALL_ATTRIBUTES.concat("style"); - empty(slides); - removeClass(root, rootClasses); - removeClass(track, trackClasses); - removeAttribute([track, list], attrs); - removeAttribute(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]); - } - - function update() { - removeClass(root, rootClasses); - removeClass(track, trackClasses); - rootClasses = getClasses(CLASS_ROOT); - trackClasses = getClasses(CLASS_TRACK); - addClass(root, rootClasses); - addClass(track, trackClasses); - setAttribute(root, ARIA_LABEL, options.label); - setAttribute(root, ARIA_LABELLEDBY, options.labelledby); - } - - function collect() { - track = find("." + CLASS_TRACK); - list = child(track, "." + CLASS_LIST); - assert(track && list, "A track/list element is missing."); - push(slides, children(list, "." + CLASS_SLIDE + ":not(." + CLASS_CLONE + ")")); - forOwn({ - arrows: CLASS_ARROWS, - pagination: CLASS_PAGINATION, - prev: CLASS_ARROW_PREV, - next: CLASS_ARROW_NEXT, - bar: CLASS_PROGRESS_BAR, - toggle: CLASS_TOGGLE - }, function (className, key) { - elements[key] = find("." + className); - }); - assign(elements, { - root: root, - track: track, - list: list, - slides: slides - }); - } - - function init() { - var id = root.id || uniqueId(PROJECT_CODE); - var role = options.role; - root.id = id; - track.id = track.id || id + "-track"; - list.id = list.id || id + "-list"; - - if (!getAttribute(root, ROLE) && root.tagName !== "SECTION" && role) { - setAttribute(root, ROLE, role); - } - - setAttribute(root, ARIA_ROLEDESCRIPTION, i18n.carousel); - setAttribute(list, ROLE, "presentation"); - } - - function find(selector) { - var elm = query(root, selector); - return elm && closest(elm, "." + CLASS_ROOT) === root ? elm : void 0; - } - - function getClasses(base) { - return [base + "--" + options.type, base + "--" + options.direction, options.drag && base + "--draggable", options.isNavigation && base + "--nav", base === CLASS_ROOT && CLASS_ACTIVE]; - } - - return assign(elements, { - setup: setup, - mount: mount, - destroy: destroy - }); -} - -var SLIDE = "slide"; -var LOOP = "loop"; -var FADE = "fade"; - -function Slide$1(Splide2, index, slideIndex, slide) { - var event = EventInterface(Splide2); - var on = event.on, - emit = event.emit, - bind = event.bind; - var Components = Splide2.Components, - root = Splide2.root, - options = Splide2.options; - var isNavigation = options.isNavigation, - updateOnMove = options.updateOnMove, - i18n = options.i18n, - pagination = options.pagination, - slideFocus = options.slideFocus; - var resolve = Components.Direction.resolve; - var styles = getAttribute(slide, "style"); - var label = getAttribute(slide, ARIA_LABEL); - var isClone = slideIndex > -1; - var container = child(slide, "." + CLASS_CONTAINER); - var focusableNodes = queryAll(slide, options.focusableNodes || ""); - var destroyed; - - function mount() { - if (!isClone) { - slide.id = root.id + "-slide" + pad(index + 1); - setAttribute(slide, ROLE, pagination ? "tabpanel" : "group"); - setAttribute(slide, ARIA_ROLEDESCRIPTION, i18n.slide); - setAttribute(slide, ARIA_LABEL, label || format(i18n.slideLabel, [index + 1, Splide2.length])); - } - - listen(); - } - - function listen() { - bind(slide, "click", apply(emit, EVENT_CLICK, self)); - bind(slide, "keydown", apply(emit, EVENT_SLIDE_KEYDOWN, self)); - on([EVENT_MOVED, EVENT_SHIFTED, EVENT_SCROLLED], update); - on(EVENT_NAVIGATION_MOUNTED, initNavigation); - - if (updateOnMove) { - on(EVENT_MOVE, onMove); - } - } - - function destroy() { - destroyed = true; - event.destroy(); - removeClass(slide, STATUS_CLASSES); - removeAttribute(slide, ALL_ATTRIBUTES); - setAttribute(slide, "style", styles); - setAttribute(slide, ARIA_LABEL, label || ""); - } - - function initNavigation() { - var controls = Splide2.splides.map(function (target) { - var Slide2 = target.splide.Components.Slides.getAt(index); - return Slide2 ? Slide2.slide.id : ""; - }).join(" "); - setAttribute(slide, ARIA_LABEL, format(i18n.slideX, (isClone ? slideIndex : index) + 1)); - setAttribute(slide, ARIA_CONTROLS, controls); - setAttribute(slide, ROLE, slideFocus ? "button" : ""); - slideFocus && removeAttribute(slide, ARIA_ROLEDESCRIPTION); - } - - function onMove() { - if (!destroyed) { - update(); - } - } - - function update() { - if (!destroyed) { - var curr = Splide2.index; - updateActivity(); - updateVisibility(); - toggleClass(slide, CLASS_PREV, index === curr - 1); - toggleClass(slide, CLASS_NEXT, index === curr + 1); - } - } - - function updateActivity() { - var active = isActive(); - - if (active !== hasClass(slide, CLASS_ACTIVE)) { - toggleClass(slide, CLASS_ACTIVE, active); - setAttribute(slide, ARIA_CURRENT, isNavigation && active || ""); - emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self); - } - } - - function updateVisibility() { - var visible = isVisible(); - var hidden = !visible && (!isActive() || isClone); - - if (!Splide2.state.is([MOVING, SCROLLING])) { - setAttribute(slide, ARIA_HIDDEN, hidden || ""); - } - - setAttribute(focusableNodes, TAB_INDEX, hidden ? -1 : ""); - - if (slideFocus) { - setAttribute(slide, TAB_INDEX, hidden ? -1 : 0); - } - - if (visible !== hasClass(slide, CLASS_VISIBLE)) { - toggleClass(slide, CLASS_VISIBLE, visible); - emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self); - } - - if (!visible && document.activeElement === slide) { - var Slide2 = Components.Slides.getAt(Splide2.index); - Slide2 && focus(Slide2.slide); - } - } - - function style$1(prop, value, useContainer) { - style(useContainer && container || slide, prop, value); - } - - function isActive() { - var curr = Splide2.index; - return curr === index || options.cloneStatus && curr === slideIndex; - } - - function isVisible() { - if (Splide2.is(FADE)) { - return isActive(); - } - - var trackRect = rect(Components.Elements.track); - var slideRect = rect(slide); - var left = resolve("left", true); - var right = resolve("right", true); - return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]); - } - - function isWithin(from, distance) { - var diff = abs(from - index); - - if (!isClone && (options.rewind || Splide2.is(LOOP))) { - diff = min(diff, Splide2.length - diff); - } - - return diff <= distance; - } - - var self = { - index: index, - slideIndex: slideIndex, - slide: slide, - container: container, - isClone: isClone, - mount: mount, - destroy: destroy, - update: update, - style: style$1, - isWithin: isWithin - }; - return self; -} - -function Slides(Splide2, Components2, options) { - var _EventInterface2 = EventInterface(Splide2), - on = _EventInterface2.on, - emit = _EventInterface2.emit, - bind = _EventInterface2.bind; - - var _Components2$Elements = Components2.Elements, - slides = _Components2$Elements.slides, - list = _Components2$Elements.list; - var Slides2 = []; - - function mount() { - init(); - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, init); - on([EVENT_MOUNTED, EVENT_REFRESH], function () { - Slides2.sort(function (Slide1, Slide2) { - return Slide1.index - Slide2.index; - }); - }); - } - - function init() { - slides.forEach(function (slide, index) { - register(slide, index, -1); - }); - } - - function destroy() { - forEach$1(function (Slide2) { - Slide2.destroy(); - }); - empty(Slides2); - } - - function update() { - forEach$1(function (Slide2) { - Slide2.update(); - }); - } - - function register(slide, index, slideIndex) { - var object = Slide$1(Splide2, index, slideIndex, slide); - object.mount(); - Slides2.push(object); - } - - function get(excludeClones) { - return excludeClones ? filter(function (Slide2) { - return !Slide2.isClone; - }) : Slides2; - } - - function getIn(page) { - var Controller = Components2.Controller; - var index = Controller.toIndex(page); - var max = Controller.hasFocus() ? 1 : options.perPage; - return filter(function (Slide2) { - return between(Slide2.index, index, index + max - 1); - }); - } - - function getAt(index) { - return filter(index)[0]; - } - - function add(items, index) { - forEach(items, function (slide) { - if (isString(slide)) { - slide = parseHtml(slide); - } - - if (isHTMLElement(slide)) { - var ref = slides[index]; - ref ? before(slide, ref) : append(list, slide); - addClass(slide, options.classes.slide); - observeImages(slide, apply(emit, EVENT_RESIZE)); - } - }); - emit(EVENT_REFRESH); - } - - function remove$1(matcher) { - remove(filter(matcher).map(function (Slide2) { - return Slide2.slide; - })); - emit(EVENT_REFRESH); - } - - function forEach$1(iteratee, excludeClones) { - get(excludeClones).forEach(iteratee); - } - - function filter(matcher) { - return Slides2.filter(isFunction(matcher) ? matcher : function (Slide2) { - return isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index); - }); - } - - function style(prop, value, useContainer) { - forEach$1(function (Slide2) { - Slide2.style(prop, value, useContainer); - }); - } - - function observeImages(elm, callback) { - var images = queryAll(elm, "img"); - var length = images.length; - - if (length) { - images.forEach(function (img) { - bind(img, "load error", function () { - if (! --length) { - callback(); - } - }); - }); - } else { - callback(); - } - } - - function getLength(excludeClones) { - return excludeClones ? slides.length : Slides2.length; - } - - function isEnough() { - return Slides2.length > options.perPage; - } - - return { - mount: mount, - destroy: destroy, - update: update, - register: register, - get: get, - getIn: getIn, - getAt: getAt, - add: add, - remove: remove$1, - forEach: forEach$1, - filter: filter, - style: style, - getLength: getLength, - isEnough: isEnough - }; -} - -function Layout(Splide2, Components2, options) { - var _EventInterface3 = EventInterface(Splide2), - on = _EventInterface3.on, - bind = _EventInterface3.bind, - emit = _EventInterface3.emit; - - var Slides = Components2.Slides; - var resolve = Components2.Direction.resolve; - var _Components2$Elements2 = Components2.Elements, - root = _Components2$Elements2.root, - track = _Components2$Elements2.track, - list = _Components2$Elements2.list; - var getAt = Slides.getAt, - styleSlides = Slides.style; - var vertical; - var rootRect; - - function mount() { - init(); - bind(window, "resize load", Throttle(apply(emit, EVENT_RESIZE))); - on([EVENT_UPDATED, EVENT_REFRESH], init); - on(EVENT_RESIZE, resize); - } - - function init() { - rootRect = null; - vertical = options.direction === TTB; - style(root, "maxWidth", unit(options.width)); - style(track, resolve("paddingLeft"), cssPadding(false)); - style(track, resolve("paddingRight"), cssPadding(true)); - resize(); - } - - function resize() { - var newRect = rect(root); - - if (!rootRect || rootRect.width !== newRect.width || rootRect.height !== newRect.height) { - style(track, "height", cssTrackHeight()); - styleSlides(resolve("marginRight"), unit(options.gap)); - styleSlides("width", cssSlideWidth()); - styleSlides("height", cssSlideHeight(), true); - rootRect = newRect; - emit(EVENT_RESIZED); - } - } - - function cssPadding(right) { - var padding = options.padding; - var prop = resolve(right ? "right" : "left"); - return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || "0px"; - } - - function cssTrackHeight() { - var height = ""; - - if (vertical) { - height = cssHeight(); - assert(height, "height or heightRatio is missing."); - height = "calc(" + height + " - " + cssPadding(false) + " - " + cssPadding(true) + ")"; - } - - return height; - } - - function cssHeight() { - return unit(options.height || rect(list).width * options.heightRatio); - } - - function cssSlideWidth() { - return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize()); - } - - function cssSlideHeight() { - return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight()); - } - - function cssSlideSize() { - var gap = unit(options.gap); - return "calc((100%" + (gap && " + " + gap) + ")/" + (options.perPage || 1) + (gap && " - " + gap) + ")"; - } - - function listSize() { - return rect(list)[resolve("width")]; - } - - function slideSize(index, withoutGap) { - var Slide = getAt(index || 0); - return Slide ? rect(Slide.slide)[resolve("width")] + (withoutGap ? 0 : getGap()) : 0; - } - - function totalSize(index, withoutGap) { - var Slide = getAt(index); - - if (Slide) { - var right = rect(Slide.slide)[resolve("right")]; - var left = rect(list)[resolve("left")]; - return abs(right - left) + (withoutGap ? 0 : getGap()); - } - - return 0; - } - - function sliderSize() { - return totalSize(Splide2.length - 1, true) - totalSize(-1, true); - } - - function getGap() { - var Slide = getAt(0); - return Slide && parseFloat(style(Slide.slide, resolve("marginRight"))) || 0; - } - - function getPadding(right) { - return parseFloat(style(track, resolve("padding" + (right ? "Right" : "Left")))) || 0; - } - - return { - mount: mount, - listSize: listSize, - slideSize: slideSize, - sliderSize: sliderSize, - totalSize: totalSize, - getPadding: getPadding - }; -} - -var MULTIPLIER = 2; - -function Clones(Splide2, Components2, options) { - var _EventInterface4 = EventInterface(Splide2), - on = _EventInterface4.on, - emit = _EventInterface4.emit; - - var Elements = Components2.Elements, - Slides = Components2.Slides; - var resolve = Components2.Direction.resolve; - var clones = []; - var cloneCount; - - function mount() { - init(); - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, init); - on([EVENT_UPDATED, EVENT_RESIZE], observe); - } - - function init() { - if (cloneCount = computeCloneCount()) { - generate(cloneCount); - emit(EVENT_RESIZE); - } - } - - function destroy() { - remove(clones); - empty(clones); - } - - function observe() { - if (cloneCount < computeCloneCount()) { - emit(EVENT_REFRESH); - } - } - - function generate(count) { - var slides = Slides.get().slice(); - var length = slides.length; - - if (length) { - while (slides.length < count) { - push(slides, slides); - } - - push(slides.slice(-count), slides.slice(0, count)).forEach(function (Slide, index) { - var isHead = index < count; - var clone = cloneDeep(Slide.slide, index); - isHead ? before(clone, slides[0].slide) : append(Elements.list, clone); - push(clones, clone); - Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index); - }); - } - } - - function cloneDeep(elm, index) { - var clone = elm.cloneNode(true); - addClass(clone, options.classes.clone); - clone.id = Splide2.root.id + "-clone" + pad(index + 1); - return clone; - } - - function computeCloneCount() { - var clones2 = options.clones; - - if (!Splide2.is(LOOP)) { - clones2 = 0; - } else if (!clones2) { - var fixedSize = options[resolve("fixedWidth")] && Components2.Layout.slideSize(0); - var fixedCount = fixedSize && ceil(rect(Elements.track)[resolve("width")] / fixedSize); - clones2 = fixedCount || options[resolve("autoWidth")] && Splide2.length || options.perPage * MULTIPLIER; - } - - return clones2; - } - - return { - mount: mount, - destroy: destroy - }; -} - -function Move(Splide2, Components2, options) { - var _EventInterface5 = EventInterface(Splide2), - on = _EventInterface5.on, - emit = _EventInterface5.emit; - - var set = Splide2.state.set; - var _Components2$Layout = Components2.Layout, - slideSize = _Components2$Layout.slideSize, - getPadding = _Components2$Layout.getPadding, - totalSize = _Components2$Layout.totalSize, - listSize = _Components2$Layout.listSize, - sliderSize = _Components2$Layout.sliderSize; - var _Components2$Directio = Components2.Direction, - resolve = _Components2$Directio.resolve, - orient = _Components2$Directio.orient; - var _Components2$Elements3 = Components2.Elements, - list = _Components2$Elements3.list, - track = _Components2$Elements3.track; - var Transition; - - function mount() { - Transition = Components2.Transition; - on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition); - } - - function reposition() { - if (!Components2.Controller.isBusy()) { - Components2.Scroll.cancel(); - jump(Splide2.index); - Components2.Slides.update(); - } - } - - function move(dest, index, prev, callback) { - if (dest !== index && canShift(dest > prev)) { - cancel(); - translate(shift(getPosition(), dest > prev), true); - } - - set(MOVING); - emit(EVENT_MOVE, index, prev, dest); - Transition.start(index, function () { - set(IDLE); - emit(EVENT_MOVED, index, prev, dest); - callback && callback(); - }); - } - - function jump(index) { - translate(toPosition(index, true)); - } - - function translate(position, preventLoop) { - if (!Splide2.is(FADE)) { - var destination = preventLoop ? position : loop(position); - style(list, "transform", "translate" + resolve("X") + "(" + destination + "px)"); - position !== destination && emit(EVENT_SHIFTED); - } - } - - function loop(position) { - if (Splide2.is(LOOP)) { - var index = toIndex(position); - var exceededMax = index > Components2.Controller.getEnd(); - var exceededMin = index < 0; - - if (exceededMin || exceededMax) { - position = shift(position, exceededMax); - } - } - - return position; - } - - function shift(position, backwards) { - var excess = position - getLimit(backwards); - var size = sliderSize(); - position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1); - return position; - } - - function cancel() { - translate(getPosition()); - Transition.cancel(); - } - - function toIndex(position) { - var Slides = Components2.Slides.get(); - var index = 0; - var minDistance = Infinity; - - for (var i = 0; i < Slides.length; i++) { - var slideIndex = Slides[i].index; - var distance = abs(toPosition(slideIndex, true) - position); - - if (distance <= minDistance) { - minDistance = distance; - index = slideIndex; - } else { - break; - } - } - - return index; - } - - function toPosition(index, trimming) { - var position = orient(totalSize(index - 1) - offset(index)); - return trimming ? trim(position) : position; - } - - function getPosition() { - var left = resolve("left"); - return rect(list)[left] - rect(track)[left] + orient(getPadding(false)); - } - - function trim(position) { - if (options.trimSpace && Splide2.is(SLIDE)) { - position = clamp(position, 0, orient(sliderSize() - listSize())); - } - - return position; - } - - function offset(index) { - var focus = options.focus; - return focus === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0; - } - - function getLimit(max) { - return toPosition(max ? Components2.Controller.getEnd() : 0, !!options.trimSpace); - } - - function canShift(backwards) { - var shifted = orient(shift(getPosition(), backwards)); - return backwards ? shifted >= 0 : shifted <= list[resolve("scrollWidth")] - rect(track)[resolve("width")]; - } - - function exceededLimit(max, position) { - position = isUndefined(position) ? getPosition() : position; - var exceededMin = max !== true && orient(position) < orient(getLimit(false)); - var exceededMax = max !== false && orient(position) > orient(getLimit(true)); - return exceededMin || exceededMax; - } - - return { - mount: mount, - move: move, - jump: jump, - translate: translate, - shift: shift, - cancel: cancel, - toIndex: toIndex, - toPosition: toPosition, - getPosition: getPosition, - getLimit: getLimit, - exceededLimit: exceededLimit, - reposition: reposition - }; -} - -function Controller(Splide2, Components2, options) { - var _EventInterface6 = EventInterface(Splide2), - on = _EventInterface6.on; - - var Move = Components2.Move; - var getPosition = Move.getPosition, - getLimit = Move.getLimit, - toPosition = Move.toPosition; - var _Components2$Slides = Components2.Slides, - isEnough = _Components2$Slides.isEnough, - getLength = _Components2$Slides.getLength; - var isLoop = Splide2.is(LOOP); - var isSlide = Splide2.is(SLIDE); - var getNext = apply(getAdjacent, false); - var getPrev = apply(getAdjacent, true); - var currIndex = options.start || 0; - var prevIndex = currIndex; - var slideCount; - var perMove; - var perPage; - - function mount() { - init(); - on([EVENT_UPDATED, EVENT_REFRESH], init); - } - - function init() { - slideCount = getLength(true); - perMove = options.perMove; - perPage = options.perPage; - var index = clamp(currIndex, 0, slideCount - 1); - - if (index !== currIndex) { - currIndex = index; - Move.reposition(); - } - } - - function go(control, allowSameIndex, callback) { - if (!isBusy()) { - var dest = parse(control); - var index = loop(dest); - - if (index > -1 && (allowSameIndex || index !== currIndex)) { - setIndex(index); - Move.move(dest, index, prevIndex, callback); - } - } - } - - function scroll(destination, duration, snap, callback) { - Components2.Scroll.scroll(destination, duration, snap, function () { - setIndex(loop(Move.toIndex(getPosition()))); - callback && callback(); - }); - } - - function parse(control) { - var index = currIndex; - - if (isString(control)) { - var _ref = control.match(/([+\-<>])(\d+)?/) || [], - indicator = _ref[1], - number = _ref[2]; - - if (indicator === "+" || indicator === "-") { - index = computeDestIndex(currIndex + +("" + indicator + (+number || 1)), currIndex); - } else if (indicator === ">") { - index = number ? toIndex(+number) : getNext(true); - } else if (indicator === "<") { - index = getPrev(true); - } - } else { - index = isLoop ? control : clamp(control, 0, getEnd()); - } - - return index; - } - - function getAdjacent(prev, destination) { - var number = perMove || (hasFocus() ? 1 : perPage); - var dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex, !(perMove || hasFocus())); - - if (dest === -1 && isSlide) { - if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) { - return prev ? 0 : getEnd(); - } - } - - return destination ? dest : loop(dest); - } - - function computeDestIndex(dest, from, snapPage) { - if (isEnough()) { - var end = getEnd(); - var index = computeMovableDestIndex(dest); - - if (index !== dest) { - from = dest; - dest = index; - snapPage = false; - } - - if (dest < 0 || dest > end) { - if (!perMove && (between(0, dest, from, true) || between(end, from, dest, true))) { - dest = toIndex(toPage(dest)); - } else { - if (isLoop) { - dest = snapPage ? dest < 0 ? -(slideCount % perPage || perPage) : slideCount : dest; - } else if (options.rewind) { - dest = dest < 0 ? end : 0; - } else { - dest = -1; - } - } - } else { - if (snapPage && dest !== from) { - dest = toIndex(toPage(from) + (dest < from ? -1 : 1)); - } - } - } else { - dest = -1; - } - - return dest; - } - - function computeMovableDestIndex(dest) { - if (isSlide && options.trimSpace === "move" && dest !== currIndex) { - var position = getPosition(); - - while (position === toPosition(dest, true) && between(dest, 0, Splide2.length - 1, !options.rewind)) { - dest < currIndex ? --dest : ++dest; - } - } - - return dest; - } - - function loop(index) { - return isLoop ? (index + slideCount) % slideCount || 0 : index; - } - - function getEnd() { - return max(slideCount - (hasFocus() || isLoop && perMove ? 1 : perPage), 0); - } - - function toIndex(page) { - return clamp(hasFocus() ? page : perPage * page, 0, getEnd()); - } - - function toPage(index) { - return hasFocus() ? index : floor((index >= getEnd() ? slideCount - 1 : index) / perPage); - } - - function toDest(destination) { - var closest = Move.toIndex(destination); - return isSlide ? clamp(closest, 0, getEnd()) : closest; - } - - function setIndex(index) { - if (index !== currIndex) { - prevIndex = currIndex; - currIndex = index; - } - } - - function getIndex(prev) { - return prev ? prevIndex : currIndex; - } - - function hasFocus() { - return !isUndefined(options.focus) || options.isNavigation; - } - - function isBusy() { - return Splide2.state.is([MOVING, SCROLLING]) && !!options.waitForTransition; - } - - return { - mount: mount, - go: go, - scroll: scroll, - getNext: getNext, - getPrev: getPrev, - getAdjacent: getAdjacent, - getEnd: getEnd, - setIndex: setIndex, - getIndex: getIndex, - toIndex: toIndex, - toPage: toPage, - toDest: toDest, - hasFocus: hasFocus, - isBusy: isBusy - }; -} - -var XML_NAME_SPACE = "http://www.w3.org/2000/svg"; -var PATH = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"; -var SIZE = 40; - -function Arrows(Splide2, Components2, options) { - var event = EventInterface(Splide2); - var on = event.on, - bind = event.bind, - emit = event.emit; - var classes = options.classes, - i18n = options.i18n; - var Elements = Components2.Elements, - Controller = Components2.Controller; - var userArrows = Elements.arrows, - track = Elements.track; - var wrapper = userArrows; - var prev = Elements.prev; - var next = Elements.next; - var created; - var wrapperClasses; - var arrows = {}; - - function mount() { - init(); - on(EVENT_UPDATED, remount); - } - - function remount() { - destroy(); - mount(); - } - - function init() { - var enabled = options.arrows; - - if (enabled && !(prev && next)) { - createArrows(); - } - - if (prev && next) { - assign(arrows, { - prev: prev, - next: next - }); - display(wrapper, enabled ? "" : "none"); - addClass(wrapper, wrapperClasses = CLASS_ARROWS + "--" + options.direction); - - if (enabled) { - listen(); - update(); - setAttribute([prev, next], ARIA_CONTROLS, track.id); - emit(EVENT_ARROWS_MOUNTED, prev, next); - } - } - } - - function destroy() { - event.destroy(); - removeClass(wrapper, wrapperClasses); - - if (created) { - remove(userArrows ? [prev, next] : wrapper); - prev = next = null; - } else { - removeAttribute([prev, next], ALL_ATTRIBUTES); - } - } - - function listen() { - on([EVENT_MOVED, EVENT_REFRESH, EVENT_SCROLLED], update); - bind(next, "click", apply(go, ">")); - bind(prev, "click", apply(go, "<")); - } - - function go(control) { - Controller.go(control, true); - } - - function createArrows() { - wrapper = userArrows || create("div", classes.arrows); - prev = createArrow(true); - next = createArrow(false); - created = true; - append(wrapper, [prev, next]); - !userArrows && before(wrapper, track); - } - - function createArrow(prev2) { - var arrow = ""; - }; - - _proto3.html = function html() { - var _this$config = this.config, - rootClass = _this$config.rootClass, - listTag = _this$config.listTag, - arrows = _this$config.arrows, - beforeTrack = _this$config.beforeTrack, - afterTrack = _this$config.afterTrack, - slider = _this$config.slider, - beforeSlider = _this$config.beforeSlider, - afterSlider = _this$config.afterSlider; - var html = ""; - html += "
"; - html += ""; - - if (slider) { - html += beforeSlider || ""; - html += "
"; - } - - html += beforeTrack || ""; - - if (arrows) { - html += this.renderArrows(); - } - - html += "
"; - html += "<" + listTag + " class=\"splide__list\">"; - html += this.renderSlides(); - html += ""; - html += "
"; - html += afterTrack || ""; - - if (slider) { - html += "
"; - html += afterSlider || ""; - } - - html += "
"; - return html; - }; - - return SplideRenderer; -}(); - -exports.CLASSES = CLASSES; -exports.CLASS_ACTIVE = CLASS_ACTIVE; -exports.CLASS_ARROW = CLASS_ARROW; -exports.CLASS_ARROWS = CLASS_ARROWS; -exports.CLASS_ARROW_NEXT = CLASS_ARROW_NEXT; -exports.CLASS_ARROW_PREV = CLASS_ARROW_PREV; -exports.CLASS_CLONE = CLASS_CLONE; -exports.CLASS_CONTAINER = CLASS_CONTAINER; -exports.CLASS_FOCUS_IN = CLASS_FOCUS_IN; -exports.CLASS_INITIALIZED = CLASS_INITIALIZED; -exports.CLASS_LIST = CLASS_LIST; -exports.CLASS_LOADING = CLASS_LOADING; -exports.CLASS_NEXT = CLASS_NEXT; -exports.CLASS_PAGINATION = CLASS_PAGINATION; -exports.CLASS_PAGINATION_PAGE = CLASS_PAGINATION_PAGE; -exports.CLASS_PREV = CLASS_PREV; -exports.CLASS_PROGRESS = CLASS_PROGRESS; -exports.CLASS_PROGRESS_BAR = CLASS_PROGRESS_BAR; -exports.CLASS_ROOT = CLASS_ROOT; -exports.CLASS_SLIDE = CLASS_SLIDE; -exports.CLASS_SPINNER = CLASS_SPINNER; -exports.CLASS_SR = CLASS_SR; -exports.CLASS_TOGGLE = CLASS_TOGGLE; -exports.CLASS_TOGGLE_PAUSE = CLASS_TOGGLE_PAUSE; -exports.CLASS_TOGGLE_PLAY = CLASS_TOGGLE_PLAY; -exports.CLASS_TRACK = CLASS_TRACK; -exports.CLASS_VISIBLE = CLASS_VISIBLE; -exports.DEFAULTS = DEFAULTS; -exports.EVENT_ACTIVE = EVENT_ACTIVE; -exports.EVENT_ARROWS_MOUNTED = EVENT_ARROWS_MOUNTED; -exports.EVENT_ARROWS_UPDATED = EVENT_ARROWS_UPDATED; -exports.EVENT_AUTOPLAY_PAUSE = EVENT_AUTOPLAY_PAUSE; -exports.EVENT_AUTOPLAY_PLAY = EVENT_AUTOPLAY_PLAY; -exports.EVENT_AUTOPLAY_PLAYING = EVENT_AUTOPLAY_PLAYING; -exports.EVENT_CLICK = EVENT_CLICK; -exports.EVENT_DESTROY = EVENT_DESTROY; -exports.EVENT_DRAG = EVENT_DRAG; -exports.EVENT_DRAGGED = EVENT_DRAGGED; -exports.EVENT_DRAGGING = EVENT_DRAGGING; -exports.EVENT_HIDDEN = EVENT_HIDDEN; -exports.EVENT_INACTIVE = EVENT_INACTIVE; -exports.EVENT_LAZYLOAD_LOADED = EVENT_LAZYLOAD_LOADED; -exports.EVENT_MOUNTED = EVENT_MOUNTED; -exports.EVENT_MOVE = EVENT_MOVE; -exports.EVENT_MOVED = EVENT_MOVED; -exports.EVENT_NAVIGATION_MOUNTED = EVENT_NAVIGATION_MOUNTED; -exports.EVENT_PAGINATION_MOUNTED = EVENT_PAGINATION_MOUNTED; -exports.EVENT_PAGINATION_UPDATED = EVENT_PAGINATION_UPDATED; -exports.EVENT_READY = EVENT_READY; -exports.EVENT_REFRESH = EVENT_REFRESH; -exports.EVENT_RESIZE = EVENT_RESIZE; -exports.EVENT_RESIZED = EVENT_RESIZED; -exports.EVENT_SCROLL = EVENT_SCROLL; -exports.EVENT_SCROLLED = EVENT_SCROLLED; -exports.EVENT_SHIFTED = EVENT_SHIFTED; -exports.EVENT_SLIDE_KEYDOWN = EVENT_SLIDE_KEYDOWN; -exports.EVENT_UPDATED = EVENT_UPDATED; -exports.EVENT_VISIBLE = EVENT_VISIBLE; -exports.EventBinder = EventBinder; -exports.EventInterface = EventInterface; -exports.FADE = FADE; -exports.LOOP = LOOP; -exports.LTR = LTR; -exports.RTL = RTL; -exports.RequestInterval = RequestInterval; -exports.SLIDE = SLIDE; -exports.STATUS_CLASSES = STATUS_CLASSES; -exports.Splide = Splide; -exports.SplideRenderer = SplideRenderer; -exports.State = State; -exports.TTB = TTB; -exports.Throttle = Throttle; -exports["default"] = Splide; diff --git a/assets/splide/js/splide.esm.js b/assets/splide/js/splide.esm.js deleted file mode 100644 index c70f01864..000000000 --- a/assets/splide/js/splide.esm.js +++ /dev/null @@ -1,3644 +0,0 @@ -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -/*! - * Splide.js - * Version : 4.0.7 - * License : MIT - * Copyright: 2022 Naotoshi Fujita - */ -var MEDIA_PREFERS_REDUCED_MOTION = "(prefers-reduced-motion: reduce)"; -var CREATED = 1; -var MOUNTED = 2; -var IDLE = 3; -var MOVING = 4; -var SCROLLING = 5; -var DRAGGING = 6; -var DESTROYED = 7; -var STATES = { - CREATED: CREATED, - MOUNTED: MOUNTED, - IDLE: IDLE, - MOVING: MOVING, - SCROLLING: SCROLLING, - DRAGGING: DRAGGING, - DESTROYED: DESTROYED -}; - -function empty(array) { - array.length = 0; -} - -function slice(arrayLike, start, end) { - return Array.prototype.slice.call(arrayLike, start, end); -} - -function apply(func) { - return func.bind.apply(func, [null].concat(slice(arguments, 1))); -} - -var nextTick = setTimeout; - -var noop = function noop() {}; - -function raf(func) { - return requestAnimationFrame(func); -} - -function typeOf(type, subject) { - return typeof subject === type; -} - -function isObject(subject) { - return !isNull(subject) && typeOf("object", subject); -} - -var isArray = Array.isArray; -var isFunction = apply(typeOf, "function"); -var isString = apply(typeOf, "string"); -var isUndefined = apply(typeOf, "undefined"); - -function isNull(subject) { - return subject === null; -} - -function isHTMLElement(subject) { - return subject instanceof HTMLElement; -} - -function toArray(value) { - return isArray(value) ? value : [value]; -} - -function forEach(values, iteratee) { - toArray(values).forEach(iteratee); -} - -function includes(array, value) { - return array.indexOf(value) > -1; -} - -function push(array, items) { - array.push.apply(array, toArray(items)); - return array; -} - -function toggleClass(elm, classes, add) { - if (elm) { - forEach(classes, function (name) { - if (name) { - elm.classList[add ? "add" : "remove"](name); - } - }); - } -} - -function addClass(elm, classes) { - toggleClass(elm, isString(classes) ? classes.split(" ") : classes, true); -} - -function append(parent, children) { - forEach(children, parent.appendChild.bind(parent)); -} - -function before(nodes, ref) { - forEach(nodes, function (node) { - var parent = (ref || node).parentNode; - - if (parent) { - parent.insertBefore(node, ref); - } - }); -} - -function matches(elm, selector) { - return isHTMLElement(elm) && (elm["msMatchesSelector"] || elm.matches).call(elm, selector); -} - -function children(parent, selector) { - var children2 = parent ? slice(parent.children) : []; - return selector ? children2.filter(function (child) { - return matches(child, selector); - }) : children2; -} - -function child(parent, selector) { - return selector ? children(parent, selector)[0] : parent.firstElementChild; -} - -var ownKeys = Object.keys; - -function forOwn(object, iteratee, right) { - if (object) { - var keys = ownKeys(object); - keys = right ? keys.reverse() : keys; - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== "__proto__") { - if (iteratee(object[key], key) === false) { - break; - } - } - } - } - - return object; -} - -function assign(object) { - slice(arguments, 1).forEach(function (source) { - forOwn(source, function (value, key) { - object[key] = source[key]; - }); - }); - return object; -} - -function merge(object) { - slice(arguments, 1).forEach(function (source) { - forOwn(source, function (value, key) { - if (isArray(value)) { - object[key] = value.slice(); - } else if (isObject(value)) { - object[key] = merge({}, isObject(object[key]) ? object[key] : {}, value); - } else { - object[key] = value; - } - }); - }); - return object; -} - -function omit(object, keys) { - toArray(keys || ownKeys(object)).forEach(function (key) { - delete object[key]; - }); -} - -function removeAttribute(elms, attrs) { - forEach(elms, function (elm) { - forEach(attrs, function (attr) { - elm && elm.removeAttribute(attr); - }); - }); -} - -function setAttribute(elms, attrs, value) { - if (isObject(attrs)) { - forOwn(attrs, function (value2, name) { - setAttribute(elms, name, value2); - }); - } else { - forEach(elms, function (elm) { - isNull(value) || value === "" ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value)); - }); - } -} - -function create(tag, attrs, parent) { - var elm = document.createElement(tag); - - if (attrs) { - isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs); - } - - parent && append(parent, elm); - return elm; -} - -function style(elm, prop, value) { - if (isUndefined(value)) { - return getComputedStyle(elm)[prop]; - } - - if (!isNull(value)) { - elm.style[prop] = "" + value; - } -} - -function display(elm, display2) { - style(elm, "display", display2); -} - -function focus(elm) { - elm["setActive"] && elm["setActive"]() || elm.focus({ - preventScroll: true - }); -} - -function getAttribute(elm, attr) { - return elm.getAttribute(attr); -} - -function hasClass(elm, className) { - return elm && elm.classList.contains(className); -} - -function rect(target) { - return target.getBoundingClientRect(); -} - -function remove(nodes) { - forEach(nodes, function (node) { - if (node && node.parentNode) { - node.parentNode.removeChild(node); - } - }); -} - -function parseHtml(html) { - return child(new DOMParser().parseFromString(html, "text/html").body); -} - -function prevent(e, stopPropagation) { - e.preventDefault(); - - if (stopPropagation) { - e.stopPropagation(); - e.stopImmediatePropagation(); - } -} - -function query(parent, selector) { - return parent && parent.querySelector(selector); -} - -function queryAll(parent, selector) { - return selector ? slice(parent.querySelectorAll(selector)) : []; -} - -function removeClass(elm, classes) { - toggleClass(elm, classes, false); -} - -function timeOf(e) { - return e.timeStamp; -} - -function unit(value) { - return isString(value) ? value : value ? value + "px" : ""; -} - -var PROJECT_CODE = "splide"; -var DATA_ATTRIBUTE = "data-" + PROJECT_CODE; - -function assert(condition, message) { - if (!condition) { - throw new Error("[" + PROJECT_CODE + "] " + (message || "")); - } -} - -var min = Math.min, - max = Math.max, - floor = Math.floor, - ceil = Math.ceil, - abs = Math.abs; - -function approximatelyEqual(x, y, epsilon) { - return abs(x - y) < epsilon; -} - -function between(number, minOrMax, maxOrMin, exclusive) { - var minimum = min(minOrMax, maxOrMin); - var maximum = max(minOrMax, maxOrMin); - return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum; -} - -function clamp(number, x, y) { - var minimum = min(x, y); - var maximum = max(x, y); - return min(max(minimum, number), maximum); -} - -function sign(x) { - return +(x > 0) - +(x < 0); -} - -function camelToKebab(string) { - return string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); -} - -function format(string, replacements) { - forEach(replacements, function (replacement) { - string = string.replace("%s", "" + replacement); - }); - return string; -} - -function pad(number) { - return number < 10 ? "0" + number : "" + number; -} - -var ids = {}; - -function uniqueId(prefix) { - return "" + prefix + pad(ids[prefix] = (ids[prefix] || 0) + 1); -} - -function EventBinder() { - var listeners = []; - - function bind(targets, events, callback, options) { - forEachEvent(targets, events, function (target, event, namespace) { - var isEventTarget = ("addEventListener" in target); - var remover = isEventTarget ? target.removeEventListener.bind(target, event, callback, options) : target["removeListener"].bind(target, callback); - isEventTarget ? target.addEventListener(event, callback, options) : target["addListener"](callback); - listeners.push([target, event, namespace, callback, remover]); - }); - } - - function unbind(targets, events, callback) { - forEachEvent(targets, events, function (target, event, namespace) { - listeners = listeners.filter(function (listener) { - if (listener[0] === target && listener[1] === event && listener[2] === namespace && (!callback || listener[3] === callback)) { - listener[4](); - return false; - } - - return true; - }); - }); - } - - function dispatch(target, type, detail) { - var e; - var bubbles = true; - - if (typeof CustomEvent === "function") { - e = new CustomEvent(type, { - bubbles: bubbles, - detail: detail - }); - } else { - e = document.createEvent("CustomEvent"); - e.initCustomEvent(type, bubbles, false, detail); - } - - target.dispatchEvent(e); - return e; - } - - function forEachEvent(targets, events, iteratee) { - forEach(targets, function (target) { - target && forEach(events, function (events2) { - events2.split(" ").forEach(function (eventNS) { - var fragment = eventNS.split("."); - iteratee(target, fragment[0], fragment[1]); - }); - }); - }); - } - - function destroy() { - listeners.forEach(function (data) { - data[4](); - }); - empty(listeners); - } - - return { - bind: bind, - unbind: unbind, - dispatch: dispatch, - destroy: destroy - }; -} - -var EVENT_MOUNTED = "mounted"; -var EVENT_READY = "ready"; -var EVENT_MOVE = "move"; -var EVENT_MOVED = "moved"; -var EVENT_SHIFTED = "shifted"; -var EVENT_CLICK = "click"; -var EVENT_ACTIVE = "active"; -var EVENT_INACTIVE = "inactive"; -var EVENT_VISIBLE = "visible"; -var EVENT_HIDDEN = "hidden"; -var EVENT_SLIDE_KEYDOWN = "slide:keydown"; -var EVENT_REFRESH = "refresh"; -var EVENT_UPDATED = "updated"; -var EVENT_RESIZE = "resize"; -var EVENT_RESIZED = "resized"; -var EVENT_DRAG = "drag"; -var EVENT_DRAGGING = "dragging"; -var EVENT_DRAGGED = "dragged"; -var EVENT_SCROLL = "scroll"; -var EVENT_SCROLLED = "scrolled"; -var EVENT_DESTROY = "destroy"; -var EVENT_ARROWS_MOUNTED = "arrows:mounted"; -var EVENT_ARROWS_UPDATED = "arrows:updated"; -var EVENT_PAGINATION_MOUNTED = "pagination:mounted"; -var EVENT_PAGINATION_UPDATED = "pagination:updated"; -var EVENT_NAVIGATION_MOUNTED = "navigation:mounted"; -var EVENT_AUTOPLAY_PLAY = "autoplay:play"; -var EVENT_AUTOPLAY_PLAYING = "autoplay:playing"; -var EVENT_AUTOPLAY_PAUSE = "autoplay:pause"; -var EVENT_LAZYLOAD_LOADED = "lazyload:loaded"; - -function EventInterface(Splide2) { - var bus = Splide2 ? Splide2.event.bus : document.createDocumentFragment(); - var binder = EventBinder(); - - function on(events, callback) { - binder.bind(bus, toArray(events).join(" "), function (e) { - callback.apply(callback, isArray(e.detail) ? e.detail : []); - }); - } - - function emit(event) { - binder.dispatch(bus, event, slice(arguments, 1)); - } - - if (Splide2) { - Splide2.event.on(EVENT_DESTROY, binder.destroy); - } - - return assign(binder, { - bus: bus, - on: on, - off: apply(binder.unbind, bus), - emit: emit - }); -} - -function RequestInterval(interval, onInterval, onUpdate, limit) { - var now = Date.now; - var startTime; - var rate = 0; - var id; - var paused = true; - var count = 0; - - function update() { - if (!paused) { - rate = interval ? min((now() - startTime) / interval, 1) : 1; - onUpdate && onUpdate(rate); - - if (rate >= 1) { - onInterval(); - startTime = now(); - - if (limit && ++count >= limit) { - return pause(); - } - } - - raf(update); - } - } - - function start(resume) { - !resume && cancel(); - startTime = now() - (resume ? rate * interval : 0); - paused = false; - raf(update); - } - - function pause() { - paused = true; - } - - function rewind() { - startTime = now(); - rate = 0; - - if (onUpdate) { - onUpdate(rate); - } - } - - function cancel() { - id && cancelAnimationFrame(id); - rate = 0; - id = 0; - paused = true; - } - - function set(time) { - interval = time; - } - - function isPaused() { - return paused; - } - - return { - start: start, - rewind: rewind, - pause: pause, - cancel: cancel, - set: set, - isPaused: isPaused - }; -} - -function State(initialState) { - var state = initialState; - - function set(value) { - state = value; - } - - function is(states) { - return includes(toArray(states), state); - } - - return { - set: set, - is: is - }; -} - -function Throttle(func, duration) { - var interval; - - function throttled() { - if (!interval) { - interval = RequestInterval(duration || 0, function () { - func(); - interval = null; - }, null, 1); - interval.start(); - } - } - - return throttled; -} - -function Media(Splide2, Components2, options) { - var state = Splide2.state; - var breakpoints = options.breakpoints || {}; - var reducedMotion = options.reducedMotion || {}; - var binder = EventBinder(); - var queries = []; - - function setup() { - var isMin = options.mediaQuery === "min"; - ownKeys(breakpoints).sort(function (n, m) { - return isMin ? +n - +m : +m - +n; - }).forEach(function (key) { - register(breakpoints[key], "(" + (isMin ? "min" : "max") + "-width:" + key + "px)"); - }); - register(reducedMotion, MEDIA_PREFERS_REDUCED_MOTION); - update(); - } - - function destroy(completely) { - if (completely) { - binder.destroy(); - } - } - - function register(options2, query) { - var queryList = matchMedia(query); - binder.bind(queryList, "change", update); - queries.push([options2, queryList]); - } - - function update() { - var destroyed = state.is(DESTROYED); - var direction = options.direction; - var merged = queries.reduce(function (merged2, entry) { - return merge(merged2, entry[1].matches ? entry[0] : {}); - }, {}); - omit(options); - set(merged); - - if (options.destroy) { - Splide2.destroy(options.destroy === "completely"); - } else if (destroyed) { - destroy(true); - Splide2.mount(); - } else { - direction !== options.direction && Splide2.refresh(); - } - } - - function reduce(enable) { - if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) { - enable ? merge(options, reducedMotion) : omit(options, ownKeys(reducedMotion)); - } - } - - function set(opts, user) { - merge(options, opts); - user && merge(Object.getPrototypeOf(options), opts); - - if (!state.is(CREATED)) { - Splide2.emit(EVENT_UPDATED, options); - } - } - - return { - setup: setup, - destroy: destroy, - reduce: reduce, - set: set - }; -} - -var ARROW = "Arrow"; -var ARROW_LEFT = ARROW + "Left"; -var ARROW_RIGHT = ARROW + "Right"; -var ARROW_UP = ARROW + "Up"; -var ARROW_DOWN = ARROW + "Down"; -var LTR = "ltr"; -var RTL = "rtl"; -var TTB = "ttb"; -var ORIENTATION_MAP = { - width: ["height"], - left: ["top", "right"], - right: ["bottom", "left"], - x: ["y"], - X: ["Y"], - Y: ["X"], - ArrowLeft: [ARROW_UP, ARROW_RIGHT], - ArrowRight: [ARROW_DOWN, ARROW_LEFT] -}; - -function Direction(Splide2, Components2, options) { - function resolve(prop, axisOnly, direction) { - direction = direction || options.direction; - var index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1; - return ORIENTATION_MAP[prop] && ORIENTATION_MAP[prop][index] || prop.replace(/width|left|right/i, function (match, offset) { - var replacement = ORIENTATION_MAP[match.toLowerCase()][index] || match; - return offset > 0 ? replacement.charAt(0).toUpperCase() + replacement.slice(1) : replacement; - }); - } - - function orient(value) { - return value * (options.direction === RTL ? 1 : -1); - } - - return { - resolve: resolve, - orient: orient - }; -} - -var ROLE = "role"; -var TAB_INDEX = "tabindex"; -var DISABLED = "disabled"; -var ARIA_PREFIX = "aria-"; -var ARIA_CONTROLS = ARIA_PREFIX + "controls"; -var ARIA_CURRENT = ARIA_PREFIX + "current"; -var ARIA_SELECTED = ARIA_PREFIX + "selected"; -var ARIA_LABEL = ARIA_PREFIX + "label"; -var ARIA_LABELLEDBY = ARIA_PREFIX + "labelledby"; -var ARIA_HIDDEN = ARIA_PREFIX + "hidden"; -var ARIA_ORIENTATION = ARIA_PREFIX + "orientation"; -var ARIA_ROLEDESCRIPTION = ARIA_PREFIX + "roledescription"; -var ARIA_LIVE = ARIA_PREFIX + "live"; -var ARIA_BUSY = ARIA_PREFIX + "busy"; -var ARIA_ATOMIC = ARIA_PREFIX + "atomic"; -var ALL_ATTRIBUTES = [ROLE, TAB_INDEX, DISABLED, ARIA_CONTROLS, ARIA_CURRENT, ARIA_LABEL, ARIA_LABELLEDBY, ARIA_HIDDEN, ARIA_ORIENTATION, ARIA_ROLEDESCRIPTION]; -var CLASS_ROOT = PROJECT_CODE; -var CLASS_TRACK = PROJECT_CODE + "__track"; -var CLASS_LIST = PROJECT_CODE + "__list"; -var CLASS_SLIDE = PROJECT_CODE + "__slide"; -var CLASS_CLONE = CLASS_SLIDE + "--clone"; -var CLASS_CONTAINER = CLASS_SLIDE + "__container"; -var CLASS_ARROWS = PROJECT_CODE + "__arrows"; -var CLASS_ARROW = PROJECT_CODE + "__arrow"; -var CLASS_ARROW_PREV = CLASS_ARROW + "--prev"; -var CLASS_ARROW_NEXT = CLASS_ARROW + "--next"; -var CLASS_PAGINATION = PROJECT_CODE + "__pagination"; -var CLASS_PAGINATION_PAGE = CLASS_PAGINATION + "__page"; -var CLASS_PROGRESS = PROJECT_CODE + "__progress"; -var CLASS_PROGRESS_BAR = CLASS_PROGRESS + "__bar"; -var CLASS_TOGGLE = PROJECT_CODE + "__toggle"; -var CLASS_TOGGLE_PLAY = CLASS_TOGGLE + "__play"; -var CLASS_TOGGLE_PAUSE = CLASS_TOGGLE + "__pause"; -var CLASS_SPINNER = PROJECT_CODE + "__spinner"; -var CLASS_SR = PROJECT_CODE + "__sr"; -var CLASS_INITIALIZED = "is-initialized"; -var CLASS_ACTIVE = "is-active"; -var CLASS_PREV = "is-prev"; -var CLASS_NEXT = "is-next"; -var CLASS_VISIBLE = "is-visible"; -var CLASS_LOADING = "is-loading"; -var CLASS_FOCUS_IN = "is-focus-in"; -var STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING, CLASS_FOCUS_IN]; -var CLASSES = { - slide: CLASS_SLIDE, - clone: CLASS_CLONE, - arrows: CLASS_ARROWS, - arrow: CLASS_ARROW, - prev: CLASS_ARROW_PREV, - next: CLASS_ARROW_NEXT, - pagination: CLASS_PAGINATION, - page: CLASS_PAGINATION_PAGE, - spinner: CLASS_SPINNER -}; - -function closest(from, selector) { - if (isFunction(from.closest)) { - return from.closest(selector); - } - - var elm = from; - - while (elm && elm.nodeType === 1) { - if (matches(elm, selector)) { - break; - } - - elm = elm.parentElement; - } - - return elm; -} - -var FRICTION = 5; -var LOG_INTERVAL = 200; -var POINTER_DOWN_EVENTS = "touchstart mousedown"; -var POINTER_MOVE_EVENTS = "touchmove mousemove"; -var POINTER_UP_EVENTS = "touchend touchcancel mouseup click"; - -function Elements(Splide2, Components2, options) { - var _EventInterface = EventInterface(Splide2), - on = _EventInterface.on, - bind = _EventInterface.bind; - - var root = Splide2.root; - var i18n = options.i18n; - var elements = {}; - var slides = []; - var rootClasses = []; - var trackClasses = []; - var track; - var list; - var isUsingKey; - - function setup() { - collect(); - init(); - update(); - } - - function mount() { - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, setup); - on(EVENT_UPDATED, update); - bind(document, POINTER_DOWN_EVENTS + " keydown", function (e) { - isUsingKey = e.type === "keydown"; - }, { - capture: true - }); - bind(root, "focusin", function () { - toggleClass(root, CLASS_FOCUS_IN, !!isUsingKey); - }); - } - - function destroy(completely) { - var attrs = ALL_ATTRIBUTES.concat("style"); - empty(slides); - removeClass(root, rootClasses); - removeClass(track, trackClasses); - removeAttribute([track, list], attrs); - removeAttribute(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]); - } - - function update() { - removeClass(root, rootClasses); - removeClass(track, trackClasses); - rootClasses = getClasses(CLASS_ROOT); - trackClasses = getClasses(CLASS_TRACK); - addClass(root, rootClasses); - addClass(track, trackClasses); - setAttribute(root, ARIA_LABEL, options.label); - setAttribute(root, ARIA_LABELLEDBY, options.labelledby); - } - - function collect() { - track = find("." + CLASS_TRACK); - list = child(track, "." + CLASS_LIST); - assert(track && list, "A track/list element is missing."); - push(slides, children(list, "." + CLASS_SLIDE + ":not(." + CLASS_CLONE + ")")); - forOwn({ - arrows: CLASS_ARROWS, - pagination: CLASS_PAGINATION, - prev: CLASS_ARROW_PREV, - next: CLASS_ARROW_NEXT, - bar: CLASS_PROGRESS_BAR, - toggle: CLASS_TOGGLE - }, function (className, key) { - elements[key] = find("." + className); - }); - assign(elements, { - root: root, - track: track, - list: list, - slides: slides - }); - } - - function init() { - var id = root.id || uniqueId(PROJECT_CODE); - var role = options.role; - root.id = id; - track.id = track.id || id + "-track"; - list.id = list.id || id + "-list"; - - if (!getAttribute(root, ROLE) && root.tagName !== "SECTION" && role) { - setAttribute(root, ROLE, role); - } - - setAttribute(root, ARIA_ROLEDESCRIPTION, i18n.carousel); - setAttribute(list, ROLE, "presentation"); - } - - function find(selector) { - var elm = query(root, selector); - return elm && closest(elm, "." + CLASS_ROOT) === root ? elm : void 0; - } - - function getClasses(base) { - return [base + "--" + options.type, base + "--" + options.direction, options.drag && base + "--draggable", options.isNavigation && base + "--nav", base === CLASS_ROOT && CLASS_ACTIVE]; - } - - return assign(elements, { - setup: setup, - mount: mount, - destroy: destroy - }); -} - -var SLIDE = "slide"; -var LOOP = "loop"; -var FADE = "fade"; - -function Slide$1(Splide2, index, slideIndex, slide) { - var event = EventInterface(Splide2); - var on = event.on, - emit = event.emit, - bind = event.bind; - var Components = Splide2.Components, - root = Splide2.root, - options = Splide2.options; - var isNavigation = options.isNavigation, - updateOnMove = options.updateOnMove, - i18n = options.i18n, - pagination = options.pagination, - slideFocus = options.slideFocus; - var resolve = Components.Direction.resolve; - var styles = getAttribute(slide, "style"); - var label = getAttribute(slide, ARIA_LABEL); - var isClone = slideIndex > -1; - var container = child(slide, "." + CLASS_CONTAINER); - var focusableNodes = queryAll(slide, options.focusableNodes || ""); - var destroyed; - - function mount() { - if (!isClone) { - slide.id = root.id + "-slide" + pad(index + 1); - setAttribute(slide, ROLE, pagination ? "tabpanel" : "group"); - setAttribute(slide, ARIA_ROLEDESCRIPTION, i18n.slide); - setAttribute(slide, ARIA_LABEL, label || format(i18n.slideLabel, [index + 1, Splide2.length])); - } - - listen(); - } - - function listen() { - bind(slide, "click", apply(emit, EVENT_CLICK, self)); - bind(slide, "keydown", apply(emit, EVENT_SLIDE_KEYDOWN, self)); - on([EVENT_MOVED, EVENT_SHIFTED, EVENT_SCROLLED], update); - on(EVENT_NAVIGATION_MOUNTED, initNavigation); - - if (updateOnMove) { - on(EVENT_MOVE, onMove); - } - } - - function destroy() { - destroyed = true; - event.destroy(); - removeClass(slide, STATUS_CLASSES); - removeAttribute(slide, ALL_ATTRIBUTES); - setAttribute(slide, "style", styles); - setAttribute(slide, ARIA_LABEL, label || ""); - } - - function initNavigation() { - var controls = Splide2.splides.map(function (target) { - var Slide2 = target.splide.Components.Slides.getAt(index); - return Slide2 ? Slide2.slide.id : ""; - }).join(" "); - setAttribute(slide, ARIA_LABEL, format(i18n.slideX, (isClone ? slideIndex : index) + 1)); - setAttribute(slide, ARIA_CONTROLS, controls); - setAttribute(slide, ROLE, slideFocus ? "button" : ""); - slideFocus && removeAttribute(slide, ARIA_ROLEDESCRIPTION); - } - - function onMove() { - if (!destroyed) { - update(); - } - } - - function update() { - if (!destroyed) { - var curr = Splide2.index; - updateActivity(); - updateVisibility(); - toggleClass(slide, CLASS_PREV, index === curr - 1); - toggleClass(slide, CLASS_NEXT, index === curr + 1); - } - } - - function updateActivity() { - var active = isActive(); - - if (active !== hasClass(slide, CLASS_ACTIVE)) { - toggleClass(slide, CLASS_ACTIVE, active); - setAttribute(slide, ARIA_CURRENT, isNavigation && active || ""); - emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self); - } - } - - function updateVisibility() { - var visible = isVisible(); - var hidden = !visible && (!isActive() || isClone); - - if (!Splide2.state.is([MOVING, SCROLLING])) { - setAttribute(slide, ARIA_HIDDEN, hidden || ""); - } - - setAttribute(focusableNodes, TAB_INDEX, hidden ? -1 : ""); - - if (slideFocus) { - setAttribute(slide, TAB_INDEX, hidden ? -1 : 0); - } - - if (visible !== hasClass(slide, CLASS_VISIBLE)) { - toggleClass(slide, CLASS_VISIBLE, visible); - emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self); - } - - if (!visible && document.activeElement === slide) { - var Slide2 = Components.Slides.getAt(Splide2.index); - Slide2 && focus(Slide2.slide); - } - } - - function style$1(prop, value, useContainer) { - style(useContainer && container || slide, prop, value); - } - - function isActive() { - var curr = Splide2.index; - return curr === index || options.cloneStatus && curr === slideIndex; - } - - function isVisible() { - if (Splide2.is(FADE)) { - return isActive(); - } - - var trackRect = rect(Components.Elements.track); - var slideRect = rect(slide); - var left = resolve("left", true); - var right = resolve("right", true); - return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]); - } - - function isWithin(from, distance) { - var diff = abs(from - index); - - if (!isClone && (options.rewind || Splide2.is(LOOP))) { - diff = min(diff, Splide2.length - diff); - } - - return diff <= distance; - } - - var self = { - index: index, - slideIndex: slideIndex, - slide: slide, - container: container, - isClone: isClone, - mount: mount, - destroy: destroy, - update: update, - style: style$1, - isWithin: isWithin - }; - return self; -} - -function Slides(Splide2, Components2, options) { - var _EventInterface2 = EventInterface(Splide2), - on = _EventInterface2.on, - emit = _EventInterface2.emit, - bind = _EventInterface2.bind; - - var _Components2$Elements = Components2.Elements, - slides = _Components2$Elements.slides, - list = _Components2$Elements.list; - var Slides2 = []; - - function mount() { - init(); - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, init); - on([EVENT_MOUNTED, EVENT_REFRESH], function () { - Slides2.sort(function (Slide1, Slide2) { - return Slide1.index - Slide2.index; - }); - }); - } - - function init() { - slides.forEach(function (slide, index) { - register(slide, index, -1); - }); - } - - function destroy() { - forEach$1(function (Slide2) { - Slide2.destroy(); - }); - empty(Slides2); - } - - function update() { - forEach$1(function (Slide2) { - Slide2.update(); - }); - } - - function register(slide, index, slideIndex) { - var object = Slide$1(Splide2, index, slideIndex, slide); - object.mount(); - Slides2.push(object); - } - - function get(excludeClones) { - return excludeClones ? filter(function (Slide2) { - return !Slide2.isClone; - }) : Slides2; - } - - function getIn(page) { - var Controller = Components2.Controller; - var index = Controller.toIndex(page); - var max = Controller.hasFocus() ? 1 : options.perPage; - return filter(function (Slide2) { - return between(Slide2.index, index, index + max - 1); - }); - } - - function getAt(index) { - return filter(index)[0]; - } - - function add(items, index) { - forEach(items, function (slide) { - if (isString(slide)) { - slide = parseHtml(slide); - } - - if (isHTMLElement(slide)) { - var ref = slides[index]; - ref ? before(slide, ref) : append(list, slide); - addClass(slide, options.classes.slide); - observeImages(slide, apply(emit, EVENT_RESIZE)); - } - }); - emit(EVENT_REFRESH); - } - - function remove$1(matcher) { - remove(filter(matcher).map(function (Slide2) { - return Slide2.slide; - })); - emit(EVENT_REFRESH); - } - - function forEach$1(iteratee, excludeClones) { - get(excludeClones).forEach(iteratee); - } - - function filter(matcher) { - return Slides2.filter(isFunction(matcher) ? matcher : function (Slide2) { - return isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index); - }); - } - - function style(prop, value, useContainer) { - forEach$1(function (Slide2) { - Slide2.style(prop, value, useContainer); - }); - } - - function observeImages(elm, callback) { - var images = queryAll(elm, "img"); - var length = images.length; - - if (length) { - images.forEach(function (img) { - bind(img, "load error", function () { - if (! --length) { - callback(); - } - }); - }); - } else { - callback(); - } - } - - function getLength(excludeClones) { - return excludeClones ? slides.length : Slides2.length; - } - - function isEnough() { - return Slides2.length > options.perPage; - } - - return { - mount: mount, - destroy: destroy, - update: update, - register: register, - get: get, - getIn: getIn, - getAt: getAt, - add: add, - remove: remove$1, - forEach: forEach$1, - filter: filter, - style: style, - getLength: getLength, - isEnough: isEnough - }; -} - -function Layout(Splide2, Components2, options) { - var _EventInterface3 = EventInterface(Splide2), - on = _EventInterface3.on, - bind = _EventInterface3.bind, - emit = _EventInterface3.emit; - - var Slides = Components2.Slides; - var resolve = Components2.Direction.resolve; - var _Components2$Elements2 = Components2.Elements, - root = _Components2$Elements2.root, - track = _Components2$Elements2.track, - list = _Components2$Elements2.list; - var getAt = Slides.getAt, - styleSlides = Slides.style; - var vertical; - var rootRect; - - function mount() { - init(); - bind(window, "resize load", Throttle(apply(emit, EVENT_RESIZE))); - on([EVENT_UPDATED, EVENT_REFRESH], init); - on(EVENT_RESIZE, resize); - } - - function init() { - rootRect = null; - vertical = options.direction === TTB; - style(root, "maxWidth", unit(options.width)); - style(track, resolve("paddingLeft"), cssPadding(false)); - style(track, resolve("paddingRight"), cssPadding(true)); - resize(); - } - - function resize() { - var newRect = rect(root); - - if (!rootRect || rootRect.width !== newRect.width || rootRect.height !== newRect.height) { - style(track, "height", cssTrackHeight()); - styleSlides(resolve("marginRight"), unit(options.gap)); - styleSlides("width", cssSlideWidth()); - styleSlides("height", cssSlideHeight(), true); - rootRect = newRect; - emit(EVENT_RESIZED); - } - } - - function cssPadding(right) { - var padding = options.padding; - var prop = resolve(right ? "right" : "left"); - return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || "0px"; - } - - function cssTrackHeight() { - var height = ""; - - if (vertical) { - height = cssHeight(); - assert(height, "height or heightRatio is missing."); - height = "calc(" + height + " - " + cssPadding(false) + " - " + cssPadding(true) + ")"; - } - - return height; - } - - function cssHeight() { - return unit(options.height || rect(list).width * options.heightRatio); - } - - function cssSlideWidth() { - return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize()); - } - - function cssSlideHeight() { - return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight()); - } - - function cssSlideSize() { - var gap = unit(options.gap); - return "calc((100%" + (gap && " + " + gap) + ")/" + (options.perPage || 1) + (gap && " - " + gap) + ")"; - } - - function listSize() { - return rect(list)[resolve("width")]; - } - - function slideSize(index, withoutGap) { - var Slide = getAt(index || 0); - return Slide ? rect(Slide.slide)[resolve("width")] + (withoutGap ? 0 : getGap()) : 0; - } - - function totalSize(index, withoutGap) { - var Slide = getAt(index); - - if (Slide) { - var right = rect(Slide.slide)[resolve("right")]; - var left = rect(list)[resolve("left")]; - return abs(right - left) + (withoutGap ? 0 : getGap()); - } - - return 0; - } - - function sliderSize() { - return totalSize(Splide2.length - 1, true) - totalSize(-1, true); - } - - function getGap() { - var Slide = getAt(0); - return Slide && parseFloat(style(Slide.slide, resolve("marginRight"))) || 0; - } - - function getPadding(right) { - return parseFloat(style(track, resolve("padding" + (right ? "Right" : "Left")))) || 0; - } - - return { - mount: mount, - listSize: listSize, - slideSize: slideSize, - sliderSize: sliderSize, - totalSize: totalSize, - getPadding: getPadding - }; -} - -var MULTIPLIER = 2; - -function Clones(Splide2, Components2, options) { - var _EventInterface4 = EventInterface(Splide2), - on = _EventInterface4.on, - emit = _EventInterface4.emit; - - var Elements = Components2.Elements, - Slides = Components2.Slides; - var resolve = Components2.Direction.resolve; - var clones = []; - var cloneCount; - - function mount() { - init(); - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, init); - on([EVENT_UPDATED, EVENT_RESIZE], observe); - } - - function init() { - if (cloneCount = computeCloneCount()) { - generate(cloneCount); - emit(EVENT_RESIZE); - } - } - - function destroy() { - remove(clones); - empty(clones); - } - - function observe() { - if (cloneCount < computeCloneCount()) { - emit(EVENT_REFRESH); - } - } - - function generate(count) { - var slides = Slides.get().slice(); - var length = slides.length; - - if (length) { - while (slides.length < count) { - push(slides, slides); - } - - push(slides.slice(-count), slides.slice(0, count)).forEach(function (Slide, index) { - var isHead = index < count; - var clone = cloneDeep(Slide.slide, index); - isHead ? before(clone, slides[0].slide) : append(Elements.list, clone); - push(clones, clone); - Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index); - }); - } - } - - function cloneDeep(elm, index) { - var clone = elm.cloneNode(true); - addClass(clone, options.classes.clone); - clone.id = Splide2.root.id + "-clone" + pad(index + 1); - return clone; - } - - function computeCloneCount() { - var clones2 = options.clones; - - if (!Splide2.is(LOOP)) { - clones2 = 0; - } else if (!clones2) { - var fixedSize = options[resolve("fixedWidth")] && Components2.Layout.slideSize(0); - var fixedCount = fixedSize && ceil(rect(Elements.track)[resolve("width")] / fixedSize); - clones2 = fixedCount || options[resolve("autoWidth")] && Splide2.length || options.perPage * MULTIPLIER; - } - - return clones2; - } - - return { - mount: mount, - destroy: destroy - }; -} - -function Move(Splide2, Components2, options) { - var _EventInterface5 = EventInterface(Splide2), - on = _EventInterface5.on, - emit = _EventInterface5.emit; - - var set = Splide2.state.set; - var _Components2$Layout = Components2.Layout, - slideSize = _Components2$Layout.slideSize, - getPadding = _Components2$Layout.getPadding, - totalSize = _Components2$Layout.totalSize, - listSize = _Components2$Layout.listSize, - sliderSize = _Components2$Layout.sliderSize; - var _Components2$Directio = Components2.Direction, - resolve = _Components2$Directio.resolve, - orient = _Components2$Directio.orient; - var _Components2$Elements3 = Components2.Elements, - list = _Components2$Elements3.list, - track = _Components2$Elements3.track; - var Transition; - - function mount() { - Transition = Components2.Transition; - on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition); - } - - function reposition() { - if (!Components2.Controller.isBusy()) { - Components2.Scroll.cancel(); - jump(Splide2.index); - Components2.Slides.update(); - } - } - - function move(dest, index, prev, callback) { - if (dest !== index && canShift(dest > prev)) { - cancel(); - translate(shift(getPosition(), dest > prev), true); - } - - set(MOVING); - emit(EVENT_MOVE, index, prev, dest); - Transition.start(index, function () { - set(IDLE); - emit(EVENT_MOVED, index, prev, dest); - callback && callback(); - }); - } - - function jump(index) { - translate(toPosition(index, true)); - } - - function translate(position, preventLoop) { - if (!Splide2.is(FADE)) { - var destination = preventLoop ? position : loop(position); - style(list, "transform", "translate" + resolve("X") + "(" + destination + "px)"); - position !== destination && emit(EVENT_SHIFTED); - } - } - - function loop(position) { - if (Splide2.is(LOOP)) { - var index = toIndex(position); - var exceededMax = index > Components2.Controller.getEnd(); - var exceededMin = index < 0; - - if (exceededMin || exceededMax) { - position = shift(position, exceededMax); - } - } - - return position; - } - - function shift(position, backwards) { - var excess = position - getLimit(backwards); - var size = sliderSize(); - position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1); - return position; - } - - function cancel() { - translate(getPosition()); - Transition.cancel(); - } - - function toIndex(position) { - var Slides = Components2.Slides.get(); - var index = 0; - var minDistance = Infinity; - - for (var i = 0; i < Slides.length; i++) { - var slideIndex = Slides[i].index; - var distance = abs(toPosition(slideIndex, true) - position); - - if (distance <= minDistance) { - minDistance = distance; - index = slideIndex; - } else { - break; - } - } - - return index; - } - - function toPosition(index, trimming) { - var position = orient(totalSize(index - 1) - offset(index)); - return trimming ? trim(position) : position; - } - - function getPosition() { - var left = resolve("left"); - return rect(list)[left] - rect(track)[left] + orient(getPadding(false)); - } - - function trim(position) { - if (options.trimSpace && Splide2.is(SLIDE)) { - position = clamp(position, 0, orient(sliderSize() - listSize())); - } - - return position; - } - - function offset(index) { - var focus = options.focus; - return focus === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0; - } - - function getLimit(max) { - return toPosition(max ? Components2.Controller.getEnd() : 0, !!options.trimSpace); - } - - function canShift(backwards) { - var shifted = orient(shift(getPosition(), backwards)); - return backwards ? shifted >= 0 : shifted <= list[resolve("scrollWidth")] - rect(track)[resolve("width")]; - } - - function exceededLimit(max, position) { - position = isUndefined(position) ? getPosition() : position; - var exceededMin = max !== true && orient(position) < orient(getLimit(false)); - var exceededMax = max !== false && orient(position) > orient(getLimit(true)); - return exceededMin || exceededMax; - } - - return { - mount: mount, - move: move, - jump: jump, - translate: translate, - shift: shift, - cancel: cancel, - toIndex: toIndex, - toPosition: toPosition, - getPosition: getPosition, - getLimit: getLimit, - exceededLimit: exceededLimit, - reposition: reposition - }; -} - -function Controller(Splide2, Components2, options) { - var _EventInterface6 = EventInterface(Splide2), - on = _EventInterface6.on; - - var Move = Components2.Move; - var getPosition = Move.getPosition, - getLimit = Move.getLimit, - toPosition = Move.toPosition; - var _Components2$Slides = Components2.Slides, - isEnough = _Components2$Slides.isEnough, - getLength = _Components2$Slides.getLength; - var isLoop = Splide2.is(LOOP); - var isSlide = Splide2.is(SLIDE); - var getNext = apply(getAdjacent, false); - var getPrev = apply(getAdjacent, true); - var currIndex = options.start || 0; - var prevIndex = currIndex; - var slideCount; - var perMove; - var perPage; - - function mount() { - init(); - on([EVENT_UPDATED, EVENT_REFRESH], init); - } - - function init() { - slideCount = getLength(true); - perMove = options.perMove; - perPage = options.perPage; - var index = clamp(currIndex, 0, slideCount - 1); - - if (index !== currIndex) { - currIndex = index; - Move.reposition(); - } - } - - function go(control, allowSameIndex, callback) { - if (!isBusy()) { - var dest = parse(control); - var index = loop(dest); - - if (index > -1 && (allowSameIndex || index !== currIndex)) { - setIndex(index); - Move.move(dest, index, prevIndex, callback); - } - } - } - - function scroll(destination, duration, snap, callback) { - Components2.Scroll.scroll(destination, duration, snap, function () { - setIndex(loop(Move.toIndex(getPosition()))); - callback && callback(); - }); - } - - function parse(control) { - var index = currIndex; - - if (isString(control)) { - var _ref = control.match(/([+\-<>])(\d+)?/) || [], - indicator = _ref[1], - number = _ref[2]; - - if (indicator === "+" || indicator === "-") { - index = computeDestIndex(currIndex + +("" + indicator + (+number || 1)), currIndex); - } else if (indicator === ">") { - index = number ? toIndex(+number) : getNext(true); - } else if (indicator === "<") { - index = getPrev(true); - } - } else { - index = isLoop ? control : clamp(control, 0, getEnd()); - } - - return index; - } - - function getAdjacent(prev, destination) { - var number = perMove || (hasFocus() ? 1 : perPage); - var dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex, !(perMove || hasFocus())); - - if (dest === -1 && isSlide) { - if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) { - return prev ? 0 : getEnd(); - } - } - - return destination ? dest : loop(dest); - } - - function computeDestIndex(dest, from, snapPage) { - if (isEnough()) { - var end = getEnd(); - var index = computeMovableDestIndex(dest); - - if (index !== dest) { - from = dest; - dest = index; - snapPage = false; - } - - if (dest < 0 || dest > end) { - if (!perMove && (between(0, dest, from, true) || between(end, from, dest, true))) { - dest = toIndex(toPage(dest)); - } else { - if (isLoop) { - dest = snapPage ? dest < 0 ? -(slideCount % perPage || perPage) : slideCount : dest; - } else if (options.rewind) { - dest = dest < 0 ? end : 0; - } else { - dest = -1; - } - } - } else { - if (snapPage && dest !== from) { - dest = toIndex(toPage(from) + (dest < from ? -1 : 1)); - } - } - } else { - dest = -1; - } - - return dest; - } - - function computeMovableDestIndex(dest) { - if (isSlide && options.trimSpace === "move" && dest !== currIndex) { - var position = getPosition(); - - while (position === toPosition(dest, true) && between(dest, 0, Splide2.length - 1, !options.rewind)) { - dest < currIndex ? --dest : ++dest; - } - } - - return dest; - } - - function loop(index) { - return isLoop ? (index + slideCount) % slideCount || 0 : index; - } - - function getEnd() { - return max(slideCount - (hasFocus() || isLoop && perMove ? 1 : perPage), 0); - } - - function toIndex(page) { - return clamp(hasFocus() ? page : perPage * page, 0, getEnd()); - } - - function toPage(index) { - return hasFocus() ? index : floor((index >= getEnd() ? slideCount - 1 : index) / perPage); - } - - function toDest(destination) { - var closest = Move.toIndex(destination); - return isSlide ? clamp(closest, 0, getEnd()) : closest; - } - - function setIndex(index) { - if (index !== currIndex) { - prevIndex = currIndex; - currIndex = index; - } - } - - function getIndex(prev) { - return prev ? prevIndex : currIndex; - } - - function hasFocus() { - return !isUndefined(options.focus) || options.isNavigation; - } - - function isBusy() { - return Splide2.state.is([MOVING, SCROLLING]) && !!options.waitForTransition; - } - - return { - mount: mount, - go: go, - scroll: scroll, - getNext: getNext, - getPrev: getPrev, - getAdjacent: getAdjacent, - getEnd: getEnd, - setIndex: setIndex, - getIndex: getIndex, - toIndex: toIndex, - toPage: toPage, - toDest: toDest, - hasFocus: hasFocus, - isBusy: isBusy - }; -} - -var XML_NAME_SPACE = "http://www.w3.org/2000/svg"; -var PATH = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"; -var SIZE = 40; - -function Arrows(Splide2, Components2, options) { - var event = EventInterface(Splide2); - var on = event.on, - bind = event.bind, - emit = event.emit; - var classes = options.classes, - i18n = options.i18n; - var Elements = Components2.Elements, - Controller = Components2.Controller; - var userArrows = Elements.arrows, - track = Elements.track; - var wrapper = userArrows; - var prev = Elements.prev; - var next = Elements.next; - var created; - var wrapperClasses; - var arrows = {}; - - function mount() { - init(); - on(EVENT_UPDATED, remount); - } - - function remount() { - destroy(); - mount(); - } - - function init() { - var enabled = options.arrows; - - if (enabled && !(prev && next)) { - createArrows(); - } - - if (prev && next) { - assign(arrows, { - prev: prev, - next: next - }); - display(wrapper, enabled ? "" : "none"); - addClass(wrapper, wrapperClasses = CLASS_ARROWS + "--" + options.direction); - - if (enabled) { - listen(); - update(); - setAttribute([prev, next], ARIA_CONTROLS, track.id); - emit(EVENT_ARROWS_MOUNTED, prev, next); - } - } - } - - function destroy() { - event.destroy(); - removeClass(wrapper, wrapperClasses); - - if (created) { - remove(userArrows ? [prev, next] : wrapper); - prev = next = null; - } else { - removeAttribute([prev, next], ALL_ATTRIBUTES); - } - } - - function listen() { - on([EVENT_MOVED, EVENT_REFRESH, EVENT_SCROLLED], update); - bind(next, "click", apply(go, ">")); - bind(prev, "click", apply(go, "<")); - } - - function go(control) { - Controller.go(control, true); - } - - function createArrows() { - wrapper = userArrows || create("div", classes.arrows); - prev = createArrow(true); - next = createArrow(false); - created = true; - append(wrapper, [prev, next]); - !userArrows && before(wrapper, track); - } - - function createArrow(prev2) { - var arrow = ""; - }; - - _proto3.html = function html() { - var _this$config = this.config, - rootClass = _this$config.rootClass, - listTag = _this$config.listTag, - arrows = _this$config.arrows, - beforeTrack = _this$config.beforeTrack, - afterTrack = _this$config.afterTrack, - slider = _this$config.slider, - beforeSlider = _this$config.beforeSlider, - afterSlider = _this$config.afterSlider; - var html = ""; - html += "
"; - html += ""; - - if (slider) { - html += beforeSlider || ""; - html += "
"; - } - - html += beforeTrack || ""; - - if (arrows) { - html += this.renderArrows(); - } - - html += "
"; - html += "<" + listTag + " class=\"splide__list\">"; - html += this.renderSlides(); - html += ""; - html += "
"; - html += afterTrack || ""; - - if (slider) { - html += "
"; - html += afterSlider || ""; - } - - html += "
"; - return html; - }; - - return SplideRenderer; -}(); - -export { CLASSES, CLASS_ACTIVE, CLASS_ARROW, CLASS_ARROWS, CLASS_ARROW_NEXT, CLASS_ARROW_PREV, CLASS_CLONE, CLASS_CONTAINER, CLASS_FOCUS_IN, CLASS_INITIALIZED, CLASS_LIST, CLASS_LOADING, CLASS_NEXT, CLASS_PAGINATION, CLASS_PAGINATION_PAGE, CLASS_PREV, CLASS_PROGRESS, CLASS_PROGRESS_BAR, CLASS_ROOT, CLASS_SLIDE, CLASS_SPINNER, CLASS_SR, CLASS_TOGGLE, CLASS_TOGGLE_PAUSE, CLASS_TOGGLE_PLAY, CLASS_TRACK, CLASS_VISIBLE, DEFAULTS, EVENT_ACTIVE, EVENT_ARROWS_MOUNTED, EVENT_ARROWS_UPDATED, EVENT_AUTOPLAY_PAUSE, EVENT_AUTOPLAY_PLAY, EVENT_AUTOPLAY_PLAYING, EVENT_CLICK, EVENT_DESTROY, EVENT_DRAG, EVENT_DRAGGED, EVENT_DRAGGING, EVENT_HIDDEN, EVENT_INACTIVE, EVENT_LAZYLOAD_LOADED, EVENT_MOUNTED, EVENT_MOVE, EVENT_MOVED, EVENT_NAVIGATION_MOUNTED, EVENT_PAGINATION_MOUNTED, EVENT_PAGINATION_UPDATED, EVENT_READY, EVENT_REFRESH, EVENT_RESIZE, EVENT_RESIZED, EVENT_SCROLL, EVENT_SCROLLED, EVENT_SHIFTED, EVENT_SLIDE_KEYDOWN, EVENT_UPDATED, EVENT_VISIBLE, EventBinder, EventInterface, FADE, LOOP, LTR, RTL, RequestInterval, SLIDE, STATUS_CLASSES, Splide, SplideRenderer, State, TTB, Throttle, Splide as default }; diff --git a/assets/splide/js/splide.js b/assets/splide/js/splide.js deleted file mode 100644 index 10d7b4976..000000000 --- a/assets/splide/js/splide.js +++ /dev/null @@ -1,3122 +0,0 @@ -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -/*! - * Splide.js - * Version : 4.0.7 - * License : MIT - * Copyright: 2022 Naotoshi Fujita - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Splide = factory()); -})(this, function () { - 'use strict'; - - var MEDIA_PREFERS_REDUCED_MOTION = "(prefers-reduced-motion: reduce)"; - var CREATED = 1; - var MOUNTED = 2; - var IDLE = 3; - var MOVING = 4; - var SCROLLING = 5; - var DRAGGING = 6; - var DESTROYED = 7; - var STATES = { - CREATED: CREATED, - MOUNTED: MOUNTED, - IDLE: IDLE, - MOVING: MOVING, - SCROLLING: SCROLLING, - DRAGGING: DRAGGING, - DESTROYED: DESTROYED - }; - - function empty(array) { - array.length = 0; - } - - function slice(arrayLike, start, end) { - return Array.prototype.slice.call(arrayLike, start, end); - } - - function apply(func) { - return func.bind.apply(func, [null].concat(slice(arguments, 1))); - } - - var nextTick = setTimeout; - - var noop = function noop() {}; - - function raf(func) { - return requestAnimationFrame(func); - } - - function typeOf(type, subject) { - return typeof subject === type; - } - - function isObject(subject) { - return !isNull(subject) && typeOf("object", subject); - } - - var isArray = Array.isArray; - var isFunction = apply(typeOf, "function"); - var isString = apply(typeOf, "string"); - var isUndefined = apply(typeOf, "undefined"); - - function isNull(subject) { - return subject === null; - } - - function isHTMLElement(subject) { - return subject instanceof HTMLElement; - } - - function toArray(value) { - return isArray(value) ? value : [value]; - } - - function forEach(values, iteratee) { - toArray(values).forEach(iteratee); - } - - function includes(array, value) { - return array.indexOf(value) > -1; - } - - function push(array, items) { - array.push.apply(array, toArray(items)); - return array; - } - - function toggleClass(elm, classes, add) { - if (elm) { - forEach(classes, function (name) { - if (name) { - elm.classList[add ? "add" : "remove"](name); - } - }); - } - } - - function addClass(elm, classes) { - toggleClass(elm, isString(classes) ? classes.split(" ") : classes, true); - } - - function append(parent, children) { - forEach(children, parent.appendChild.bind(parent)); - } - - function before(nodes, ref) { - forEach(nodes, function (node) { - var parent = (ref || node).parentNode; - - if (parent) { - parent.insertBefore(node, ref); - } - }); - } - - function matches(elm, selector) { - return isHTMLElement(elm) && (elm["msMatchesSelector"] || elm.matches).call(elm, selector); - } - - function children(parent, selector) { - var children2 = parent ? slice(parent.children) : []; - return selector ? children2.filter(function (child) { - return matches(child, selector); - }) : children2; - } - - function child(parent, selector) { - return selector ? children(parent, selector)[0] : parent.firstElementChild; - } - - var ownKeys = Object.keys; - - function forOwn(object, iteratee, right) { - if (object) { - var keys = ownKeys(object); - keys = right ? keys.reverse() : keys; - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== "__proto__") { - if (iteratee(object[key], key) === false) { - break; - } - } - } - } - - return object; - } - - function assign(object) { - slice(arguments, 1).forEach(function (source) { - forOwn(source, function (value, key) { - object[key] = source[key]; - }); - }); - return object; - } - - function merge(object) { - slice(arguments, 1).forEach(function (source) { - forOwn(source, function (value, key) { - if (isArray(value)) { - object[key] = value.slice(); - } else if (isObject(value)) { - object[key] = merge({}, isObject(object[key]) ? object[key] : {}, value); - } else { - object[key] = value; - } - }); - }); - return object; - } - - function omit(object, keys) { - toArray(keys || ownKeys(object)).forEach(function (key) { - delete object[key]; - }); - } - - function removeAttribute(elms, attrs) { - forEach(elms, function (elm) { - forEach(attrs, function (attr) { - elm && elm.removeAttribute(attr); - }); - }); - } - - function setAttribute(elms, attrs, value) { - if (isObject(attrs)) { - forOwn(attrs, function (value2, name) { - setAttribute(elms, name, value2); - }); - } else { - forEach(elms, function (elm) { - isNull(value) || value === "" ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value)); - }); - } - } - - function create(tag, attrs, parent) { - var elm = document.createElement(tag); - - if (attrs) { - isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs); - } - - parent && append(parent, elm); - return elm; - } - - function style(elm, prop, value) { - if (isUndefined(value)) { - return getComputedStyle(elm)[prop]; - } - - if (!isNull(value)) { - elm.style[prop] = "" + value; - } - } - - function display(elm, display2) { - style(elm, "display", display2); - } - - function focus(elm) { - elm["setActive"] && elm["setActive"]() || elm.focus({ - preventScroll: true - }); - } - - function getAttribute(elm, attr) { - return elm.getAttribute(attr); - } - - function hasClass(elm, className) { - return elm && elm.classList.contains(className); - } - - function rect(target) { - return target.getBoundingClientRect(); - } - - function remove(nodes) { - forEach(nodes, function (node) { - if (node && node.parentNode) { - node.parentNode.removeChild(node); - } - }); - } - - function parseHtml(html) { - return child(new DOMParser().parseFromString(html, "text/html").body); - } - - function prevent(e, stopPropagation) { - e.preventDefault(); - - if (stopPropagation) { - e.stopPropagation(); - e.stopImmediatePropagation(); - } - } - - function query(parent, selector) { - return parent && parent.querySelector(selector); - } - - function queryAll(parent, selector) { - return selector ? slice(parent.querySelectorAll(selector)) : []; - } - - function removeClass(elm, classes) { - toggleClass(elm, classes, false); - } - - function timeOf(e) { - return e.timeStamp; - } - - function unit(value) { - return isString(value) ? value : value ? value + "px" : ""; - } - - var PROJECT_CODE = "splide"; - var DATA_ATTRIBUTE = "data-" + PROJECT_CODE; - - function assert(condition, message) { - if (!condition) { - throw new Error("[" + PROJECT_CODE + "] " + (message || "")); - } - } - - var min = Math.min, - max = Math.max, - floor = Math.floor, - ceil = Math.ceil, - abs = Math.abs; - - function approximatelyEqual(x, y, epsilon) { - return abs(x - y) < epsilon; - } - - function between(number, minOrMax, maxOrMin, exclusive) { - var minimum = min(minOrMax, maxOrMin); - var maximum = max(minOrMax, maxOrMin); - return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum; - } - - function clamp(number, x, y) { - var minimum = min(x, y); - var maximum = max(x, y); - return min(max(minimum, number), maximum); - } - - function sign(x) { - return +(x > 0) - +(x < 0); - } - - function format(string, replacements) { - forEach(replacements, function (replacement) { - string = string.replace("%s", "" + replacement); - }); - return string; - } - - function pad(number) { - return number < 10 ? "0" + number : "" + number; - } - - var ids = {}; - - function uniqueId(prefix) { - return "" + prefix + pad(ids[prefix] = (ids[prefix] || 0) + 1); - } - - function EventBinder() { - var listeners = []; - - function bind(targets, events, callback, options) { - forEachEvent(targets, events, function (target, event, namespace) { - var isEventTarget = ("addEventListener" in target); - var remover = isEventTarget ? target.removeEventListener.bind(target, event, callback, options) : target["removeListener"].bind(target, callback); - isEventTarget ? target.addEventListener(event, callback, options) : target["addListener"](callback); - listeners.push([target, event, namespace, callback, remover]); - }); - } - - function unbind(targets, events, callback) { - forEachEvent(targets, events, function (target, event, namespace) { - listeners = listeners.filter(function (listener) { - if (listener[0] === target && listener[1] === event && listener[2] === namespace && (!callback || listener[3] === callback)) { - listener[4](); - return false; - } - - return true; - }); - }); - } - - function dispatch(target, type, detail) { - var e; - var bubbles = true; - - if (typeof CustomEvent === "function") { - e = new CustomEvent(type, { - bubbles: bubbles, - detail: detail - }); - } else { - e = document.createEvent("CustomEvent"); - e.initCustomEvent(type, bubbles, false, detail); - } - - target.dispatchEvent(e); - return e; - } - - function forEachEvent(targets, events, iteratee) { - forEach(targets, function (target) { - target && forEach(events, function (events2) { - events2.split(" ").forEach(function (eventNS) { - var fragment = eventNS.split("."); - iteratee(target, fragment[0], fragment[1]); - }); - }); - }); - } - - function destroy() { - listeners.forEach(function (data) { - data[4](); - }); - empty(listeners); - } - - return { - bind: bind, - unbind: unbind, - dispatch: dispatch, - destroy: destroy - }; - } - - var EVENT_MOUNTED = "mounted"; - var EVENT_READY = "ready"; - var EVENT_MOVE = "move"; - var EVENT_MOVED = "moved"; - var EVENT_SHIFTED = "shifted"; - var EVENT_CLICK = "click"; - var EVENT_ACTIVE = "active"; - var EVENT_INACTIVE = "inactive"; - var EVENT_VISIBLE = "visible"; - var EVENT_HIDDEN = "hidden"; - var EVENT_SLIDE_KEYDOWN = "slide:keydown"; - var EVENT_REFRESH = "refresh"; - var EVENT_UPDATED = "updated"; - var EVENT_RESIZE = "resize"; - var EVENT_RESIZED = "resized"; - var EVENT_DRAG = "drag"; - var EVENT_DRAGGING = "dragging"; - var EVENT_DRAGGED = "dragged"; - var EVENT_SCROLL = "scroll"; - var EVENT_SCROLLED = "scrolled"; - var EVENT_DESTROY = "destroy"; - var EVENT_ARROWS_MOUNTED = "arrows:mounted"; - var EVENT_ARROWS_UPDATED = "arrows:updated"; - var EVENT_PAGINATION_MOUNTED = "pagination:mounted"; - var EVENT_PAGINATION_UPDATED = "pagination:updated"; - var EVENT_NAVIGATION_MOUNTED = "navigation:mounted"; - var EVENT_AUTOPLAY_PLAY = "autoplay:play"; - var EVENT_AUTOPLAY_PLAYING = "autoplay:playing"; - var EVENT_AUTOPLAY_PAUSE = "autoplay:pause"; - var EVENT_LAZYLOAD_LOADED = "lazyload:loaded"; - - function EventInterface(Splide2) { - var bus = Splide2 ? Splide2.event.bus : document.createDocumentFragment(); - var binder = EventBinder(); - - function on(events, callback) { - binder.bind(bus, toArray(events).join(" "), function (e) { - callback.apply(callback, isArray(e.detail) ? e.detail : []); - }); - } - - function emit(event) { - binder.dispatch(bus, event, slice(arguments, 1)); - } - - if (Splide2) { - Splide2.event.on(EVENT_DESTROY, binder.destroy); - } - - return assign(binder, { - bus: bus, - on: on, - off: apply(binder.unbind, bus), - emit: emit - }); - } - - function RequestInterval(interval, onInterval, onUpdate, limit) { - var now = Date.now; - var startTime; - var rate = 0; - var id; - var paused = true; - var count = 0; - - function update() { - if (!paused) { - rate = interval ? min((now() - startTime) / interval, 1) : 1; - onUpdate && onUpdate(rate); - - if (rate >= 1) { - onInterval(); - startTime = now(); - - if (limit && ++count >= limit) { - return pause(); - } - } - - raf(update); - } - } - - function start(resume) { - !resume && cancel(); - startTime = now() - (resume ? rate * interval : 0); - paused = false; - raf(update); - } - - function pause() { - paused = true; - } - - function rewind() { - startTime = now(); - rate = 0; - - if (onUpdate) { - onUpdate(rate); - } - } - - function cancel() { - id && cancelAnimationFrame(id); - rate = 0; - id = 0; - paused = true; - } - - function set(time) { - interval = time; - } - - function isPaused() { - return paused; - } - - return { - start: start, - rewind: rewind, - pause: pause, - cancel: cancel, - set: set, - isPaused: isPaused - }; - } - - function State(initialState) { - var state = initialState; - - function set(value) { - state = value; - } - - function is(states) { - return includes(toArray(states), state); - } - - return { - set: set, - is: is - }; - } - - function Throttle(func, duration) { - var interval; - - function throttled() { - if (!interval) { - interval = RequestInterval(duration || 0, function () { - func(); - interval = null; - }, null, 1); - interval.start(); - } - } - - return throttled; - } - - function Media(Splide2, Components2, options) { - var state = Splide2.state; - var breakpoints = options.breakpoints || {}; - var reducedMotion = options.reducedMotion || {}; - var binder = EventBinder(); - var queries = []; - - function setup() { - var isMin = options.mediaQuery === "min"; - ownKeys(breakpoints).sort(function (n, m) { - return isMin ? +n - +m : +m - +n; - }).forEach(function (key) { - register(breakpoints[key], "(" + (isMin ? "min" : "max") + "-width:" + key + "px)"); - }); - register(reducedMotion, MEDIA_PREFERS_REDUCED_MOTION); - update(); - } - - function destroy(completely) { - if (completely) { - binder.destroy(); - } - } - - function register(options2, query) { - var queryList = matchMedia(query); - binder.bind(queryList, "change", update); - queries.push([options2, queryList]); - } - - function update() { - var destroyed = state.is(DESTROYED); - var direction = options.direction; - var merged = queries.reduce(function (merged2, entry) { - return merge(merged2, entry[1].matches ? entry[0] : {}); - }, {}); - omit(options); - set(merged); - - if (options.destroy) { - Splide2.destroy(options.destroy === "completely"); - } else if (destroyed) { - destroy(true); - Splide2.mount(); - } else { - direction !== options.direction && Splide2.refresh(); - } - } - - function reduce(enable) { - if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) { - enable ? merge(options, reducedMotion) : omit(options, ownKeys(reducedMotion)); - } - } - - function set(opts, user) { - merge(options, opts); - user && merge(Object.getPrototypeOf(options), opts); - - if (!state.is(CREATED)) { - Splide2.emit(EVENT_UPDATED, options); - } - } - - return { - setup: setup, - destroy: destroy, - reduce: reduce, - set: set - }; - } - - var ARROW = "Arrow"; - var ARROW_LEFT = ARROW + "Left"; - var ARROW_RIGHT = ARROW + "Right"; - var ARROW_UP = ARROW + "Up"; - var ARROW_DOWN = ARROW + "Down"; - var RTL = "rtl"; - var TTB = "ttb"; - var ORIENTATION_MAP = { - width: ["height"], - left: ["top", "right"], - right: ["bottom", "left"], - x: ["y"], - X: ["Y"], - Y: ["X"], - ArrowLeft: [ARROW_UP, ARROW_RIGHT], - ArrowRight: [ARROW_DOWN, ARROW_LEFT] - }; - - function Direction(Splide2, Components2, options) { - function resolve(prop, axisOnly, direction) { - direction = direction || options.direction; - var index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1; - return ORIENTATION_MAP[prop] && ORIENTATION_MAP[prop][index] || prop.replace(/width|left|right/i, function (match, offset) { - var replacement = ORIENTATION_MAP[match.toLowerCase()][index] || match; - return offset > 0 ? replacement.charAt(0).toUpperCase() + replacement.slice(1) : replacement; - }); - } - - function orient(value) { - return value * (options.direction === RTL ? 1 : -1); - } - - return { - resolve: resolve, - orient: orient - }; - } - - var ROLE = "role"; - var TAB_INDEX = "tabindex"; - var DISABLED = "disabled"; - var ARIA_PREFIX = "aria-"; - var ARIA_CONTROLS = ARIA_PREFIX + "controls"; - var ARIA_CURRENT = ARIA_PREFIX + "current"; - var ARIA_SELECTED = ARIA_PREFIX + "selected"; - var ARIA_LABEL = ARIA_PREFIX + "label"; - var ARIA_LABELLEDBY = ARIA_PREFIX + "labelledby"; - var ARIA_HIDDEN = ARIA_PREFIX + "hidden"; - var ARIA_ORIENTATION = ARIA_PREFIX + "orientation"; - var ARIA_ROLEDESCRIPTION = ARIA_PREFIX + "roledescription"; - var ARIA_LIVE = ARIA_PREFIX + "live"; - var ARIA_BUSY = ARIA_PREFIX + "busy"; - var ARIA_ATOMIC = ARIA_PREFIX + "atomic"; - var ALL_ATTRIBUTES = [ROLE, TAB_INDEX, DISABLED, ARIA_CONTROLS, ARIA_CURRENT, ARIA_LABEL, ARIA_LABELLEDBY, ARIA_HIDDEN, ARIA_ORIENTATION, ARIA_ROLEDESCRIPTION]; - var CLASS_ROOT = PROJECT_CODE; - var CLASS_TRACK = PROJECT_CODE + "__track"; - var CLASS_LIST = PROJECT_CODE + "__list"; - var CLASS_SLIDE = PROJECT_CODE + "__slide"; - var CLASS_CLONE = CLASS_SLIDE + "--clone"; - var CLASS_CONTAINER = CLASS_SLIDE + "__container"; - var CLASS_ARROWS = PROJECT_CODE + "__arrows"; - var CLASS_ARROW = PROJECT_CODE + "__arrow"; - var CLASS_ARROW_PREV = CLASS_ARROW + "--prev"; - var CLASS_ARROW_NEXT = CLASS_ARROW + "--next"; - var CLASS_PAGINATION = PROJECT_CODE + "__pagination"; - var CLASS_PAGINATION_PAGE = CLASS_PAGINATION + "__page"; - var CLASS_PROGRESS = PROJECT_CODE + "__progress"; - var CLASS_PROGRESS_BAR = CLASS_PROGRESS + "__bar"; - var CLASS_TOGGLE = PROJECT_CODE + "__toggle"; - var CLASS_SPINNER = PROJECT_CODE + "__spinner"; - var CLASS_SR = PROJECT_CODE + "__sr"; - var CLASS_INITIALIZED = "is-initialized"; - var CLASS_ACTIVE = "is-active"; - var CLASS_PREV = "is-prev"; - var CLASS_NEXT = "is-next"; - var CLASS_VISIBLE = "is-visible"; - var CLASS_LOADING = "is-loading"; - var CLASS_FOCUS_IN = "is-focus-in"; - var STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING, CLASS_FOCUS_IN]; - var CLASSES = { - slide: CLASS_SLIDE, - clone: CLASS_CLONE, - arrows: CLASS_ARROWS, - arrow: CLASS_ARROW, - prev: CLASS_ARROW_PREV, - next: CLASS_ARROW_NEXT, - pagination: CLASS_PAGINATION, - page: CLASS_PAGINATION_PAGE, - spinner: CLASS_SPINNER - }; - - function closest(from, selector) { - if (isFunction(from.closest)) { - return from.closest(selector); - } - - var elm = from; - - while (elm && elm.nodeType === 1) { - if (matches(elm, selector)) { - break; - } - - elm = elm.parentElement; - } - - return elm; - } - - var FRICTION = 5; - var LOG_INTERVAL = 200; - var POINTER_DOWN_EVENTS = "touchstart mousedown"; - var POINTER_MOVE_EVENTS = "touchmove mousemove"; - var POINTER_UP_EVENTS = "touchend touchcancel mouseup click"; - - function Elements(Splide2, Components2, options) { - var _EventInterface = EventInterface(Splide2), - on = _EventInterface.on, - bind = _EventInterface.bind; - - var root = Splide2.root; - var i18n = options.i18n; - var elements = {}; - var slides = []; - var rootClasses = []; - var trackClasses = []; - var track; - var list; - var isUsingKey; - - function setup() { - collect(); - init(); - update(); - } - - function mount() { - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, setup); - on(EVENT_UPDATED, update); - bind(document, POINTER_DOWN_EVENTS + " keydown", function (e) { - isUsingKey = e.type === "keydown"; - }, { - capture: true - }); - bind(root, "focusin", function () { - toggleClass(root, CLASS_FOCUS_IN, !!isUsingKey); - }); - } - - function destroy(completely) { - var attrs = ALL_ATTRIBUTES.concat("style"); - empty(slides); - removeClass(root, rootClasses); - removeClass(track, trackClasses); - removeAttribute([track, list], attrs); - removeAttribute(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]); - } - - function update() { - removeClass(root, rootClasses); - removeClass(track, trackClasses); - rootClasses = getClasses(CLASS_ROOT); - trackClasses = getClasses(CLASS_TRACK); - addClass(root, rootClasses); - addClass(track, trackClasses); - setAttribute(root, ARIA_LABEL, options.label); - setAttribute(root, ARIA_LABELLEDBY, options.labelledby); - } - - function collect() { - track = find("." + CLASS_TRACK); - list = child(track, "." + CLASS_LIST); - assert(track && list, "A track/list element is missing."); - push(slides, children(list, "." + CLASS_SLIDE + ":not(." + CLASS_CLONE + ")")); - forOwn({ - arrows: CLASS_ARROWS, - pagination: CLASS_PAGINATION, - prev: CLASS_ARROW_PREV, - next: CLASS_ARROW_NEXT, - bar: CLASS_PROGRESS_BAR, - toggle: CLASS_TOGGLE - }, function (className, key) { - elements[key] = find("." + className); - }); - assign(elements, { - root: root, - track: track, - list: list, - slides: slides - }); - } - - function init() { - var id = root.id || uniqueId(PROJECT_CODE); - var role = options.role; - root.id = id; - track.id = track.id || id + "-track"; - list.id = list.id || id + "-list"; - - if (!getAttribute(root, ROLE) && root.tagName !== "SECTION" && role) { - setAttribute(root, ROLE, role); - } - - setAttribute(root, ARIA_ROLEDESCRIPTION, i18n.carousel); - setAttribute(list, ROLE, "presentation"); - } - - function find(selector) { - var elm = query(root, selector); - return elm && closest(elm, "." + CLASS_ROOT) === root ? elm : void 0; - } - - function getClasses(base) { - return [base + "--" + options.type, base + "--" + options.direction, options.drag && base + "--draggable", options.isNavigation && base + "--nav", base === CLASS_ROOT && CLASS_ACTIVE]; - } - - return assign(elements, { - setup: setup, - mount: mount, - destroy: destroy - }); - } - - var SLIDE = "slide"; - var LOOP = "loop"; - var FADE = "fade"; - - function Slide$1(Splide2, index, slideIndex, slide) { - var event = EventInterface(Splide2); - var on = event.on, - emit = event.emit, - bind = event.bind; - var Components = Splide2.Components, - root = Splide2.root, - options = Splide2.options; - var isNavigation = options.isNavigation, - updateOnMove = options.updateOnMove, - i18n = options.i18n, - pagination = options.pagination, - slideFocus = options.slideFocus; - var resolve = Components.Direction.resolve; - var styles = getAttribute(slide, "style"); - var label = getAttribute(slide, ARIA_LABEL); - var isClone = slideIndex > -1; - var container = child(slide, "." + CLASS_CONTAINER); - var focusableNodes = queryAll(slide, options.focusableNodes || ""); - var destroyed; - - function mount() { - if (!isClone) { - slide.id = root.id + "-slide" + pad(index + 1); - setAttribute(slide, ROLE, pagination ? "tabpanel" : "group"); - setAttribute(slide, ARIA_ROLEDESCRIPTION, i18n.slide); - setAttribute(slide, ARIA_LABEL, label || format(i18n.slideLabel, [index + 1, Splide2.length])); - } - - listen(); - } - - function listen() { - bind(slide, "click", apply(emit, EVENT_CLICK, self)); - bind(slide, "keydown", apply(emit, EVENT_SLIDE_KEYDOWN, self)); - on([EVENT_MOVED, EVENT_SHIFTED, EVENT_SCROLLED], update); - on(EVENT_NAVIGATION_MOUNTED, initNavigation); - - if (updateOnMove) { - on(EVENT_MOVE, onMove); - } - } - - function destroy() { - destroyed = true; - event.destroy(); - removeClass(slide, STATUS_CLASSES); - removeAttribute(slide, ALL_ATTRIBUTES); - setAttribute(slide, "style", styles); - setAttribute(slide, ARIA_LABEL, label || ""); - } - - function initNavigation() { - var controls = Splide2.splides.map(function (target) { - var Slide2 = target.splide.Components.Slides.getAt(index); - return Slide2 ? Slide2.slide.id : ""; - }).join(" "); - setAttribute(slide, ARIA_LABEL, format(i18n.slideX, (isClone ? slideIndex : index) + 1)); - setAttribute(slide, ARIA_CONTROLS, controls); - setAttribute(slide, ROLE, slideFocus ? "button" : ""); - slideFocus && removeAttribute(slide, ARIA_ROLEDESCRIPTION); - } - - function onMove() { - if (!destroyed) { - update(); - } - } - - function update() { - if (!destroyed) { - var curr = Splide2.index; - updateActivity(); - updateVisibility(); - toggleClass(slide, CLASS_PREV, index === curr - 1); - toggleClass(slide, CLASS_NEXT, index === curr + 1); - } - } - - function updateActivity() { - var active = isActive(); - - if (active !== hasClass(slide, CLASS_ACTIVE)) { - toggleClass(slide, CLASS_ACTIVE, active); - setAttribute(slide, ARIA_CURRENT, isNavigation && active || ""); - emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self); - } - } - - function updateVisibility() { - var visible = isVisible(); - var hidden = !visible && (!isActive() || isClone); - - if (!Splide2.state.is([MOVING, SCROLLING])) { - setAttribute(slide, ARIA_HIDDEN, hidden || ""); - } - - setAttribute(focusableNodes, TAB_INDEX, hidden ? -1 : ""); - - if (slideFocus) { - setAttribute(slide, TAB_INDEX, hidden ? -1 : 0); - } - - if (visible !== hasClass(slide, CLASS_VISIBLE)) { - toggleClass(slide, CLASS_VISIBLE, visible); - emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self); - } - - if (!visible && document.activeElement === slide) { - var Slide2 = Components.Slides.getAt(Splide2.index); - Slide2 && focus(Slide2.slide); - } - } - - function style$1(prop, value, useContainer) { - style(useContainer && container || slide, prop, value); - } - - function isActive() { - var curr = Splide2.index; - return curr === index || options.cloneStatus && curr === slideIndex; - } - - function isVisible() { - if (Splide2.is(FADE)) { - return isActive(); - } - - var trackRect = rect(Components.Elements.track); - var slideRect = rect(slide); - var left = resolve("left", true); - var right = resolve("right", true); - return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]); - } - - function isWithin(from, distance) { - var diff = abs(from - index); - - if (!isClone && (options.rewind || Splide2.is(LOOP))) { - diff = min(diff, Splide2.length - diff); - } - - return diff <= distance; - } - - var self = { - index: index, - slideIndex: slideIndex, - slide: slide, - container: container, - isClone: isClone, - mount: mount, - destroy: destroy, - update: update, - style: style$1, - isWithin: isWithin - }; - return self; - } - - function Slides(Splide2, Components2, options) { - var _EventInterface2 = EventInterface(Splide2), - on = _EventInterface2.on, - emit = _EventInterface2.emit, - bind = _EventInterface2.bind; - - var _Components2$Elements = Components2.Elements, - slides = _Components2$Elements.slides, - list = _Components2$Elements.list; - var Slides2 = []; - - function mount() { - init(); - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, init); - on([EVENT_MOUNTED, EVENT_REFRESH], function () { - Slides2.sort(function (Slide1, Slide2) { - return Slide1.index - Slide2.index; - }); - }); - } - - function init() { - slides.forEach(function (slide, index) { - register(slide, index, -1); - }); - } - - function destroy() { - forEach$1(function (Slide2) { - Slide2.destroy(); - }); - empty(Slides2); - } - - function update() { - forEach$1(function (Slide2) { - Slide2.update(); - }); - } - - function register(slide, index, slideIndex) { - var object = Slide$1(Splide2, index, slideIndex, slide); - object.mount(); - Slides2.push(object); - } - - function get(excludeClones) { - return excludeClones ? filter(function (Slide2) { - return !Slide2.isClone; - }) : Slides2; - } - - function getIn(page) { - var Controller = Components2.Controller; - var index = Controller.toIndex(page); - var max = Controller.hasFocus() ? 1 : options.perPage; - return filter(function (Slide2) { - return between(Slide2.index, index, index + max - 1); - }); - } - - function getAt(index) { - return filter(index)[0]; - } - - function add(items, index) { - forEach(items, function (slide) { - if (isString(slide)) { - slide = parseHtml(slide); - } - - if (isHTMLElement(slide)) { - var ref = slides[index]; - ref ? before(slide, ref) : append(list, slide); - addClass(slide, options.classes.slide); - observeImages(slide, apply(emit, EVENT_RESIZE)); - } - }); - emit(EVENT_REFRESH); - } - - function remove$1(matcher) { - remove(filter(matcher).map(function (Slide2) { - return Slide2.slide; - })); - emit(EVENT_REFRESH); - } - - function forEach$1(iteratee, excludeClones) { - get(excludeClones).forEach(iteratee); - } - - function filter(matcher) { - return Slides2.filter(isFunction(matcher) ? matcher : function (Slide2) { - return isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index); - }); - } - - function style(prop, value, useContainer) { - forEach$1(function (Slide2) { - Slide2.style(prop, value, useContainer); - }); - } - - function observeImages(elm, callback) { - var images = queryAll(elm, "img"); - var length = images.length; - - if (length) { - images.forEach(function (img) { - bind(img, "load error", function () { - if (! --length) { - callback(); - } - }); - }); - } else { - callback(); - } - } - - function getLength(excludeClones) { - return excludeClones ? slides.length : Slides2.length; - } - - function isEnough() { - return Slides2.length > options.perPage; - } - - return { - mount: mount, - destroy: destroy, - update: update, - register: register, - get: get, - getIn: getIn, - getAt: getAt, - add: add, - remove: remove$1, - forEach: forEach$1, - filter: filter, - style: style, - getLength: getLength, - isEnough: isEnough - }; - } - - function Layout(Splide2, Components2, options) { - var _EventInterface3 = EventInterface(Splide2), - on = _EventInterface3.on, - bind = _EventInterface3.bind, - emit = _EventInterface3.emit; - - var Slides = Components2.Slides; - var resolve = Components2.Direction.resolve; - var _Components2$Elements2 = Components2.Elements, - root = _Components2$Elements2.root, - track = _Components2$Elements2.track, - list = _Components2$Elements2.list; - var getAt = Slides.getAt, - styleSlides = Slides.style; - var vertical; - var rootRect; - - function mount() { - init(); - bind(window, "resize load", Throttle(apply(emit, EVENT_RESIZE))); - on([EVENT_UPDATED, EVENT_REFRESH], init); - on(EVENT_RESIZE, resize); - } - - function init() { - rootRect = null; - vertical = options.direction === TTB; - style(root, "maxWidth", unit(options.width)); - style(track, resolve("paddingLeft"), cssPadding(false)); - style(track, resolve("paddingRight"), cssPadding(true)); - resize(); - } - - function resize() { - var newRect = rect(root); - - if (!rootRect || rootRect.width !== newRect.width || rootRect.height !== newRect.height) { - style(track, "height", cssTrackHeight()); - styleSlides(resolve("marginRight"), unit(options.gap)); - styleSlides("width", cssSlideWidth()); - styleSlides("height", cssSlideHeight(), true); - rootRect = newRect; - emit(EVENT_RESIZED); - } - } - - function cssPadding(right) { - var padding = options.padding; - var prop = resolve(right ? "right" : "left"); - return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || "0px"; - } - - function cssTrackHeight() { - var height = ""; - - if (vertical) { - height = cssHeight(); - assert(height, "height or heightRatio is missing."); - height = "calc(" + height + " - " + cssPadding(false) + " - " + cssPadding(true) + ")"; - } - - return height; - } - - function cssHeight() { - return unit(options.height || rect(list).width * options.heightRatio); - } - - function cssSlideWidth() { - return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize()); - } - - function cssSlideHeight() { - return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight()); - } - - function cssSlideSize() { - var gap = unit(options.gap); - return "calc((100%" + (gap && " + " + gap) + ")/" + (options.perPage || 1) + (gap && " - " + gap) + ")"; - } - - function listSize() { - return rect(list)[resolve("width")]; - } - - function slideSize(index, withoutGap) { - var Slide = getAt(index || 0); - return Slide ? rect(Slide.slide)[resolve("width")] + (withoutGap ? 0 : getGap()) : 0; - } - - function totalSize(index, withoutGap) { - var Slide = getAt(index); - - if (Slide) { - var right = rect(Slide.slide)[resolve("right")]; - var left = rect(list)[resolve("left")]; - return abs(right - left) + (withoutGap ? 0 : getGap()); - } - - return 0; - } - - function sliderSize() { - return totalSize(Splide2.length - 1, true) - totalSize(-1, true); - } - - function getGap() { - var Slide = getAt(0); - return Slide && parseFloat(style(Slide.slide, resolve("marginRight"))) || 0; - } - - function getPadding(right) { - return parseFloat(style(track, resolve("padding" + (right ? "Right" : "Left")))) || 0; - } - - return { - mount: mount, - listSize: listSize, - slideSize: slideSize, - sliderSize: sliderSize, - totalSize: totalSize, - getPadding: getPadding - }; - } - - var MULTIPLIER = 2; - - function Clones(Splide2, Components2, options) { - var _EventInterface4 = EventInterface(Splide2), - on = _EventInterface4.on, - emit = _EventInterface4.emit; - - var Elements = Components2.Elements, - Slides = Components2.Slides; - var resolve = Components2.Direction.resolve; - var clones = []; - var cloneCount; - - function mount() { - init(); - on(EVENT_REFRESH, destroy); - on(EVENT_REFRESH, init); - on([EVENT_UPDATED, EVENT_RESIZE], observe); - } - - function init() { - if (cloneCount = computeCloneCount()) { - generate(cloneCount); - emit(EVENT_RESIZE); - } - } - - function destroy() { - remove(clones); - empty(clones); - } - - function observe() { - if (cloneCount < computeCloneCount()) { - emit(EVENT_REFRESH); - } - } - - function generate(count) { - var slides = Slides.get().slice(); - var length = slides.length; - - if (length) { - while (slides.length < count) { - push(slides, slides); - } - - push(slides.slice(-count), slides.slice(0, count)).forEach(function (Slide, index) { - var isHead = index < count; - var clone = cloneDeep(Slide.slide, index); - isHead ? before(clone, slides[0].slide) : append(Elements.list, clone); - push(clones, clone); - Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index); - }); - } - } - - function cloneDeep(elm, index) { - var clone = elm.cloneNode(true); - addClass(clone, options.classes.clone); - clone.id = Splide2.root.id + "-clone" + pad(index + 1); - return clone; - } - - function computeCloneCount() { - var clones2 = options.clones; - - if (!Splide2.is(LOOP)) { - clones2 = 0; - } else if (!clones2) { - var fixedSize = options[resolve("fixedWidth")] && Components2.Layout.slideSize(0); - var fixedCount = fixedSize && ceil(rect(Elements.track)[resolve("width")] / fixedSize); - clones2 = fixedCount || options[resolve("autoWidth")] && Splide2.length || options.perPage * MULTIPLIER; - } - - return clones2; - } - - return { - mount: mount, - destroy: destroy - }; - } - - function Move(Splide2, Components2, options) { - var _EventInterface5 = EventInterface(Splide2), - on = _EventInterface5.on, - emit = _EventInterface5.emit; - - var set = Splide2.state.set; - var _Components2$Layout = Components2.Layout, - slideSize = _Components2$Layout.slideSize, - getPadding = _Components2$Layout.getPadding, - totalSize = _Components2$Layout.totalSize, - listSize = _Components2$Layout.listSize, - sliderSize = _Components2$Layout.sliderSize; - var _Components2$Directio = Components2.Direction, - resolve = _Components2$Directio.resolve, - orient = _Components2$Directio.orient; - var _Components2$Elements3 = Components2.Elements, - list = _Components2$Elements3.list, - track = _Components2$Elements3.track; - var Transition; - - function mount() { - Transition = Components2.Transition; - on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition); - } - - function reposition() { - if (!Components2.Controller.isBusy()) { - Components2.Scroll.cancel(); - jump(Splide2.index); - Components2.Slides.update(); - } - } - - function move(dest, index, prev, callback) { - if (dest !== index && canShift(dest > prev)) { - cancel(); - translate(shift(getPosition(), dest > prev), true); - } - - set(MOVING); - emit(EVENT_MOVE, index, prev, dest); - Transition.start(index, function () { - set(IDLE); - emit(EVENT_MOVED, index, prev, dest); - callback && callback(); - }); - } - - function jump(index) { - translate(toPosition(index, true)); - } - - function translate(position, preventLoop) { - if (!Splide2.is(FADE)) { - var destination = preventLoop ? position : loop(position); - style(list, "transform", "translate" + resolve("X") + "(" + destination + "px)"); - position !== destination && emit(EVENT_SHIFTED); - } - } - - function loop(position) { - if (Splide2.is(LOOP)) { - var index = toIndex(position); - var exceededMax = index > Components2.Controller.getEnd(); - var exceededMin = index < 0; - - if (exceededMin || exceededMax) { - position = shift(position, exceededMax); - } - } - - return position; - } - - function shift(position, backwards) { - var excess = position - getLimit(backwards); - var size = sliderSize(); - position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1); - return position; - } - - function cancel() { - translate(getPosition()); - Transition.cancel(); - } - - function toIndex(position) { - var Slides = Components2.Slides.get(); - var index = 0; - var minDistance = Infinity; - - for (var i = 0; i < Slides.length; i++) { - var slideIndex = Slides[i].index; - var distance = abs(toPosition(slideIndex, true) - position); - - if (distance <= minDistance) { - minDistance = distance; - index = slideIndex; - } else { - break; - } - } - - return index; - } - - function toPosition(index, trimming) { - var position = orient(totalSize(index - 1) - offset(index)); - return trimming ? trim(position) : position; - } - - function getPosition() { - var left = resolve("left"); - return rect(list)[left] - rect(track)[left] + orient(getPadding(false)); - } - - function trim(position) { - if (options.trimSpace && Splide2.is(SLIDE)) { - position = clamp(position, 0, orient(sliderSize() - listSize())); - } - - return position; - } - - function offset(index) { - var focus = options.focus; - return focus === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0; - } - - function getLimit(max) { - return toPosition(max ? Components2.Controller.getEnd() : 0, !!options.trimSpace); - } - - function canShift(backwards) { - var shifted = orient(shift(getPosition(), backwards)); - return backwards ? shifted >= 0 : shifted <= list[resolve("scrollWidth")] - rect(track)[resolve("width")]; - } - - function exceededLimit(max, position) { - position = isUndefined(position) ? getPosition() : position; - var exceededMin = max !== true && orient(position) < orient(getLimit(false)); - var exceededMax = max !== false && orient(position) > orient(getLimit(true)); - return exceededMin || exceededMax; - } - - return { - mount: mount, - move: move, - jump: jump, - translate: translate, - shift: shift, - cancel: cancel, - toIndex: toIndex, - toPosition: toPosition, - getPosition: getPosition, - getLimit: getLimit, - exceededLimit: exceededLimit, - reposition: reposition - }; - } - - function Controller(Splide2, Components2, options) { - var _EventInterface6 = EventInterface(Splide2), - on = _EventInterface6.on; - - var Move = Components2.Move; - var getPosition = Move.getPosition, - getLimit = Move.getLimit, - toPosition = Move.toPosition; - var _Components2$Slides = Components2.Slides, - isEnough = _Components2$Slides.isEnough, - getLength = _Components2$Slides.getLength; - var isLoop = Splide2.is(LOOP); - var isSlide = Splide2.is(SLIDE); - var getNext = apply(getAdjacent, false); - var getPrev = apply(getAdjacent, true); - var currIndex = options.start || 0; - var prevIndex = currIndex; - var slideCount; - var perMove; - var perPage; - - function mount() { - init(); - on([EVENT_UPDATED, EVENT_REFRESH], init); - } - - function init() { - slideCount = getLength(true); - perMove = options.perMove; - perPage = options.perPage; - var index = clamp(currIndex, 0, slideCount - 1); - - if (index !== currIndex) { - currIndex = index; - Move.reposition(); - } - } - - function go(control, allowSameIndex, callback) { - if (!isBusy()) { - var dest = parse(control); - var index = loop(dest); - - if (index > -1 && (allowSameIndex || index !== currIndex)) { - setIndex(index); - Move.move(dest, index, prevIndex, callback); - } - } - } - - function scroll(destination, duration, snap, callback) { - Components2.Scroll.scroll(destination, duration, snap, function () { - setIndex(loop(Move.toIndex(getPosition()))); - callback && callback(); - }); - } - - function parse(control) { - var index = currIndex; - - if (isString(control)) { - var _ref = control.match(/([+\-<>])(\d+)?/) || [], - indicator = _ref[1], - number = _ref[2]; - - if (indicator === "+" || indicator === "-") { - index = computeDestIndex(currIndex + +("" + indicator + (+number || 1)), currIndex); - } else if (indicator === ">") { - index = number ? toIndex(+number) : getNext(true); - } else if (indicator === "<") { - index = getPrev(true); - } - } else { - index = isLoop ? control : clamp(control, 0, getEnd()); - } - - return index; - } - - function getAdjacent(prev, destination) { - var number = perMove || (hasFocus() ? 1 : perPage); - var dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex, !(perMove || hasFocus())); - - if (dest === -1 && isSlide) { - if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) { - return prev ? 0 : getEnd(); - } - } - - return destination ? dest : loop(dest); - } - - function computeDestIndex(dest, from, snapPage) { - if (isEnough()) { - var end = getEnd(); - var index = computeMovableDestIndex(dest); - - if (index !== dest) { - from = dest; - dest = index; - snapPage = false; - } - - if (dest < 0 || dest > end) { - if (!perMove && (between(0, dest, from, true) || between(end, from, dest, true))) { - dest = toIndex(toPage(dest)); - } else { - if (isLoop) { - dest = snapPage ? dest < 0 ? -(slideCount % perPage || perPage) : slideCount : dest; - } else if (options.rewind) { - dest = dest < 0 ? end : 0; - } else { - dest = -1; - } - } - } else { - if (snapPage && dest !== from) { - dest = toIndex(toPage(from) + (dest < from ? -1 : 1)); - } - } - } else { - dest = -1; - } - - return dest; - } - - function computeMovableDestIndex(dest) { - if (isSlide && options.trimSpace === "move" && dest !== currIndex) { - var position = getPosition(); - - while (position === toPosition(dest, true) && between(dest, 0, Splide2.length - 1, !options.rewind)) { - dest < currIndex ? --dest : ++dest; - } - } - - return dest; - } - - function loop(index) { - return isLoop ? (index + slideCount) % slideCount || 0 : index; - } - - function getEnd() { - return max(slideCount - (hasFocus() || isLoop && perMove ? 1 : perPage), 0); - } - - function toIndex(page) { - return clamp(hasFocus() ? page : perPage * page, 0, getEnd()); - } - - function toPage(index) { - return hasFocus() ? index : floor((index >= getEnd() ? slideCount - 1 : index) / perPage); - } - - function toDest(destination) { - var closest = Move.toIndex(destination); - return isSlide ? clamp(closest, 0, getEnd()) : closest; - } - - function setIndex(index) { - if (index !== currIndex) { - prevIndex = currIndex; - currIndex = index; - } - } - - function getIndex(prev) { - return prev ? prevIndex : currIndex; - } - - function hasFocus() { - return !isUndefined(options.focus) || options.isNavigation; - } - - function isBusy() { - return Splide2.state.is([MOVING, SCROLLING]) && !!options.waitForTransition; - } - - return { - mount: mount, - go: go, - scroll: scroll, - getNext: getNext, - getPrev: getPrev, - getAdjacent: getAdjacent, - getEnd: getEnd, - setIndex: setIndex, - getIndex: getIndex, - toIndex: toIndex, - toPage: toPage, - toDest: toDest, - hasFocus: hasFocus, - isBusy: isBusy - }; - } - - var XML_NAME_SPACE = "http://www.w3.org/2000/svg"; - var PATH = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"; - var SIZE = 40; - - function Arrows(Splide2, Components2, options) { - var event = EventInterface(Splide2); - var on = event.on, - bind = event.bind, - emit = event.emit; - var classes = options.classes, - i18n = options.i18n; - var Elements = Components2.Elements, - Controller = Components2.Controller; - var userArrows = Elements.arrows, - track = Elements.track; - var wrapper = userArrows; - var prev = Elements.prev; - var next = Elements.next; - var created; - var wrapperClasses; - var arrows = {}; - - function mount() { - init(); - on(EVENT_UPDATED, remount); - } - - function remount() { - destroy(); - mount(); - } - - function init() { - var enabled = options.arrows; - - if (enabled && !(prev && next)) { - createArrows(); - } - - if (prev && next) { - assign(arrows, { - prev: prev, - next: next - }); - display(wrapper, enabled ? "" : "none"); - addClass(wrapper, wrapperClasses = CLASS_ARROWS + "--" + options.direction); - - if (enabled) { - listen(); - update(); - setAttribute([prev, next], ARIA_CONTROLS, track.id); - emit(EVENT_ARROWS_MOUNTED, prev, next); - } - } - } - - function destroy() { - event.destroy(); - removeClass(wrapper, wrapperClasses); - - if (created) { - remove(userArrows ? [prev, next] : wrapper); - prev = next = null; - } else { - removeAttribute([prev, next], ALL_ATTRIBUTES); - } - } - - function listen() { - on([EVENT_MOVED, EVENT_REFRESH, EVENT_SCROLLED], update); - bind(next, "click", apply(go, ">")); - bind(prev, "click", apply(go, "<")); - } - - function go(control) { - Controller.go(control, true); - } - - function createArrows() { - wrapper = userArrows || create("div", classes.arrows); - prev = createArrow(true); - next = createArrow(false); - created = true; - append(wrapper, [prev, next]); - !userArrows && before(wrapper, track); - } - - function createArrow(prev2) { - var arrow = "