├── .gitattributes ├── assets ├── globe.png ├── font-styles.css.liquid ├── application.css.scss ├── application.js └── bootstrap.min.js ├── config ├── settings_data.json └── settings_schema.json ├── templates ├── 404.json ├── collection.json ├── page.contact.json ├── list-collections.json ├── cart.json ├── page.json ├── blog.json ├── page.faq.json ├── index.json ├── article.json ├── gift_card.liquid ├── customers │ ├── reset_password.liquid │ ├── register.liquid │ ├── activate_account.liquid │ ├── login.liquid │ ├── account.liquid │ ├── order.liquid │ └── addresses.liquid ├── product.json └── search.liquid ├── snippets ├── form-error.liquid └── pagination.liquid ├── .gitignore ├── sections ├── template-404.liquid ├── translation.liquid ├── template-list-collections.liquid ├── product-recommendation.liquid ├── featured-collection.liquid ├── template-page-contact.liquid ├── template-page-faq.liquid ├── hero.liquid ├── template-page-default.liquid ├── sidebar.liquid ├── template-blog.liquid ├── template-collection.liquid ├── header.liquid ├── footer-section.liquid ├── template-article.liquid ├── product-template.liquid └── template-cart.liquid ├── README.md ├── locales ├── en.default.json ├── fr.json └── ja.json ├── layout ├── theme.liquid └── theme-blog-with-sidebar.liquid └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coolcat-creations/Leena/main/assets/globe.png -------------------------------------------------------------------------------- /config/settings_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "current": "Default", 3 | "presets": { 4 | "Default": { } 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /templates/404.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-404" 5 | } 6 | }, 7 | "order": ["template"] 8 | } -------------------------------------------------------------------------------- /templates/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-collection" 5 | } 6 | }, 7 | "order": ["template"] 8 | } -------------------------------------------------------------------------------- /templates/page.contact.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-page-contact" 5 | } 6 | }, 7 | "order": ["template"] 8 | } -------------------------------------------------------------------------------- /templates/list-collections.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-list-collections" 5 | } 6 | }, 7 | "order": ["template"] 8 | } -------------------------------------------------------------------------------- /snippets/form-error.liquid: -------------------------------------------------------------------------------- 1 | {% for error in form.errors %} 2 |
3 | {% if error == 'form' %} 4 | {{ form.errors.messages[error] }} 5 | {% else %} 6 | {{ form.errors.translated_fields[error] }} {{ form.errors.messages[error] }} 7 | {% endif %} 8 |
9 | {% endfor %} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This file contains a list of files and folders to be ignored when 2 | # committing to a git repository. Ignored files are both Slate project 3 | # specific files as well as commonly ignored files on any project. 4 | 5 | # For more information on this .gitignore files, see GitHub's 6 | # documentation: https://help.github.com/articles/ignoring-files/ 7 | 8 | *.yml -------------------------------------------------------------------------------- /sections/template-404.liquid: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

404

6 |

{{ 'general.404.title' | t }}

7 |

{{ 'general.404.subtext_html' | t }}

8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Leena by WeeklyHow 2 | Shopify Theme Development Course Project Files by WeeklyHow 3 | 4 | [Official course page](https://weeklyhow.com/courses/shopify-theme-development-masterclass-learn-how-to-create-shopify-themes/). 5 | 6 | This package is built using ThemeKit, so in order for you to be able to customize this package, you either download this repository and upload the theme to a development store, or use ThemeKit for Shopify theme development. -------------------------------------------------------------------------------- /locales/en.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "general": { 3 | "404": { 4 | "title": "Not found", 5 | "subtext_html": "The page you were looking for does not exist" 6 | }, 7 | "Cart": { 8 | "title": "Cart" 9 | }, 10 | "Blog": { 11 | "title": "Blog" 12 | }, 13 | "Layout": { 14 | "login_text": "Login", 15 | "logout_text": "Logout", 16 | "register_text": "Register", 17 | "account_text": "Account" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /locales/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "general": { 3 | "404": { 4 | "title": "Pas trouve", 5 | "subtext_html": "le page introuvable" 6 | }, 7 | "Cart": { 8 | "title": "Panier" 9 | }, 10 | "Blog": { 11 | "title": "Blog" 12 | }, 13 | "Layout": { 14 | "login_text": "Compte", 15 | "logout_text": "Logout", 16 | "register_text": "Creer un compte", 17 | "account_text": "User" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /locales/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "general": { 3 | "404": { 4 | "title": "Pas trouve", 5 | "subtext_html": "le page introuvable" 6 | }, 7 | "Cart": { 8 | "title": "Shopping Cart" 9 | }, 10 | "Blog": { 11 | "title": "Blog" 12 | }, 13 | "Layout": { 14 | "login_text": "Compte", 15 | "logout_text": "Logout", 16 | "register_text": "Creer un compte", 17 | "account_text": "User" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /templates/cart.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-cart", 5 | "blocks": { 6 | "cart_total": { 7 | "type": "cart_total" 8 | }, 9 | "cart_buttons": { 10 | "type": "cart_checkout_button" 11 | } 12 | }, 13 | "block_order": ["cart_total","cart_buttons"] 14 | } 15 | }, 16 | "order": ["template"] 17 | } -------------------------------------------------------------------------------- /sections/translation.liquid: -------------------------------------------------------------------------------- 1 | {% form 'localization', id: "localization_form_tag", class: "dropup" %} 2 |
{{ 'globe.png' | asset_img_url: '50px' | img_tag }}
3 |
4 | {% for locale in shop.published_locales %} 5 | {{ locale.endonym_name }} 6 | {% endfor %} 7 |
8 | 9 | {% endform %} -------------------------------------------------------------------------------- /assets/font-styles.css.liquid: -------------------------------------------------------------------------------- 1 | {% assign font_header = settings.header_text_font %} 2 | {% assign font_body = settings.body_text_font %} 3 | {% assign font_body_size = settings.body_font_size %} 4 | 5 | {{ font_header | font_face }} 6 | {{ font_body | font_face }} 7 | 8 | h1, h2, h3, h4, h5, h6, button { 9 | font-family: {{ font_header.family }}, {{ font_header.fallback_families }}; 10 | } 11 | 12 | body { 13 | font-family: {{ font_body.family }}, {{ font_body.fallback_families }}; 14 | font-size: {{ font_body_size }}px; 15 | } -------------------------------------------------------------------------------- /templates/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-page-default", 5 | "blocks": { 6 | "title": { 7 | "type": "page_title" 8 | }, 9 | "date": { 10 | "type": "page_date" 11 | }, 12 | "content": { 13 | "type": "page_content" 14 | } 15 | }, 16 | "block_order": ["title","date","content"] 17 | } 18 | }, 19 | "order": ["template"] 20 | } -------------------------------------------------------------------------------- /templates/blog.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-blog", 5 | "blocks": { 6 | "blog_title": { 7 | "type": "blog_title" 8 | }, 9 | "blog_grid": { 10 | "type": "blog_grid" 11 | }, 12 | "blog_pagination": { 13 | "type": "blog_pagination" 14 | } 15 | }, 16 | "block_order": ["blog_title","blog_grid","blog_pagination"] 17 | } 18 | }, 19 | "order": ["template"] 20 | } -------------------------------------------------------------------------------- /templates/page.faq.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "template-page-faq", 5 | "blocks": { 6 | "new-faq-item": { 7 | "type": "faq", 8 | "settings": { 9 | "title": "How to create a block for this page template?", 10 | "answer": "

To create a block, you can open your cuztomizer or your theme editor and then navigate to your FAQ page and there you should be able to create an FAQ item

" 11 | } 12 | } 13 | }, 14 | "block_order": ["new-faq-item"] 15 | } 16 | }, 17 | "order": ["template"] 18 | } -------------------------------------------------------------------------------- /templates/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "hero": { 4 | "type": "hero", 5 | "settings": { 6 | "image": "", 7 | "title": "Welcome To Elena", 8 | "description": "

We are happy to welcome you to our official store

", 9 | "button_label": "Learn more", 10 | "button_link": "https:\/\/google.com\/" 11 | } 12 | }, 13 | "featured-collection": { 14 | "type": "featured-collection", 15 | "settings": { 16 | "featured_collection": "summer-collection", 17 | "title": "Featured Summer Collection" 18 | } 19 | } 20 | }, 21 | "order": ["hero","featured-collection"] 22 | } -------------------------------------------------------------------------------- /templates/article.json: -------------------------------------------------------------------------------- 1 | { 2 | "layout": "theme-blog-with-sidebar", 3 | "sections": { 4 | "template": { 5 | "type": "template-article", 6 | "blocks": { 7 | "featured_image": { 8 | "type": "featured_image" 9 | }, 10 | "title": { 11 | "type": "title" 12 | }, 13 | "article_meta": { 14 | "type": "article_meta" 15 | }, 16 | "content": { 17 | "type": "content" 18 | } 19 | }, 20 | "block_order": ["featured_image","title","article_meta","content"] 21 | }, 22 | "sidebar": { 23 | "type": "sidebar" 24 | } 25 | }, 26 | "order": ["template","sidebar"] 27 | } -------------------------------------------------------------------------------- /layout/theme.liquid: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ page_title }} 4 | 5 | 6 | 7 | 8 | 9 | {{ content_for_header }} 10 | {{ 'bootstrap.min.css' | asset_url | stylesheet_tag }} 11 | {{ 'application.css.scss' | asset_url | stylesheet_tag }} 12 | {{ 'font-styles.css' | asset_url | stylesheet_tag }} 13 | 14 | 15 | {% section 'translation' %} 16 | {% section 'header' %} 17 | 18 |
19 | {{ content_for_layout }} 20 |
21 | 22 | {% section 'footer-section' %} 23 | 24 | 25 | -------------------------------------------------------------------------------- /templates/gift_card.liquid: -------------------------------------------------------------------------------- 1 | {% layout none %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ 'vendor/qrcode.js' | shopify_asset_url | script_tag }} 9 | 10 | 11 |
12 | 19 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /snippets/pagination.liquid: -------------------------------------------------------------------------------- 1 | {% if paginate.pages > 1 %} 2 | 21 | {% endif %} -------------------------------------------------------------------------------- /layout/theme-blog-with-sidebar.liquid: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ page_title }} 4 | 5 | 6 | 7 | 8 | 9 | {{ content_for_header }} 10 | {{ 'bootstrap.min.css' | asset_url | stylesheet_tag }} 11 | {{ 'application.css.scss' | asset_url | stylesheet_tag }} 12 | {{ 'font-styles.css' | asset_url | stylesheet_tag }} 13 | 14 | 15 | {% section 'translation' %} 16 | {% section 'header' %} 17 | 18 |
19 |
20 | {{ content_for_layout }} 21 |
22 |
23 | 24 | {% section 'footer-section' %} 25 | 26 | 27 | -------------------------------------------------------------------------------- /templates/customers/reset_password.liquid: -------------------------------------------------------------------------------- 1 |
2 |

Reset Password

3 |
4 | {% form 'reset_customer_password' %} 5 | {% include 'form-error', form: form %} 6 | 7 |
8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 | {% endform %} 20 |
21 |
-------------------------------------------------------------------------------- /templates/customers/register.liquid: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% form 'create_customer' %} 4 | {% include 'form-error', form: form %} 5 |

Customer Register

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% endform %} 21 |
22 |
23 | 24 | -------------------------------------------------------------------------------- /templates/product.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": { 3 | "template": { 4 | "type": "product-template", 5 | "blocks": { 6 | "title": { 7 | "type": "title" 8 | }, 9 | "price": { 10 | "type": "price" 11 | }, 12 | "variantSelector": { 13 | "type": "variant_selector" 14 | }, 15 | "quantity": { 16 | "type": "quantity" 17 | }, 18 | "checkoutButtons": { 19 | "type": "checkout_buttons" 20 | }, 21 | "description": { 22 | "type": "description" 23 | } 24 | }, 25 | "block_order": ["title","price","variantSelector","quantity","checkoutButtons","description"] 26 | }, 27 | "product-recommendation": { 28 | "type": "product-recommendation" 29 | } 30 | }, 31 | "order": ["template","product-recommendation"] 32 | } -------------------------------------------------------------------------------- /templates/customers/activate_account.liquid: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Activate Account

4 |
5 | {% form 'activate_customer_password' %} 6 | {% include 'form-error', form: form %} 7 | 8 |
9 | 10 | 11 |
12 |
13 | 14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |

or

22 | 23 |
24 | 25 |
26 | {% endform %} 27 |
28 |
-------------------------------------------------------------------------------- /sections/template-list-collections.liquid: -------------------------------------------------------------------------------- 1 |
2 | {% for collection in collections %} 3 | {% if collection.handle != 'frontpage' %} 4 | {% assign collection_title = collection.title | escape %} 5 | 6 |
7 |

{{ collection_title }}

8 |
9 | 10 |
11 | {% for product in collection.products limit: 5 %} 12 | {% assign image = product.featured_media.preview_image %} 13 |
14 |
15 | {{ product.title }} 16 |
17 |

{{ product.title }}

18 |

{{ product.price | money_without_trailing_zeros }}

19 |
20 |
21 |
22 | {% endfor %} 23 |
24 | 25 |
26 | More {{ collection_title }} 27 |
28 | 29 | {% endif %} 30 | 31 | {% endfor %} 32 |
33 | -------------------------------------------------------------------------------- /sections/product-recommendation.liquid: -------------------------------------------------------------------------------- 1 |
2 |
3 |

You may also like this

4 |
5 | 6 |
7 |
8 |
9 | 10 | -------------------------------------------------------------------------------- /templates/customers/login.liquid: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% form 'customer_login' %} 4 | {% include 'form-error', form: form %} 5 |

Customer Login

6 | 7 | 8 | 9 | 10 | 11 | 12 | {% endform %} 13 | 14 | Forgot your password? 15 |
16 |
17 | {% form 'recover_customer_password' %} 18 | {% include 'form-error', form: form %} 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | {% endform %} 27 |
28 |
29 | 30 | -------------------------------------------------------------------------------- /config/settings_schema.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "theme_info", 4 | "theme_name": "Leena", 5 | "theme_version": "1.0.0", 6 | "theme_author": "WeeklyHow", 7 | "theme_documentation_url": "https://weeklyhow.com/blog", 8 | "theme_support_url": "https://weeklyhow.com/contact" 9 | }, 10 | { 11 | "name": "Navigational Bar Colors Setting", 12 | "settings": [ 13 | { 14 | "type": "color", 15 | "id": "navbar_color", 16 | "label": "NavBar Background Colors", 17 | "default": "#000" 18 | } 19 | ] 20 | }, 21 | { 22 | "name": "Typography", 23 | "settings": [ 24 | { 25 | "type": "header", 26 | "content": "Heading Font Styles" 27 | }, 28 | { 29 | "type": "font_picker", 30 | "id": "header_text_font", 31 | "label": "Font", 32 | "default": "mono" 33 | }, 34 | { 35 | "type": "header", 36 | "content": "Body Font Styles" 37 | }, 38 | { 39 | "type": "font_picker", 40 | "id": "body_text_font", 41 | "label": "Font", 42 | "default": "mono" 43 | }, 44 | { 45 | "type": "header", 46 | "content": "Body Font Size" 47 | }, 48 | { 49 | "type": "range", 50 | "id": "body_font_size", 51 | "label": "Font Size", 52 | "default": 16, 53 | "unit": "px", 54 | "min": 13, 55 | "max": 25, 56 | "step": 1 57 | } 58 | ] 59 | } 60 | ] 61 | -------------------------------------------------------------------------------- /assets/application.css.scss: -------------------------------------------------------------------------------- 1 | // put your styles here 2 | html, body {} 3 | 4 | .inner-hero-section { 5 | position: relative; 6 | overflow: hidden; 7 | width: 100%; 8 | height: 400px; 9 | } 10 | 11 | .inner-hero-section img, 12 | .inner-hero-section svg { 13 | position: absolute; 14 | top: 0; 15 | bottom: 0; 16 | width: 100%; 17 | height: 100%; 18 | object-fit: cover; 19 | object-position: top; 20 | z-index: -1; 21 | } 22 | 23 | .login-form, .forgot-password-form { 24 | width: 100%; 25 | max-width: 330px; 26 | margin: auto; 27 | } 28 | 29 | .dropup { 30 | position: relative; 31 | display: inline-block; 32 | } 33 | 34 | .localeBtn { 35 | background-color: #3298DB; 36 | color:#fff; 37 | padding: 6px; 38 | font-size: 20px; 39 | position: fixed; 40 | bottom: 25px; 41 | right: 25px; 42 | border-radius: 50%; 43 | max-width: 70px; 44 | max-height: 70px; 45 | box-shadow: -1px 0px 20px 0px #00000066; 46 | } 47 | 48 | .localeBtn img { 49 | width: 50px; 50 | height: 50px; 51 | } 52 | 53 | .dropup-content { 54 | display: none; 55 | position: fixed; 56 | bottom: 80px; 57 | right: 25px; 58 | min-width: 210px; 59 | z-index: 1; 60 | background-color: #f1f1f1; 61 | box-shadow: -1px 0px 20px 0px #00000066; 62 | } 63 | 64 | .dropup:hover .dropup-content { 65 | display: block; 66 | } 67 | 68 | .dropup-content a { 69 | color: #000; 70 | font-size: 17px; 71 | padding: 15px 10px; 72 | display: block; 73 | text-align: center; 74 | } 75 | 76 | #shopify-section-translation { 77 | position: fixed; 78 | } -------------------------------------------------------------------------------- /sections/featured-collection.liquid: -------------------------------------------------------------------------------- 1 |
2 |

{{ section.settings.title }}

3 |
4 | {% for product in collections[section.settings.featured_collection].products %} 5 | {% assign image = product.featured_media.preview_image %} 6 |
7 |
8 | {% if image != blank %} 9 | {{ product.title }} 10 | {% else %} 11 | {{ 'product-1' | placeholder_svg_tag: 'card-img-top' }} 12 | {% endif %} 13 | 14 |
15 |

{{ product.title }}

16 |

{{ product.price | money_without_trailing_zeros }}

17 |
18 |
19 |
20 | {% endfor %} 21 |
22 | 23 |
24 | 25 | 26 | 27 | {% schema %} 28 | { 29 | "name": "Featured Collection", 30 | "class": "featured-collection-section", 31 | "settings": [ 32 | { 33 | "type": "collection", 34 | "id": "featured_collection", 35 | "label": "Collection" 36 | }, 37 | { 38 | "type": "text", 39 | "id": "title", 40 | "default": "Featured Collection", 41 | "label": "Title" 42 | } 43 | 44 | ], 45 | "presets": [ 46 | { 47 | "category": "Collection", 48 | "name":"Featured Collection" 49 | } 50 | ] 51 | } 52 | {% endschema %} -------------------------------------------------------------------------------- /sections/template-page-contact.liquid: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

{{ page.title }}

5 |
6 |
7 | 8 |
9 | {% form 'contact' %} 10 | {% if form.posted_successfully? %} 11 |
12 | Thank you for your contact 13 |
14 | {% endif %} 15 | 16 | {{ form.errors | default_errors }} 17 | 18 |
19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 |
27 |
28 | 29 |
30 | 31 | 32 |
33 | 34 |
35 | 36 | 37 |
38 | 39 |
40 | 41 | 42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | {% endform %} 50 |
51 |
52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /sections/template-page-faq.liquid: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{ page.title }}

4 |
5 |
6 | {% for block in section.blocks %} 7 |
8 |

9 | 17 |

18 |
24 | {{ block.settings.answer }} 25 |
26 |
27 | {% endfor %} 28 |
29 |
30 | 31 | 32 | {% schema %} 33 | { 34 | "name": "FAQ", 35 | "blocks": [ 36 | { 37 | "name": "FAQ Items", 38 | "type": "faq", 39 | "settings": [ 40 | { 41 | "type": "text", 42 | "id": "title", 43 | "label": "Title", 44 | "default": "FAQ Title Example" 45 | }, 46 | { 47 | "type": "richtext", 48 | "id": "answer", 49 | "label": "Answer" 50 | } 51 | ] 52 | } 53 | ] 54 | } 55 | {% endschema %} -------------------------------------------------------------------------------- /sections/hero.liquid: -------------------------------------------------------------------------------- 1 |
2 | {% if section.settings.image != blank %} 3 | {{ section.settings.image.alt}} 4 | {% else %} 5 | {% assign placeholder = 'lifestyle-2' %} 6 | {{ placeholder | placeholder_svg_tag: 'placeholder-svg' }} 7 | {% endif %} 8 | 9 |
10 |
11 |
12 |

{{ section.settings.title }}

13 | {{ section.settings.description }} 14 | {{ section.settings.button_label }} 15 |
16 |
17 |
18 |
19 | 20 | {% schema %} 21 | { 22 | "name": "Hero", 23 | "class": "hero-section", 24 | "settings": [ 25 | { 26 | "type": "image_picker", 27 | "id": "image", 28 | "label": "Heading Background Title" 29 | }, 30 | { 31 | "type": "text", 32 | "id": "title", 33 | "default": "Example Heading", 34 | "label": "Heading Title" 35 | }, 36 | { 37 | "type": "richtext", 38 | "id": "description", 39 | "default": "

Example Paragraph

", 40 | "label": "Heading Description" 41 | }, 42 | { 43 | "type": "text", 44 | "id": "button_label", 45 | "default": "Button", 46 | "label": "Heading Button Label" 47 | }, 48 | { 49 | "type": "url", 50 | "id": "button_link", 51 | "label": "Heading Button Link" 52 | } 53 | ], 54 | "presets": [ 55 | { 56 | "category": "Hero", 57 | "name":"Simple Hero" 58 | } 59 | ] 60 | } 61 | {% endschema %} -------------------------------------------------------------------------------- /sections/template-page-default.liquid: -------------------------------------------------------------------------------- 1 | {% if section.settings.container == 'container' %} 2 | {% assign container_class = 'container' %} 3 | {% else %} 4 | {% assign container_class = 'container-fluid' %} 5 | {% endif %} 6 | 7 |
8 | {% for block in section.blocks %} 9 | {% case block.type %} 10 | {% when 'page_title' %} 11 |

{{ page.title }}

12 | {% when 'page_date' %} 13 | {% if section.settings.show_publish_date %} 14 | {{ page.published_at | date: '%B %d, %Y' }} 15 | {% endif %} 16 | {% when 'page_content' %} 17 |
{{ page.content }}
18 | {% else %} 19 | {% endcase %} 20 | {% endfor %} 21 |
22 | 23 | 24 | 25 | {% schema %} 26 | { 27 | "name": "Page settings", 28 | "settings": [ 29 | { 30 | "type": "select", 31 | "id": "container", 32 | "label": "Layout", 33 | "options": [ 34 | { 35 | "value": "container", 36 | "label": "Container" 37 | }, 38 | { 39 | "value": "container-fluid", 40 | "label": "Container Fluid" 41 | } 42 | ], 43 | "default": "container" 44 | }, 45 | { 46 | "type": "checkbox", 47 | "id": "show_publish_date", 48 | "default": true, 49 | "label": "Show Publish Date" 50 | } 51 | ], 52 | "blocks": [ 53 | { 54 | "type": "page_title", 55 | "name": "Title", 56 | "limit": 1 57 | }, 58 | { 59 | "type": "page_date", 60 | "name": "Date", 61 | "limit": 1 62 | }, 63 | { 64 | "type": "page_content", 65 | "name": "Content", 66 | "limit": 1 67 | } 68 | ] 69 | } 70 | {% endschema %} -------------------------------------------------------------------------------- /sections/sidebar.liquid: -------------------------------------------------------------------------------- 1 | 21 | 22 | {% schema %} 23 | { 24 | "name": "Sidebar", 25 | "class": "col-md-4 col-12", 26 | "tag": "section", 27 | "blocks": [ 28 | { 29 | "name": "Sidebar Image", 30 | "type": "image", 31 | "settings": [ 32 | { 33 | "type": "text", 34 | "id": "title", 35 | "label": "Title", 36 | "default": "Sidebar Title" 37 | }, 38 | { 39 | "type": "image_picker", 40 | "id": "image", 41 | "label": "Image" 42 | }, 43 | { 44 | "type": "url", 45 | "id": "url", 46 | "label": "Link" 47 | } 48 | ] 49 | }, 50 | { 51 | "name": "Sidebar Text", 52 | "type": "text", 53 | "settings": [ 54 | { 55 | "type": "text", 56 | "id": "title", 57 | "label": "Title", 58 | "default": "Sidebar Title" 59 | }, 60 | { 61 | "type": "richtext", 62 | "id": "description", 63 | "label": "Description" 64 | } 65 | ] 66 | } 67 | ] 68 | } 69 | {% endschema %} -------------------------------------------------------------------------------- /templates/customers/account.liquid: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Account

4 |
5 |
6 |
Account details
7 | {{ customer.default_address | format_address }} 8 | 9 | 10 | View addresses 11 | {{ customer.addresses_count }} 12 | 13 |
14 |
15 |
16 | {% if customer.orders.size > 0 %} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {% for order in customer.orders %} 29 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | {% endfor %} 39 | 40 | 41 |
Order #Fulfillment StatusPayment StatusOrder DateTotal
31 | {{ order.name }} 32 | {{ order.fulfillment_status_label }}{{ order.financial_status_label }}{{ order.created_at | time_tag: format: 'date' }}{{ order.total_price | money }}
42 | {% endif %} 43 |
44 |
45 |
46 |
-------------------------------------------------------------------------------- /templates/customers/order.liquid: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Order {{ order.name }}

4 | 5 |
6 |
7 |
8 |
Billing Information
9 |
10 |

Billing status: {{ order.financial_status_label }}

11 | {{ order.billing_address | format_address }} 12 |
13 |
14 |
15 |
Shipping Information
16 |
17 |

Fulfillment status: {{ order.fulfillment_status_label }}

18 | {{ order.shipping_address | format_address }} 19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | {% for line_item in order.line_items %} 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | {% endfor %} 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
ProductSKUPriceQuantityTotal
{{ line_item.title | link_to: line_item.product.url }}{{ line_item.sku }}{{ line_item.original_price | money }}{{ line_item.quantity }}{{ line_item.line_price | money }}
SUBTOTAL{{ order.line_items_subtotal_price | money }}
51 |
52 |
53 |
-------------------------------------------------------------------------------- /sections/template-blog.liquid: -------------------------------------------------------------------------------- 1 | {% paginate blog.articles by 5 %} 2 | 3 | {% for block in section.blocks %} 4 | {% case block.type %} 5 | {% when 'blog_title' %} 6 |
7 |
8 |

{{ blog.title }}

9 |

Read our latest publications

10 |
11 |
12 | {% when 'blog_grid' %} 13 |
14 |
15 | {% for article in blog.articles %} 16 |
17 |
18 | {% if article.image.src != null %} 19 | {{ article.image.alt}} 20 | {% else %} 21 | {{ 'image' | placeholder_svg_tag: 'card-img-top' }} 22 | {% endif %} 23 |
24 |

{{ article.title }}

25 | {{ article.author }} @ {{ article.created_at }} 26 |

27 | {% if article.excerpt.size > 0 %} 28 | {{ article.excerpt }} 29 | {% else %} 30 |

{{ article.content | strip_html | truncatewords: 100 }}

31 | {% endif %} 32 |

33 |
34 |
35 | 36 |
37 | {% endfor %} 38 |
39 |
40 | {% when 'blog_pagination' %} 41 |
42 | {% render 'pagination', paginate: paginate %} 43 |
44 | {% else %} 45 | 46 | {% endcase %} 47 | 48 | {% endfor %} 49 | 50 | {% endpaginate %} 51 | 52 | {% schema %} 53 | { 54 | "name": "Blog Section", 55 | "tag": "section", 56 | "blocks": [ 57 | { 58 | "type": "blog_title", 59 | "name": "Blog Title", 60 | "limit": 1 61 | }, 62 | { 63 | "type": "blog_grid", 64 | "name": "Blog Grid", 65 | "limit": 1 66 | }, 67 | { 68 | "type": "blog_pagination", 69 | "name": "Blog Pagination", 70 | "limit": 1 71 | } 72 | ] 73 | } 74 | {% endschema %} -------------------------------------------------------------------------------- /templates/search.liquid: -------------------------------------------------------------------------------- 1 | {% paginate search.results by 10 %} 2 | 3 |
4 |
5 |
6 | 7 |
8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 | 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 |

{{ search.results_count }} search results

25 |
26 | 27 |
28 | {% if search.performed %} 29 | {% for item in search.results %} 30 | {% if item.object_type == 'product' %} 31 |
32 |
33 | {% if item.featured_image %} 34 | 35 | {{ item.featured_image.src | img_url: 'medium' | img_tag: item.featured_image.alt, 'card-img-top' }} 36 | 37 | {% endif %} 38 | 39 |
40 |
{{ item.title | link_to: item.url }}
41 |

{{ item.content | strip_html | truncatewords: 50 }}

42 |
43 |
44 |
45 | {% else if item.object_type == 'article' %} 46 |
47 |
48 | {% if item.image %} 49 | 50 | {{ item.image.src | img_url: 'medium' | img_tag: item.image.alt, 'card-img-top' }} 51 | 52 | {% endif %} 53 | 54 |
55 |
{{ item.title | link_to: item.url }}
56 |

{{ item.content | strip_html | truncatewords: 50 }}

57 |
58 |
59 |
60 | 61 | {% endif %} 62 | 63 | 64 | {% else %} 65 | no results 66 | {% endfor %} 67 | {% endif %} 68 |
69 |
70 | 71 |
72 | {% render 'pagination', paginate: paginate %} 73 |
74 | 75 | {% endpaginate %} 76 | -------------------------------------------------------------------------------- /sections/template-collection.liquid: -------------------------------------------------------------------------------- 1 |
2 | {% paginate collection.products by 2 %} 3 |
4 |

{{ collection.title }}

5 |
6 | 7 |
8 | 17 |
18 | 19 |
20 | {% for product in collection.products %} 21 | {% assign image = product.featured_media.preview_image %} 22 |
23 |
24 | {% if image != blank %} 25 | 26 | {{ product.title }} 27 | 28 | {% else %} 29 | {{ 'product-1' | placeholder_svg_tag: 'card-img-top' }} 30 | {% endif %} 31 | 32 |
33 |

{{ product.title }}

34 |

{{ product.price | money_without_trailing_zeros }}

35 |
36 |
37 |
38 | 39 | {% else %} 40 |

no matches

41 | {% endfor %} 42 |
43 | 44 | 45 | 46 | {% render 'pagination', paginate: paginate %} 47 | 48 | {% endpaginate %} 49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /sections/header.liquid: -------------------------------------------------------------------------------- 1 | 58 | 59 |
60 |
61 |
Product Search Result
62 | 63 |
64 |
65 |
66 |
-------------------------------------------------------------------------------- /sections/footer-section.liquid: -------------------------------------------------------------------------------- 1 | 37 | 38 | {{ 'bootstrap.min.js' | asset_url | script_tag }} 39 | {{ 'application.js' | asset_url | script_tag }} 40 | 41 | {% schema %} 42 | { 43 | "name": "Footer", 44 | "settings": [ 45 | { 46 | "type": "range", 47 | "id": "col_num", 48 | "default": 3, 49 | "min": 2, 50 | "max": 4, 51 | "label": "Number of Columns" 52 | }, 53 | { 54 | "type": "checkbox", 55 | "id": "enable_payment_type_icons", 56 | "label": "Enable Payment Type Icons", 57 | "default": true 58 | } 59 | ], 60 | "max_blocks": 4, 61 | "blocks": [ 62 | { 63 | "type": "link_list", 64 | "name": "Navigation", 65 | "settings": [ 66 | { 67 | "type": "text", 68 | "id": "title", 69 | "label": "Title", 70 | "default": "Quick Links" 71 | }, 72 | { 73 | "type": "link_list", 74 | "id": "menu", 75 | "label": "Menu" 76 | } 77 | 78 | ] 79 | }, 80 | { 81 | "type": "text", 82 | "name": "Store details", 83 | "settings": [ 84 | { 85 | "type": "image_picker", 86 | "id": "logo", 87 | "label": "Store Logo" 88 | }, 89 | { 90 | "type": "text", 91 | "id": "title", 92 | "label": "Heading", 93 | "default": "Store information" 94 | }, 95 | { 96 | "type": "richtext", 97 | "id": "description", 98 | "label": "Text" 99 | } 100 | ] 101 | } 102 | ] 103 | } 104 | {% endschema %} -------------------------------------------------------------------------------- /sections/template-article.liquid: -------------------------------------------------------------------------------- 1 | {% assign number_of_comments = article.comments_count %} 2 | {% if comment and comment.created_at %} 3 | {% assign number_of_comments = article.comments_count %} 4 | {% endif %} 5 | 6 | {% capture author %}{{ article.author }}{% endcapture %} 7 | {% capture date %}{% endcapture %} 8 | 9 |
10 | 11 | {% for block in section.blocks %} 12 | {% case block.type %} 13 | {% when 'featured_image' %} 14 | {% if article.image != blank %} 15 | 16 | {% endif %} 17 | {% when 'title' %} 18 |

{{ article.title }}

19 | {% when 'article_meta' %} 20 |

By {{ author }} published on {{ date }}

21 | {% when 'content' %} 22 |
{{ article.content }}
23 | {% else %} 24 | {% endcase %} 25 | {% endfor %} 26 | 27 |
28 | {% if blog.comments_enabled? %} 29 |

{{ number_of_comments }} comment{% if number_of_comments > 1 %}s{% endif %}

30 | {% paginate article.comments by 5 %} 31 | {% for comment in article.comments %} 32 |
33 |
By {{ comment.author }} on {{ comment.created_at | date: format: 'long' }}
34 |
35 |
{{ comment.content }}
36 |
37 |
38 | {% endfor %} 39 | 40 | {% render 'pagination' %} 41 | {% endpaginate %} 42 | 43 |
44 | {% form 'new_comment', article %} 45 | 46 | {% include 'form-error', form: form %} 47 | 48 |
49 |

Comment your thoughts below

50 |
51 | 52 | 53 |
54 | 55 |
56 | 57 | 58 |
59 | 60 |
61 | 62 | 63 |
64 | 65 | 66 | 67 |
68 | 69 | {% endform %} 70 |
71 | {% endif %} 72 |
73 | 74 |
75 | 76 | {% schema %} 77 | { 78 | "name": "Article Section", 79 | "tag": "section", 80 | "class": "col-md-8 col-12", 81 | "blocks": [ 82 | { 83 | "type": "featured_image", 84 | "name": "Featured Image", 85 | "limit": 1 86 | }, 87 | { 88 | "type": "title", 89 | "name": "Article Title", 90 | "limit": 1 91 | }, 92 | { 93 | "type": "article_meta", 94 | "name": "Article Meta", 95 | "limit": 1 96 | }, 97 | { 98 | "type": "content", 99 | "name": "Article Content", 100 | "limit": 1 101 | } 102 | ] 103 | } 104 | {% endschema %} -------------------------------------------------------------------------------- /sections/product-template.liquid: -------------------------------------------------------------------------------- 1 | {% assign current_product = product.selected_or_first_available_variant %} 2 | {% assign product_image = current_product.featured_image | default: product.featured_image %} 3 | 4 |
5 |
6 |
7 | {{ product_image.alt }} 8 | {% for image in product.images %} 9 | {{ image.alt }} 10 | {% endfor %} 11 |
12 |
13 | {% form 'product', product, class:"product-form", id:"AddToCartForm" %} 14 | {% for block in section.blocks %} 15 | {% case block.type %} 16 | {% when 'title' %} 17 |

{{ product.title }}

18 | {% when 'price' %} 19 |

{{ current_product.price | money_with_currency }}

20 | {% when 'variant_selector' %} 21 |
22 | 23 | 37 |
38 | {% when 'quantity' %} 39 |
40 | 41 | 42 |
43 | {% when 'checkout_buttons' %} 44 | 45 | 46 | {% if section.settings.dynamic_buttons_checkbox == true %} 47 | {{ form | payment_button }} 48 | {% endif %} 49 | {% when 'description' %} 50 |

{{ product.description }}

51 | {% else %} 52 | 53 | {% endcase %} 54 | {% endfor %} 55 | 56 | {% endform %} 57 |
58 |
59 |
60 | 61 | 62 | 63 | {% schema %} 64 | { 65 | "name": "Product", 66 | "settings": [ 67 | { 68 | "type": "checkbox", 69 | "id": "dynamic_buttons_checkbox", 70 | "label": "Enable Dynamic Buttons", 71 | "default": false 72 | } 73 | ], 74 | "blocks": [ 75 | { 76 | "type": "title", 77 | "name": "Title", 78 | "limit": 1 79 | }, 80 | { 81 | "type": "price", 82 | "name": "Price", 83 | "limit": 1 84 | }, 85 | { 86 | "type": "variant_selector", 87 | "name": "Variant Selector", 88 | "limit": 1 89 | }, 90 | { 91 | "type": "quantity", 92 | "name": "Quantity", 93 | "limit": 1 94 | }, 95 | { 96 | "type": "checkout_buttons", 97 | "name": "Checkout Buttons", 98 | "limit": 1 99 | }, 100 | { 101 | "type": "description", 102 | "name": "Description", 103 | "limit": 1 104 | } 105 | ] 106 | } 107 | {% endschema %} -------------------------------------------------------------------------------- /sections/template-cart.liquid: -------------------------------------------------------------------------------- 1 |
2 | {% if cart.item_count > 0 %} 3 | 4 |
5 |

{{ 'general.Cart.title' | t }}

6 |
7 |
8 |
9 |
10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% for item in cart.items %} 21 | 22 | 27 | 32 | 33 | 36 | 41 | 42 | {% endfor %} 43 | 44 |
ProdPriceQtytotal
23 | 24 | {{ item.title | escape }} 25 | 26 | 28 | {{ item.product.title }} 29 |

{{ item.variant.title }}

30 | remove 31 |
{{ item.price | money }} 34 | 35 | 37 | {% if item.original_line_price != item.line_price %}{{ item.original_line_price | money }}{% endif %} 38 | {{ item.line_price | money }} 39 | {% for discount in item.discounts %}{{ discount.title }}{% endfor %} 40 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 | {% for block in section.blocks %} 53 | {% case block.type %} 54 | {% when 'cart_total' %} 55 |
56 |

The total amount is

57 |

{{ cart.total_price | money }}

58 |
59 | {% when 'cart_checkout_button' %} 60 |
61 | 62 | 63 |
64 | 65 | {% else %} 66 | {% endcase %} 67 | {% endfor %} 68 |
69 |
70 |
71 |
72 |
73 | 74 | {% else %} 75 | 76 |
77 |

{{ 'general.Cart.title' | t }}

78 |

Cart is empty

79 |
80 | 81 | {% endif %} 82 |
83 | 84 | {% schema %} 85 | { 86 | "name": "Template Cart", 87 | "tag": "section", 88 | "blocks": [ 89 | { 90 | "type": "cart_total", 91 | "name": "Cart Total", 92 | "limit": 1 93 | }, 94 | { 95 | "type": "cart_checkout_button", 96 | "name": "Cart Buttons", 97 | "limit": 1 98 | } 99 | ] 100 | } 101 | {% endschema %} -------------------------------------------------------------------------------- /templates/customers/addresses.liquid: -------------------------------------------------------------------------------- 1 |
2 |

My Addresses

3 | 4 | 5 |
6 | {% for address in customer.addresses %} 7 |
8 |
9 |
10 | {{ address | format_address }} 11 |
12 | 22 |
23 |
24 | {% endfor %} 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /assets/application.js: -------------------------------------------------------------------------------- 1 | // Put your applicaiton javascript here 2 | 3 | if( document.getElementById('sort_by') != null ) { 4 | document.querySelector('#sort_by').addEventListener('change', function(e) { 5 | var url = new URL(window.location.href); 6 | url.searchParams.set('sort_by', e.currentTarget.value); 7 | 8 | window.location = url.href; 9 | }); 10 | } 11 | 12 | if( document.getElementById('AddressCountryNew') != null ) { 13 | document.getElementById('AddressCountryNew').addEventListener('change', function(e) { 14 | var provinces = this.options[this.selectedIndex].getAttribute('data-provinces'); 15 | var provinceSelector = document.getElementById('AddressProvinceNew'); 16 | var provinceArray = JSON.parse(provinces); 17 | 18 | //console.log(provinceArray); 19 | if(provinceArray.length < 1) { 20 | provinceSelector.setAttribute('disabled','disabled'); 21 | } else { 22 | provinceSelector.removeAttribute('disabled'); 23 | } 24 | 25 | provinceSelector.innerHTML = ''; 26 | var options = ''; 27 | for(var i = 0; i < provinceArray.length; i++) { 28 | options += ''; 29 | } 30 | 31 | provinceSelector.innerHTML = options; 32 | }); 33 | } 34 | 35 | if(document.getElementById("forgotPassword") != null) { 36 | document.getElementById("forgotPassword").addEventListener("click", function(e) { 37 | console.log("I clicked"); 38 | const element = document.querySelector("#forgot_password_form"); 39 | if(element.classList.contains("d-none")) { 40 | element.classList.remove("d-none"); 41 | element.classList.add("d-block"); 42 | } 43 | }); 44 | } 45 | 46 | var localeItems = document.querySelectorAll("#localeItem"); 47 | if(localeItems.length > 0) { 48 | localeItems.forEach(item => { 49 | item.addEventListener("click", event => { 50 | document.getElementById("localeCode").value = item.getAttribute("lang"); 51 | document.getElementById("localization_form_tag").submit(); 52 | }); 53 | }); 54 | } 55 | 56 | var productInfoAnchors = document.querySelectorAll("#productInfoAnchor"); 57 | 58 | var productModal; 59 | 60 | if( document.getElementById('productInfoModal') != null ) { 61 | productModal = new bootstrap.Modal(document.getElementById('productInfoModal'), {}); 62 | } 63 | 64 | if(productInfoAnchors.length > 0) { 65 | productInfoAnchors.forEach(item => { 66 | item.addEventListener("click", event => { 67 | 68 | var url = '/products/' + item.getAttribute('product-handle') + '.js'; 69 | 70 | fetch(url) 71 | .then((resp) => resp.json()) 72 | .then(function(data) { 73 | console.log(data); 74 | 75 | document.getElementById("productInfoImg").src = data.images[0]; 76 | document.getElementById("productInfoTitle").innerHTML = data.title; 77 | document.getElementById("productInfoPrice").innerHTML = item.getAttribute('product-price'); 78 | document.getElementById("productInfoDescription").innerHTML = data.description; 79 | 80 | var variants = data.variants; 81 | var variantSelect = document.getElementById("modalItemID"); 82 | 83 | variantSelect.innerHTML = ''; 84 | 85 | variants.forEach(function( variant, index) { 86 | console.log(variant); 87 | 88 | variantSelect.options[variantSelect.options.length] = new Option(variant.option1, variant.id); 89 | }); 90 | 91 | productModal.show(); 92 | }); 93 | 94 | 95 | }); 96 | }); 97 | } 98 | 99 | var modalAddToCartForm = document.querySelector("#addToCartForm"); 100 | 101 | if( modalAddToCartForm != null ) { 102 | modalAddToCartForm.addEventListener("submit", function(e) { 103 | e.preventDefault(); 104 | 105 | let formData = { 106 | 'items': [ 107 | { 108 | 'id': document.getElementById("modalItemID").value, 109 | 'quantity': document.getElementById("modalItemQuantity").value 110 | } 111 | ] 112 | }; 113 | 114 | fetch('/cart/add.js', { 115 | method: 'POST', 116 | headers: { 117 | 'Content-Type': 'application/json' 118 | }, 119 | body: JSON.stringify(formData) 120 | }) 121 | .then((resp) => { 122 | return resp.json(); 123 | }) 124 | .then((data) => { 125 | update_cart(); 126 | }) 127 | .catch((err) => { 128 | console.error('Error: ' + err); 129 | }) 130 | }); 131 | } 132 | 133 | document.addEventListener('DOMContentLoaded', function() { 134 | update_cart(); 135 | }); 136 | 137 | function update_cart() { 138 | fetch('/cart.js') 139 | .then((resp) => resp.json()) 140 | .then((data) => document.getElementById("numberOfCartItems").innerHTML = data.items.length) 141 | .catch((err) => console.error(err)); 142 | } 143 | 144 | var predictiveSearchInput = document.getElementById('searchInputField'); 145 | var timer; 146 | 147 | var offcanvasSearch = document.getElementById('offcanvasSearchResult'); 148 | var bsOffcanvas = new bootstrap.Offcanvas(offcanvasSearch); 149 | 150 | if(predictiveSearchInput != null) { 151 | predictiveSearchInput.addEventListener('input', function(e) { 152 | 153 | clearTimeout(timer); 154 | 155 | if(predictiveSearchInput.value) { 156 | timer = setTimeout(fetchPredictiveSearch, 3000); 157 | } 158 | 159 | 160 | }); 161 | } 162 | 163 | function fetchPredictiveSearch() { 164 | fetch(`/search/suggest.json?q=${predictiveSearchInput.value}&resources[type]=product`) 165 | .then(resp => resp.json()) 166 | .then(data => { 167 | console.log(data); 168 | 169 | var products = data.resources.results.products; 170 | 171 | document.getElementById('search_results_body').innerHTML = ''; 172 | 173 | products.forEach(function(product, index) { 174 | document.getElementById('search_results_body').innerHTML += ` 175 |
176 | 177 |
178 |
${product.title}
179 |

$${product.price}

180 |
181 |
182 | ` 183 | }); 184 | bsOffcanvas.show(); 185 | }); 186 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /assets/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v5.0.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5 | */ 6 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}})),e.default=t,Object.freeze(e)}var s=e(t);const i={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const s=[];let i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(e)&&s.push(i),i=i.parentNode;return s},prev(t,e){let s=t.previousElementSibling;for(;s;){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;for(;s;){if(s.matches(e))return[s];s=s.nextElementSibling}return[]}},n=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},o=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s="#"+s.split("#")[1]),e=s&&"#"!==s?s.trim():null}return e},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),n=Number.parseFloat(s);return i||n?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0},c=t=>{t.dispatchEvent(new Event("transitionend"))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),d=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?i.findOne(t):null,u=(t,e)=>{let s=!1;const i=e+5;t.addEventListener("transitionend",(function e(){s=!0,t.removeEventListener("transitionend",e)})),setTimeout(()=>{s||c(t)},i)},g=(t,e,s)=>{Object.keys(s).forEach(i=>{const n=s[i],o=e[i],r=o&&h(o)?"element":null==(a=o)?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(n).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${n}".`)})},f=t=>{if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){const e=getComputedStyle(t),s=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==s.display&&"hidden"!==e.visibility}return!1},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),m=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?m(t.parentNode):null},_=()=>{},b=t=>t.offsetHeight,v=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},y=()=>"rtl"===document.documentElement.dir,w=t=>{var e;e=()=>{const e=v();if(e){const s=t.NAME,i=e.fn[s];e.fn[s]=t.jQueryInterface,e.fn[s].Constructor=t,e.fn[s].noConflict=()=>(e.fn[s]=i,t.jQueryInterface)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()},E=t=>{"function"==typeof t&&t()},T=new Map;var A={set(t,e,s){T.has(t)||T.set(t,new Map);const i=T.get(t);i.has(e)||0===i.size?i.set(e,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>T.has(t)&&T.get(t).get(e)||null,remove(t,e){if(!T.has(t))return;const s=T.get(t);s.delete(e),0===s.size&&T.delete(t)}};const k=/[^.]*(?=\..*)\.|.*/,L=/\..*/,C=/::\d+$/,D={};let N=1;const S={mouseenter:"mouseover",mouseleave:"mouseout"},O=/^(mouseenter|mouseleave)/i,I=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function x(t,e){return e&&`${e}::${N++}`||t.uidEvent||N++}function j(t){const e=x(t);return t.uidEvent=e,D[e]=D[e]||{},D[e]}function P(t,e,s=null){const i=Object.keys(t);for(let n=0,o=i.length;nfunction(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};i?i=t(i):s=t(s)}const[o,r,a]=M(e,s,i),l=j(t),c=l[a]||(l[a]={}),h=P(c,r,o?s:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=x(r,e.replace(k,"")),u=o?function(t,e,s){return function i(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return n.delegateTarget=r,i.oneOff&&$.off(t,n.type,e,s),s.apply(r,[n]);return null}}(t,s,i):function(t,e){return function s(i){return i.delegateTarget=t,s.oneOff&&$.off(t,i.type,e),e.apply(t,[i])}}(t,s);u.delegationSelector=o?s:null,u.originalHandler=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function R(t,e,s,i,n){const o=P(e[s],i,n);o&&(t.removeEventListener(s,o,Boolean(n)),delete e[s][o.uidEvent])}function B(t){return t=t.replace(L,""),S[t]||t}const $={on(t,e,s,i){H(t,e,s,i,!1)},one(t,e,s,i){H(t,e,s,i,!0)},off(t,e,s,i){if("string"!=typeof e||!t)return;const[n,o,r]=M(e,s,i),a=r!==e,l=j(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void R(t,l,r,o,n?s:null)}c&&Object.keys(l).forEach(s=>{!function(t,e,s,i){const n=e[s]||{};Object.keys(n).forEach(o=>{if(o.includes(i)){const i=n[o];R(t,e,s,i.originalHandler,i.delegationSelector)}})}(t,l,s,e.slice(1))});const h=l[r]||{};Object.keys(h).forEach(s=>{const i=s.replace(C,"");if(!a||e.includes(i)){const e=h[s];R(t,l,r,e.originalHandler,e.delegationSelector)}})},trigger(t,e,s){if("string"!=typeof e||!t)return null;const i=v(),n=B(e),o=e!==n,r=I.has(n);let a,l=!0,c=!0,h=!1,d=null;return o&&i&&(a=i.Event(e,s),i(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(n,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==s&&Object.keys(s).forEach(t=>{Object.defineProperty(d,t,{get:()=>s[t]})}),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}};class z{constructor(t){(t=d(t))&&(this._element=t,A.set(this._element,this.constructor.DATA_KEY,this))}dispose(){A.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,s=!0){if(!s)return void E(t);const i=l(e);$.one(e,"transitionend",()=>E(t)),u(e,i)}static getInstance(t){return A.get(t,this.DATA_KEY)}static get VERSION(){return"5.0.1"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return"bs."+this.NAME}static get EVENT_KEY(){return"."+this.DATA_KEY}}class U extends z{static get NAME(){return"alert"}close(t){const e=t?this._getRootElement(t):this._element,s=this._triggerCloseEvent(e);null===s||s.defaultPrevented||this._removeElement(e)}_getRootElement(t){return a(t)||t.closest(".alert")}_triggerCloseEvent(t){return $.trigger(t,"close.bs.alert")}_removeElement(t){t.classList.remove("show");const e=t.classList.contains("fade");this._queueCallback(()=>this._destroyElement(t),t,e)}_destroyElement(t){t.parentNode&&t.parentNode.removeChild(t),$.trigger(t,"closed.bs.alert")}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.alert");e||(e=new U(this)),"close"===t&&e[t](this)}))}static handleDismiss(t){return function(e){e&&e.preventDefault(),t.close(this)}}}$.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',U.handleDismiss(new U)),w(U);class q extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.button");e||(e=new q(this)),"toggle"===t&&e[t]()}))}}function F(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function W(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}$.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',t=>{t.preventDefault();const e=t.target.closest('[data-bs-toggle="button"]');let s=A.get(e,"bs.button");s||(s=new q(e)),s.toggle()}),w(q);const K={setDataAttribute(t,e,s){t.setAttribute("data-bs-"+W(e),s)},removeDataAttribute(t,e){t.removeAttribute("data-bs-"+W(e))},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(s=>{let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=F(t.dataset[s])}),e},getDataAttribute:(t,e)=>F(t.getAttribute("data-bs-"+W(e))),offset(t){const e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},V={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Q={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},X="next",Y="prev",G="left",Z="right";class J extends z{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=i.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return V}static get NAME(){return"carousel"}next(){this._isSliding||this._slide(X)}nextWhenVisible(){!document.hidden&&f(this._element)&&this.next()}prev(){this._isSliding||this._slide(Y)}pause(t){t||(this._isPaused=!0),i.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=i.findOne(".active.carousel-item",this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void $.one(this._element,"slid.bs.carousel",()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const s=t>e?X:Y;this._slide(s,this._items[t])}_getConfig(t){return t={...V,...t},g("carousel",t,Q),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?Z:G)}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",t=>this._keydown(t)),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",t=>this.pause(t)),$.on(this._element,"mouseleave.bs.carousel",t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType?this._pointerEvent||(this.touchStartX=t.touches[0].clientX):this.touchStartX=t.clientX},e=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},s=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.touchDeltaX=t.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),500+this._config.interval))};i.find(".carousel-item img",this._element).forEach(t=>{$.on(t,"dragstart.bs.carousel",t=>t.preventDefault())}),this._pointerEvent?($.on(this._element,"pointerdown.bs.carousel",e=>t(e)),$.on(this._element,"pointerup.bs.carousel",t=>s(t)),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.carousel",e=>t(e)),$.on(this._element,"touchmove.bs.carousel",t=>e(t)),$.on(this._element,"touchend.bs.carousel",t=>s(t)))}_keydown(t){/input|textarea/i.test(t.target.tagName)||("ArrowLeft"===t.key?(t.preventDefault(),this._slide(Z)):"ArrowRight"===t.key&&(t.preventDefault(),this._slide(G)))}_getItemIndex(t){return this._items=t&&t.parentNode?i.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const s=t===X,i=t===Y,n=this._getItemIndex(e),o=this._items.length-1;if((i&&0===n||s&&n===o)&&!this._config.wrap)return e;const r=(n+(i?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]}_triggerSlideEvent(t,e){const s=this._getItemIndex(t),n=this._getItemIndex(i.findOne(".active.carousel-item",this._element));return $.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:n,to:s})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=i.findOne(".active",this._indicatorsElement);e.classList.remove("active"),e.removeAttribute("aria-current");const s=i.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e{$.trigger(this._element,"slid.bs.carousel",{relatedTarget:r,direction:u,from:o,to:a})};if(this._element.classList.contains("slide")){r.classList.add(d),b(r),n.classList.add(h),r.classList.add(h);const t=()=>{r.classList.remove(h,d),r.classList.add("active"),n.classList.remove("active",d,h),this._isSliding=!1,setTimeout(g,0)};this._queueCallback(t,n,!0)}else n.classList.remove("active"),r.classList.add("active"),this._isSliding=!1,g();l&&this.cycle()}_directionToOrder(t){return[Z,G].includes(t)?y()?t===G?Y:X:t===G?X:Y:t}_orderToDirection(t){return[X,Y].includes(t)?y()?t===Y?G:Z:t===Y?Z:G:t}static carouselInterface(t,e){let s=A.get(t,"bs.carousel"),i={...V,...K.getDataAttributes(t)};"object"==typeof e&&(i={...i,...e});const n="string"==typeof e?e:i.slide;if(s||(s=new J(t,i)),"number"==typeof e)s.to(e);else if("string"==typeof n){if(void 0===s[n])throw new TypeError(`No method named "${n}"`);s[n]()}else i.interval&&i.ride&&(s.pause(),s.cycle())}static jQueryInterface(t){return this.each((function(){J.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=a(this);if(!e||!e.classList.contains("carousel"))return;const s={...K.getDataAttributes(e),...K.getDataAttributes(this)},i=this.getAttribute("data-bs-slide-to");i&&(s.interval=!1),J.carouselInterface(e,s),i&&A.get(e,"bs.carousel").to(i),t.preventDefault()}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",J.dataApiClickHandler),$.on(window,"load.bs.carousel.data-api",()=>{const t=i.find('[data-bs-ride="carousel"]');for(let e=0,s=t.length;et===this._element);null!==n&&o.length&&(this._selector=n,this._triggerArray.push(e))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get Default(){return tt}static get NAME(){return"collapse"}toggle(){this._element.classList.contains("show")?this.hide():this.show()}show(){if(this._isTransitioning||this._element.classList.contains("show"))return;let t,e;this._parent&&(t=i.find(".show, .collapsing",this._parent).filter(t=>"string"==typeof this._config.parent?t.getAttribute("data-bs-parent")===this._config.parent:t.classList.contains("collapse")),0===t.length&&(t=null));const s=i.findOne(this._selector);if(t){const i=t.find(t=>s!==t);if(e=i?A.get(i,"bs.collapse"):null,e&&e._isTransitioning)return}if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;t&&t.forEach(t=>{s!==t&&st.collapseInterface(t,"hide"),e||A.set(t,"bs.collapse",null)});const n=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[n]=0,this._triggerArray.length&&this._triggerArray.forEach(t=>{t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)}),this.setTransitioning(!0);const o="scroll"+(n[0].toUpperCase()+n.slice(1));this._queueCallback(()=>{this._element.classList.remove("collapsing"),this._element.classList.add("collapse","show"),this._element.style[n]="",this.setTransitioning(!1),$.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[n]=this._element[o]+"px"}hide(){if(this._isTransitioning||!this._element.classList.contains("show"))return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=this._element.getBoundingClientRect()[t]+"px",b(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");const e=this._triggerArray.length;if(e>0)for(let t=0;t{this.setTransitioning(!1),this._element.classList.remove("collapsing"),this._element.classList.add("collapse"),$.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}setTransitioning(t){this._isTransitioning=t}_getConfig(t){return(t={...tt,...t}).toggle=Boolean(t.toggle),g("collapse",t,et),t}_getDimension(){return this._element.classList.contains("width")?"width":"height"}_getParent(){let{parent:t}=this._config;t=d(t);const e=`[data-bs-toggle="collapse"][data-bs-parent="${t}"]`;return i.find(e,t).forEach(t=>{const e=a(t);this._addAriaAndCollapsedClass(e,[t])}),t}_addAriaAndCollapsedClass(t,e){if(!t||!e.length)return;const s=t.classList.contains("show");e.forEach(t=>{s?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",s)})}static collapseInterface(t,e){let s=A.get(t,"bs.collapse");const i={...tt,...K.getDataAttributes(t),..."object"==typeof e&&e?e:{}};if(!s&&i.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(i.toggle=!1),s||(s=new st(t,i)),"string"==typeof e){if(void 0===s[e])throw new TypeError(`No method named "${e}"`);s[e]()}}static jQueryInterface(t){return this.each((function(){st.collapseInterface(this,t)}))}}$.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=K.getDataAttributes(this),s=r(this);i.find(s).forEach(t=>{const s=A.get(t,"bs.collapse");let i;s?(null===s._parent&&"string"==typeof e.parent&&(s._config.parent=e.parent,s._parent=s._getParent()),i="toggle"):i=e,st.collapseInterface(t,i)})})),w(st);const it=new RegExp("ArrowUp|ArrowDown|Escape"),nt=y()?"top-end":"top-start",ot=y()?"top-start":"top-end",rt=y()?"bottom-end":"bottom-start",at=y()?"bottom-start":"bottom-end",lt=y()?"left-start":"right-start",ct=y()?"right-start":"left-start",ht={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},dt={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class ut extends z{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get Default(){return ht}static get DefaultType(){return dt}static get NAME(){return"dropdown"}toggle(){p(this._element)||(this._element.classList.contains("show")?this.hide():this.show())}show(){if(p(this._element)||this._menu.classList.contains("show"))return;const t=ut.getParentFromElement(this._element),e={relatedTarget:this._element};if(!$.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._inNavbar)K.setDataAttribute(this._menu,"popper","none");else{if(void 0===s)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:h(this._config.reference)?e=d(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find(t=>"applyStyles"===t.name&&!1===t.enabled);this._popper=s.createPopper(e,this._menu,i),n&&K.setDataAttribute(this._menu,"popper","static")}"ontouchstart"in document.documentElement&&!t.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(t=>$.on(t,"mouseover",_)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),$.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(p(this._element)||!this._menu.classList.contains("show"))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_addEventListeners(){$.on(this._element,"click.bs.dropdown",t=>{t.preventDefault(),this.toggle()})}_completeHide(t){$.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>$.off(t,"mouseover",_)),this._popper&&this._popper.destroy(),this._menu.classList.remove("show"),this._element.classList.remove("show"),this._element.setAttribute("aria-expanded","false"),K.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...K.getDataAttributes(this._element),...t},g("dropdown",t,this.constructor.DefaultType),"object"==typeof t.reference&&!h(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError("dropdown".toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t}_getMenuElement(){return i.next(this._element,".dropdown-menu")[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return lt;if(t.classList.contains("dropstart"))return ct;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ot:nt:e?at:rt}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem(t){const e=i.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(f);if(!e.length)return;let s=e.indexOf(t.target);"ArrowUp"===t.key&&s>0&&s--,"ArrowDown"===t.key&&sthis.matches('[data-bs-toggle="dropdown"]')?this:i.prev(this,'[data-bs-toggle="dropdown"]')[0];if("Escape"===t.key)return s().focus(),void ut.clearMenus();e||"ArrowUp"!==t.key&&"ArrowDown"!==t.key?e&&"Space"!==t.key?ut.getInstance(s())._selectMenuItem(t):ut.clearMenus():s().click()}}$.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',ut.dataApiKeydownHandler),$.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",ut.dataApiKeydownHandler),$.on(document,"click.bs.dropdown.data-api",ut.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",ut.clearMenus),$.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),ut.dropdownInterface(this)})),w(ut);const gt=()=>{const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)},ft=(t=gt())=>{pt(),mt("body","paddingRight",e=>e+t),mt(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight",e=>e+t),mt(".sticky-top","marginRight",e=>e-t)},pt=()=>{const t=document.body.style.overflow;t&&K.setDataAttribute(document.body,"overflow",t),document.body.style.overflow="hidden"},mt=(t,e,s)=>{const n=gt();i.find(t).forEach(t=>{if(t!==document.body&&window.innerWidth>t.clientWidth+n)return;const i=t.style[e],o=window.getComputedStyle(t)[e];K.setDataAttribute(t,e,i),t.style[e]=s(Number.parseFloat(o))+"px"})},_t=()=>{bt("body","overflow"),bt("body","paddingRight"),bt(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),bt(".sticky-top","marginRight")},bt=(t,e)=>{i.find(t).forEach(t=>{const s=K.getDataAttribute(t,e);void 0===s?t.style.removeProperty(e):(K.removeDataAttribute(t,e),t.style[e]=s)})},vt={isVisible:!0,isAnimated:!1,rootElement:document.body,clickCallback:null},yt={isVisible:"boolean",isAnimated:"boolean",rootElement:"element",clickCallback:"(function|null)"};class wt{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&b(this._getElement()),this._getElement().classList.add("show"),this._emulateAnimation(()=>{E(t)})):E(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),E(t)})):E(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className="modal-backdrop",this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...vt,..."object"==typeof t?t:{}}).rootElement=t.rootElement||document.body,g("backdrop",t,yt),t}_append(){this._isAppended||(this._config.rootElement.appendChild(this._getElement()),$.on(this._getElement(),"mousedown.bs.backdrop",()=>{E(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&($.off(this._element,"mousedown.bs.backdrop"),this._getElement().parentNode.removeChild(this._element),this._isAppended=!1)}_emulateAnimation(t){if(!this._config.isAnimated)return void E(t);const e=l(this._getElement());$.one(this._getElement(),"transitionend",()=>E(t)),u(this._getElement(),e)}}const Et={backdrop:!0,keyboard:!0,focus:!0},Tt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"};class At extends z{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=i.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1}static get Default(){return Et}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;this._isAnimated()&&(this._isTransitioning=!0);const e=$.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||e.defaultPrevented||(this._isShown=!0,ft(),document.body.classList.add("modal-open"),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),$.on(this._element,"click.dismiss.bs.modal",'[data-bs-dismiss="modal"]',t=>this.hide(t)),$.on(this._dialog,"mousedown.dismiss.bs.modal",()=>{$.one(this._element,"mouseup.dismiss.bs.modal",t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(t){if(t&&t.preventDefault(),!this._isShown||this._isTransitioning)return;if($.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),$.off(this._element,"click.dismiss.bs.modal"),$.off(this._dialog,"mousedown.dismiss.bs.modal"),this._queueCallback(()=>this._hideModal(),this._element,e)}dispose(){[window,this._dialog].forEach(t=>$.off(t,".bs.modal")),this._backdrop.dispose(),super.dispose(),$.off(document,"focusin.bs.modal")}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new wt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_getConfig(t){return t={...Et,...K.getDataAttributes(this._element),...t},g("modal",t,Tt),t}_showElement(t){const e=this._isAnimated(),s=i.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,s&&(s.scrollTop=0),e&&b(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus(),this._queueCallback(()=>{this._config.focus&&this._element.focus(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:t})},this._dialog,e)}_enforceFocus(){$.off(document,"focusin.bs.modal"),$.on(document,"focusin.bs.modal",t=>{document===t.target||this._element===t.target||this._element.contains(t.target)||this._element.focus()})}_setEscapeEvent(){this._isShown?$.on(this._element,"keydown.dismiss.bs.modal",t=>{this._config.keyboard&&"Escape"===t.key?(t.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==t.key||this._triggerBackdropTransition()}):$.off(this._element,"keydown.dismiss.bs.modal")}_setResizeEvent(){this._isShown?$.on(window,"resize.bs.modal",()=>this._adjustDialog()):$.off(window,"resize.bs.modal")}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove("modal-open"),this._resetAdjustments(),_t(),$.trigger(this._element,"hidden.bs.modal")})}_showBackdrop(t){$.on(this._element,"click.dismiss.bs.modal",t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight;t||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");const e=l(this._dialog);$.off(this._element,"transitionend"),$.one(this._element,"transitionend",()=>{this._element.classList.remove("modal-static"),t||($.one(this._element,"transitionend",()=>{this._element.style.overflowY=""}),u(this._element,e))}),u(this._element,e),this._element.focus()}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=gt(),s=e>0;(!s&&t&&!y()||s&&!t&&y())&&(this._element.style.paddingLeft=e+"px"),(s&&!t&&!y()||!s&&t&&y())&&(this._element.style.paddingRight=e+"px")}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const s=At.getInstance(this)||new At(this,"object"==typeof t?t:{});if("string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](e)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,"show.bs.modal",t=>{t.defaultPrevented||$.one(e,"hidden.bs.modal",()=>{f(this)&&this.focus()})}),(At.getInstance(e)||new At(e)).toggle(this)})),w(At);const kt={backdrop:!0,keyboard:!0,scroll:!1},Lt={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"};class Ct extends z{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get NAME(){return"offcanvas"}static get Default(){return kt}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||$.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(ft(),this._enforceFocusOnElement(this._element)),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||($.off(document,"focusin.bs.offcanvas"),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||_t(),$.trigger(this._element,"hidden.bs.offcanvas")},this._element,!0)))}dispose(){this._backdrop.dispose(),super.dispose(),$.off(document,"focusin.bs.offcanvas")}_getConfig(t){return t={...kt,...K.getDataAttributes(this._element),..."object"==typeof t?t:{}},g("offcanvas",t,Lt),t}_initializeBackDrop(){return new wt({isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_enforceFocusOnElement(t){$.off(document,"focusin.bs.offcanvas"),$.on(document,"focusin.bs.offcanvas",e=>{document===e.target||t===e.target||t.contains(e.target)||t.focus()}),t.focus()}_addEventListeners(){$.on(this._element,"click.dismiss.bs.offcanvas",'[data-bs-dismiss="offcanvas"]',()=>this.hide()),$.on(this._element,"keydown.dismiss.bs.offcanvas",t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()})}static jQueryInterface(t){return this.each((function(){const e=A.get(this,"bs.offcanvas")||new Ct(this,"object"==typeof t?t:{});if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;$.one(e,"hidden.bs.offcanvas",()=>{f(this)&&this.focus()});const s=i.findOne(".offcanvas.show");s&&s!==e&&Ct.getInstance(s).hide(),(A.get(e,"bs.offcanvas")||new Ct(e)).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",()=>{i.find(".offcanvas.show").forEach(t=>(A.get(t,"bs.offcanvas")||new Ct(t)).show())}),w(Ct);const Dt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Nt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,St=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ot=(t,e)=>{const s=t.nodeName.toLowerCase();if(e.includes(s))return!Dt.has(s)||Boolean(Nt.test(t.nodeValue)||St.test(t.nodeValue));const i=e.filter(t=>t instanceof RegExp);for(let t=0,e=i.length;t{Ot(t,a)||s.removeAttribute(t.nodeName)})}return i.body.innerHTML}const xt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),jt=new Set(["sanitize","allowList","sanitizeFn"]),Pt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Mt={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},Ht={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Rt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"};class Bt extends z{constructor(t,e){if(void 0===s)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Ht}static get NAME(){return"tooltip"}static get Event(){return Rt}static get DefaultType(){return Pt}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode&&this.tip.parentNode.removeChild(this.tip),this._popper&&this._popper.destroy(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=$.trigger(this._element,this.constructor.Event.SHOW),e=m(this._element),i=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!i)return;const o=this.getTipElement(),r=n(this.constructor.NAME);o.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this.setContent(),this._config.animation&&o.classList.add("fade");const a="function"==typeof this._config.placement?this._config.placement.call(this,o,this._element):this._config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);const{container:c}=this._config;A.set(o,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(c.appendChild(o),$.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=s.createPopper(this._element,o,this._getPopperConfig(l)),o.classList.add("show");const h="function"==typeof this._config.customClass?this._config.customClass():this._config.customClass;h&&o.classList.add(...h.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>{$.on(t,"mouseover",_)});const d=this.tip.classList.contains("fade");this._queueCallback(()=>{const t=this._hoverState;this._hoverState=null,$.trigger(this._element,this.constructor.Event.SHOWN),"out"===t&&this._leave(null,this)},this.tip,d)}hide(){if(!this._popper)return;const t=this.getTipElement();if($.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove("show"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>$.off(t,"mouseover",_)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains("fade");this._queueCallback(()=>{this._isWithActiveTrigger()||("show"!==this._hoverState&&t.parentNode&&t.parentNode.removeChild(t),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))},this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");return t.innerHTML=this._config.template,this.tip=t.children[0],this.tip}setContent(){const t=this.getTipElement();this.setElementContent(i.findOne(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")}setElementContent(t,e){if(null!==t)return h(e)?(e=d(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=It(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){let t=this._element.getAttribute("data-bs-original-title");return t||(t="function"==typeof this._config.title?this._config.title.call(this._element):this._config.title),t}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){const s=this.constructor.DATA_KEY;return(e=e||A.get(t.delegateTarget,s))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),A.set(t.delegateTarget,s,e)),e}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add("bs-tooltip-"+this.updateAttachment(t))}_getAttachment(t){return Mt[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(t=>{if("click"===t)$.on(this._element,this.constructor.Event.CLICK,this._config.selector,t=>this.toggle(t));else if("manual"!==t){const e="hover"===t?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,s="hover"===t?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;$.on(this._element,e,this._config.selector,t=>this._enter(t)),$.on(this._element,s,this._config.selector,t=>this._leave(t))}}),this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e._config.delay&&e._config.delay.show?e._timeout=setTimeout(()=>{"show"===e._hoverState&&e.show()},e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e._config.delay&&e._config.delay.hide?e._timeout=setTimeout(()=>{"out"===e._hoverState&&e.hide()},e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=K.getDataAttributes(this._element);return Object.keys(e).forEach(t=>{jt.has(t)&&delete e[t]}),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:d(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),g("tooltip",t,this.constructor.DefaultType),t.sanitize&&(t.template=It(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};if(this._config)for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=t.getAttribute("class").match(xt);null!==e&&e.length>0&&e.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.tooltip");const s="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new Bt(this,s)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(Bt);const $t=new RegExp("(^|\\s)bs-popover\\S+","g"),zt={...Bt.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},Ut={...Bt.DefaultType,content:"(string|element|function)"},qt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Ft extends Bt{static get Default(){return zt}static get NAME(){return"popover"}static get Event(){return qt}static get DefaultType(){return Ut}isWithContent(){return this.getTitle()||this._getContent()}setContent(){const t=this.getTipElement();this.setElementContent(i.findOne(".popover-header",t),this.getTitle());let e=this._getContent();"function"==typeof e&&(e=e.call(this._element)),this.setElementContent(i.findOne(".popover-body",t),e),t.classList.remove("fade","show")}_addAttachmentClass(t){this.getTipElement().classList.add("bs-popover-"+this.updateAttachment(t))}_getContent(){return this._element.getAttribute("data-bs-content")||this._config.content}_cleanTipClass(){const t=this.getTipElement(),e=t.getAttribute("class").match($t);null!==e&&e.length>0&&e.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.popover");const s="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new Ft(this,s),A.set(this,"bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(Ft);const Wt={offset:10,method:"auto",target:""},Kt={offset:"number",method:"string",target:"(string|element)"};class Vt extends z{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._selector=`${this._config.target} .nav-link, ${this._config.target} .list-group-item, ${this._config.target} .dropdown-item`,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,$.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return Wt}static get NAME(){return"scrollspy"}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":"position",e="auto"===this._config.method?t:this._config.method,s="position"===e?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),i.find(this._selector).map(t=>{const n=r(t),o=n?i.findOne(n):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[K[e](o).top+s,n]}return null}).filter(t=>t).sort((t,e)=>t[0]-e[0]).forEach(t=>{this._offsets.push(t[0]),this._targets.push(t[1])})}dispose(){$.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){if("string"!=typeof(t={...Wt,...K.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target&&h(t.target)){let{id:e}=t.target;e||(e=n("scrollspy"),t.target.id=e),t.target="#"+e}return g("scrollspy",t,Kt),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),s=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=s){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t`${e}[data-bs-target="${t}"],${e}[href="${t}"]`),s=i.findOne(e.join(","));s.classList.contains("dropdown-item")?(i.findOne(".dropdown-toggle",s.closest(".dropdown")).classList.add("active"),s.classList.add("active")):(s.classList.add("active"),i.parents(s,".nav, .list-group").forEach(t=>{i.prev(t,".nav-link, .list-group-item").forEach(t=>t.classList.add("active")),i.prev(t,".nav-item").forEach(t=>{i.children(t,".nav-link").forEach(t=>t.classList.add("active"))})})),$.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){i.find(this._selector).filter(t=>t.classList.contains("active")).forEach(t=>t.classList.remove("active"))}static jQueryInterface(t){return this.each((function(){const e=Vt.getInstance(this)||new Vt(this,"object"==typeof t?t:{});if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(window,"load.bs.scrollspy.data-api",()=>{i.find('[data-bs-spy="scroll"]').forEach(t=>new Vt(t))}),w(Vt);class Qt extends z{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active"))return;let t;const e=a(this._element),s=this._element.closest(".nav, .list-group");if(s){const e="UL"===s.nodeName||"OL"===s.nodeName?":scope > li > .active":".active";t=i.find(e,s),t=t[t.length-1]}const n=t?$.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if($.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==n&&n.defaultPrevented)return;this._activate(this._element,s);const o=()=>{$.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),$.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,s){const n=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.children(e,".active"):i.find(":scope > li > .active",e))[0],o=s&&n&&n.classList.contains("fade"),r=()=>this._transitionComplete(t,n,s);n&&o?(n.classList.remove("show"),this._queueCallback(r,t,!0)):r()}_transitionComplete(t,e,s){if(e){e.classList.remove("active");const t=i.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),b(t),t.classList.contains("fade")&&t.classList.add("show");let n=t.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&i.find(".dropdown-toggle",e).forEach(t=>t.classList.add("active")),t.setAttribute("aria-expanded",!0)}s&&s()}static jQueryInterface(t){return this.each((function(){const e=A.get(this,"bs.tab")||new Qt(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||(A.get(this,"bs.tab")||new Qt(this)).show()})),w(Qt);const Xt={animation:"boolean",autohide:"boolean",delay:"number"},Yt={animation:!0,autohide:!0,delay:5e3};class Gt extends z{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return Xt}static get Default(){return Yt}static get NAME(){return"toast"}show(){$.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),b(this._element),this._element.classList.add("showing"),this._queueCallback(()=>{this._element.classList.remove("showing"),this._element.classList.add("show"),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains("show")&&($.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.remove("show"),this._queueCallback(()=>{this._element.classList.add("hide"),$.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),super.dispose()}_getConfig(t){return t={...Yt,...K.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},g("toast",t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',()=>this.hide()),$.on(this._element,"mouseover.bs.toast",t=>this._onInteraction(t,!0)),$.on(this._element,"mouseout.bs.toast",t=>this._onInteraction(t,!1)),$.on(this._element,"focusin.bs.toast",t=>this._onInteraction(t,!0)),$.on(this._element,"focusout.bs.toast",t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){let e=A.get(this,"bs.toast");if(e||(e=new Gt(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return w(Gt),{Alert:U,Button:q,Carousel:J,Collapse:st,Dropdown:ut,Modal:At,Offcanvas:Ct,Popover:Ft,ScrollSpy:Vt,Tab:Qt,Toast:Gt,Tooltip:Bt}})); 7 | //# sourceMappingURL=bootstrap.min.js.map --------------------------------------------------------------------------------