diff --git a/cao_sunyata/models/entries.py b/cao_sunyata/models/entries.py index 7558c45..f92786d 100644 --- a/cao_sunyata/models/entries.py +++ b/cao_sunyata/models/entries.py @@ -39,6 +39,15 @@ def get_entries_by_id(request, _id): results = request.dbsession.execute(query, {'id':_id}).first() return results +def get_entries_count_by_topic(request): + query = """SELECT topics.topic_name, tags.tag_name, count(entries.id) as count, strftime('%d/%m/%Y', created) AS create_date + FROM entries + INNER JOIN topics ON entries.topic_id = topics.topic + INNER JOIN tags ON entries.tag = tags.tag + GROUP BY entries.tag ORDER BY entries.topic_id, entries.tag;""" + results = request.dbsession.execute(query,).fetchall() + return results + def get_last_created(request): # gest the 10 last created posts query = "SELECT strftime('%d/%m/%Y', created) AS create_date, id, title, author, status FROM entries WHERE topic_id <> '_admin'" @@ -52,7 +61,7 @@ def get_last_created(request): def get_last_edited(request): # gest the last edited posts - query = "SELECT strftime('%d/%m/%Y', edited) AS edit_date, title, author, status FROM entries WHERE topic_id <> '_admin'" + query = "SELECT strftime('%d/%m/%Y', edited) AS edit_date, id, title, author, status FROM entries WHERE topic_id <> '_admin'" if request.authenticated_userid == None: # if user is anonym, display only published posts query = query + " AND status='publié'" @@ -111,7 +120,7 @@ def update_entry(request, blog_id, new_values): else: s = "%s=:%s" % (param, param) - import pdb;pdb.set_trace() + # import pdb;pdb.set_trace() if blog_id == '0': query = """INSERT INTO entries (title, body, created, edited, topic_id, tag, author, status, creator, editor) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{8}')""".format( diff --git a/cao_sunyata/routes.py b/cao_sunyata/routes.py index 198848e..0d086aa 100644 --- a/cao_sunyata/routes.py +++ b/cao_sunyata/routes.py @@ -5,11 +5,13 @@ def includeme(config): config.add_route('blog_copy', '/blog_copy/{topic}/{id}') config.add_route('blog_edit', '/blog_edit/{topic}/{id}') config.add_route('blog_search', '/blog_search') + config.add_route('contact', '/contact') config.add_route('images', '/images') config.add_route('image_edit', '/image_edit/{filename}') config.add_route('login', '/login') config.add_route('logout', '/logout') config.add_route('settings', '/settings') + config.add_route('stats_pages', '/stats_pages') config.add_route('tag_edit', '/tag_edit/{topic}/{id}') config.add_route('topic', '/topic/{topic}') config.add_route('topic_edit', '/topic_edit/{topic}') diff --git a/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.eot b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.eot new file mode 100644 index 0000000..ed55371 Binary files /dev/null and b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.eot differ diff --git a/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.svg b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.svg new file mode 100644 index 0000000..2c3262e --- /dev/null +++ b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.svg @@ -0,0 +1,9012 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.ttf b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.ttf new file mode 100644 index 0000000..6cebc05 Binary files /dev/null and b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.ttf differ diff --git a/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.woff b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.woff new file mode 100644 index 0000000..fea18a0 Binary files /dev/null and b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.woff differ diff --git a/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.woff2 b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.woff2 new file mode 100644 index 0000000..1a24ee3 Binary files /dev/null and b/cao_sunyata/static/css/icons/tabler-icons/fonts/tabler-icons.woff2 differ diff --git a/cao_sunyata/static/css/icons/tabler-icons/tabler-icons.css b/cao_sunyata/static/css/icons/tabler-icons/tabler-icons.css new file mode 100644 index 0000000..6f2379e --- /dev/null +++ b/cao_sunyata/static/css/icons/tabler-icons/tabler-icons.css @@ -0,0 +1,12031 @@ +/*! + * Tabler Icons 1.112.0 by tabler - https://tabler.io + * License - https://github.com/tabler/tabler-icons/blob/master/LICENSE + */ +@font-face { + font-family: "tabler-icons"; + font-style: normal; + font-weight: 400; + src: url("fonts/tabler-icons.eot"); + src: url("fonts/tabler-icons.eot?#iefix") format("embedded-opentype"), url("fonts/tabler-icons.woff2") format("woff2"), url("fonts/tabler-icons.woff") format("woff"), url("fonts/tabler-icons.ttf") format("truetype"), url("fonts/tabler-icons.svg#tabler-icons") format("svg"); +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + @font-face { + font-family: "tabler-icons"; + src: url("fonts/tabler-icons.svg#tabler-icons") format("svg"); + } +} + +.ti { + font-family: "tabler-icons" !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + /* Better Font Rendering */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.ti-123:before { + content: "\f554"; +} + +.ti-2fa:before { + content: "\eca0"; +} + +.ti-360-view:before { + content: "\f566"; +} + +.ti-3d-cube-sphere:before { + content: "\ecd7"; +} + +.ti-3d-cube-sphere-off:before { + content: "\f3b5"; +} + +.ti-3d-rotate:before { + content: "\f020"; +} + +.ti-a-b:before { + content: "\ec36"; +} + +.ti-a-b-2:before { + content: "\f25f"; +} + +.ti-a-b-off:before { + content: "\f0a6"; +} + +.ti-abacus:before { + content: "\f05c"; +} + +.ti-abacus-off:before { + content: "\f3b6"; +} + +.ti-abc:before { + content: "\f567"; +} + +.ti-access-point:before { + content: "\ed1b"; +} + +.ti-access-point-off:before { + content: "\ed1a"; +} + +.ti-accessible:before { + content: "\eba9"; +} + +.ti-accessible-off:before { + content: "\f0a7"; +} + +.ti-activity:before { + content: "\ed23"; +} + +.ti-activity-heartbeat:before { + content: "\f0db"; +} + +.ti-ad:before { + content: "\ea02"; +} + +.ti-ad-2:before { + content: "\ef1f"; +} + +.ti-ad-off:before { + content: "\f3b7"; +} + +.ti-address-book:before { + content: "\f021"; +} + +.ti-address-book-off:before { + content: "\f3b8"; +} + +.ti-adjustments:before { + content: "\ea03"; +} + +.ti-adjustments-alt:before { + content: "\ec37"; +} + +.ti-adjustments-horizontal:before { + content: "\ec38"; +} + +.ti-adjustments-off:before { + content: "\f0a8"; +} + +.ti-aerial-lift:before { + content: "\edfe"; +} + +.ti-affiliate:before { + content: "\edff"; +} + +.ti-air-balloon:before { + content: "\f4a6"; +} + +.ti-air-conditioning:before { + content: "\f3a2"; +} + +.ti-air-conditioning-disabled:before { + content: "\f542"; +} + +.ti-alarm:before { + content: "\ea04"; +} + +.ti-alarm-off:before { + content: "\f0a9"; +} + +.ti-album:before { + content: "\f022"; +} + +.ti-album-off:before { + content: "\f3b9"; +} + +.ti-alert-circle:before { + content: "\ea05"; +} + +.ti-alert-octagon:before { + content: "\ecc6"; +} + +.ti-alert-triangle:before { + content: "\ea06"; +} + +.ti-alien:before { + content: "\ebde"; +} + +.ti-align-box-bottom-center:before { + content: "\f530"; +} + +.ti-align-box-bottom-left:before { + content: "\f531"; +} + +.ti-align-box-bottom-right:before { + content: "\f532"; +} + +.ti-align-box-left-bottom:before { + content: "\f533"; +} + +.ti-align-box-left-middle:before { + content: "\f534"; +} + +.ti-align-box-left-top:before { + content: "\f535"; +} + +.ti-align-box-right-bottom:before { + content: "\f536"; +} + +.ti-align-box-right-middle:before { + content: "\f537"; +} + +.ti-align-box-right-top:before { + content: "\f538"; +} + +.ti-align-box-top-center:before { + content: "\f539"; +} + +.ti-align-box-top-left:before { + content: "\f53a"; +} + +.ti-align-box-top-right:before { + content: "\f53b"; +} + +.ti-align-center:before { + content: "\ea07"; +} + +.ti-align-justified:before { + content: "\ea08"; +} + +.ti-align-left:before { + content: "\ea09"; +} + +.ti-align-right:before { + content: "\ea0a"; +} + +.ti-alpha:before { + content: "\f543"; +} + +.ti-alphabet-cyrillic:before { + content: "\f1df"; +} + +.ti-alphabet-greek:before { + content: "\f1e0"; +} + +.ti-alphabet-latin:before { + content: "\f1e1"; +} + +.ti-ambulance:before { + content: "\ebf5"; +} + +.ti-ampersand:before { + content: "\f229"; +} + +.ti-analyze:before { + content: "\f3a3"; +} + +.ti-analyze-off:before { + content: "\f3ba"; +} + +.ti-anchor:before { + content: "\eb76"; +} + +.ti-anchor-off:before { + content: "\f0f7"; +} + +.ti-angle:before { + content: "\ef20"; +} + +.ti-ankh:before { + content: "\f1cd"; +} + +.ti-antenna:before { + content: "\f094"; +} + +.ti-antenna-bars-1:before { + content: "\ecc7"; +} + +.ti-antenna-bars-2:before { + content: "\ecc8"; +} + +.ti-antenna-bars-3:before { + content: "\ecc9"; +} + +.ti-antenna-bars-4:before { + content: "\ecca"; +} + +.ti-antenna-bars-5:before { + content: "\eccb"; +} + +.ti-antenna-bars-off:before { + content: "\f0aa"; +} + +.ti-antenna-off:before { + content: "\f3bb"; +} + +.ti-aperture:before { + content: "\eb58"; +} + +.ti-aperture-off:before { + content: "\f3bc"; +} + +.ti-api:before { + content: "\effd"; +} + +.ti-api-app:before { + content: "\effc"; +} + +.ti-api-app-off:before { + content: "\f0ab"; +} + +.ti-api-off:before { + content: "\f0f8"; +} + +.ti-app-window:before { + content: "\efe6"; +} + +.ti-apple:before { + content: "\ef21"; +} + +.ti-apps:before { + content: "\ebb6"; +} + +.ti-apps-off:before { + content: "\f0ac"; +} + +.ti-archive:before { + content: "\ea0b"; +} + +.ti-archive-off:before { + content: "\f0ad"; +} + +.ti-armchair:before { + content: "\ef9e"; +} + +.ti-armchair-2:before { + content: "\efe7"; +} + +.ti-armchair-2-off:before { + content: "\f3bd"; +} + +.ti-armchair-off:before { + content: "\f3be"; +} + +.ti-arrow-autofit-content:before { + content: "\ef31"; +} + +.ti-arrow-autofit-down:before { + content: "\ef32"; +} + +.ti-arrow-autofit-height:before { + content: "\ef33"; +} + +.ti-arrow-autofit-left:before { + content: "\ef34"; +} + +.ti-arrow-autofit-right:before { + content: "\ef35"; +} + +.ti-arrow-autofit-up:before { + content: "\ef36"; +} + +.ti-arrow-autofit-width:before { + content: "\ef37"; +} + +.ti-arrow-back:before { + content: "\ea0c"; +} + +.ti-arrow-back-up:before { + content: "\eb77"; +} + +.ti-arrow-bar-down:before { + content: "\ea0d"; +} + +.ti-arrow-bar-left:before { + content: "\ea0e"; +} + +.ti-arrow-bar-right:before { + content: "\ea0f"; +} + +.ti-arrow-bar-to-down:before { + content: "\ec88"; +} + +.ti-arrow-bar-to-left:before { + content: "\ec89"; +} + +.ti-arrow-bar-to-right:before { + content: "\ec8a"; +} + +.ti-arrow-bar-to-up:before { + content: "\ec8b"; +} + +.ti-arrow-bar-up:before { + content: "\ea10"; +} + +.ti-arrow-bear-left:before { + content: "\f045"; +} + +.ti-arrow-bear-left-2:before { + content: "\f044"; +} + +.ti-arrow-bear-right:before { + content: "\f047"; +} + +.ti-arrow-bear-right-2:before { + content: "\f046"; +} + +.ti-arrow-big-down:before { + content: "\edda"; +} + +.ti-arrow-big-down-line:before { + content: "\efe8"; +} + +.ti-arrow-big-down-lines:before { + content: "\efe9"; +} + +.ti-arrow-big-left:before { + content: "\eddb"; +} + +.ti-arrow-big-left-line:before { + content: "\efea"; +} + +.ti-arrow-big-left-lines:before { + content: "\efeb"; +} + +.ti-arrow-big-right:before { + content: "\eddc"; +} + +.ti-arrow-big-right-line:before { + content: "\efec"; +} + +.ti-arrow-big-right-lines:before { + content: "\efed"; +} + +.ti-arrow-big-top:before { + content: "\eddd"; +} + +.ti-arrow-big-up-line:before { + content: "\efee"; +} + +.ti-arrow-big-up-lines:before { + content: "\efef"; +} + +.ti-arrow-bounce:before { + content: "\f3a4"; +} + +.ti-arrow-curve-left:before { + content: "\f048"; +} + +.ti-arrow-curve-right:before { + content: "\f049"; +} + +.ti-arrow-down:before { + content: "\ea16"; +} + +.ti-arrow-down-bar:before { + content: "\ed98"; +} + +.ti-arrow-down-circle:before { + content: "\ea11"; +} + +.ti-arrow-down-left:before { + content: "\ea13"; +} + +.ti-arrow-down-left-circle:before { + content: "\ea12"; +} + +.ti-arrow-down-right:before { + content: "\ea15"; +} + +.ti-arrow-down-right-circle:before { + content: "\ea14"; +} + +.ti-arrow-down-square:before { + content: "\ed9a"; +} + +.ti-arrow-down-tail:before { + content: "\ed9b"; +} + +.ti-arrow-fork:before { + content: "\f04a"; +} + +.ti-arrow-forward:before { + content: "\ea17"; +} + +.ti-arrow-forward-up:before { + content: "\eb78"; +} + +.ti-arrow-guide:before { + content: "\f22a"; +} + +.ti-arrow-iteration:before { + content: "\f578"; +} + +.ti-arrow-left:before { + content: "\ea19"; +} + +.ti-arrow-left-bar:before { + content: "\ed9c"; +} + +.ti-arrow-left-circle:before { + content: "\ea18"; +} + +.ti-arrow-left-right:before { + content: "\f04b"; +} + +.ti-arrow-left-square:before { + content: "\ed9d"; +} + +.ti-arrow-left-tail:before { + content: "\ed9e"; +} + +.ti-arrow-loop-left:before { + content: "\ed9f"; +} + +.ti-arrow-loop-left-2:before { + content: "\f04c"; +} + +.ti-arrow-loop-right:before { + content: "\eda0"; +} + +.ti-arrow-loop-right-2:before { + content: "\f04d"; +} + +.ti-arrow-merge:before { + content: "\f04e"; +} + +.ti-arrow-merge-both:before { + content: "\f23b"; +} + +.ti-arrow-merge-left:before { + content: "\f23c"; +} + +.ti-arrow-merge-right:before { + content: "\f23d"; +} + +.ti-arrow-move-down:before { + content: "\f2ba"; +} + +.ti-arrow-move-left:before { + content: "\f2bb"; +} + +.ti-arrow-move-right:before { + content: "\f2bc"; +} + +.ti-arrow-move-up:before { + content: "\f2bd"; +} + +.ti-arrow-narrow-down:before { + content: "\ea1a"; +} + +.ti-arrow-narrow-left:before { + content: "\ea1b"; +} + +.ti-arrow-narrow-right:before { + content: "\ea1c"; +} + +.ti-arrow-narrow-up:before { + content: "\ea1d"; +} + +.ti-arrow-ramp-left:before { + content: "\ed3c"; +} + +.ti-arrow-ramp-left-2:before { + content: "\f04f"; +} + +.ti-arrow-ramp-left-3:before { + content: "\f050"; +} + +.ti-arrow-ramp-right:before { + content: "\ed3d"; +} + +.ti-arrow-ramp-right-2:before { + content: "\f051"; +} + +.ti-arrow-ramp-right-3:before { + content: "\f052"; +} + +.ti-arrow-right:before { + content: "\ea1f"; +} + +.ti-arrow-right-bar:before { + content: "\eda1"; +} + +.ti-arrow-right-circle:before { + content: "\ea1e"; +} + +.ti-arrow-right-square:before { + content: "\eda2"; +} + +.ti-arrow-right-tail:before { + content: "\eda3"; +} + +.ti-arrow-rotary-first-left:before { + content: "\f053"; +} + +.ti-arrow-rotary-first-right:before { + content: "\f054"; +} + +.ti-arrow-rotary-last-left:before { + content: "\f055"; +} + +.ti-arrow-rotary-last-right:before { + content: "\f056"; +} + +.ti-arrow-rotary-left:before { + content: "\f057"; +} + +.ti-arrow-rotary-right:before { + content: "\f058"; +} + +.ti-arrow-rotary-straight:before { + content: "\f059"; +} + +.ti-arrow-roundabout-left:before { + content: "\f22b"; +} + +.ti-arrow-roundabout-right:before { + content: "\f22c"; +} + +.ti-arrow-sharp-turn-left:before { + content: "\f05a"; +} + +.ti-arrow-sharp-turn-right:before { + content: "\f05b"; +} + +.ti-arrow-up:before { + content: "\ea25"; +} + +.ti-arrow-up-bar:before { + content: "\eda4"; +} + +.ti-arrow-up-circle:before { + content: "\ea20"; +} + +.ti-arrow-up-left:before { + content: "\ea22"; +} + +.ti-arrow-up-left-circle:before { + content: "\ea21"; +} + +.ti-arrow-up-right:before { + content: "\ea24"; +} + +.ti-arrow-up-right-circle:before { + content: "\ea23"; +} + +.ti-arrow-up-square:before { + content: "\eda6"; +} + +.ti-arrow-up-tail:before { + content: "\eda7"; +} + +.ti-arrow-wave-left-down:before { + content: "\eda8"; +} + +.ti-arrow-wave-left-up:before { + content: "\eda9"; +} + +.ti-arrow-wave-right-down:before { + content: "\edaa"; +} + +.ti-arrow-wave-right-up:before { + content: "\edab"; +} + +.ti-arrow-zig-zag:before { + content: "\f4a7"; +} + +.ti-arrows-cross:before { + content: "\effe"; +} + +.ti-arrows-diagonal:before { + content: "\ea27"; +} + +.ti-arrows-diagonal-2:before { + content: "\ea26"; +} + +.ti-arrows-diagonal-minimize:before { + content: "\ef39"; +} + +.ti-arrows-diagonal-minimize-2:before { + content: "\ef38"; +} + +.ti-arrows-diff:before { + content: "\f296"; +} + +.ti-arrows-double-ne-sw:before { + content: "\edde"; +} + +.ti-arrows-double-nw-se:before { + content: "\eddf"; +} + +.ti-arrows-double-se-nw:before { + content: "\ede0"; +} + +.ti-arrows-double-sw-ne:before { + content: "\ede1"; +} + +.ti-arrows-down:before { + content: "\edad"; +} + +.ti-arrows-down-up:before { + content: "\edac"; +} + +.ti-arrows-exchange:before { + content: "\f1f4"; +} + +.ti-arrows-exchange-2:before { + content: "\f1f3"; +} + +.ti-arrows-horizontal:before { + content: "\eb59"; +} + +.ti-arrows-join:before { + content: "\edaf"; +} + +.ti-arrows-join-2:before { + content: "\edae"; +} + +.ti-arrows-left:before { + content: "\edb1"; +} + +.ti-arrows-left-down:before { + content: "\ee00"; +} + +.ti-arrows-left-right:before { + content: "\edb0"; +} + +.ti-arrows-maximize:before { + content: "\ea28"; +} + +.ti-arrows-minimize:before { + content: "\ea29"; +} + +.ti-arrows-move:before { + content: "\f22f"; +} + +.ti-arrows-move-horizontal:before { + content: "\f22d"; +} + +.ti-arrows-move-vertical:before { + content: "\f22e"; +} + +.ti-arrows-random:before { + content: "\f095"; +} + +.ti-arrows-right:before { + content: "\edb3"; +} + +.ti-arrows-right-down:before { + content: "\ee01"; +} + +.ti-arrows-right-left:before { + content: "\edb2"; +} + +.ti-arrows-shuffle:before { + content: "\f000"; +} + +.ti-arrows-shuffle-2:before { + content: "\efff"; +} + +.ti-arrows-sort:before { + content: "\eb5a"; +} + +.ti-arrows-split:before { + content: "\edb5"; +} + +.ti-arrows-split-2:before { + content: "\edb4"; +} + +.ti-arrows-transfer-down:before { + content: "\f2cc"; +} + +.ti-arrows-transfer-up:before { + content: "\f2cd"; +} + +.ti-arrows-up:before { + content: "\edb7"; +} + +.ti-arrows-up-down:before { + content: "\edb6"; +} + +.ti-arrows-up-left:before { + content: "\ee02"; +} + +.ti-arrows-up-right:before { + content: "\ee03"; +} + +.ti-arrows-vertical:before { + content: "\eb5b"; +} + +.ti-artboard:before { + content: "\ea2a"; +} + +.ti-artboard-off:before { + content: "\f0ae"; +} + +.ti-article:before { + content: "\f1e2"; +} + +.ti-article-off:before { + content: "\f3bf"; +} + +.ti-aspect-ratio:before { + content: "\ed30"; +} + +.ti-aspect-ratio-off:before { + content: "\f0af"; +} + +.ti-assembly:before { + content: "\f24d"; +} + +.ti-assembly-off:before { + content: "\f3c0"; +} + +.ti-asset:before { + content: "\f1ce"; +} + +.ti-asterisk:before { + content: "\efd5"; +} + +.ti-asterisk-simple:before { + content: "\efd4"; +} + +.ti-at:before { + content: "\ea2b"; +} + +.ti-at-off:before { + content: "\f0b0"; +} + +.ti-atom:before { + content: "\eb79"; +} + +.ti-atom-2:before { + content: "\ebdf"; +} + +.ti-atom-off:before { + content: "\f0f9"; +} + +.ti-augmented-reality:before { + content: "\f023"; +} + +.ti-augmented-reality-2:before { + content: "\f37e"; +} + +.ti-augmented-reality-off:before { + content: "\f3c1"; +} + +.ti-award:before { + content: "\ea2c"; +} + +.ti-award-off:before { + content: "\f0fa"; +} + +.ti-axe:before { + content: "\ef9f"; +} + +.ti-axis-x:before { + content: "\ef45"; +} + +.ti-axis-y:before { + content: "\ef46"; +} + +.ti-baby-bottle:before { + content: "\f5d2"; +} + +.ti-baby-carriage:before { + content: "\f05d"; +} + +.ti-backhoe:before { + content: "\ed86"; +} + +.ti-backpack:before { + content: "\ef47"; +} + +.ti-backpack-off:before { + content: "\f3c2"; +} + +.ti-backspace:before { + content: "\ea2d"; +} + +.ti-badge:before { + content: "\efc2"; +} + +.ti-badge-3d:before { + content: "\f555"; +} + +.ti-badge-4k:before { + content: "\f556"; +} + +.ti-badge-8k:before { + content: "\f557"; +} + +.ti-badge-ad:before { + content: "\f558"; +} + +.ti-badge-ar:before { + content: "\f559"; +} + +.ti-badge-cc:before { + content: "\f55a"; +} + +.ti-badge-hd:before { + content: "\f55b"; +} + +.ti-badge-off:before { + content: "\f0fb"; +} + +.ti-badge-sd:before { + content: "\f55c"; +} + +.ti-badge-tm:before { + content: "\f55d"; +} + +.ti-badge-vo:before { + content: "\f55e"; +} + +.ti-badge-vr:before { + content: "\f55f"; +} + +.ti-badge-wc:before { + content: "\f560"; +} + +.ti-badges:before { + content: "\efc3"; +} + +.ti-badges-off:before { + content: "\f0fc"; +} + +.ti-baguette:before { + content: "\f3a5"; +} + +.ti-ball-american-football:before { + content: "\ee04"; +} + +.ti-ball-american-football-off:before { + content: "\f3c3"; +} + +.ti-ball-baseball:before { + content: "\efa0"; +} + +.ti-ball-basketball:before { + content: "\ec28"; +} + +.ti-ball-bowling:before { + content: "\ec29"; +} + +.ti-ball-football:before { + content: "\ee06"; +} + +.ti-ball-football-off:before { + content: "\ee05"; +} + +.ti-ball-tennis:before { + content: "\ec2a"; +} + +.ti-ball-volleyball:before { + content: "\ec2b"; +} + +.ti-ballon:before { + content: "\ef3a"; +} + +.ti-ballon-off:before { + content: "\f0fd"; +} + +.ti-ballpen:before { + content: "\f06e"; +} + +.ti-ballpen-off:before { + content: "\f0b1"; +} + +.ti-ban:before { + content: "\ea2e"; +} + +.ti-bandage:before { + content: "\eb7a"; +} + +.ti-bandage-off:before { + content: "\f3c4"; +} + +.ti-barbell:before { + content: "\eff0"; +} + +.ti-barbell-off:before { + content: "\f0b2"; +} + +.ti-barcode:before { + content: "\ebc6"; +} + +.ti-barcode-off:before { + content: "\f0b3"; +} + +.ti-barrel:before { + content: "\f0b4"; +} + +.ti-barrel-off:before { + content: "\f0fe"; +} + +.ti-barrier-block:before { + content: "\f00e"; +} + +.ti-barrier-block-off:before { + content: "\f0b5"; +} + +.ti-baseline:before { + content: "\f024"; +} + +.ti-basket:before { + content: "\ebe1"; +} + +.ti-basket-off:before { + content: "\f0b6"; +} + +.ti-bat:before { + content: "\f284"; +} + +.ti-bath:before { + content: "\ef48"; +} + +.ti-bath-off:before { + content: "\f0ff"; +} + +.ti-battery:before { + content: "\ea34"; +} + +.ti-battery-1:before { + content: "\ea2f"; +} + +.ti-battery-2:before { + content: "\ea30"; +} + +.ti-battery-3:before { + content: "\ea31"; +} + +.ti-battery-4:before { + content: "\ea32"; +} + +.ti-battery-automotive:before { + content: "\ee07"; +} + +.ti-battery-charging:before { + content: "\ea33"; +} + +.ti-battery-charging-2:before { + content: "\ef3b"; +} + +.ti-battery-eco:before { + content: "\ef3c"; +} + +.ti-battery-off:before { + content: "\ed1c"; +} + +.ti-beach:before { + content: "\ef3d"; +} + +.ti-beach-off:before { + content: "\f0b7"; +} + +.ti-bed:before { + content: "\eb5c"; +} + +.ti-bed-off:before { + content: "\f100"; +} + +.ti-beer:before { + content: "\efa1"; +} + +.ti-beer-off:before { + content: "\f101"; +} + +.ti-bell:before { + content: "\ea35"; +} + +.ti-bell-minus:before { + content: "\ede2"; +} + +.ti-bell-off:before { + content: "\ece9"; +} + +.ti-bell-plus:before { + content: "\ede3"; +} + +.ti-bell-ringing:before { + content: "\ed07"; +} + +.ti-bell-ringing-2:before { + content: "\ede4"; +} + +.ti-bell-school:before { + content: "\f05e"; +} + +.ti-bell-x:before { + content: "\ede5"; +} + +.ti-bell-z:before { + content: "\eff1"; +} + +.ti-beta:before { + content: "\f544"; +} + +.ti-bible:before { + content: "\efc4"; +} + +.ti-bike:before { + content: "\ea36"; +} + +.ti-bike-off:before { + content: "\f0b8"; +} + +.ti-binary:before { + content: "\ee08"; +} + +.ti-binary-off:before { + content: "\f3c5"; +} + +.ti-binary-tree:before { + content: "\f5d4"; +} + +.ti-binary-tree-2:before { + content: "\f5d3"; +} + +.ti-biohazard:before { + content: "\ecb8"; +} + +.ti-biohazard-off:before { + content: "\f0b9"; +} + +.ti-blade:before { + content: "\f4bd"; +} + +.ti-bleach:before { + content: "\f2f3"; +} + +.ti-bleach-chlorine:before { + content: "\f2f0"; +} + +.ti-bleach-no-chlorine:before { + content: "\f2f1"; +} + +.ti-bleach-off:before { + content: "\f2f2"; +} + +.ti-blockquote:before { + content: "\ee09"; +} + +.ti-bluetooth:before { + content: "\ea37"; +} + +.ti-bluetooth-connected:before { + content: "\ecea"; +} + +.ti-bluetooth-off:before { + content: "\eceb"; +} + +.ti-bluetooth-x:before { + content: "\f081"; +} + +.ti-blur:before { + content: "\ef8c"; +} + +.ti-blur-off:before { + content: "\f3c6"; +} + +.ti-bmp:before { + content: "\f3a6"; +} + +.ti-bold:before { + content: "\eb7b"; +} + +.ti-bold-off:before { + content: "\f0ba"; +} + +.ti-bolt:before { + content: "\ea38"; +} + +.ti-bolt-off:before { + content: "\ecec"; +} + +.ti-bomb:before { + content: "\f59c"; +} + +.ti-bone:before { + content: "\edb8"; +} + +.ti-bone-off:before { + content: "\f0bb"; +} + +.ti-bong:before { + content: "\f3a7"; +} + +.ti-bong-off:before { + content: "\f3c7"; +} + +.ti-book:before { + content: "\ea39"; +} + +.ti-book-2:before { + content: "\efc5"; +} + +.ti-book-download:before { + content: "\f070"; +} + +.ti-book-off:before { + content: "\f0bc"; +} + +.ti-book-upload:before { + content: "\f071"; +} + +.ti-bookmark:before { + content: "\ea3a"; +} + +.ti-bookmark-off:before { + content: "\eced"; +} + +.ti-bookmarks:before { + content: "\ed08"; +} + +.ti-bookmarks-off:before { + content: "\f0bd"; +} + +.ti-books:before { + content: "\eff2"; +} + +.ti-books-off:before { + content: "\f0be"; +} + +.ti-border-all:before { + content: "\ea3b"; +} + +.ti-border-bottom:before { + content: "\ea3c"; +} + +.ti-border-horizontal:before { + content: "\ea3d"; +} + +.ti-border-inner:before { + content: "\ea3e"; +} + +.ti-border-left:before { + content: "\ea3f"; +} + +.ti-border-none:before { + content: "\ea40"; +} + +.ti-border-outer:before { + content: "\ea41"; +} + +.ti-border-radius:before { + content: "\eb7c"; +} + +.ti-border-right:before { + content: "\ea42"; +} + +.ti-border-style:before { + content: "\ee0a"; +} + +.ti-border-style-2:before { + content: "\ef22"; +} + +.ti-border-top:before { + content: "\ea43"; +} + +.ti-border-vertical:before { + content: "\ea44"; +} + +.ti-bottle:before { + content: "\ef0b"; +} + +.ti-bottle-off:before { + content: "\f3c8"; +} + +.ti-bounce-left:before { + content: "\f59d"; +} + +.ti-bounce-right:before { + content: "\f59e"; +} + +.ti-bow:before { + content: "\f096"; +} + +.ti-bowl:before { + content: "\f4fa"; +} + +.ti-box:before { + content: "\ea45"; +} + +.ti-box-align-bottom:before { + content: "\f2a8"; +} + +.ti-box-align-bottom-left:before { + content: "\f2ce"; +} + +.ti-box-align-bottom-right:before { + content: "\f2cf"; +} + +.ti-box-align-left:before { + content: "\f2a9"; +} + +.ti-box-align-right:before { + content: "\f2aa"; +} + +.ti-box-align-top:before { + content: "\f2ab"; +} + +.ti-box-align-top-left:before { + content: "\f2d0"; +} + +.ti-box-align-top-right:before { + content: "\f2d1"; +} + +.ti-box-margin:before { + content: "\ee0b"; +} + +.ti-box-model:before { + content: "\ee0c"; +} + +.ti-box-model-2:before { + content: "\ef23"; +} + +.ti-box-model-2-off:before { + content: "\f3c9"; +} + +.ti-box-model-off:before { + content: "\f3ca"; +} + +.ti-box-multiple:before { + content: "\ee17"; +} + +.ti-box-multiple-0:before { + content: "\ee0d"; +} + +.ti-box-multiple-1:before { + content: "\ee0e"; +} + +.ti-box-multiple-2:before { + content: "\ee0f"; +} + +.ti-box-multiple-3:before { + content: "\ee10"; +} + +.ti-box-multiple-4:before { + content: "\ee11"; +} + +.ti-box-multiple-5:before { + content: "\ee12"; +} + +.ti-box-multiple-6:before { + content: "\ee13"; +} + +.ti-box-multiple-7:before { + content: "\ee14"; +} + +.ti-box-multiple-8:before { + content: "\ee15"; +} + +.ti-box-multiple-9:before { + content: "\ee16"; +} + +.ti-box-off:before { + content: "\f102"; +} + +.ti-box-padding:before { + content: "\ee18"; +} + +.ti-box-seam:before { + content: "\f561"; +} + +.ti-braces:before { + content: "\ebcc"; +} + +.ti-braces-off:before { + content: "\f0bf"; +} + +.ti-brackets:before { + content: "\ebcd"; +} + +.ti-brackets-contain:before { + content: "\f1e5"; +} + +.ti-brackets-contain-end:before { + content: "\f1e3"; +} + +.ti-brackets-contain-start:before { + content: "\f1e4"; +} + +.ti-brackets-off:before { + content: "\f0c0"; +} + +.ti-braile:before { + content: "\f545"; +} + +.ti-brain:before { + content: "\f59f"; +} + +.ti-brand-4chan:before { + content: "\f494"; +} + +.ti-brand-abstract:before { + content: "\f495"; +} + +.ti-brand-adobe:before { + content: "\f0dc"; +} + +.ti-brand-adonis-js:before { + content: "\f496"; +} + +.ti-brand-airbnb:before { + content: "\ed68"; +} + +.ti-brand-airtable:before { + content: "\ef6a"; +} + +.ti-brand-algolia:before { + content: "\f390"; +} + +.ti-brand-alpine-js:before { + content: "\f324"; +} + +.ti-brand-amazon:before { + content: "\f230"; +} + +.ti-brand-amongus:before { + content: "\f205"; +} + +.ti-brand-android:before { + content: "\ec16"; +} + +.ti-brand-angular:before { + content: "\ef6b"; +} + +.ti-brand-appgallery:before { + content: "\f231"; +} + +.ti-brand-apple:before { + content: "\ec17"; +} + +.ti-brand-apple-arcade:before { + content: "\ed69"; +} + +.ti-brand-apple-podcast:before { + content: "\f1e6"; +} + +.ti-brand-appstore:before { + content: "\ed24"; +} + +.ti-brand-asana:before { + content: "\edc5"; +} + +.ti-brand-backbone:before { + content: "\f325"; +} + +.ti-brand-badoo:before { + content: "\f206"; +} + +.ti-brand-bandcamp:before { + content: "\f207"; +} + +.ti-brand-beats:before { + content: "\f208"; +} + +.ti-brand-behance:before { + content: "\ec6e"; +} + +.ti-brand-binance:before { + content: "\f5a0"; +} + +.ti-brand-bing:before { + content: "\edc6"; +} + +.ti-brand-bitbucket:before { + content: "\edc7"; +} + +.ti-brand-blackbery:before { + content: "\f568"; +} + +.ti-brand-blender:before { + content: "\f326"; +} + +.ti-brand-blogger:before { + content: "\f35a"; +} + +.ti-brand-booking:before { + content: "\edc8"; +} + +.ti-brand-bootstrap:before { + content: "\ef3e"; +} + +.ti-brand-bulma:before { + content: "\f327"; +} + +.ti-brand-bunpo:before { + content: "\f4cf"; +} + +.ti-brand-campaignmonitor:before { + content: "\f328"; +} + +.ti-brand-carbon:before { + content: "\f348"; +} + +.ti-brand-cashapp:before { + content: "\f391"; +} + +.ti-brand-chrome:before { + content: "\ec18"; +} + +.ti-brand-codecov:before { + content: "\f329"; +} + +.ti-brand-codepen:before { + content: "\ec6f"; +} + +.ti-brand-codesandbox:before { + content: "\ed6a"; +} + +.ti-brand-cohost:before { + content: "\f5d5"; +} + +.ti-brand-coinbase:before { + content: "\f209"; +} + +.ti-brand-comedy-central:before { + content: "\f217"; +} + +.ti-brand-couchsurfing:before { + content: "\f392"; +} + +.ti-brand-css3:before { + content: "\ed6b"; +} + +.ti-brand-ctemplar:before { + content: "\f4d0"; +} + +.ti-brand-cucumber:before { + content: "\ef6c"; +} + +.ti-brand-cupra:before { + content: "\f4d1"; +} + +.ti-brand-cypress:before { + content: "\f333"; +} + +.ti-brand-d3:before { + content: "\f24e"; +} + +.ti-brand-days-counter:before { + content: "\f4d2"; +} + +.ti-brand-dcos:before { + content: "\f32a"; +} + +.ti-brand-debian:before { + content: "\ef57"; +} + +.ti-brand-deliveroo:before { + content: "\f4d3"; +} + +.ti-brand-deno:before { + content: "\f24f"; +} + +.ti-brand-deviantart:before { + content: "\ecfb"; +} + +.ti-brand-discord:before { + content: "\ece3"; +} + +.ti-brand-disney:before { + content: "\f20a"; +} + +.ti-brand-disqus:before { + content: "\edc9"; +} + +.ti-brand-django:before { + content: "\f349"; +} + +.ti-brand-docker:before { + content: "\edca"; +} + +.ti-brand-doctrine:before { + content: "\ef6d"; +} + +.ti-brand-dolby-digital:before { + content: "\f4d4"; +} + +.ti-brand-dribbble:before { + content: "\ec19"; +} + +.ti-brand-drops:before { + content: "\f4d5"; +} + +.ti-brand-drupal:before { + content: "\f393"; +} + +.ti-brand-edge:before { + content: "\ecfc"; +} + +.ti-brand-ember:before { + content: "\f497"; +} + +.ti-brand-envato:before { + content: "\f394"; +} + +.ti-brand-facebook:before { + content: "\ec1a"; +} + +.ti-brand-figma:before { + content: "\ec93"; +} + +.ti-brand-finder:before { + content: "\f218"; +} + +.ti-brand-firebase:before { + content: "\ef6e"; +} + +.ti-brand-firefox:before { + content: "\ecfd"; +} + +.ti-brand-flickr:before { + content: "\ecfe"; +} + +.ti-brand-flightradar24:before { + content: "\f4d6"; +} + +.ti-brand-flipboard:before { + content: "\f20b"; +} + +.ti-brand-flutter:before { + content: "\f395"; +} + +.ti-brand-fortnite:before { + content: "\f260"; +} + +.ti-brand-foursquare:before { + content: "\ecff"; +} + +.ti-brand-framer:before { + content: "\ec1b"; +} + +.ti-brand-gatsby:before { + content: "\f396"; +} + +.ti-brand-git:before { + content: "\ef6f"; +} + +.ti-brand-github:before { + content: "\ec1c"; +} + +.ti-brand-github-copilot:before { + content: "\f4a8"; +} + +.ti-brand-gitlab:before { + content: "\ec1d"; +} + +.ti-brand-gmail:before { + content: "\efa2"; +} + +.ti-brand-google:before { + content: "\ec1f"; +} + +.ti-brand-google-analytics:before { + content: "\edcb"; +} + +.ti-brand-google-drive:before { + content: "\ec1e"; +} + +.ti-brand-google-fit:before { + content: "\f297"; +} + +.ti-brand-google-one:before { + content: "\f232"; +} + +.ti-brand-google-photos:before { + content: "\f20c"; +} + +.ti-brand-google-play:before { + content: "\ed25"; +} + +.ti-brand-grammarly:before { + content: "\f32b"; +} + +.ti-brand-graphql:before { + content: "\f32c"; +} + +.ti-brand-gravatar:before { + content: "\edcc"; +} + +.ti-brand-grindr:before { + content: "\f20d"; +} + +.ti-brand-guardian:before { + content: "\f4fb"; +} + +.ti-brand-gumroad:before { + content: "\f5d6"; +} + +.ti-brand-headlessui:before { + content: "\f32d"; +} + +.ti-brand-hipchat:before { + content: "\edcd"; +} + +.ti-brand-html5:before { + content: "\ed6c"; +} + +.ti-brand-inertia:before { + content: "\f34a"; +} + +.ti-brand-instagram:before { + content: "\ec20"; +} + +.ti-brand-intercom:before { + content: "\f1cf"; +} + +.ti-brand-javascript:before { + content: "\ef0c"; +} + +.ti-brand-kickstarter:before { + content: "\edce"; +} + +.ti-brand-kotlin:before { + content: "\ed6d"; +} + +.ti-brand-laravel:before { + content: "\f34b"; +} + +.ti-brand-lastfm:before { + content: "\f001"; +} + +.ti-brand-linkedin:before { + content: "\ec8c"; +} + +.ti-brand-linktree:before { + content: "\f1e7"; +} + +.ti-brand-linqpad:before { + content: "\f562"; +} + +.ti-brand-loom:before { + content: "\ef70"; +} + +.ti-brand-mailgun:before { + content: "\f32e"; +} + +.ti-brand-mantine:before { + content: "\f32f"; +} + +.ti-brand-mastercard:before { + content: "\ef49"; +} + +.ti-brand-mastodon:before { + content: "\f250"; +} + +.ti-brand-mcdonalds:before { + content: "\f251"; +} + +.ti-brand-medium:before { + content: "\ec70"; +} + +.ti-brand-mercedes:before { + content: "\f072"; +} + +.ti-brand-messenger:before { + content: "\ec71"; +} + +.ti-brand-meta:before { + content: "\efb0"; +} + +.ti-brand-mixpanel:before { + content: "\f397"; +} + +.ti-brand-monday:before { + content: "\f219"; +} + +.ti-brand-my-oppo:before { + content: "\f4d7"; +} + +.ti-brand-nem:before { + content: "\f5a1"; +} + +.ti-brand-netbeans:before { + content: "\ef71"; +} + +.ti-brand-netflix:before { + content: "\edcf"; +} + +.ti-brand-nexo:before { + content: "\f5a2"; +} + +.ti-brand-nextcloud:before { + content: "\f4d8"; +} + +.ti-brand-nextjs:before { + content: "\f0dd"; +} + +.ti-brand-nord-vpn:before { + content: "\f37f"; +} + +.ti-brand-notion:before { + content: "\ef7b"; +} + +.ti-brand-npm:before { + content: "\f569"; +} + +.ti-brand-nuxt:before { + content: "\f0de"; +} + +.ti-brand-nytimes:before { + content: "\ef8d"; +} + +.ti-brand-office:before { + content: "\f398"; +} + +.ti-brand-ok-ru:before { + content: "\f399"; +} + +.ti-brand-onedrive:before { + content: "\f5d7"; +} + +.ti-brand-open-source:before { + content: "\edd0"; +} + +.ti-brand-openvpn:before { + content: "\f39a"; +} + +.ti-brand-opera:before { + content: "\ec21"; +} + +.ti-brand-pagekit:before { + content: "\edd1"; +} + +.ti-brand-patreon:before { + content: "\edd2"; +} + +.ti-brand-paypal:before { + content: "\ec22"; +} + +.ti-brand-peanut:before { + content: "\f39b"; +} + +.ti-brand-pepsi:before { + content: "\f261"; +} + +.ti-brand-php:before { + content: "\ef72"; +} + +.ti-brand-picsart:before { + content: "\f4d9"; +} + +.ti-brand-pinterest:before { + content: "\ec8d"; +} + +.ti-brand-pocket:before { + content: "\ed00"; +} + +.ti-brand-polymer:before { + content: "\f498"; +} + +.ti-brand-prisma:before { + content: "\f499"; +} + +.ti-brand-producthunt:before { + content: "\edd3"; +} + +.ti-brand-pushbullet:before { + content: "\f330"; +} + +.ti-brand-pushover:before { + content: "\f20e"; +} + +.ti-brand-python:before { + content: "\ed01"; +} + +.ti-brand-react:before { + content: "\f34c"; +} + +.ti-brand-react-native:before { + content: "\ef73"; +} + +.ti-brand-reason:before { + content: "\f49a"; +} + +.ti-brand-reddit:before { + content: "\ec8e"; +} + +.ti-brand-redhat:before { + content: "\f331"; +} + +.ti-brand-redux:before { + content: "\f3a8"; +} + +.ti-brand-revolut:before { + content: "\f4da"; +} + +.ti-brand-safari:before { + content: "\ec23"; +} + +.ti-brand-samsungpass:before { + content: "\f4db"; +} + +.ti-brand-sass:before { + content: "\edd4"; +} + +.ti-brand-sentry:before { + content: "\edd5"; +} + +.ti-brand-sharik:before { + content: "\f4dc"; +} + +.ti-brand-shazam:before { + content: "\edd6"; +} + +.ti-brand-shopee:before { + content: "\f252"; +} + +.ti-brand-sketch:before { + content: "\ec24"; +} + +.ti-brand-skype:before { + content: "\ed02"; +} + +.ti-brand-slack:before { + content: "\ec72"; +} + +.ti-brand-snapchat:before { + content: "\ec25"; +} + +.ti-brand-snapseed:before { + content: "\f253"; +} + +.ti-brand-socket-io:before { + content: "\f49b"; +} + +.ti-brand-soundcloud:before { + content: "\ed6e"; +} + +.ti-brand-spacehey:before { + content: "\f4fc"; +} + +.ti-brand-spotify:before { + content: "\ed03"; +} + +.ti-brand-stackoverflow:before { + content: "\ef58"; +} + +.ti-brand-steam:before { + content: "\ed6f"; +} + +.ti-brand-storybook:before { + content: "\f332"; +} + +.ti-brand-strava:before { + content: "\f254"; +} + +.ti-brand-stripe:before { + content: "\edd7"; +} + +.ti-brand-sublime-text:before { + content: "\ef74"; +} + +.ti-brand-superhuman:before { + content: "\f50c"; +} + +.ti-brand-supernova:before { + content: "\f49c"; +} + +.ti-brand-surfshark:before { + content: "\f255"; +} + +.ti-brand-svelte:before { + content: "\f0df"; +} + +.ti-brand-tabler:before { + content: "\ec8f"; +} + +.ti-brand-tailwind:before { + content: "\eca1"; +} + +.ti-brand-telegram:before { + content: "\ec26"; +} + +.ti-brand-tether:before { + content: "\f5a3"; +} + +.ti-brand-tidal:before { + content: "\ed70"; +} + +.ti-brand-tiktok:before { + content: "\ec73"; +} + +.ti-brand-tinder:before { + content: "\ed71"; +} + +.ti-brand-topbuzz:before { + content: "\f50d"; +} + +.ti-brand-torchain:before { + content: "\f5a4"; +} + +.ti-brand-toyota:before { + content: "\f262"; +} + +.ti-brand-trello:before { + content: "\f39d"; +} + +.ti-brand-tripadvisor:before { + content: "\f002"; +} + +.ti-brand-tumblr:before { + content: "\ed04"; +} + +.ti-brand-twitch:before { + content: "\ed05"; +} + +.ti-brand-twitter:before { + content: "\ec27"; +} + +.ti-brand-uber:before { + content: "\ef75"; +} + +.ti-brand-ubuntu:before { + content: "\ef59"; +} + +.ti-brand-unity:before { + content: "\f49d"; +} + +.ti-brand-unsplash:before { + content: "\edd8"; +} + +.ti-brand-upwork:before { + content: "\f39e"; +} + +.ti-brand-valorant:before { + content: "\f39f"; +} + +.ti-brand-vercel:before { + content: "\ef24"; +} + +.ti-brand-vimeo:before { + content: "\ed06"; +} + +.ti-brand-vinted:before { + content: "\f20f"; +} + +.ti-brand-visa:before { + content: "\f380"; +} + +.ti-brand-visual-studio:before { + content: "\ef76"; +} + +.ti-brand-vivaldi:before { + content: "\f210"; +} + +.ti-brand-vk:before { + content: "\ed72"; +} + +.ti-brand-volkswagen:before { + content: "\f50e"; +} + +.ti-brand-vsco:before { + content: "\f334"; +} + +.ti-brand-vscode:before { + content: "\f3a0"; +} + +.ti-brand-vue:before { + content: "\f0e0"; +} + +.ti-brand-walmart:before { + content: "\f211"; +} + +.ti-brand-waze:before { + content: "\f5d8"; +} + +.ti-brand-webflow:before { + content: "\f2d2"; +} + +.ti-brand-whatsapp:before { + content: "\ec74"; +} + +.ti-brand-windows:before { + content: "\ecd8"; +} + +.ti-brand-windy:before { + content: "\f4dd"; +} + +.ti-brand-wish:before { + content: "\f212"; +} + +.ti-brand-wix:before { + content: "\f3a1"; +} + +.ti-brand-wordpress:before { + content: "\f2d3"; +} + +.ti-brand-xbox:before { + content: "\f298"; +} + +.ti-brand-xing:before { + content: "\f21a"; +} + +.ti-brand-yahoo:before { + content: "\ed73"; +} + +.ti-brand-yatse:before { + content: "\f213"; +} + +.ti-brand-ycombinator:before { + content: "\edd9"; +} + +.ti-brand-youtube:before { + content: "\ec90"; +} + +.ti-brand-youtube-kids:before { + content: "\f214"; +} + +.ti-brand-zalando:before { + content: "\f49e"; +} + +.ti-brand-zapier:before { + content: "\f49f"; +} + +.ti-brand-zeit:before { + content: "\f335"; +} + +.ti-brand-zoom:before { + content: "\f215"; +} + +.ti-brand-zulip:before { + content: "\f4de"; +} + +.ti-brand-zwift:before { + content: "\f216"; +} + +.ti-bread:before { + content: "\efa3"; +} + +.ti-bread-off:before { + content: "\f3cb"; +} + +.ti-briefcase:before { + content: "\ea46"; +} + +.ti-briefcase-off:before { + content: "\f3cc"; +} + +.ti-brightness:before { + content: "\eb7f"; +} + +.ti-brightness-2:before { + content: "\ee19"; +} + +.ti-brightness-down:before { + content: "\eb7d"; +} + +.ti-brightness-half:before { + content: "\ee1a"; +} + +.ti-brightness-off:before { + content: "\f3cd"; +} + +.ti-brightness-up:before { + content: "\eb7e"; +} + +.ti-broadcast:before { + content: "\f1e9"; +} + +.ti-broadcast-off:before { + content: "\f1e8"; +} + +.ti-browser:before { + content: "\ebb7"; +} + +.ti-browser-check:before { + content: "\efd6"; +} + +.ti-browser-off:before { + content: "\f0c1"; +} + +.ti-browser-plus:before { + content: "\efd7"; +} + +.ti-browser-x:before { + content: "\efd8"; +} + +.ti-brush:before { + content: "\ebb8"; +} + +.ti-brush-off:before { + content: "\f0c2"; +} + +.ti-bucket:before { + content: "\ea47"; +} + +.ti-bucket-droplet:before { + content: "\f56a"; +} + +.ti-bucket-off:before { + content: "\f103"; +} + +.ti-bug:before { + content: "\ea48"; +} + +.ti-bug-off:before { + content: "\f0c3"; +} + +.ti-building:before { + content: "\ea4f"; +} + +.ti-building-arch:before { + content: "\ea49"; +} + +.ti-building-bank:before { + content: "\ebe2"; +} + +.ti-building-bridge:before { + content: "\ea4b"; +} + +.ti-building-bridge-2:before { + content: "\ea4a"; +} + +.ti-building-broadcast-tower:before { + content: "\f4be"; +} + +.ti-building-carousel:before { + content: "\ed87"; +} + +.ti-building-castle:before { + content: "\ed88"; +} + +.ti-building-church:before { + content: "\ea4c"; +} + +.ti-building-circus:before { + content: "\f4bf"; +} + +.ti-building-community:before { + content: "\ebf6"; +} + +.ti-building-cottage:before { + content: "\ee1b"; +} + +.ti-building-estate:before { + content: "\f5a5"; +} + +.ti-building-factory:before { + content: "\ee1c"; +} + +.ti-building-factory-2:before { + content: "\f082"; +} + +.ti-building-fortress:before { + content: "\ed89"; +} + +.ti-building-hospital:before { + content: "\ea4d"; +} + +.ti-building-lighthouse:before { + content: "\ed8a"; +} + +.ti-building-monument:before { + content: "\ed26"; +} + +.ti-building-pavilon:before { + content: "\ebf7"; +} + +.ti-building-skyscraper:before { + content: "\ec39"; +} + +.ti-building-store:before { + content: "\ea4e"; +} + +.ti-building-tunnel:before { + content: "\f5a6"; +} + +.ti-building-warehouse:before { + content: "\ebe3"; +} + +.ti-building-wind-turbine:before { + content: "\f4c0"; +} + +.ti-bulb:before { + content: "\ea51"; +} + +.ti-bulb-off:before { + content: "\ea50"; +} + +.ti-bulldozer:before { + content: "\ee1d"; +} + +.ti-bus:before { + content: "\ebe4"; +} + +.ti-bus-off:before { + content: "\f3ce"; +} + +.ti-bus-stop:before { + content: "\f2d4"; +} + +.ti-businessplan:before { + content: "\ee1e"; +} + +.ti-butterfly:before { + content: "\efd9"; +} + +.ti-c-sharp:before { + content: "\f003"; +} + +.ti-cactus:before { + content: "\f21b"; +} + +.ti-cactus-off:before { + content: "\f3cf"; +} + +.ti-cake:before { + content: "\f00f"; +} + +.ti-cake-off:before { + content: "\f104"; +} + +.ti-calculator:before { + content: "\eb80"; +} + +.ti-calculator-off:before { + content: "\f0c4"; +} + +.ti-calendar:before { + content: "\ea53"; +} + +.ti-calendar-event:before { + content: "\ea52"; +} + +.ti-calendar-minus:before { + content: "\ebb9"; +} + +.ti-calendar-off:before { + content: "\ee1f"; +} + +.ti-calendar-plus:before { + content: "\ebba"; +} + +.ti-calendar-stats:before { + content: "\ee20"; +} + +.ti-calendar-time:before { + content: "\ee21"; +} + +.ti-camera:before { + content: "\ea54"; +} + +.ti-camera-minus:before { + content: "\ec3a"; +} + +.ti-camera-off:before { + content: "\ecee"; +} + +.ti-camera-plus:before { + content: "\ec3b"; +} + +.ti-camera-rotate:before { + content: "\ee22"; +} + +.ti-camera-selfie:before { + content: "\ee23"; +} + +.ti-campfire:before { + content: "\f5a7"; +} + +.ti-candle:before { + content: "\efc6"; +} + +.ti-candy:before { + content: "\ef0d"; +} + +.ti-candy-off:before { + content: "\f0c5"; +} + +.ti-cane:before { + content: "\f50f"; +} + +.ti-cannabis:before { + content: "\f4c1"; +} + +.ti-capture:before { + content: "\ec3c"; +} + +.ti-capture-off:before { + content: "\f0c6"; +} + +.ti-car:before { + content: "\ebbb"; +} + +.ti-car-crane:before { + content: "\ef25"; +} + +.ti-car-crash:before { + content: "\efa4"; +} + +.ti-car-off:before { + content: "\f0c7"; +} + +.ti-car-turbine:before { + content: "\f4fd"; +} + +.ti-caravan:before { + content: "\ec7c"; +} + +.ti-cardboards:before { + content: "\ed74"; +} + +.ti-cardboards-off:before { + content: "\f0c8"; +} + +.ti-cards:before { + content: "\f510"; +} + +.ti-caret-down:before { + content: "\eb5d"; +} + +.ti-caret-left:before { + content: "\eb5e"; +} + +.ti-caret-right:before { + content: "\eb5f"; +} + +.ti-caret-up:before { + content: "\eb60"; +} + +.ti-carrot:before { + content: "\f21c"; +} + +.ti-carrot-off:before { + content: "\f3d0"; +} + +.ti-cash:before { + content: "\ea55"; +} + +.ti-cash-banknote:before { + content: "\ee25"; +} + +.ti-cash-banknote-off:before { + content: "\ee24"; +} + +.ti-cash-off:before { + content: "\f105"; +} + +.ti-cast:before { + content: "\ea56"; +} + +.ti-cast-off:before { + content: "\f0c9"; +} + +.ti-category:before { + content: "\f1f6"; +} + +.ti-category-2:before { + content: "\f1f5"; +} + +.ti-ce:before { + content: "\ed75"; +} + +.ti-ce-off:before { + content: "\f0ca"; +} + +.ti-cell:before { + content: "\f05f"; +} + +.ti-cell-signal-1:before { + content: "\f083"; +} + +.ti-cell-signal-2:before { + content: "\f084"; +} + +.ti-cell-signal-3:before { + content: "\f085"; +} + +.ti-cell-signal-4:before { + content: "\f086"; +} + +.ti-cell-signal-5:before { + content: "\f087"; +} + +.ti-cell-signal-off:before { + content: "\f088"; +} + +.ti-certificate:before { + content: "\ed76"; +} + +.ti-certificate-2:before { + content: "\f073"; +} + +.ti-certificate-2-off:before { + content: "\f0cb"; +} + +.ti-certificate-off:before { + content: "\f0cc"; +} + +.ti-chair-director:before { + content: "\f2d5"; +} + +.ti-chalkboard:before { + content: "\f34d"; +} + +.ti-chalkboard-off:before { + content: "\f3d1"; +} + +.ti-charging-pile:before { + content: "\ee26"; +} + +.ti-chart-arcs:before { + content: "\ee28"; +} + +.ti-chart-arcs-3:before { + content: "\ee27"; +} + +.ti-chart-area:before { + content: "\ea58"; +} + +.ti-chart-area-line:before { + content: "\ea57"; +} + +.ti-chart-arrows:before { + content: "\ee2a"; +} + +.ti-chart-arrows-vertical:before { + content: "\ee29"; +} + +.ti-chart-bar:before { + content: "\ea59"; +} + +.ti-chart-bar-off:before { + content: "\f3d2"; +} + +.ti-chart-bubble:before { + content: "\ec75"; +} + +.ti-chart-candle:before { + content: "\ea5a"; +} + +.ti-chart-circles:before { + content: "\ee2b"; +} + +.ti-chart-donut:before { + content: "\ea5b"; +} + +.ti-chart-donut-2:before { + content: "\ee2c"; +} + +.ti-chart-donut-3:before { + content: "\ee2d"; +} + +.ti-chart-donut-4:before { + content: "\ee2e"; +} + +.ti-chart-dots:before { + content: "\ee2f"; +} + +.ti-chart-dots-2:before { + content: "\f097"; +} + +.ti-chart-dots-3:before { + content: "\f098"; +} + +.ti-chart-grid-dots:before { + content: "\f4c2"; +} + +.ti-chart-infographic:before { + content: "\ee30"; +} + +.ti-chart-line:before { + content: "\ea5c"; +} + +.ti-chart-pie:before { + content: "\ea5d"; +} + +.ti-chart-pie-2:before { + content: "\ee31"; +} + +.ti-chart-pie-3:before { + content: "\ee32"; +} + +.ti-chart-pie-4:before { + content: "\ee33"; +} + +.ti-chart-pie-off:before { + content: "\f3d3"; +} + +.ti-chart-radar:before { + content: "\ed77"; +} + +.ti-chart-treemap:before { + content: "\f381"; +} + +.ti-check:before { + content: "\ea5e"; +} + +.ti-checkbox:before { + content: "\eba6"; +} + +.ti-checklist:before { + content: "\f074"; +} + +.ti-checks:before { + content: "\ebaa"; +} + +.ti-checkup-list:before { + content: "\ef5a"; +} + +.ti-cheese:before { + content: "\ef26"; +} + +.ti-chef-hat:before { + content: "\f21d"; +} + +.ti-chef-hat-off:before { + content: "\f3d4"; +} + +.ti-cherry:before { + content: "\f511"; +} + +.ti-chess:before { + content: "\f382"; +} + +.ti-chess-bishop:before { + content: "\f56b"; +} + +.ti-chess-king:before { + content: "\f56c"; +} + +.ti-chess-knight:before { + content: "\f56d"; +} + +.ti-chess-queen:before { + content: "\f56e"; +} + +.ti-chess-rook:before { + content: "\f56f"; +} + +.ti-chevron-down:before { + content: "\ea5f"; +} + +.ti-chevron-down-left:before { + content: "\ed09"; +} + +.ti-chevron-down-right:before { + content: "\ed0a"; +} + +.ti-chevron-left:before { + content: "\ea60"; +} + +.ti-chevron-right:before { + content: "\ea61"; +} + +.ti-chevron-up:before { + content: "\ea62"; +} + +.ti-chevron-up-left:before { + content: "\ed0b"; +} + +.ti-chevron-up-right:before { + content: "\ed0c"; +} + +.ti-chevrons-down:before { + content: "\ea63"; +} + +.ti-chevrons-down-left:before { + content: "\ed0d"; +} + +.ti-chevrons-down-right:before { + content: "\ed0e"; +} + +.ti-chevrons-left:before { + content: "\ea64"; +} + +.ti-chevrons-right:before { + content: "\ea65"; +} + +.ti-chevrons-up:before { + content: "\ea66"; +} + +.ti-chevrons-up-left:before { + content: "\ed0f"; +} + +.ti-chevrons-up-right:before { + content: "\ed10"; +} + +.ti-chisel:before { + content: "\f383"; +} + +.ti-christmas-tree:before { + content: "\ed78"; +} + +.ti-christmas-tree-off:before { + content: "\f3d5"; +} + +.ti-circle:before { + content: "\ea6b"; +} + +.ti-circle-caret-down:before { + content: "\f4a9"; +} + +.ti-circle-caret-left:before { + content: "\f4aa"; +} + +.ti-circle-caret-right:before { + content: "\f4ab"; +} + +.ti-circle-caret-up:before { + content: "\f4ac"; +} + +.ti-circle-check:before { + content: "\ea67"; +} + +.ti-circle-dashed:before { + content: "\ed27"; +} + +.ti-circle-dot:before { + content: "\efb1"; +} + +.ti-circle-dotted:before { + content: "\ed28"; +} + +.ti-circle-half:before { + content: "\ee3f"; +} + +.ti-circle-half-2:before { + content: "\eff3"; +} + +.ti-circle-half-vertical:before { + content: "\ee3e"; +} + +.ti-circle-letter-a:before { + content: "\f441"; +} + +.ti-circle-letter-b:before { + content: "\f442"; +} + +.ti-circle-letter-c:before { + content: "\f443"; +} + +.ti-circle-letter-d:before { + content: "\f444"; +} + +.ti-circle-letter-e:before { + content: "\f445"; +} + +.ti-circle-letter-f:before { + content: "\f446"; +} + +.ti-circle-letter-g:before { + content: "\f447"; +} + +.ti-circle-letter-h:before { + content: "\f448"; +} + +.ti-circle-letter-i:before { + content: "\f449"; +} + +.ti-circle-letter-j:before { + content: "\f44a"; +} + +.ti-circle-letter-k:before { + content: "\f44b"; +} + +.ti-circle-letter-l:before { + content: "\f44c"; +} + +.ti-circle-letter-m:before { + content: "\f44d"; +} + +.ti-circle-letter-n:before { + content: "\f44e"; +} + +.ti-circle-letter-o:before { + content: "\f44f"; +} + +.ti-circle-letter-p:before { + content: "\f450"; +} + +.ti-circle-letter-q:before { + content: "\f451"; +} + +.ti-circle-letter-r:before { + content: "\f452"; +} + +.ti-circle-letter-s:before { + content: "\f453"; +} + +.ti-circle-letter-t:before { + content: "\f454"; +} + +.ti-circle-letter-u:before { + content: "\f455"; +} + +.ti-circle-letter-v:before { + content: "\f4ad"; +} + +.ti-circle-letter-w:before { + content: "\f456"; +} + +.ti-circle-letter-x:before { + content: "\f4ae"; +} + +.ti-circle-letter-y:before { + content: "\f457"; +} + +.ti-circle-letter-z:before { + content: "\f458"; +} + +.ti-circle-minus:before { + content: "\ea68"; +} + +.ti-circle-number-0:before { + content: "\ee34"; +} + +.ti-circle-number-1:before { + content: "\ee35"; +} + +.ti-circle-number-2:before { + content: "\ee36"; +} + +.ti-circle-number-3:before { + content: "\ee37"; +} + +.ti-circle-number-4:before { + content: "\ee38"; +} + +.ti-circle-number-5:before { + content: "\ee39"; +} + +.ti-circle-number-6:before { + content: "\ee3a"; +} + +.ti-circle-number-7:before { + content: "\ee3b"; +} + +.ti-circle-number-8:before { + content: "\ee3c"; +} + +.ti-circle-number-9:before { + content: "\ee3d"; +} + +.ti-circle-off:before { + content: "\ee40"; +} + +.ti-circle-plus:before { + content: "\ea69"; +} + +.ti-circle-rectangle:before { + content: "\f010"; +} + +.ti-circle-rectangle-off:before { + content: "\f0cd"; +} + +.ti-circle-square:before { + content: "\ece4"; +} + +.ti-circle-triangle:before { + content: "\f011"; +} + +.ti-circle-x:before { + content: "\ea6a"; +} + +.ti-circles:before { + content: "\ece5"; +} + +.ti-circles-relation:before { + content: "\f4c3"; +} + +.ti-circuit-ammeter:before { + content: "\f271"; +} + +.ti-circuit-battery:before { + content: "\f272"; +} + +.ti-circuit-bulb:before { + content: "\f273"; +} + +.ti-circuit-capacitor:before { + content: "\f275"; +} + +.ti-circuit-capacitor-polarized:before { + content: "\f274"; +} + +.ti-circuit-cell:before { + content: "\f277"; +} + +.ti-circuit-cell-plus:before { + content: "\f276"; +} + +.ti-circuit-changeover:before { + content: "\f278"; +} + +.ti-circuit-diode:before { + content: "\f27a"; +} + +.ti-circuit-diode-zener:before { + content: "\f279"; +} + +.ti-circuit-ground:before { + content: "\f27c"; +} + +.ti-circuit-ground-digital:before { + content: "\f27b"; +} + +.ti-circuit-inductor:before { + content: "\f27d"; +} + +.ti-circuit-motor:before { + content: "\f27e"; +} + +.ti-circuit-pushbutton:before { + content: "\f27f"; +} + +.ti-circuit-resistor:before { + content: "\f280"; +} + +.ti-circuit-switch-closed:before { + content: "\f281"; +} + +.ti-circuit-switch-open:before { + content: "\f282"; +} + +.ti-circuit-voltmeter:before { + content: "\f283"; +} + +.ti-clear-all:before { + content: "\ee41"; +} + +.ti-clear-formatting:before { + content: "\ebe5"; +} + +.ti-click:before { + content: "\ebbc"; +} + +.ti-clipboard:before { + content: "\ea6f"; +} + +.ti-clipboard-check:before { + content: "\ea6c"; +} + +.ti-clipboard-copy:before { + content: "\f299"; +} + +.ti-clipboard-data:before { + content: "\f563"; +} + +.ti-clipboard-heart:before { + content: "\f34e"; +} + +.ti-clipboard-list:before { + content: "\ea6d"; +} + +.ti-clipboard-off:before { + content: "\f0ce"; +} + +.ti-clipboard-plus:before { + content: "\efb2"; +} + +.ti-clipboard-text:before { + content: "\f089"; +} + +.ti-clipboard-typography:before { + content: "\f34f"; +} + +.ti-clipboard-x:before { + content: "\ea6e"; +} + +.ti-clock:before { + content: "\ea70"; +} + +.ti-clock-2:before { + content: "\f099"; +} + +.ti-clock-cancel:before { + content: "\f546"; +} + +.ti-clock-edit:before { + content: "\f547"; +} + +.ti-clock-hour-1:before { + content: "\f313"; +} + +.ti-clock-hour-10:before { + content: "\f314"; +} + +.ti-clock-hour-11:before { + content: "\f315"; +} + +.ti-clock-hour-12:before { + content: "\f316"; +} + +.ti-clock-hour-2:before { + content: "\f317"; +} + +.ti-clock-hour-3:before { + content: "\f318"; +} + +.ti-clock-hour-4:before { + content: "\f319"; +} + +.ti-clock-hour-5:before { + content: "\f31a"; +} + +.ti-clock-hour-6:before { + content: "\f31b"; +} + +.ti-clock-hour-7:before { + content: "\f31c"; +} + +.ti-clock-hour-8:before { + content: "\f31d"; +} + +.ti-clock-hour-9:before { + content: "\f31e"; +} + +.ti-clock-off:before { + content: "\f0cf"; +} + +.ti-clock-pause:before { + content: "\f548"; +} + +.ti-clock-play:before { + content: "\f549"; +} + +.ti-clock-record:before { + content: "\f54a"; +} + +.ti-clock-stop:before { + content: "\f54b"; +} + +.ti-clothes-rack:before { + content: "\f285"; +} + +.ti-clothes-rack-off:before { + content: "\f3d6"; +} + +.ti-cloud:before { + content: "\ea76"; +} + +.ti-cloud-computing:before { + content: "\f1d0"; +} + +.ti-cloud-data-connection:before { + content: "\f1d1"; +} + +.ti-cloud-download:before { + content: "\ea71"; +} + +.ti-cloud-fog:before { + content: "\ecd9"; +} + +.ti-cloud-lock:before { + content: "\efdb"; +} + +.ti-cloud-lock-open:before { + content: "\efda"; +} + +.ti-cloud-off:before { + content: "\ed3e"; +} + +.ti-cloud-rain:before { + content: "\ea72"; +} + +.ti-cloud-snow:before { + content: "\ea73"; +} + +.ti-cloud-storm:before { + content: "\ea74"; +} + +.ti-cloud-upload:before { + content: "\ea75"; +} + +.ti-clover:before { + content: "\f1ea"; +} + +.ti-clover-2:before { + content: "\f21e"; +} + +.ti-clubs:before { + content: "\eff4"; +} + +.ti-code:before { + content: "\ea77"; +} + +.ti-code-asterix:before { + content: "\f312"; +} + +.ti-code-circle:before { + content: "\f4ff"; +} + +.ti-code-circle-2:before { + content: "\f4fe"; +} + +.ti-code-minus:before { + content: "\ee42"; +} + +.ti-code-off:before { + content: "\f0d0"; +} + +.ti-code-plus:before { + content: "\ee43"; +} + +.ti-coffee:before { + content: "\ef0e"; +} + +.ti-coffee-off:before { + content: "\f106"; +} + +.ti-coffin:before { + content: "\f579"; +} + +.ti-coin:before { + content: "\eb82"; +} + +.ti-coin-bitcoin:before { + content: "\f2be"; +} + +.ti-coin-euro:before { + content: "\f2bf"; +} + +.ti-coin-monero:before { + content: "\f4a0"; +} + +.ti-coin-off:before { + content: "\f0d1"; +} + +.ti-coin-pound:before { + content: "\f2c0"; +} + +.ti-coin-rupee:before { + content: "\f2c1"; +} + +.ti-coin-yen:before { + content: "\f2c2"; +} + +.ti-coin-yuan:before { + content: "\f2c3"; +} + +.ti-color-filter:before { + content: "\f5a8"; +} + +.ti-color-picker:before { + content: "\ebe6"; +} + +.ti-color-picker-off:before { + content: "\f0d2"; +} + +.ti-color-swatch:before { + content: "\eb61"; +} + +.ti-color-swatch-off:before { + content: "\f0d3"; +} + +.ti-column-insert-left:before { + content: "\ee44"; +} + +.ti-column-insert-right:before { + content: "\ee45"; +} + +.ti-columns:before { + content: "\eb83"; +} + +.ti-columns-off:before { + content: "\f0d4"; +} + +.ti-comet:before { + content: "\ec76"; +} + +.ti-command:before { + content: "\ea78"; +} + +.ti-command-off:before { + content: "\f3d7"; +} + +.ti-compass:before { + content: "\ea79"; +} + +.ti-compass-off:before { + content: "\f0d5"; +} + +.ti-components:before { + content: "\efa5"; +} + +.ti-components-off:before { + content: "\f0d6"; +} + +.ti-cone:before { + content: "\efdd"; +} + +.ti-cone-2:before { + content: "\efdc"; +} + +.ti-cone-off:before { + content: "\f3d8"; +} + +.ti-confetti:before { + content: "\ee46"; +} + +.ti-confetti-off:before { + content: "\f3d9"; +} + +.ti-confucius:before { + content: "\f58a"; +} + +.ti-container:before { + content: "\ee47"; +} + +.ti-container-off:before { + content: "\f107"; +} + +.ti-contrast:before { + content: "\ec4e"; +} + +.ti-contrast-2:before { + content: "\efc7"; +} + +.ti-contrast-2-off:before { + content: "\f3da"; +} + +.ti-contrast-off:before { + content: "\f3db"; +} + +.ti-cooker:before { + content: "\f57a"; +} + +.ti-cookie:before { + content: "\ef0f"; +} + +.ti-cookie-man:before { + content: "\f4c4"; +} + +.ti-cookie-off:before { + content: "\f0d7"; +} + +.ti-copy:before { + content: "\ea7a"; +} + +.ti-copy-off:before { + content: "\f0d8"; +} + +.ti-copyleft:before { + content: "\ec3d"; +} + +.ti-copyleft-off:before { + content: "\f0d9"; +} + +.ti-copyright:before { + content: "\ea7b"; +} + +.ti-copyright-off:before { + content: "\f0da"; +} + +.ti-corner-down-left:before { + content: "\ea7c"; +} + +.ti-corner-down-left-double:before { + content: "\ee48"; +} + +.ti-corner-down-right:before { + content: "\ea7d"; +} + +.ti-corner-down-right-double:before { + content: "\ee49"; +} + +.ti-corner-left-down:before { + content: "\ea7e"; +} + +.ti-corner-left-down-double:before { + content: "\ee4a"; +} + +.ti-corner-left-up:before { + content: "\ea7f"; +} + +.ti-corner-left-up-double:before { + content: "\ee4b"; +} + +.ti-corner-right-down:before { + content: "\ea80"; +} + +.ti-corner-right-down-double:before { + content: "\ee4c"; +} + +.ti-corner-right-up:before { + content: "\ea81"; +} + +.ti-corner-right-up-double:before { + content: "\ee4d"; +} + +.ti-corner-up-left:before { + content: "\ea82"; +} + +.ti-corner-up-left-double:before { + content: "\ee4e"; +} + +.ti-corner-up-right:before { + content: "\ea83"; +} + +.ti-corner-up-right-double:before { + content: "\ee4f"; +} + +.ti-cpu:before { + content: "\ef8e"; +} + +.ti-cpu-2:before { + content: "\f075"; +} + +.ti-cpu-off:before { + content: "\f108"; +} + +.ti-crane:before { + content: "\ef27"; +} + +.ti-crane-off:before { + content: "\f109"; +} + +.ti-creative-commons:before { + content: "\efb3"; +} + +.ti-creative-commons-by:before { + content: "\f21f"; +} + +.ti-creative-commons-nc:before { + content: "\f220"; +} + +.ti-creative-commons-nd:before { + content: "\f221"; +} + +.ti-creative-commons-off:before { + content: "\f10a"; +} + +.ti-creative-commons-sa:before { + content: "\f222"; +} + +.ti-creative-commons-zero:before { + content: "\f223"; +} + +.ti-credit-card:before { + content: "\ea84"; +} + +.ti-credit-card-off:before { + content: "\ed11"; +} + +.ti-cricket:before { + content: "\f09a"; +} + +.ti-crop:before { + content: "\ea85"; +} + +.ti-cross:before { + content: "\ef8f"; +} + +.ti-cross-off:before { + content: "\f10b"; +} + +.ti-crosshair:before { + content: "\ec3e"; +} + +.ti-crown:before { + content: "\ed12"; +} + +.ti-crown-off:before { + content: "\ee50"; +} + +.ti-crutches:before { + content: "\ef5b"; +} + +.ti-crutches-off:before { + content: "\f10c"; +} + +.ti-crystal-ball:before { + content: "\f57b"; +} + +.ti-cup:before { + content: "\ef28"; +} + +.ti-cup-off:before { + content: "\f10d"; +} + +.ti-curling:before { + content: "\efc8"; +} + +.ti-curly-loop:before { + content: "\ecda"; +} + +.ti-currency:before { + content: "\efa6"; +} + +.ti-currency-bahraini:before { + content: "\ee51"; +} + +.ti-currency-baht:before { + content: "\f08a"; +} + +.ti-currency-bitcoin:before { + content: "\ebab"; +} + +.ti-currency-cent:before { + content: "\ee53"; +} + +.ti-currency-dinar:before { + content: "\ee54"; +} + +.ti-currency-dirham:before { + content: "\ee55"; +} + +.ti-currency-dogecoin:before { + content: "\ef4b"; +} + +.ti-currency-dollar:before { + content: "\eb84"; +} + +.ti-currency-dollar-australian:before { + content: "\ee56"; +} + +.ti-currency-dollar-brunei:before { + content: "\f36c"; +} + +.ti-currency-dollar-canadian:before { + content: "\ee57"; +} + +.ti-currency-dollar-guyanese:before { + content: "\f36d"; +} + +.ti-currency-dollar-off:before { + content: "\f3dc"; +} + +.ti-currency-dollar-singapore:before { + content: "\ee58"; +} + +.ti-currency-dollar-zimbabwean:before { + content: "\f36e"; +} + +.ti-currency-dong:before { + content: "\f36f"; +} + +.ti-currency-dram:before { + content: "\f370"; +} + +.ti-currency-ethereum:before { + content: "\ee59"; +} + +.ti-currency-euro:before { + content: "\eb85"; +} + +.ti-currency-euro-off:before { + content: "\f3dd"; +} + +.ti-currency-forint:before { + content: "\ee5a"; +} + +.ti-currency-frank:before { + content: "\ee5b"; +} + +.ti-currency-guarani:before { + content: "\f371"; +} + +.ti-currency-hryvnia:before { + content: "\f372"; +} + +.ti-currency-kip:before { + content: "\f373"; +} + +.ti-currency-krone-czech:before { + content: "\ee5c"; +} + +.ti-currency-krone-danish:before { + content: "\ee5d"; +} + +.ti-currency-krone-swedish:before { + content: "\ee5e"; +} + +.ti-currency-lari:before { + content: "\f374"; +} + +.ti-currency-leu:before { + content: "\ee5f"; +} + +.ti-currency-lira:before { + content: "\ee60"; +} + +.ti-currency-litecoin:before { + content: "\ee61"; +} + +.ti-currency-lyd:before { + content: "\f375"; +} + +.ti-currency-manat:before { + content: "\f376"; +} + +.ti-currency-monero:before { + content: "\f377"; +} + +.ti-currency-naira:before { + content: "\ee62"; +} + +.ti-currency-off:before { + content: "\f3de"; +} + +.ti-currency-paanga:before { + content: "\f378"; +} + +.ti-currency-pound:before { + content: "\ebac"; +} + +.ti-currency-pound-off:before { + content: "\f3df"; +} + +.ti-currency-quetzal:before { + content: "\f379"; +} + +.ti-currency-real:before { + content: "\ee63"; +} + +.ti-currency-renminbi:before { + content: "\ee64"; +} + +.ti-currency-ripple:before { + content: "\ee65"; +} + +.ti-currency-riyal:before { + content: "\ee66"; +} + +.ti-currency-rubel:before { + content: "\ee67"; +} + +.ti-currency-rufiyaa:before { + content: "\f37a"; +} + +.ti-currency-rupee:before { + content: "\ebad"; +} + +.ti-currency-rupee-nepalese:before { + content: "\f37b"; +} + +.ti-currency-shekel:before { + content: "\ee68"; +} + +.ti-currency-solana:before { + content: "\f4a1"; +} + +.ti-currency-som:before { + content: "\f37c"; +} + +.ti-currency-taka:before { + content: "\ee69"; +} + +.ti-currency-tenge:before { + content: "\f37d"; +} + +.ti-currency-tugrik:before { + content: "\ee6a"; +} + +.ti-currency-won:before { + content: "\ee6b"; +} + +.ti-currency-yen:before { + content: "\ebae"; +} + +.ti-currency-yen-off:before { + content: "\f3e0"; +} + +.ti-currency-yuan:before { + content: "\f29a"; +} + +.ti-currency-zloty:before { + content: "\ee6c"; +} + +.ti-current-location:before { + content: "\ecef"; +} + +.ti-current-location-off:before { + content: "\f10e"; +} + +.ti-cursor-off:before { + content: "\f10f"; +} + +.ti-cursor-text:before { + content: "\ee6d"; +} + +.ti-cut:before { + content: "\ea86"; +} + +.ti-cylinder:before { + content: "\f54c"; +} + +.ti-dashboard:before { + content: "\ea87"; +} + +.ti-dashboard-off:before { + content: "\f3e1"; +} + +.ti-database:before { + content: "\ea88"; +} + +.ti-database-export:before { + content: "\ee6e"; +} + +.ti-database-import:before { + content: "\ee6f"; +} + +.ti-database-off:before { + content: "\ee70"; +} + +.ti-deer:before { + content: "\f4c5"; +} + +.ti-delta:before { + content: "\f53c"; +} + +.ti-dental:before { + content: "\f025"; +} + +.ti-dental-broken:before { + content: "\f286"; +} + +.ti-dental-off:before { + content: "\f110"; +} + +.ti-details:before { + content: "\ee71"; +} + +.ti-details-off:before { + content: "\f3e2"; +} + +.ti-device-airpods:before { + content: "\f5a9"; +} + +.ti-device-analytics:before { + content: "\ee72"; +} + +.ti-device-audio-tape:before { + content: "\ee73"; +} + +.ti-device-camera-phone:before { + content: "\f233"; +} + +.ti-device-cctv:before { + content: "\ee74"; +} + +.ti-device-cctv-off:before { + content: "\f3e3"; +} + +.ti-device-computer-camera:before { + content: "\ee76"; +} + +.ti-device-computer-camera-off:before { + content: "\ee75"; +} + +.ti-device-desktop:before { + content: "\ea89"; +} + +.ti-device-desktop-analytics:before { + content: "\ee77"; +} + +.ti-device-desktop-off:before { + content: "\ee78"; +} + +.ti-device-floppy:before { + content: "\eb62"; +} + +.ti-device-gamepad:before { + content: "\eb63"; +} + +.ti-device-gamepad-2:before { + content: "\f1d2"; +} + +.ti-device-heart-monitor:before { + content: "\f060"; +} + +.ti-device-laptop:before { + content: "\eb64"; +} + +.ti-device-laptop-off:before { + content: "\f061"; +} + +.ti-device-mobile:before { + content: "\ea8a"; +} + +.ti-device-mobile-charging:before { + content: "\f224"; +} + +.ti-device-mobile-message:before { + content: "\ee79"; +} + +.ti-device-mobile-off:before { + content: "\f062"; +} + +.ti-device-mobile-rotated:before { + content: "\ecdb"; +} + +.ti-device-mobile-vibration:before { + content: "\eb86"; +} + +.ti-device-nintendo:before { + content: "\f026"; +} + +.ti-device-nintendo-off:before { + content: "\f111"; +} + +.ti-device-sd-card:before { + content: "\f384"; +} + +.ti-device-sim:before { + content: "\f4b2"; +} + +.ti-device-sim-1:before { + content: "\f4af"; +} + +.ti-device-sim-2:before { + content: "\f4b0"; +} + +.ti-device-sim-3:before { + content: "\f4b1"; +} + +.ti-device-speaker:before { + content: "\ea8b"; +} + +.ti-device-speaker-off:before { + content: "\f112"; +} + +.ti-device-tablet:before { + content: "\ea8c"; +} + +.ti-device-tablet-off:before { + content: "\f063"; +} + +.ti-device-tv:before { + content: "\ea8d"; +} + +.ti-device-tv-off:before { + content: "\f064"; +} + +.ti-device-tv-old:before { + content: "\f1d3"; +} + +.ti-device-watch:before { + content: "\ebf9"; +} + +.ti-device-watch-off:before { + content: "\f065"; +} + +.ti-device-watch-stats:before { + content: "\ef7d"; +} + +.ti-device-watch-stats-2:before { + content: "\ef7c"; +} + +.ti-devices:before { + content: "\eb87"; +} + +.ti-devices-2:before { + content: "\ed29"; +} + +.ti-devices-off:before { + content: "\f3e4"; +} + +.ti-devices-pc:before { + content: "\ee7a"; +} + +.ti-devices-pc-off:before { + content: "\f113"; +} + +.ti-dialpad:before { + content: "\f067"; +} + +.ti-dialpad-off:before { + content: "\f114"; +} + +.ti-diamond:before { + content: "\eb65"; +} + +.ti-diamond-off:before { + content: "\f115"; +} + +.ti-diamonds:before { + content: "\eff5"; +} + +.ti-dice:before { + content: "\eb66"; +} + +.ti-dice-1:before { + content: "\f08b"; +} + +.ti-dice-2:before { + content: "\f08c"; +} + +.ti-dice-3:before { + content: "\f08d"; +} + +.ti-dice-4:before { + content: "\f08e"; +} + +.ti-dice-5:before { + content: "\f08f"; +} + +.ti-dice-6:before { + content: "\f090"; +} + +.ti-dimensions:before { + content: "\ee7b"; +} + +.ti-direction:before { + content: "\ebfb"; +} + +.ti-direction-horizontal:before { + content: "\ebfa"; +} + +.ti-direction-sign:before { + content: "\f1f7"; +} + +.ti-direction-sign-off:before { + content: "\f3e5"; +} + +.ti-directions:before { + content: "\ea8e"; +} + +.ti-directions-off:before { + content: "\f116"; +} + +.ti-disabled:before { + content: "\ea8f"; +} + +.ti-disabled-2:before { + content: "\ebaf"; +} + +.ti-disabled-off:before { + content: "\f117"; +} + +.ti-disc:before { + content: "\ea90"; +} + +.ti-disc-golf:before { + content: "\f385"; +} + +.ti-disc-off:before { + content: "\f118"; +} + +.ti-discount:before { + content: "\ebbd"; +} + +.ti-discount-2:before { + content: "\ee7c"; +} + +.ti-discount-2-off:before { + content: "\f3e6"; +} + +.ti-discount-check:before { + content: "\f1f8"; +} + +.ti-discount-off:before { + content: "\f3e7"; +} + +.ti-divide:before { + content: "\ed5c"; +} + +.ti-dna:before { + content: "\ee7d"; +} + +.ti-dna-2:before { + content: "\ef5c"; +} + +.ti-dna-2-off:before { + content: "\f119"; +} + +.ti-dna-off:before { + content: "\f11a"; +} + +.ti-dog-bowl:before { + content: "\ef29"; +} + +.ti-door:before { + content: "\ef4e"; +} + +.ti-door-enter:before { + content: "\ef4c"; +} + +.ti-door-exit:before { + content: "\ef4d"; +} + +.ti-door-off:before { + content: "\f11b"; +} + +.ti-dots:before { + content: "\ea95"; +} + +.ti-dots-circle-horizontal:before { + content: "\ea91"; +} + +.ti-dots-diagonal:before { + content: "\ea93"; +} + +.ti-dots-diagonal-2:before { + content: "\ea92"; +} + +.ti-dots-vertical:before { + content: "\ea94"; +} + +.ti-download:before { + content: "\ea96"; +} + +.ti-download-off:before { + content: "\f11c"; +} + +.ti-drag-drop:before { + content: "\eb89"; +} + +.ti-drag-drop-2:before { + content: "\eb88"; +} + +.ti-drone:before { + content: "\ed79"; +} + +.ti-drone-off:before { + content: "\ee7e"; +} + +.ti-drop-circle:before { + content: "\efde"; +} + +.ti-droplet:before { + content: "\ea97"; +} + +.ti-droplet-filled:before { + content: "\ee80"; +} + +.ti-droplet-filled-2:before { + content: "\ee7f"; +} + +.ti-droplet-half:before { + content: "\ee82"; +} + +.ti-droplet-half-2:before { + content: "\ee81"; +} + +.ti-droplet-off:before { + content: "\ee83"; +} + +.ti-e-passport:before { + content: "\f4df"; +} + +.ti-ear:before { + content: "\ebce"; +} + +.ti-ear-off:before { + content: "\ee84"; +} + +.ti-ease-in:before { + content: "\f573"; +} + +.ti-ease-in-control-point:before { + content: "\f570"; +} + +.ti-ease-in-out:before { + content: "\f572"; +} + +.ti-ease-in-out-control-points:before { + content: "\f571"; +} + +.ti-ease-out:before { + content: "\f575"; +} + +.ti-ease-out-control-point:before { + content: "\f574"; +} + +.ti-edit:before { + content: "\ea98"; +} + +.ti-edit-circle:before { + content: "\ee85"; +} + +.ti-edit-circle-off:before { + content: "\f11d"; +} + +.ti-edit-off:before { + content: "\f11e"; +} + +.ti-egg:before { + content: "\eb8a"; +} + +.ti-egg-cracked:before { + content: "\f2d6"; +} + +.ti-egg-fried:before { + content: "\f386"; +} + +.ti-egg-off:before { + content: "\f11f"; +} + +.ti-eggs:before { + content: "\f500"; +} + +.ti-elevator:before { + content: "\efdf"; +} + +.ti-elevator-off:before { + content: "\f3e8"; +} + +.ti-emergency-bed:before { + content: "\ef5d"; +} + +.ti-empathize:before { + content: "\f29b"; +} + +.ti-empathize-off:before { + content: "\f3e9"; +} + +.ti-emphasis:before { + content: "\ebcf"; +} + +.ti-engine:before { + content: "\ef7e"; +} + +.ti-engine-off:before { + content: "\f120"; +} + +.ti-equal:before { + content: "\ee87"; +} + +.ti-equal-double:before { + content: "\f4e1"; +} + +.ti-equal-not:before { + content: "\ee86"; +} + +.ti-eraser:before { + content: "\eb8b"; +} + +.ti-eraser-off:before { + content: "\f121"; +} + +.ti-error-404:before { + content: "\f027"; +} + +.ti-error-404-off:before { + content: "\f122"; +} + +.ti-exchange:before { + content: "\ebe7"; +} + +.ti-exchange-off:before { + content: "\f123"; +} + +.ti-exclamation-mark:before { + content: "\efb4"; +} + +.ti-exclamation-mark-off:before { + content: "\f124"; +} + +.ti-explicit:before { + content: "\f256"; +} + +.ti-explicit-off:before { + content: "\f3ea"; +} + +.ti-exposure:before { + content: "\eb8c"; +} + +.ti-exposure-0:before { + content: "\f29c"; +} + +.ti-exposure-minus-1:before { + content: "\f29d"; +} + +.ti-exposure-minus-2:before { + content: "\f29e"; +} + +.ti-exposure-off:before { + content: "\f3eb"; +} + +.ti-exposure-plus-1:before { + content: "\f29f"; +} + +.ti-exposure-plus-2:before { + content: "\f2a0"; +} + +.ti-external-link:before { + content: "\ea99"; +} + +.ti-external-link-off:before { + content: "\f125"; +} + +.ti-eye:before { + content: "\ea9a"; +} + +.ti-eye-check:before { + content: "\ee88"; +} + +.ti-eye-off:before { + content: "\ecf0"; +} + +.ti-eye-table:before { + content: "\ef5e"; +} + +.ti-eyeglass:before { + content: "\ee8a"; +} + +.ti-eyeglass-2:before { + content: "\ee89"; +} + +.ti-eyeglass-off:before { + content: "\f126"; +} + +.ti-face-id:before { + content: "\ea9b"; +} + +.ti-face-id-error:before { + content: "\efa7"; +} + +.ti-face-mask:before { + content: "\efb5"; +} + +.ti-face-mask-off:before { + content: "\f127"; +} + +.ti-fall:before { + content: "\ecb9"; +} + +.ti-feather:before { + content: "\ee8b"; +} + +.ti-feather-off:before { + content: "\f128"; +} + +.ti-fence:before { + content: "\ef2a"; +} + +.ti-fence-off:before { + content: "\f129"; +} + +.ti-fidget-spinner:before { + content: "\f068"; +} + +.ti-file:before { + content: "\eaa4"; +} + +.ti-file-3d:before { + content: "\f032"; +} + +.ti-file-alert:before { + content: "\ede6"; +} + +.ti-file-analytics:before { + content: "\ede7"; +} + +.ti-file-arrow-left:before { + content: "\f033"; +} + +.ti-file-arrow-right:before { + content: "\f034"; +} + +.ti-file-barcode:before { + content: "\f035"; +} + +.ti-file-broken:before { + content: "\f501"; +} + +.ti-file-certificate:before { + content: "\ed4d"; +} + +.ti-file-chart:before { + content: "\f036"; +} + +.ti-file-check:before { + content: "\ea9c"; +} + +.ti-file-code:before { + content: "\ebd0"; +} + +.ti-file-code-2:before { + content: "\ede8"; +} + +.ti-file-database:before { + content: "\f037"; +} + +.ti-file-delta:before { + content: "\f53d"; +} + +.ti-file-description:before { + content: "\f028"; +} + +.ti-file-diff:before { + content: "\ecf1"; +} + +.ti-file-digit:before { + content: "\efa8"; +} + +.ti-file-dislike:before { + content: "\ed2a"; +} + +.ti-file-dollar:before { + content: "\efe0"; +} + +.ti-file-dots:before { + content: "\f038"; +} + +.ti-file-download:before { + content: "\ea9d"; +} + +.ti-file-euro:before { + content: "\efe1"; +} + +.ti-file-export:before { + content: "\ede9"; +} + +.ti-file-function:before { + content: "\f53e"; +} + +.ti-file-horizontal:before { + content: "\ebb0"; +} + +.ti-file-import:before { + content: "\edea"; +} + +.ti-file-infinity:before { + content: "\f502"; +} + +.ti-file-info:before { + content: "\edec"; +} + +.ti-file-invoice:before { + content: "\eb67"; +} + +.ti-file-lambda:before { + content: "\f53f"; +} + +.ti-file-like:before { + content: "\ed2b"; +} + +.ti-file-minus:before { + content: "\ea9e"; +} + +.ti-file-music:before { + content: "\ea9f"; +} + +.ti-file-off:before { + content: "\ecf2"; +} + +.ti-file-orientation:before { + content: "\f2a1"; +} + +.ti-file-pencil:before { + content: "\f039"; +} + +.ti-file-percent:before { + content: "\f540"; +} + +.ti-file-phone:before { + content: "\ecdc"; +} + +.ti-file-plus:before { + content: "\eaa0"; +} + +.ti-file-power:before { + content: "\f03a"; +} + +.ti-file-report:before { + content: "\eded"; +} + +.ti-file-rss:before { + content: "\f03b"; +} + +.ti-file-scissors:before { + content: "\f03c"; +} + +.ti-file-search:before { + content: "\ed5d"; +} + +.ti-file-settings:before { + content: "\f029"; +} + +.ti-file-shredder:before { + content: "\eaa1"; +} + +.ti-file-signal:before { + content: "\f03d"; +} + +.ti-file-spreadsheet:before { + content: "\f03e"; +} + +.ti-file-stack:before { + content: "\f503"; +} + +.ti-file-star:before { + content: "\f03f"; +} + +.ti-file-symlink:before { + content: "\ed53"; +} + +.ti-file-text:before { + content: "\eaa2"; +} + +.ti-file-time:before { + content: "\f040"; +} + +.ti-file-typography:before { + content: "\f041"; +} + +.ti-file-unknown:before { + content: "\f042"; +} + +.ti-file-upload:before { + content: "\ec91"; +} + +.ti-file-vector:before { + content: "\f043"; +} + +.ti-file-x:before { + content: "\eaa3"; +} + +.ti-file-zip:before { + content: "\ed4e"; +} + +.ti-files:before { + content: "\edef"; +} + +.ti-files-off:before { + content: "\edee"; +} + +.ti-filter:before { + content: "\eaa5"; +} + +.ti-filter-off:before { + content: "\ed2c"; +} + +.ti-fingerprint:before { + content: "\ebd1"; +} + +.ti-fingerprint-off:before { + content: "\f12a"; +} + +.ti-fire-hydrant:before { + content: "\f3a9"; +} + +.ti-fire-hydrant-off:before { + content: "\f3ec"; +} + +.ti-firetruck:before { + content: "\ebe8"; +} + +.ti-first-aid-kit:before { + content: "\ef5f"; +} + +.ti-first-aid-kit-off:before { + content: "\f3ed"; +} + +.ti-fish:before { + content: "\ef2b"; +} + +.ti-fish-bone:before { + content: "\f287"; +} + +.ti-fish-christianity:before { + content: "\f58b"; +} + +.ti-fish-hook:before { + content: "\f1f9"; +} + +.ti-fish-hook-off:before { + content: "\f3ee"; +} + +.ti-fish-off:before { + content: "\f12b"; +} + +.ti-flag:before { + content: "\eaa6"; +} + +.ti-flag-2:before { + content: "\ee8c"; +} + +.ti-flag-2-off:before { + content: "\f12c"; +} + +.ti-flag-3:before { + content: "\ee8d"; +} + +.ti-flag-off:before { + content: "\f12d"; +} + +.ti-flame:before { + content: "\ec2c"; +} + +.ti-flame-off:before { + content: "\f12e"; +} + +.ti-flare:before { + content: "\ee8e"; +} + +.ti-flask:before { + content: "\ebd2"; +} + +.ti-flask-2:before { + content: "\ef60"; +} + +.ti-flask-2-off:before { + content: "\f12f"; +} + +.ti-flask-off:before { + content: "\f130"; +} + +.ti-flip-flops:before { + content: "\f564"; +} + +.ti-flip-horizontal:before { + content: "\eaa7"; +} + +.ti-flip-vertical:before { + content: "\eaa8"; +} + +.ti-float-center:before { + content: "\ebb1"; +} + +.ti-float-left:before { + content: "\ebb2"; +} + +.ti-float-none:before { + content: "\ed13"; +} + +.ti-float-right:before { + content: "\ebb3"; +} + +.ti-flower:before { + content: "\eff6"; +} + +.ti-flower-off:before { + content: "\f131"; +} + +.ti-focus:before { + content: "\eb8d"; +} + +.ti-focus-2:before { + content: "\ebd3"; +} + +.ti-focus-centered:before { + content: "\f02a"; +} + +.ti-fold:before { + content: "\ed56"; +} + +.ti-fold-down:before { + content: "\ed54"; +} + +.ti-fold-up:before { + content: "\ed55"; +} + +.ti-folder:before { + content: "\eaad"; +} + +.ti-folder-minus:before { + content: "\eaaa"; +} + +.ti-folder-off:before { + content: "\ed14"; +} + +.ti-folder-plus:before { + content: "\eaab"; +} + +.ti-folder-x:before { + content: "\eaac"; +} + +.ti-folders:before { + content: "\eaae"; +} + +.ti-folders-off:before { + content: "\f133"; +} + +.ti-forbid:before { + content: "\ebd5"; +} + +.ti-forbid-2:before { + content: "\ebd4"; +} + +.ti-forklift:before { + content: "\ebe9"; +} + +.ti-forms:before { + content: "\ee8f"; +} + +.ti-fountain:before { + content: "\f09b"; +} + +.ti-fountain-off:before { + content: "\f134"; +} + +.ti-frame:before { + content: "\eaaf"; +} + +.ti-frame-off:before { + content: "\f135"; +} + +.ti-free-rights:before { + content: "\efb6"; +} + +.ti-fridge:before { + content: "\f1fa"; +} + +.ti-fridge-off:before { + content: "\f3ef"; +} + +.ti-friends:before { + content: "\eab0"; +} + +.ti-friends-off:before { + content: "\f136"; +} + +.ti-function:before { + content: "\f225"; +} + +.ti-function-off:before { + content: "\f3f0"; +} + +.ti-garden-cart:before { + content: "\f23e"; +} + +.ti-garden-cart-off:before { + content: "\f3f1"; +} + +.ti-gas-station:before { + content: "\ec7d"; +} + +.ti-gas-station-off:before { + content: "\f137"; +} + +.ti-gauge:before { + content: "\eab1"; +} + +.ti-gauge-off:before { + content: "\f138"; +} + +.ti-gavel:before { + content: "\ef90"; +} + +.ti-gender-agender:before { + content: "\f0e1"; +} + +.ti-gender-androgyne:before { + content: "\f0e2"; +} + +.ti-gender-bigender:before { + content: "\f0e3"; +} + +.ti-gender-demiboy:before { + content: "\f0e4"; +} + +.ti-gender-demigirl:before { + content: "\f0e5"; +} + +.ti-gender-epicene:before { + content: "\f0e6"; +} + +.ti-gender-female:before { + content: "\f0e7"; +} + +.ti-gender-femme:before { + content: "\f0e8"; +} + +.ti-gender-genderfluid:before { + content: "\f0e9"; +} + +.ti-gender-genderless:before { + content: "\f0ea"; +} + +.ti-gender-genderqueer:before { + content: "\f0eb"; +} + +.ti-gender-hermaphrodite:before { + content: "\f0ec"; +} + +.ti-gender-intergender:before { + content: "\f0ed"; +} + +.ti-gender-male:before { + content: "\f0ee"; +} + +.ti-gender-neutrois:before { + content: "\f0ef"; +} + +.ti-gender-third:before { + content: "\f0f0"; +} + +.ti-gender-transgender:before { + content: "\f0f1"; +} + +.ti-gender-trasvesti:before { + content: "\f0f2"; +} + +.ti-geometry:before { + content: "\ee90"; +} + +.ti-ghost:before { + content: "\eb8e"; +} + +.ti-ghost-2:before { + content: "\f57c"; +} + +.ti-ghost-off:before { + content: "\f3f2"; +} + +.ti-gif:before { + content: "\f257"; +} + +.ti-gift:before { + content: "\eb68"; +} + +.ti-gift-card:before { + content: "\f3aa"; +} + +.ti-gift-off:before { + content: "\f3f3"; +} + +.ti-git-branch:before { + content: "\eab2"; +} + +.ti-git-branch-deleted:before { + content: "\f57d"; +} + +.ti-git-cherry-pick:before { + content: "\f57e"; +} + +.ti-git-commit:before { + content: "\eab3"; +} + +.ti-git-compare:before { + content: "\eab4"; +} + +.ti-git-fork:before { + content: "\eb8f"; +} + +.ti-git-merge:before { + content: "\eab5"; +} + +.ti-git-pull-request:before { + content: "\eab6"; +} + +.ti-git-pull-request-closed:before { + content: "\ef7f"; +} + +.ti-git-pull-request-draft:before { + content: "\efb7"; +} + +.ti-gizmo:before { + content: "\f02b"; +} + +.ti-glass:before { + content: "\eab8"; +} + +.ti-glass-full:before { + content: "\eab7"; +} + +.ti-glass-off:before { + content: "\ee91"; +} + +.ti-globe:before { + content: "\eab9"; +} + +.ti-globe-off:before { + content: "\f139"; +} + +.ti-go-game:before { + content: "\f512"; +} + +.ti-golf:before { + content: "\ed8c"; +} + +.ti-golf-off:before { + content: "\f13a"; +} + +.ti-gps:before { + content: "\ed7a"; +} + +.ti-gradienter:before { + content: "\f3ab"; +} + +.ti-grain:before { + content: "\ee92"; +} + +.ti-graph:before { + content: "\f288"; +} + +.ti-graph-off:before { + content: "\f3f4"; +} + +.ti-grave:before { + content: "\f580"; +} + +.ti-grave-2:before { + content: "\f57f"; +} + +.ti-grid-dots:before { + content: "\eaba"; +} + +.ti-grid-pattern:before { + content: "\efc9"; +} + +.ti-grill:before { + content: "\efa9"; +} + +.ti-grill-fork:before { + content: "\f35b"; +} + +.ti-grill-off:before { + content: "\f3f5"; +} + +.ti-grill-spatula:before { + content: "\f35c"; +} + +.ti-grip-horizontal:before { + content: "\ec00"; +} + +.ti-grip-vertical:before { + content: "\ec01"; +} + +.ti-growth:before { + content: "\ee93"; +} + +.ti-guitar-pick:before { + content: "\f4c6"; +} + +.ti-h-1:before { + content: "\ec94"; +} + +.ti-h-2:before { + content: "\ec95"; +} + +.ti-h-3:before { + content: "\ec96"; +} + +.ti-h-4:before { + content: "\ec97"; +} + +.ti-h-5:before { + content: "\ec98"; +} + +.ti-h-6:before { + content: "\ec99"; +} + +.ti-hammer:before { + content: "\ef91"; +} + +.ti-hammer-off:before { + content: "\f13c"; +} + +.ti-hand-click:before { + content: "\ef4f"; +} + +.ti-hand-finger:before { + content: "\ee94"; +} + +.ti-hand-finger-off:before { + content: "\f13d"; +} + +.ti-hand-grab:before { + content: "\f091"; +} + +.ti-hand-little-finger:before { + content: "\ee95"; +} + +.ti-hand-middle-finger:before { + content: "\ec2d"; +} + +.ti-hand-move:before { + content: "\ef50"; +} + +.ti-hand-off:before { + content: "\ed15"; +} + +.ti-hand-ring-finger:before { + content: "\ee96"; +} + +.ti-hand-rock:before { + content: "\ee97"; +} + +.ti-hand-stop:before { + content: "\ec2e"; +} + +.ti-hand-three-fingers:before { + content: "\ee98"; +} + +.ti-hand-two-fingers:before { + content: "\ee99"; +} + +.ti-hanger:before { + content: "\ee9a"; +} + +.ti-hanger-2:before { + content: "\f09c"; +} + +.ti-hanger-off:before { + content: "\f13e"; +} + +.ti-hash:before { + content: "\eabc"; +} + +.ti-haze:before { + content: "\efaa"; +} + +.ti-heading:before { + content: "\ee9b"; +} + +.ti-heading-off:before { + content: "\f13f"; +} + +.ti-headphones:before { + content: "\eabd"; +} + +.ti-headphones-off:before { + content: "\ed1d"; +} + +.ti-headset:before { + content: "\eb90"; +} + +.ti-headset-off:before { + content: "\f3f6"; +} + +.ti-health-recognition:before { + content: "\f1fb"; +} + +.ti-heart:before { + content: "\eabe"; +} + +.ti-heart-broken:before { + content: "\ecba"; +} + +.ti-heart-handshake:before { + content: "\f0f3"; +} + +.ti-heart-minus:before { + content: "\f140"; +} + +.ti-heart-off:before { + content: "\f141"; +} + +.ti-heart-plus:before { + content: "\f142"; +} + +.ti-heart-rate-monitor:before { + content: "\ef61"; +} + +.ti-heartbeat:before { + content: "\ef92"; +} + +.ti-hearts:before { + content: "\f387"; +} + +.ti-hearts-off:before { + content: "\f3f7"; +} + +.ti-helicopter:before { + content: "\ed8e"; +} + +.ti-helicopter-landing:before { + content: "\ed8d"; +} + +.ti-helmet:before { + content: "\efca"; +} + +.ti-helmet-off:before { + content: "\f143"; +} + +.ti-help:before { + content: "\eabf"; +} + +.ti-help-off:before { + content: "\f3f8"; +} + +.ti-hexagon:before { + content: "\ec02"; +} + +.ti-hexagon-3d:before { + content: "\f4c7"; +} + +.ti-hexagon-letter-a:before { + content: "\f463"; +} + +.ti-hexagon-letter-b:before { + content: "\f464"; +} + +.ti-hexagon-letter-c:before { + content: "\f465"; +} + +.ti-hexagon-letter-d:before { + content: "\f466"; +} + +.ti-hexagon-letter-e:before { + content: "\f467"; +} + +.ti-hexagon-letter-f:before { + content: "\f468"; +} + +.ti-hexagon-letter-g:before { + content: "\f469"; +} + +.ti-hexagon-letter-h:before { + content: "\f46a"; +} + +.ti-hexagon-letter-i:before { + content: "\f46b"; +} + +.ti-hexagon-letter-j:before { + content: "\f46c"; +} + +.ti-hexagon-letter-k:before { + content: "\f46d"; +} + +.ti-hexagon-letter-l:before { + content: "\f46e"; +} + +.ti-hexagon-letter-m:before { + content: "\f46f"; +} + +.ti-hexagon-letter-n:before { + content: "\f470"; +} + +.ti-hexagon-letter-o:before { + content: "\f471"; +} + +.ti-hexagon-letter-p:before { + content: "\f472"; +} + +.ti-hexagon-letter-q:before { + content: "\f473"; +} + +.ti-hexagon-letter-r:before { + content: "\f474"; +} + +.ti-hexagon-letter-s:before { + content: "\f475"; +} + +.ti-hexagon-letter-t:before { + content: "\f476"; +} + +.ti-hexagon-letter-u:before { + content: "\f477"; +} + +.ti-hexagon-letter-v:before { + content: "\f4b3"; +} + +.ti-hexagon-letter-w:before { + content: "\f478"; +} + +.ti-hexagon-letter-x:before { + content: "\f479"; +} + +.ti-hexagon-letter-y:before { + content: "\f47a"; +} + +.ti-hexagon-letter-z:before { + content: "\f47b"; +} + +.ti-hexagon-number-0:before { + content: "\f459"; +} + +.ti-hexagon-number-1:before { + content: "\f45a"; +} + +.ti-hexagon-number-2:before { + content: "\f45b"; +} + +.ti-hexagon-number-3:before { + content: "\f45c"; +} + +.ti-hexagon-number-4:before { + content: "\f45d"; +} + +.ti-hexagon-number-5:before { + content: "\f45e"; +} + +.ti-hexagon-number-6:before { + content: "\f45f"; +} + +.ti-hexagon-number-7:before { + content: "\f460"; +} + +.ti-hexagon-number-8:before { + content: "\f461"; +} + +.ti-hexagon-number-9:before { + content: "\f462"; +} + +.ti-hexagon-off:before { + content: "\ee9c"; +} + +.ti-hexagons:before { + content: "\f09d"; +} + +.ti-hexagons-off:before { + content: "\f3f9"; +} + +.ti-hierarchy:before { + content: "\ee9e"; +} + +.ti-hierarchy-2:before { + content: "\ee9d"; +} + +.ti-hierarchy-3:before { + content: "\f289"; +} + +.ti-hierarchy-off:before { + content: "\f3fa"; +} + +.ti-highlight:before { + content: "\ef3f"; +} + +.ti-highlight-off:before { + content: "\f144"; +} + +.ti-history:before { + content: "\ebea"; +} + +.ti-history-off:before { + content: "\f3fb"; +} + +.ti-history-toggle:before { + content: "\f1fc"; +} + +.ti-home:before { + content: "\eac1"; +} + +.ti-home-2:before { + content: "\eac0"; +} + +.ti-home-bolt:before { + content: "\f336"; +} + +.ti-home-cancel:before { + content: "\f350"; +} + +.ti-home-check:before { + content: "\f337"; +} + +.ti-home-cog:before { + content: "\f338"; +} + +.ti-home-dollar:before { + content: "\f339"; +} + +.ti-home-dot:before { + content: "\f33a"; +} + +.ti-home-down:before { + content: "\f33b"; +} + +.ti-home-eco:before { + content: "\f351"; +} + +.ti-home-edit:before { + content: "\f352"; +} + +.ti-home-exclamation:before { + content: "\f33c"; +} + +.ti-home-hand:before { + content: "\f504"; +} + +.ti-home-heart:before { + content: "\f353"; +} + +.ti-home-infinity:before { + content: "\f505"; +} + +.ti-home-link:before { + content: "\f354"; +} + +.ti-home-minus:before { + content: "\f33d"; +} + +.ti-home-move:before { + content: "\f33e"; +} + +.ti-home-off:before { + content: "\f145"; +} + +.ti-home-plus:before { + content: "\f33f"; +} + +.ti-home-question:before { + content: "\f340"; +} + +.ti-home-ribbon:before { + content: "\f355"; +} + +.ti-home-search:before { + content: "\f341"; +} + +.ti-home-share:before { + content: "\f342"; +} + +.ti-home-shield:before { + content: "\f343"; +} + +.ti-home-signal:before { + content: "\f356"; +} + +.ti-home-star:before { + content: "\f344"; +} + +.ti-home-stats:before { + content: "\f345"; +} + +.ti-home-up:before { + content: "\f346"; +} + +.ti-home-x:before { + content: "\f347"; +} + +.ti-horse-toy:before { + content: "\f28a"; +} + +.ti-hotel-service:before { + content: "\ef80"; +} + +.ti-hourglass:before { + content: "\ef93"; +} + +.ti-hourglass-empty:before { + content: "\f146"; +} + +.ti-hourglass-high:before { + content: "\f092"; +} + +.ti-hourglass-low:before { + content: "\f093"; +} + +.ti-hourglass-off:before { + content: "\f147"; +} + +.ti-ice-cream:before { + content: "\eac2"; +} + +.ti-ice-cream-2:before { + content: "\ee9f"; +} + +.ti-ice-cream-off:before { + content: "\f148"; +} + +.ti-ice-skating:before { + content: "\efcb"; +} + +.ti-icons:before { + content: "\f1d4"; +} + +.ti-icons-off:before { + content: "\f3fc"; +} + +.ti-id:before { + content: "\eac3"; +} + +.ti-id-badge:before { + content: "\eff7"; +} + +.ti-id-badge-2:before { + content: "\f076"; +} + +.ti-id-badge-off:before { + content: "\f3fd"; +} + +.ti-id-off:before { + content: "\f149"; +} + +.ti-inbox:before { + content: "\eac4"; +} + +.ti-inbox-off:before { + content: "\f14a"; +} + +.ti-indent-decrease:before { + content: "\eb91"; +} + +.ti-indent-increase:before { + content: "\eb92"; +} + +.ti-infinity:before { + content: "\eb69"; +} + +.ti-infinity-off:before { + content: "\f3fe"; +} + +.ti-info-circle:before { + content: "\eac5"; +} + +.ti-info-square:before { + content: "\eac6"; +} + +.ti-inner-shadow-bottom:before { + content: "\f520"; +} + +.ti-inner-shadow-bottom-left:before { + content: "\f51e"; +} + +.ti-inner-shadow-bottom-right:before { + content: "\f51f"; +} + +.ti-inner-shadow-left:before { + content: "\f521"; +} + +.ti-inner-shadow-right:before { + content: "\f522"; +} + +.ti-inner-shadow-top:before { + content: "\f525"; +} + +.ti-inner-shadow-top-left:before { + content: "\f523"; +} + +.ti-inner-shadow-top-right:before { + content: "\f524"; +} + +.ti-input-search:before { + content: "\f2a2"; +} + +.ti-ironing-1:before { + content: "\f2f4"; +} + +.ti-ironing-2:before { + content: "\f2f5"; +} + +.ti-ironing-3:before { + content: "\f2f6"; +} + +.ti-ironing-off:before { + content: "\f2f7"; +} + +.ti-ironing-steam:before { + content: "\f2f9"; +} + +.ti-ironing-steam-off:before { + content: "\f2f8"; +} + +.ti-italic:before { + content: "\eb93"; +} + +.ti-jetpack:before { + content: "\f581"; +} + +.ti-jewish-star:before { + content: "\f3ff"; +} + +.ti-jpg:before { + content: "\f3ac"; +} + +.ti-jump-rope:before { + content: "\ed8f"; +} + +.ti-karate:before { + content: "\ed32"; +} + +.ti-kayak:before { + content: "\f1d6"; +} + +.ti-kering:before { + content: "\efb8"; +} + +.ti-key:before { + content: "\eac7"; +} + +.ti-key-off:before { + content: "\f14b"; +} + +.ti-keyboard:before { + content: "\ebd6"; +} + +.ti-keyboard-hide:before { + content: "\ec7e"; +} + +.ti-keyboard-off:before { + content: "\eea0"; +} + +.ti-keyboard-show:before { + content: "\ec7f"; +} + +.ti-keyframe:before { + content: "\f576"; +} + +.ti-keyframe-align-center:before { + content: "\f582"; +} + +.ti-keyframe-align-horizontal:before { + content: "\f583"; +} + +.ti-keyframe-align-vertical:before { + content: "\f584"; +} + +.ti-keyframes:before { + content: "\f585"; +} + +.ti-ladder:before { + content: "\efe2"; +} + +.ti-ladder-off:before { + content: "\f14c"; +} + +.ti-lambda:before { + content: "\f541"; +} + +.ti-lamp:before { + content: "\efab"; +} + +.ti-lamp-2:before { + content: "\f09e"; +} + +.ti-lamp-off:before { + content: "\f14d"; +} + +.ti-language:before { + content: "\ebbe"; +} + +.ti-language-hiragana:before { + content: "\ef77"; +} + +.ti-language-katakana:before { + content: "\ef78"; +} + +.ti-language-off:before { + content: "\f14e"; +} + +.ti-lasso:before { + content: "\efac"; +} + +.ti-lasso-off:before { + content: "\f14f"; +} + +.ti-lasso-polygon:before { + content: "\f388"; +} + +.ti-layers-difference:before { + content: "\eac8"; +} + +.ti-layers-intersect:before { + content: "\eac9"; +} + +.ti-layers-intersect-2:before { + content: "\eff8"; +} + +.ti-layers-linked:before { + content: "\eea1"; +} + +.ti-layers-off:before { + content: "\f150"; +} + +.ti-layers-subtract:before { + content: "\eaca"; +} + +.ti-layers-union:before { + content: "\eacb"; +} + +.ti-layout:before { + content: "\eadb"; +} + +.ti-layout-2:before { + content: "\eacc"; +} + +.ti-layout-align-bottom:before { + content: "\eacd"; +} + +.ti-layout-align-center:before { + content: "\eace"; +} + +.ti-layout-align-left:before { + content: "\eacf"; +} + +.ti-layout-align-middle:before { + content: "\ead0"; +} + +.ti-layout-align-right:before { + content: "\ead1"; +} + +.ti-layout-align-top:before { + content: "\ead2"; +} + +.ti-layout-board:before { + content: "\ef95"; +} + +.ti-layout-board-split:before { + content: "\ef94"; +} + +.ti-layout-bottombar:before { + content: "\ead3"; +} + +.ti-layout-bottombar-collapse:before { + content: "\f28b"; +} + +.ti-layout-bottombar-expand:before { + content: "\f28c"; +} + +.ti-layout-cards:before { + content: "\ec13"; +} + +.ti-layout-collage:before { + content: "\f389"; +} + +.ti-layout-columns:before { + content: "\ead4"; +} + +.ti-layout-dashboard:before { + content: "\f02c"; +} + +.ti-layout-distribute-horizontal:before { + content: "\ead5"; +} + +.ti-layout-distribute-vertical:before { + content: "\ead6"; +} + +.ti-layout-grid:before { + content: "\edba"; +} + +.ti-layout-grid-add:before { + content: "\edb9"; +} + +.ti-layout-kanban:before { + content: "\ec3f"; +} + +.ti-layout-list:before { + content: "\ec14"; +} + +.ti-layout-navbar:before { + content: "\ead7"; +} + +.ti-layout-navbar-collapse:before { + content: "\f28d"; +} + +.ti-layout-navbar-expand:before { + content: "\f28e"; +} + +.ti-layout-off:before { + content: "\f151"; +} + +.ti-layout-rows:before { + content: "\ead8"; +} + +.ti-layout-sidebar:before { + content: "\eada"; +} + +.ti-layout-sidebar-left-collapse:before { + content: "\f004"; +} + +.ti-layout-sidebar-left-expand:before { + content: "\f005"; +} + +.ti-layout-sidebar-right:before { + content: "\ead9"; +} + +.ti-layout-sidebar-right-collapse:before { + content: "\f006"; +} + +.ti-layout-sidebar-right-expand:before { + content: "\f007"; +} + +.ti-leaf:before { + content: "\ed4f"; +} + +.ti-leaf-off:before { + content: "\f400"; +} + +.ti-lego:before { + content: "\eadc"; +} + +.ti-lego-off:before { + content: "\f401"; +} + +.ti-lemon:before { + content: "\ef10"; +} + +.ti-lemon-2:before { + content: "\ef81"; +} + +.ti-letter-a:before { + content: "\ec50"; +} + +.ti-letter-b:before { + content: "\ec51"; +} + +.ti-letter-c:before { + content: "\ec52"; +} + +.ti-letter-case:before { + content: "\eea5"; +} + +.ti-letter-case-lower:before { + content: "\eea2"; +} + +.ti-letter-case-toggle:before { + content: "\eea3"; +} + +.ti-letter-case-upper:before { + content: "\eea4"; +} + +.ti-letter-d:before { + content: "\ec53"; +} + +.ti-letter-e:before { + content: "\ec54"; +} + +.ti-letter-f:before { + content: "\ec55"; +} + +.ti-letter-g:before { + content: "\ec56"; +} + +.ti-letter-h:before { + content: "\ec57"; +} + +.ti-letter-i:before { + content: "\ec58"; +} + +.ti-letter-j:before { + content: "\ec59"; +} + +.ti-letter-k:before { + content: "\ec5a"; +} + +.ti-letter-l:before { + content: "\ec5b"; +} + +.ti-letter-m:before { + content: "\ec5c"; +} + +.ti-letter-n:before { + content: "\ec5d"; +} + +.ti-letter-o:before { + content: "\ec5e"; +} + +.ti-letter-p:before { + content: "\ec5f"; +} + +.ti-letter-q:before { + content: "\ec60"; +} + +.ti-letter-r:before { + content: "\ec61"; +} + +.ti-letter-s:before { + content: "\ec62"; +} + +.ti-letter-spacing:before { + content: "\eea6"; +} + +.ti-letter-t:before { + content: "\ec63"; +} + +.ti-letter-u:before { + content: "\ec64"; +} + +.ti-letter-v:before { + content: "\ec65"; +} + +.ti-letter-w:before { + content: "\ec66"; +} + +.ti-letter-x:before { + content: "\ec67"; +} + +.ti-letter-y:before { + content: "\ec68"; +} + +.ti-letter-z:before { + content: "\ec69"; +} + +.ti-license:before { + content: "\ebc0"; +} + +.ti-license-off:before { + content: "\f153"; +} + +.ti-lifebuoy:before { + content: "\eadd"; +} + +.ti-lifebuoy-off:before { + content: "\f154"; +} + +.ti-line:before { + content: "\ec40"; +} + +.ti-line-dashed:before { + content: "\eea7"; +} + +.ti-line-dotted:before { + content: "\eea8"; +} + +.ti-line-height:before { + content: "\eb94"; +} + +.ti-link:before { + content: "\eade"; +} + +.ti-link-off:before { + content: "\f402"; +} + +.ti-list:before { + content: "\eb6b"; +} + +.ti-list-check:before { + content: "\eb6a"; +} + +.ti-list-details:before { + content: "\ef40"; +} + +.ti-list-numbers:before { + content: "\ef11"; +} + +.ti-list-search:before { + content: "\eea9"; +} + +.ti-live-photo:before { + content: "\eadf"; +} + +.ti-live-photo-off:before { + content: "\f403"; +} + +.ti-live-view:before { + content: "\ec6b"; +} + +.ti-loader:before { + content: "\eca3"; +} + +.ti-loader-2:before { + content: "\f226"; +} + +.ti-loader-3:before { + content: "\f513"; +} + +.ti-loader-quarter:before { + content: "\eca2"; +} + +.ti-location:before { + content: "\eae0"; +} + +.ti-location-broken:before { + content: "\f2c4"; +} + +.ti-location-off:before { + content: "\f155"; +} + +.ti-lock:before { + content: "\eae2"; +} + +.ti-lock-access:before { + content: "\eeaa"; +} + +.ti-lock-access-off:before { + content: "\f404"; +} + +.ti-lock-off:before { + content: "\ed1e"; +} + +.ti-lock-open:before { + content: "\eae1"; +} + +.ti-lock-open-off:before { + content: "\f156"; +} + +.ti-lock-square:before { + content: "\ef51"; +} + +.ti-logic-and:before { + content: "\f240"; +} + +.ti-logic-buffer:before { + content: "\f241"; +} + +.ti-logic-nand:before { + content: "\f242"; +} + +.ti-logic-nor:before { + content: "\f243"; +} + +.ti-logic-not:before { + content: "\f244"; +} + +.ti-logic-or:before { + content: "\f245"; +} + +.ti-logic-xnor:before { + content: "\f246"; +} + +.ti-logic-xor:before { + content: "\f247"; +} + +.ti-login:before { + content: "\eba7"; +} + +.ti-logout:before { + content: "\eba8"; +} + +.ti-lollipop:before { + content: "\efcc"; +} + +.ti-lollipop-off:before { + content: "\f157"; +} + +.ti-luggage:before { + content: "\efad"; +} + +.ti-luggage-off:before { + content: "\f158"; +} + +.ti-lungs:before { + content: "\ef62"; +} + +.ti-lungs-off:before { + content: "\f405"; +} + +.ti-macro:before { + content: "\eeab"; +} + +.ti-macro-off:before { + content: "\f406"; +} + +.ti-magnet:before { + content: "\eae3"; +} + +.ti-magnet-off:before { + content: "\f159"; +} + +.ti-mail:before { + content: "\eae5"; +} + +.ti-mail-fast:before { + content: "\f069"; +} + +.ti-mail-forward:before { + content: "\eeac"; +} + +.ti-mail-off:before { + content: "\f15a"; +} + +.ti-mail-opened:before { + content: "\eae4"; +} + +.ti-mailbox:before { + content: "\eead"; +} + +.ti-mailbox-off:before { + content: "\f15b"; +} + +.ti-man:before { + content: "\eae6"; +} + +.ti-manual-gearbox:before { + content: "\ed7b"; +} + +.ti-map:before { + content: "\eae9"; +} + +.ti-map-2:before { + content: "\eae7"; +} + +.ti-map-off:before { + content: "\f15c"; +} + +.ti-map-pin:before { + content: "\eae8"; +} + +.ti-map-pin-off:before { + content: "\ecf3"; +} + +.ti-map-pins:before { + content: "\ed5e"; +} + +.ti-map-search:before { + content: "\ef82"; +} + +.ti-markdown:before { + content: "\ec41"; +} + +.ti-markdown-off:before { + content: "\f407"; +} + +.ti-marquee:before { + content: "\ec77"; +} + +.ti-marquee-2:before { + content: "\eeae"; +} + +.ti-marquee-off:before { + content: "\f15d"; +} + +.ti-mars:before { + content: "\ec80"; +} + +.ti-mask:before { + content: "\eeb0"; +} + +.ti-mask-off:before { + content: "\eeaf"; +} + +.ti-masks-theater:before { + content: "\f263"; +} + +.ti-masks-theater-off:before { + content: "\f408"; +} + +.ti-massage:before { + content: "\eeb1"; +} + +.ti-matchstick:before { + content: "\f577"; +} + +.ti-math:before { + content: "\ebeb"; +} + +.ti-math-1-divide-2:before { + content: "\f4e2"; +} + +.ti-math-1-divide-3:before { + content: "\f4e3"; +} + +.ti-math-avg:before { + content: "\f0f4"; +} + +.ti-math-equal-greater:before { + content: "\f4e4"; +} + +.ti-math-equal-lower:before { + content: "\f4e5"; +} + +.ti-math-function:before { + content: "\eeb2"; +} + +.ti-math-function-off:before { + content: "\f15e"; +} + +.ti-math-function-y:before { + content: "\f4e6"; +} + +.ti-math-greater:before { + content: "\f4e7"; +} + +.ti-math-integral:before { + content: "\f4e9"; +} + +.ti-math-integral-x:before { + content: "\f4e8"; +} + +.ti-math-integrals:before { + content: "\f4ea"; +} + +.ti-math-lower:before { + content: "\f4eb"; +} + +.ti-math-max:before { + content: "\f0f5"; +} + +.ti-math-min:before { + content: "\f0f6"; +} + +.ti-math-not:before { + content: "\f4ec"; +} + +.ti-math-off:before { + content: "\f409"; +} + +.ti-math-pi:before { + content: "\f4ee"; +} + +.ti-math-pi-divide-2:before { + content: "\f4ed"; +} + +.ti-math-symbols:before { + content: "\eeb3"; +} + +.ti-math-x-divide-2:before { + content: "\f4ef"; +} + +.ti-math-x-divide-y:before { + content: "\f4f1"; +} + +.ti-math-x-divide-y-2:before { + content: "\f4f0"; +} + +.ti-math-x-minus-x:before { + content: "\f4f2"; +} + +.ti-math-x-minus-y:before { + content: "\f4f3"; +} + +.ti-math-x-plus-x:before { + content: "\f4f4"; +} + +.ti-math-x-plus-y:before { + content: "\f4f5"; +} + +.ti-math-xy:before { + content: "\f4f6"; +} + +.ti-math-y-minus-y:before { + content: "\f4f7"; +} + +.ti-math-y-plus-y:before { + content: "\f4f8"; +} + +.ti-maximize:before { + content: "\eaea"; +} + +.ti-maximize-off:before { + content: "\f15f"; +} + +.ti-meat:before { + content: "\ef12"; +} + +.ti-meat-off:before { + content: "\f40a"; +} + +.ti-medal:before { + content: "\ec78"; +} + +.ti-medal-2:before { + content: "\efcd"; +} + +.ti-medical-cross:before { + content: "\ec2f"; +} + +.ti-medical-cross-off:before { + content: "\f160"; +} + +.ti-medicine-syrup:before { + content: "\ef63"; +} + +.ti-meeple:before { + content: "\f514"; +} + +.ti-menorah:before { + content: "\f58c"; +} + +.ti-menu:before { + content: "\eaeb"; +} + +.ti-menu-2:before { + content: "\ec42"; +} + +.ti-message:before { + content: "\eaef"; +} + +.ti-message-2:before { + content: "\eaec"; +} + +.ti-message-2-code:before { + content: "\f012"; +} + +.ti-message-2-off:before { + content: "\f40b"; +} + +.ti-message-2-share:before { + content: "\f077"; +} + +.ti-message-chatbot:before { + content: "\f38a"; +} + +.ti-message-circle:before { + content: "\eaed"; +} + +.ti-message-circle-2:before { + content: "\ed3f"; +} + +.ti-message-circle-off:before { + content: "\ed40"; +} + +.ti-message-code:before { + content: "\f013"; +} + +.ti-message-dots:before { + content: "\eaee"; +} + +.ti-message-forward:before { + content: "\f28f"; +} + +.ti-message-language:before { + content: "\efae"; +} + +.ti-message-off:before { + content: "\ed41"; +} + +.ti-message-plus:before { + content: "\ec9a"; +} + +.ti-message-report:before { + content: "\ec9b"; +} + +.ti-message-share:before { + content: "\f078"; +} + +.ti-messages:before { + content: "\eb6c"; +} + +.ti-messages-off:before { + content: "\ed42"; +} + +.ti-meteor:before { + content: "\f1fd"; +} + +.ti-meteor-off:before { + content: "\f40c"; +} + +.ti-mickey:before { + content: "\f2a3"; +} + +.ti-microphone:before { + content: "\eaf0"; +} + +.ti-microphone-2:before { + content: "\ef2c"; +} + +.ti-microphone-2-off:before { + content: "\f40d"; +} + +.ti-microphone-off:before { + content: "\ed16"; +} + +.ti-microscope:before { + content: "\ef64"; +} + +.ti-microscope-off:before { + content: "\f40e"; +} + +.ti-microwave:before { + content: "\f248"; +} + +.ti-microwave-off:before { + content: "\f264"; +} + +.ti-military-award:before { + content: "\f079"; +} + +.ti-military-rank:before { + content: "\efcf"; +} + +.ti-milk:before { + content: "\ef13"; +} + +.ti-milk-off:before { + content: "\f40f"; +} + +.ti-milkshake:before { + content: "\f4c8"; +} + +.ti-minimize:before { + content: "\eaf1"; +} + +.ti-minus:before { + content: "\eaf2"; +} + +.ti-minus-vertical:before { + content: "\eeb4"; +} + +.ti-mist:before { + content: "\ec30"; +} + +.ti-mist-off:before { + content: "\f410"; +} + +.ti-moneybag:before { + content: "\f506"; +} + +.ti-mood-angry:before { + content: "\f2de"; +} + +.ti-mood-annoyed:before { + content: "\f2e0"; +} + +.ti-mood-annoyed-2:before { + content: "\f2df"; +} + +.ti-mood-boy:before { + content: "\ed2d"; +} + +.ti-mood-confuzed:before { + content: "\eaf3"; +} + +.ti-mood-crazy-happy:before { + content: "\ed90"; +} + +.ti-mood-cry:before { + content: "\ecbb"; +} + +.ti-mood-empty:before { + content: "\eeb5"; +} + +.ti-mood-happy:before { + content: "\eaf4"; +} + +.ti-mood-kid:before { + content: "\ec03"; +} + +.ti-mood-look-left:before { + content: "\f2c5"; +} + +.ti-mood-look-right:before { + content: "\f2c6"; +} + +.ti-mood-nerd:before { + content: "\f2e1"; +} + +.ti-mood-nervous:before { + content: "\ef96"; +} + +.ti-mood-neutral:before { + content: "\eaf5"; +} + +.ti-mood-off:before { + content: "\f161"; +} + +.ti-mood-sad:before { + content: "\eaf6"; +} + +.ti-mood-sad-2:before { + content: "\f2e2"; +} + +.ti-mood-sad-dizzy:before { + content: "\f2e3"; +} + +.ti-mood-sad-squint:before { + content: "\f2e4"; +} + +.ti-mood-sick:before { + content: "\f2e5"; +} + +.ti-mood-silence:before { + content: "\f2e6"; +} + +.ti-mood-sing:before { + content: "\f2c7"; +} + +.ti-mood-smile:before { + content: "\eaf7"; +} + +.ti-mood-smile-beam:before { + content: "\f2e7"; +} + +.ti-mood-smile-dizzy:before { + content: "\f2e8"; +} + +.ti-mood-suprised:before { + content: "\ec04"; +} + +.ti-mood-tongue:before { + content: "\eb95"; +} + +.ti-mood-tongue-wink:before { + content: "\f2ea"; +} + +.ti-mood-tongue-wink-2:before { + content: "\f2e9"; +} + +.ti-mood-unamused:before { + content: "\f2eb"; +} + +.ti-mood-wink:before { + content: "\f2ed"; +} + +.ti-mood-wink-2:before { + content: "\f2ec"; +} + +.ti-mood-wrrr:before { + content: "\f2ee"; +} + +.ti-mood-xd:before { + content: "\f2ef"; +} + +.ti-moon:before { + content: "\eaf8"; +} + +.ti-moon-2:before { + content: "\ece6"; +} + +.ti-moon-off:before { + content: "\f162"; +} + +.ti-moon-stars:before { + content: "\ece7"; +} + +.ti-moped:before { + content: "\ecbc"; +} + +.ti-motorbike:before { + content: "\eeb6"; +} + +.ti-mountain:before { + content: "\ef97"; +} + +.ti-mountain-off:before { + content: "\f411"; +} + +.ti-mouse:before { + content: "\eaf9"; +} + +.ti-mouse-2:before { + content: "\f1d7"; +} + +.ti-mouse-off:before { + content: "\f163"; +} + +.ti-moustache:before { + content: "\f4c9"; +} + +.ti-movie:before { + content: "\eafa"; +} + +.ti-movie-off:before { + content: "\f164"; +} + +.ti-mug:before { + content: "\eafb"; +} + +.ti-mug-off:before { + content: "\f165"; +} + +.ti-multiplier-0-5x:before { + content: "\ef41"; +} + +.ti-multiplier-1-5x:before { + content: "\ef42"; +} + +.ti-multiplier-1x:before { + content: "\ef43"; +} + +.ti-multiplier-2x:before { + content: "\ef44"; +} + +.ti-mushroom:before { + content: "\ef14"; +} + +.ti-mushroom-off:before { + content: "\f412"; +} + +.ti-music:before { + content: "\eafc"; +} + +.ti-music-off:before { + content: "\f166"; +} + +.ti-navigation:before { + content: "\f2c8"; +} + +.ti-navigation-off:before { + content: "\f413"; +} + +.ti-needle:before { + content: "\f508"; +} + +.ti-needle-thread:before { + content: "\f507"; +} + +.ti-network:before { + content: "\f09f"; +} + +.ti-network-off:before { + content: "\f414"; +} + +.ti-new-section:before { + content: "\ebc1"; +} + +.ti-news:before { + content: "\eafd"; +} + +.ti-news-off:before { + content: "\f167"; +} + +.ti-nfc:before { + content: "\eeb7"; +} + +.ti-nfc-off:before { + content: "\f168"; +} + +.ti-no-copyright:before { + content: "\efb9"; +} + +.ti-no-creative-commons:before { + content: "\efba"; +} + +.ti-no-derivatives:before { + content: "\efbb"; +} + +.ti-north-star:before { + content: "\f014"; +} + +.ti-note:before { + content: "\eb6d"; +} + +.ti-note-off:before { + content: "\f169"; +} + +.ti-notebook:before { + content: "\eb96"; +} + +.ti-notebook-off:before { + content: "\f415"; +} + +.ti-notes:before { + content: "\eb6e"; +} + +.ti-notes-off:before { + content: "\f16a"; +} + +.ti-notification:before { + content: "\eafe"; +} + +.ti-notification-off:before { + content: "\f16b"; +} + +.ti-number:before { + content: "\f1fe"; +} + +.ti-number-0:before { + content: "\edf0"; +} + +.ti-number-1:before { + content: "\edf1"; +} + +.ti-number-2:before { + content: "\edf2"; +} + +.ti-number-3:before { + content: "\edf3"; +} + +.ti-number-4:before { + content: "\edf4"; +} + +.ti-number-5:before { + content: "\edf5"; +} + +.ti-number-6:before { + content: "\edf6"; +} + +.ti-number-7:before { + content: "\edf7"; +} + +.ti-number-8:before { + content: "\edf8"; +} + +.ti-number-9:before { + content: "\edf9"; +} + +.ti-numbers:before { + content: "\f015"; +} + +.ti-nurse:before { + content: "\ef65"; +} + +.ti-octagon:before { + content: "\ecbd"; +} + +.ti-octagon-off:before { + content: "\eeb8"; +} + +.ti-old:before { + content: "\eeb9"; +} + +.ti-olympics:before { + content: "\eeba"; +} + +.ti-olympics-off:before { + content: "\f416"; +} + +.ti-om:before { + content: "\f58d"; +} + +.ti-omega:before { + content: "\eb97"; +} + +.ti-outbound:before { + content: "\f249"; +} + +.ti-outlet:before { + content: "\ebd7"; +} + +.ti-oval:before { + content: "\f02e"; +} + +.ti-oval-vertical:before { + content: "\f02d"; +} + +.ti-overline:before { + content: "\eebb"; +} + +.ti-package:before { + content: "\eaff"; +} + +.ti-package-off:before { + content: "\f16c"; +} + +.ti-packages:before { + content: "\f2c9"; +} + +.ti-packge-export:before { + content: "\f07a"; +} + +.ti-packge-import:before { + content: "\f07b"; +} + +.ti-pacman:before { + content: "\eebc"; +} + +.ti-page-break:before { + content: "\ec81"; +} + +.ti-paint:before { + content: "\eb00"; +} + +.ti-paint-off:before { + content: "\f16d"; +} + +.ti-palette:before { + content: "\eb01"; +} + +.ti-palette-off:before { + content: "\f16e"; +} + +.ti-panorama-horizontal:before { + content: "\ed33"; +} + +.ti-panorama-horizontal-off:before { + content: "\f417"; +} + +.ti-panorama-vertical:before { + content: "\ed34"; +} + +.ti-panorama-vertical-off:before { + content: "\f418"; +} + +.ti-paper-bag:before { + content: "\f02f"; +} + +.ti-paper-bag-off:before { + content: "\f16f"; +} + +.ti-paperclip:before { + content: "\eb02"; +} + +.ti-parachute:before { + content: "\ed7c"; +} + +.ti-parachute-off:before { + content: "\f170"; +} + +.ti-parentheses:before { + content: "\ebd8"; +} + +.ti-parentheses-off:before { + content: "\f171"; +} + +.ti-parking:before { + content: "\eb03"; +} + +.ti-parking-off:before { + content: "\f172"; +} + +.ti-password:before { + content: "\f4ca"; +} + +.ti-paw:before { + content: "\eff9"; +} + +.ti-paw-off:before { + content: "\f419"; +} + +.ti-peace:before { + content: "\ecbe"; +} + +.ti-pencil:before { + content: "\eb04"; +} + +.ti-pencil-minus:before { + content: "\f1eb"; +} + +.ti-pencil-off:before { + content: "\f173"; +} + +.ti-pencil-plus:before { + content: "\f1ec"; +} + +.ti-pennant:before { + content: "\ed7d"; +} + +.ti-pennant-2:before { + content: "\f06a"; +} + +.ti-pennant-off:before { + content: "\f174"; +} + +.ti-pentagon:before { + content: "\efe3"; +} + +.ti-pentagon-off:before { + content: "\f41a"; +} + +.ti-pentagram:before { + content: "\f586"; +} + +.ti-pepper:before { + content: "\ef15"; +} + +.ti-pepper-off:before { + content: "\f175"; +} + +.ti-percentage:before { + content: "\ecf4"; +} + +.ti-perfume:before { + content: "\f509"; +} + +.ti-perspective:before { + content: "\eebd"; +} + +.ti-perspective-off:before { + content: "\f176"; +} + +.ti-phone:before { + content: "\eb09"; +} + +.ti-phone-call:before { + content: "\eb05"; +} + +.ti-phone-calling:before { + content: "\ec43"; +} + +.ti-phone-check:before { + content: "\ec05"; +} + +.ti-phone-incoming:before { + content: "\eb06"; +} + +.ti-phone-off:before { + content: "\ecf5"; +} + +.ti-phone-outgoing:before { + content: "\eb07"; +} + +.ti-phone-pause:before { + content: "\eb08"; +} + +.ti-phone-plus:before { + content: "\ec06"; +} + +.ti-phone-x:before { + content: "\ec07"; +} + +.ti-photo:before { + content: "\eb0a"; +} + +.ti-photo-cancel:before { + content: "\f35d"; +} + +.ti-photo-check:before { + content: "\f35e"; +} + +.ti-photo-down:before { + content: "\f35f"; +} + +.ti-photo-edit:before { + content: "\f360"; +} + +.ti-photo-heart:before { + content: "\f361"; +} + +.ti-photo-minus:before { + content: "\f362"; +} + +.ti-photo-off:before { + content: "\ecf6"; +} + +.ti-photo-plus:before { + content: "\f363"; +} + +.ti-photo-search:before { + content: "\f364"; +} + +.ti-photo-shield:before { + content: "\f365"; +} + +.ti-photo-star:before { + content: "\f366"; +} + +.ti-photo-up:before { + content: "\f38b"; +} + +.ti-photo-x:before { + content: "\f367"; +} + +.ti-physotherapist:before { + content: "\eebe"; +} + +.ti-picture-in-picture:before { + content: "\ed35"; +} + +.ti-picture-in-picture-off:before { + content: "\ed43"; +} + +.ti-picture-in-picture-on:before { + content: "\ed44"; +} + +.ti-picture-in-picture-top:before { + content: "\efe4"; +} + +.ti-pig:before { + content: "\ef52"; +} + +.ti-pig-money:before { + content: "\f38c"; +} + +.ti-pig-off:before { + content: "\f177"; +} + +.ti-pill:before { + content: "\ec44"; +} + +.ti-pill-off:before { + content: "\f178"; +} + +.ti-pills:before { + content: "\ef66"; +} + +.ti-pin:before { + content: "\ec9c"; +} + +.ti-ping-pong:before { + content: "\f38d"; +} + +.ti-pinned:before { + content: "\ed60"; +} + +.ti-pinned-off:before { + content: "\ed5f"; +} + +.ti-pizza:before { + content: "\edbb"; +} + +.ti-pizza-off:before { + content: "\f179"; +} + +.ti-plane:before { + content: "\eb6f"; +} + +.ti-plane-arrival:before { + content: "\eb99"; +} + +.ti-plane-departure:before { + content: "\eb9a"; +} + +.ti-plane-inflight:before { + content: "\ef98"; +} + +.ti-plane-off:before { + content: "\f17a"; +} + +.ti-plane-tilt:before { + content: "\f1ed"; +} + +.ti-planet:before { + content: "\ec08"; +} + +.ti-planet-off:before { + content: "\f17b"; +} + +.ti-plant:before { + content: "\ed50"; +} + +.ti-plant-2:before { + content: "\ed7e"; +} + +.ti-plant-2-off:before { + content: "\f17c"; +} + +.ti-plant-off:before { + content: "\f17d"; +} + +.ti-play-card:before { + content: "\eebf"; +} + +.ti-play-card-off:before { + content: "\f17e"; +} + +.ti-player-eject:before { + content: "\efbc"; +} + +.ti-player-pause:before { + content: "\ed45"; +} + +.ti-player-play:before { + content: "\ed46"; +} + +.ti-player-record:before { + content: "\ed47"; +} + +.ti-player-skip-back:before { + content: "\ed48"; +} + +.ti-player-skip-forward:before { + content: "\ed49"; +} + +.ti-player-stop:before { + content: "\ed4a"; +} + +.ti-player-track-next:before { + content: "\ed4b"; +} + +.ti-player-track-prev:before { + content: "\ed4c"; +} + +.ti-playlist:before { + content: "\eec0"; +} + +.ti-playlist-add:before { + content: "\f008"; +} + +.ti-playlist-off:before { + content: "\f17f"; +} + +.ti-playlist-x:before { + content: "\f009"; +} + +.ti-playstation-circle:before { + content: "\f2ad"; +} + +.ti-playstation-square:before { + content: "\f2ae"; +} + +.ti-playstation-triangle:before { + content: "\f2af"; +} + +.ti-playstation-x:before { + content: "\f2b0"; +} + +.ti-plug:before { + content: "\ebd9"; +} + +.ti-plug-connected:before { + content: "\f00a"; +} + +.ti-plug-connected-x:before { + content: "\f0a0"; +} + +.ti-plug-off:before { + content: "\f180"; +} + +.ti-plug-x:before { + content: "\f0a1"; +} + +.ti-plus:before { + content: "\eb0b"; +} + +.ti-png:before { + content: "\f3ad"; +} + +.ti-podium:before { + content: "\f1d8"; +} + +.ti-podium-off:before { + content: "\f41b"; +} + +.ti-point:before { + content: "\eb0c"; +} + +.ti-point-off:before { + content: "\f181"; +} + +.ti-pointer:before { + content: "\f265"; +} + +.ti-pokeball:before { + content: "\eec1"; +} + +.ti-pokeball-off:before { + content: "\f41c"; +} + +.ti-poker-chip:before { + content: "\f515"; +} + +.ti-polaroid:before { + content: "\eec2"; +} + +.ti-polygon:before { + content: "\efd0"; +} + +.ti-polygon-off:before { + content: "\f182"; +} + +.ti-poo:before { + content: "\f258"; +} + +.ti-pool:before { + content: "\ed91"; +} + +.ti-pool-off:before { + content: "\f41d"; +} + +.ti-power:before { + content: "\eb0d"; +} + +.ti-pray:before { + content: "\ecbf"; +} + +.ti-premium-rights:before { + content: "\efbd"; +} + +.ti-prescription:before { + content: "\ef99"; +} + +.ti-presentation:before { + content: "\eb70"; +} + +.ti-presentation-analytics:before { + content: "\eec3"; +} + +.ti-presentation-off:before { + content: "\f183"; +} + +.ti-printer:before { + content: "\eb0e"; +} + +.ti-printer-off:before { + content: "\f184"; +} + +.ti-prison:before { + content: "\ef79"; +} + +.ti-prompt:before { + content: "\eb0f"; +} + +.ti-propeller:before { + content: "\eec4"; +} + +.ti-propeller-off:before { + content: "\f185"; +} + +.ti-pumpkin-scary:before { + content: "\f587"; +} + +.ti-puzzle:before { + content: "\eb10"; +} + +.ti-puzzle-2:before { + content: "\ef83"; +} + +.ti-puzzle-off:before { + content: "\f186"; +} + +.ti-pyramid:before { + content: "\eec5"; +} + +.ti-pyramid-off:before { + content: "\f187"; +} + +.ti-qrcode:before { + content: "\eb11"; +} + +.ti-qrcode-off:before { + content: "\f41e"; +} + +.ti-question-mark:before { + content: "\ec9d"; +} + +.ti-quote:before { + content: "\efbe"; +} + +.ti-quote-off:before { + content: "\f188"; +} + +.ti-radar:before { + content: "\f017"; +} + +.ti-radar-2:before { + content: "\f016"; +} + +.ti-radar-off:before { + content: "\f41f"; +} + +.ti-radio:before { + content: "\ef2d"; +} + +.ti-radio-off:before { + content: "\f420"; +} + +.ti-radioactive:before { + content: "\ecc0"; +} + +.ti-radioactive-off:before { + content: "\f189"; +} + +.ti-radius-bottom-left:before { + content: "\eec6"; +} + +.ti-radius-bottom-right:before { + content: "\eec7"; +} + +.ti-radius-top-left:before { + content: "\eec8"; +} + +.ti-radius-top-right:before { + content: "\eec9"; +} + +.ti-rainbow:before { + content: "\edbc"; +} + +.ti-rainbow-off:before { + content: "\f18a"; +} + +.ti-rating-12-plus:before { + content: "\f266"; +} + +.ti-rating-14-plus:before { + content: "\f267"; +} + +.ti-rating-16-plus:before { + content: "\f268"; +} + +.ti-rating-18-plus:before { + content: "\f269"; +} + +.ti-rating-21-plus:before { + content: "\f26a"; +} + +.ti-razor:before { + content: "\f4b5"; +} + +.ti-razor-electric:before { + content: "\f4b4"; +} + +.ti-receipt:before { + content: "\edfd"; +} + +.ti-receipt-2:before { + content: "\edfa"; +} + +.ti-receipt-off:before { + content: "\edfb"; +} + +.ti-receipt-refund:before { + content: "\edfc"; +} + +.ti-receipt-tax:before { + content: "\edbd"; +} + +.ti-recharging:before { + content: "\eeca"; +} + +.ti-record-mail:before { + content: "\eb12"; +} + +.ti-record-mail-off:before { + content: "\f18b"; +} + +.ti-rectangle:before { + content: "\ed37"; +} + +.ti-rectangle-vertical:before { + content: "\ed36"; +} + +.ti-recycle:before { + content: "\eb9b"; +} + +.ti-recycle-off:before { + content: "\f18c"; +} + +.ti-refresh:before { + content: "\eb13"; +} + +.ti-refresh-alert:before { + content: "\ed57"; +} + +.ti-refresh-dot:before { + content: "\efbf"; +} + +.ti-refresh-off:before { + content: "\f18d"; +} + +.ti-regex:before { + content: "\f31f"; +} + +.ti-regex-off:before { + content: "\f421"; +} + +.ti-registered:before { + content: "\eb14"; +} + +.ti-relation-many-to-many:before { + content: "\ed7f"; +} + +.ti-relation-one-to-many:before { + content: "\ed80"; +} + +.ti-relation-one-to-one:before { + content: "\ed81"; +} + +.ti-reload:before { + content: "\f3ae"; +} + +.ti-repeat:before { + content: "\eb72"; +} + +.ti-repeat-off:before { + content: "\f18e"; +} + +.ti-repeat-once:before { + content: "\eb71"; +} + +.ti-replace:before { + content: "\ebc7"; +} + +.ti-replace-off:before { + content: "\f422"; +} + +.ti-report:before { + content: "\eece"; +} + +.ti-report-analytics:before { + content: "\eecb"; +} + +.ti-report-medical:before { + content: "\eecc"; +} + +.ti-report-money:before { + content: "\eecd"; +} + +.ti-report-off:before { + content: "\f18f"; +} + +.ti-report-search:before { + content: "\ef84"; +} + +.ti-resize:before { + content: "\eecf"; +} + +.ti-ribbon-health:before { + content: "\f58e"; +} + +.ti-ripple:before { + content: "\ed82"; +} + +.ti-ripple-off:before { + content: "\f190"; +} + +.ti-road:before { + content: "\f018"; +} + +.ti-road-off:before { + content: "\f191"; +} + +.ti-road-sign:before { + content: "\ecdd"; +} + +.ti-robot:before { + content: "\f00b"; +} + +.ti-robot-off:before { + content: "\f192"; +} + +.ti-rocket:before { + content: "\ec45"; +} + +.ti-rocket-off:before { + content: "\f193"; +} + +.ti-roller-skating:before { + content: "\efd1"; +} + +.ti-rollercoaster:before { + content: "\f0a2"; +} + +.ti-rollercoaster-off:before { + content: "\f423"; +} + +.ti-rosette:before { + content: "\f599"; +} + +.ti-rosette-number-0:before { + content: "\f58f"; +} + +.ti-rosette-number-1:before { + content: "\f590"; +} + +.ti-rosette-number-2:before { + content: "\f591"; +} + +.ti-rosette-number-3:before { + content: "\f592"; +} + +.ti-rosette-number-4:before { + content: "\f593"; +} + +.ti-rosette-number-5:before { + content: "\f594"; +} + +.ti-rosette-number-6:before { + content: "\f595"; +} + +.ti-rosette-number-7:before { + content: "\f596"; +} + +.ti-rosette-number-8:before { + content: "\f597"; +} + +.ti-rosette-number-9:before { + content: "\f598"; +} + +.ti-rotate:before { + content: "\eb16"; +} + +.ti-rotate-2:before { + content: "\ebb4"; +} + +.ti-rotate-360:before { + content: "\ef85"; +} + +.ti-rotate-clockwise:before { + content: "\eb15"; +} + +.ti-rotate-clockwise-2:before { + content: "\ebb5"; +} + +.ti-rotate-dot:before { + content: "\efe5"; +} + +.ti-rotate-rectangle:before { + content: "\ec15"; +} + +.ti-route:before { + content: "\eb17"; +} + +.ti-route-2:before { + content: "\f4b6"; +} + +.ti-route-off:before { + content: "\f194"; +} + +.ti-router:before { + content: "\eb18"; +} + +.ti-router-off:before { + content: "\f424"; +} + +.ti-row-insert-bottom:before { + content: "\eed0"; +} + +.ti-row-insert-top:before { + content: "\eed1"; +} + +.ti-rss:before { + content: "\eb19"; +} + +.ti-rubber-stamp:before { + content: "\f5ab"; +} + +.ti-rubber-stamp-off:before { + content: "\f5aa"; +} + +.ti-ruler:before { + content: "\eb1a"; +} + +.ti-ruler-2:before { + content: "\eed2"; +} + +.ti-ruler-2-off:before { + content: "\f195"; +} + +.ti-ruler-3:before { + content: "\f290"; +} + +.ti-ruler-measure:before { + content: "\f291"; +} + +.ti-ruler-off:before { + content: "\f196"; +} + +.ti-run:before { + content: "\ec82"; +} + +.ti-s-turn-down:before { + content: "\f516"; +} + +.ti-s-turn-left:before { + content: "\f517"; +} + +.ti-s-turn-right:before { + content: "\f518"; +} + +.ti-s-turn-up:before { + content: "\f519"; +} + +.ti-sailboat:before { + content: "\ec83"; +} + +.ti-sailboat-off:before { + content: "\f425"; +} + +.ti-salad:before { + content: "\f50a"; +} + +.ti-salt:before { + content: "\ef16"; +} + +.ti-satellite:before { + content: "\eed3"; +} + +.ti-satellite-off:before { + content: "\f197"; +} + +.ti-sausage:before { + content: "\ef17"; +} + +.ti-scale:before { + content: "\ebc2"; +} + +.ti-scale-off:before { + content: "\f198"; +} + +.ti-scale-outline:before { + content: "\ef53"; +} + +.ti-scale-outline-off:before { + content: "\f199"; +} + +.ti-scan:before { + content: "\ebc8"; +} + +.ti-scan-eye:before { + content: "\f1ff"; +} + +.ti-schema:before { + content: "\f200"; +} + +.ti-schema-off:before { + content: "\f426"; +} + +.ti-school:before { + content: "\ecf7"; +} + +.ti-school-off:before { + content: "\f19a"; +} + +.ti-scissors:before { + content: "\eb1b"; +} + +.ti-scissors-off:before { + content: "\f19b"; +} + +.ti-scooter:before { + content: "\ec6c"; +} + +.ti-scooter-electric:before { + content: "\ecc1"; +} + +.ti-screen-share:before { + content: "\ed18"; +} + +.ti-screen-share-off:before { + content: "\ed17"; +} + +.ti-screenshot:before { + content: "\f201"; +} + +.ti-scribble:before { + content: "\f0a3"; +} + +.ti-scribble-off:before { + content: "\f427"; +} + +.ti-script:before { + content: "\f2da"; +} + +.ti-script-minus:before { + content: "\f2d7"; +} + +.ti-script-plus:before { + content: "\f2d8"; +} + +.ti-script-x:before { + content: "\f2d9"; +} + +.ti-scuba-mask:before { + content: "\eed4"; +} + +.ti-scuba-mask-off:before { + content: "\f428"; +} + +.ti-sdk:before { + content: "\f3af"; +} + +.ti-search:before { + content: "\eb1c"; +} + +.ti-search-off:before { + content: "\f19c"; +} + +.ti-section:before { + content: "\eed5"; +} + +.ti-section-sign:before { + content: "\f019"; +} + +.ti-seeding:before { + content: "\ed51"; +} + +.ti-seeding-off:before { + content: "\f19d"; +} + +.ti-select:before { + content: "\ec9e"; +} + +.ti-selector:before { + content: "\eb1d"; +} + +.ti-send:before { + content: "\eb1e"; +} + +.ti-send-off:before { + content: "\f429"; +} + +.ti-seo:before { + content: "\f26b"; +} + +.ti-separator:before { + content: "\ebda"; +} + +.ti-separator-horizontal:before { + content: "\ec79"; +} + +.ti-separator-vertical:before { + content: "\ec7a"; +} + +.ti-server:before { + content: "\eb1f"; +} + +.ti-server-2:before { + content: "\f07c"; +} + +.ti-server-bolt:before { + content: "\f320"; +} + +.ti-server-cog:before { + content: "\f321"; +} + +.ti-server-off:before { + content: "\f19e"; +} + +.ti-servicemark:before { + content: "\ec09"; +} + +.ti-settings:before { + content: "\eb20"; +} + +.ti-settings-2:before { + content: "\f5ac"; +} + +.ti-settings-automation:before { + content: "\eed6"; +} + +.ti-settings-off:before { + content: "\f19f"; +} + +.ti-shadow:before { + content: "\eed8"; +} + +.ti-shadow-off:before { + content: "\eed7"; +} + +.ti-shape:before { + content: "\eb9c"; +} + +.ti-shape-2:before { + content: "\eed9"; +} + +.ti-shape-3:before { + content: "\eeda"; +} + +.ti-shape-off:before { + content: "\f1a0"; +} + +.ti-share:before { + content: "\eb21"; +} + +.ti-share-off:before { + content: "\f1a1"; +} + +.ti-shield:before { + content: "\eb24"; +} + +.ti-shield-check:before { + content: "\eb22"; +} + +.ti-shield-checkered:before { + content: "\ef9a"; +} + +.ti-shield-chevron:before { + content: "\ef9b"; +} + +.ti-shield-half:before { + content: "\f358"; +} + +.ti-shield-half-filled:before { + content: "\f357"; +} + +.ti-shield-lock:before { + content: "\ed58"; +} + +.ti-shield-off:before { + content: "\ecf8"; +} + +.ti-shield-x:before { + content: "\eb23"; +} + +.ti-ship:before { + content: "\ec84"; +} + +.ti-ship-off:before { + content: "\f42a"; +} + +.ti-shirt:before { + content: "\ec0a"; +} + +.ti-shirt-off:before { + content: "\f1a2"; +} + +.ti-shirt-sport:before { + content: "\f26c"; +} + +.ti-shoe:before { + content: "\efd2"; +} + +.ti-shoe-off:before { + content: "\f1a4"; +} + +.ti-shopping-cart:before { + content: "\eb25"; +} + +.ti-shopping-cart-discount:before { + content: "\eedb"; +} + +.ti-shopping-cart-off:before { + content: "\eedc"; +} + +.ti-shopping-cart-plus:before { + content: "\eedd"; +} + +.ti-shopping-cart-x:before { + content: "\eede"; +} + +.ti-shovel:before { + content: "\f1d9"; +} + +.ti-shredder:before { + content: "\eedf"; +} + +.ti-sign-left:before { + content: "\f06b"; +} + +.ti-sign-right:before { + content: "\f06c"; +} + +.ti-signal-3g:before { + content: "\f1ee"; +} + +.ti-signal-4g:before { + content: "\f1ef"; +} + +.ti-signal-4g-plus:before { + content: "\f259"; +} + +.ti-signal-5g:before { + content: "\f1f0"; +} + +.ti-signature:before { + content: "\eee0"; +} + +.ti-signature-off:before { + content: "\f1a5"; +} + +.ti-sitemap:before { + content: "\eb9d"; +} + +.ti-sitemap-off:before { + content: "\f1a6"; +} + +.ti-skateboard:before { + content: "\ecc2"; +} + +.ti-skateboard-off:before { + content: "\f42b"; +} + +.ti-skull:before { + content: "\f292"; +} + +.ti-slash:before { + content: "\f4f9"; +} + +.ti-slashes:before { + content: "\f588"; +} + +.ti-sleigh:before { + content: "\ef9c"; +} + +.ti-slice:before { + content: "\ebdb"; +} + +.ti-slideshow:before { + content: "\ebc9"; +} + +.ti-smart-home:before { + content: "\ecde"; +} + +.ti-smart-home-off:before { + content: "\f1a7"; +} + +.ti-smoking:before { + content: "\ecc4"; +} + +.ti-smoking-no:before { + content: "\ecc3"; +} + +.ti-snowflake:before { + content: "\ec0b"; +} + +.ti-snowflake-off:before { + content: "\f1a8"; +} + +.ti-snowman:before { + content: "\f26d"; +} + +.ti-soccer-field:before { + content: "\ed92"; +} + +.ti-social:before { + content: "\ebec"; +} + +.ti-social-off:before { + content: "\f1a9"; +} + +.ti-sock:before { + content: "\eee1"; +} + +.ti-sofa:before { + content: "\efaf"; +} + +.ti-sofa-off:before { + content: "\f42c"; +} + +.ti-sort-0-9:before { + content: "\f54d"; +} + +.ti-sort-9-0:before { + content: "\f54e"; +} + +.ti-sort-a-z:before { + content: "\f54f"; +} + +.ti-sort-ascending:before { + content: "\eb26"; +} + +.ti-sort-ascending-2:before { + content: "\eee2"; +} + +.ti-sort-ascending-letters:before { + content: "\ef18"; +} + +.ti-sort-ascending-numbers:before { + content: "\ef19"; +} + +.ti-sort-descending:before { + content: "\eb27"; +} + +.ti-sort-descending-2:before { + content: "\eee3"; +} + +.ti-sort-descending-letters:before { + content: "\ef1a"; +} + +.ti-sort-descending-numbers:before { + content: "\ef1b"; +} + +.ti-sort-z-a:before { + content: "\f550"; +} + +.ti-sos:before { + content: "\f24a"; +} + +.ti-soup:before { + content: "\ef2e"; +} + +.ti-soup-off:before { + content: "\f42d"; +} + +.ti-source-code:before { + content: "\f4a2"; +} + +.ti-space:before { + content: "\ec0c"; +} + +.ti-space-off:before { + content: "\f1aa"; +} + +.ti-spacing-horizontal:before { + content: "\ef54"; +} + +.ti-spacing-vertical:before { + content: "\ef55"; +} + +.ti-spade:before { + content: "\effa"; +} + +.ti-speakerphone:before { + content: "\ed61"; +} + +.ti-speedboat:before { + content: "\ed93"; +} + +.ti-spider:before { + content: "\f293"; +} + +.ti-spiral:before { + content: "\f294"; +} + +.ti-spiral-off:before { + content: "\f42e"; +} + +.ti-sport-billard:before { + content: "\eee4"; +} + +.ti-spray:before { + content: "\f50b"; +} + +.ti-spy:before { + content: "\f227"; +} + +.ti-spy-off:before { + content: "\f42f"; +} + +.ti-square:before { + content: "\eb2c"; +} + +.ti-square-arrow-down:before { + content: "\f4b7"; +} + +.ti-square-arrow-left:before { + content: "\f4b8"; +} + +.ti-square-arrow-right:before { + content: "\f4b9"; +} + +.ti-square-arrow-up:before { + content: "\f4ba"; +} + +.ti-square-asterisk:before { + content: "\f01a"; +} + +.ti-square-check:before { + content: "\eb28"; +} + +.ti-square-dot:before { + content: "\ed59"; +} + +.ti-square-f0:before { + content: "\f526"; +} + +.ti-square-f1:before { + content: "\f527"; +} + +.ti-square-f2:before { + content: "\f528"; +} + +.ti-square-f3:before { + content: "\f529"; +} + +.ti-square-f4:before { + content: "\f52a"; +} + +.ti-square-f5:before { + content: "\f52b"; +} + +.ti-square-f6:before { + content: "\f52c"; +} + +.ti-square-f7:before { + content: "\f52d"; +} + +.ti-square-f8:before { + content: "\f52e"; +} + +.ti-square-f9:before { + content: "\f52f"; +} + +.ti-square-forbid:before { + content: "\ed5b"; +} + +.ti-square-forbid-2:before { + content: "\ed5a"; +} + +.ti-square-half:before { + content: "\effb"; +} + +.ti-square-letter-a:before { + content: "\f47c"; +} + +.ti-square-letter-b:before { + content: "\f47d"; +} + +.ti-square-letter-c:before { + content: "\f47e"; +} + +.ti-square-letter-d:before { + content: "\f47f"; +} + +.ti-square-letter-e:before { + content: "\f480"; +} + +.ti-square-letter-f:before { + content: "\f481"; +} + +.ti-square-letter-g:before { + content: "\f482"; +} + +.ti-square-letter-h:before { + content: "\f483"; +} + +.ti-square-letter-i:before { + content: "\f484"; +} + +.ti-square-letter-j:before { + content: "\f485"; +} + +.ti-square-letter-k:before { + content: "\f486"; +} + +.ti-square-letter-l:before { + content: "\f487"; +} + +.ti-square-letter-m:before { + content: "\f488"; +} + +.ti-square-letter-n:before { + content: "\f489"; +} + +.ti-square-letter-o:before { + content: "\f48a"; +} + +.ti-square-letter-p:before { + content: "\f48b"; +} + +.ti-square-letter-q:before { + content: "\f48c"; +} + +.ti-square-letter-r:before { + content: "\f48d"; +} + +.ti-square-letter-s:before { + content: "\f48e"; +} + +.ti-square-letter-t:before { + content: "\f48f"; +} + +.ti-square-letter-u:before { + content: "\f490"; +} + +.ti-square-letter-v:before { + content: "\f4bb"; +} + +.ti-square-letter-w:before { + content: "\f491"; +} + +.ti-square-letter-x:before { + content: "\f4bc"; +} + +.ti-square-letter-y:before { + content: "\f492"; +} + +.ti-square-letter-z:before { + content: "\f493"; +} + +.ti-square-minus:before { + content: "\eb29"; +} + +.ti-square-number-0:before { + content: "\eee5"; +} + +.ti-square-number-1:before { + content: "\eee6"; +} + +.ti-square-number-2:before { + content: "\eee7"; +} + +.ti-square-number-3:before { + content: "\eee8"; +} + +.ti-square-number-4:before { + content: "\eee9"; +} + +.ti-square-number-5:before { + content: "\eeea"; +} + +.ti-square-number-6:before { + content: "\eeeb"; +} + +.ti-square-number-7:before { + content: "\eeec"; +} + +.ti-square-number-8:before { + content: "\eeed"; +} + +.ti-square-number-9:before { + content: "\eeee"; +} + +.ti-square-off:before { + content: "\eeef"; +} + +.ti-square-plus:before { + content: "\eb2a"; +} + +.ti-square-root:before { + content: "\eef1"; +} + +.ti-square-root-2:before { + content: "\eef0"; +} + +.ti-square-rotated:before { + content: "\ecdf"; +} + +.ti-square-rotated-forbid:before { + content: "\f01c"; +} + +.ti-square-rotated-forbid-2:before { + content: "\f01b"; +} + +.ti-square-rotated-off:before { + content: "\eef2"; +} + +.ti-square-rounded:before { + content: "\f59a"; +} + +.ti-square-rounded-letter-a:before { + content: "\f5ae"; +} + +.ti-square-rounded-letter-b:before { + content: "\f5af"; +} + +.ti-square-rounded-letter-c:before { + content: "\f5b0"; +} + +.ti-square-rounded-letter-d:before { + content: "\f5b1"; +} + +.ti-square-rounded-letter-e:before { + content: "\f5b2"; +} + +.ti-square-rounded-letter-f:before { + content: "\f5b3"; +} + +.ti-square-rounded-letter-g:before { + content: "\f5b4"; +} + +.ti-square-rounded-letter-h:before { + content: "\f5b5"; +} + +.ti-square-rounded-letter-i:before { + content: "\f5b6"; +} + +.ti-square-rounded-letter-j:before { + content: "\f5b7"; +} + +.ti-square-rounded-letter-k:before { + content: "\f5b8"; +} + +.ti-square-rounded-letter-l:before { + content: "\f5b9"; +} + +.ti-square-rounded-letter-m:before { + content: "\f5ba"; +} + +.ti-square-rounded-letter-n:before { + content: "\f5bb"; +} + +.ti-square-rounded-letter-o:before { + content: "\f5bc"; +} + +.ti-square-rounded-letter-p:before { + content: "\f5bd"; +} + +.ti-square-rounded-letter-q:before { + content: "\f5be"; +} + +.ti-square-rounded-letter-r:before { + content: "\f5bf"; +} + +.ti-square-rounded-letter-s:before { + content: "\f5c0"; +} + +.ti-square-rounded-letter-t:before { + content: "\f5c1"; +} + +.ti-square-rounded-letter-u:before { + content: "\f5c2"; +} + +.ti-square-rounded-letter-v:before { + content: "\f5c3"; +} + +.ti-square-rounded-letter-w:before { + content: "\f5c4"; +} + +.ti-square-rounded-letter-x:before { + content: "\f5c5"; +} + +.ti-square-rounded-letter-y:before { + content: "\f5c6"; +} + +.ti-square-rounded-letter-z:before { + content: "\f5c7"; +} + +.ti-square-rounded-number-0:before { + content: "\f5c8"; +} + +.ti-square-rounded-number-1:before { + content: "\f5c9"; +} + +.ti-square-rounded-number-2:before { + content: "\f5ca"; +} + +.ti-square-rounded-number-3:before { + content: "\f5cb"; +} + +.ti-square-rounded-number-4:before { + content: "\f5cc"; +} + +.ti-square-rounded-number-5:before { + content: "\f5cd"; +} + +.ti-square-rounded-number-6:before { + content: "\f5ce"; +} + +.ti-square-rounded-number-7:before { + content: "\f5cf"; +} + +.ti-square-rounded-number-8:before { + content: "\f5d0"; +} + +.ti-square-rounded-number-9:before { + content: "\f5d1"; +} + +.ti-square-toggle:before { + content: "\eef4"; +} + +.ti-square-toggle-horizontal:before { + content: "\eef3"; +} + +.ti-square-x:before { + content: "\eb2b"; +} + +.ti-squares-diagonal:before { + content: "\eef5"; +} + +.ti-squares-filled:before { + content: "\eef6"; +} + +.ti-stack:before { + content: "\eb2d"; +} + +.ti-stack-2:before { + content: "\eef7"; +} + +.ti-stack-3:before { + content: "\ef9d"; +} + +.ti-stack-pop:before { + content: "\f234"; +} + +.ti-stack-push:before { + content: "\f235"; +} + +.ti-stairs:before { + content: "\eca6"; +} + +.ti-stairs-down:before { + content: "\eca4"; +} + +.ti-stairs-up:before { + content: "\eca5"; +} + +.ti-star:before { + content: "\eb2e"; +} + +.ti-star-half:before { + content: "\ed19"; +} + +.ti-star-off:before { + content: "\ed62"; +} + +.ti-stars:before { + content: "\ed38"; +} + +.ti-stars-off:before { + content: "\f430"; +} + +.ti-status-change:before { + content: "\f3b0"; +} + +.ti-steam:before { + content: "\f24b"; +} + +.ti-steering-wheel:before { + content: "\ec7b"; +} + +.ti-steering-wheel-off:before { + content: "\f431"; +} + +.ti-step-into:before { + content: "\ece0"; +} + +.ti-step-out:before { + content: "\ece1"; +} + +.ti-stereo-glasses:before { + content: "\f4cb"; +} + +.ti-stethoscope:before { + content: "\edbe"; +} + +.ti-stethoscope-off:before { + content: "\f432"; +} + +.ti-sticker:before { + content: "\eb2f"; +} + +.ti-storm:before { + content: "\f24c"; +} + +.ti-storm-off:before { + content: "\f433"; +} + +.ti-stretching:before { + content: "\f2db"; +} + +.ti-strikethrough:before { + content: "\eb9e"; +} + +.ti-submarine:before { + content: "\ed94"; +} + +.ti-subscript:before { + content: "\eb9f"; +} + +.ti-subtask:before { + content: "\ec9f"; +} + +.ti-sum:before { + content: "\eb73"; +} + +.ti-sum-off:before { + content: "\f1ab"; +} + +.ti-sun:before { + content: "\eb30"; +} + +.ti-sun-high:before { + content: "\f236"; +} + +.ti-sun-low:before { + content: "\f237"; +} + +.ti-sun-moon:before { + content: "\f4a3"; +} + +.ti-sun-off:before { + content: "\ed63"; +} + +.ti-sun-wind:before { + content: "\f238"; +} + +.ti-sunglasses:before { + content: "\f239"; +} + +.ti-sunrise:before { + content: "\ef1c"; +} + +.ti-sunset:before { + content: "\ec31"; +} + +.ti-sunset-2:before { + content: "\f23a"; +} + +.ti-superscript:before { + content: "\eba0"; +} + +.ti-svg:before { + content: "\f25a"; +} + +.ti-swimming:before { + content: "\ec92"; +} + +.ti-swipe:before { + content: "\f551"; +} + +.ti-switch:before { + content: "\eb33"; +} + +.ti-switch-2:before { + content: "\edbf"; +} + +.ti-switch-3:before { + content: "\edc0"; +} + +.ti-switch-horizontal:before { + content: "\eb31"; +} + +.ti-switch-vertical:before { + content: "\eb32"; +} + +.ti-sword:before { + content: "\f030"; +} + +.ti-sword-off:before { + content: "\f434"; +} + +.ti-swords:before { + content: "\f132"; +} + +.ti-table:before { + content: "\eba1"; +} + +.ti-table-alias:before { + content: "\f25b"; +} + +.ti-table-export:before { + content: "\eef8"; +} + +.ti-table-import:before { + content: "\eef9"; +} + +.ti-table-off:before { + content: "\eefa"; +} + +.ti-table-options:before { + content: "\f25c"; +} + +.ti-table-shortcut:before { + content: "\f25d"; +} + +.ti-tag:before { + content: "\eb34"; +} + +.ti-tag-off:before { + content: "\efc0"; +} + +.ti-tags:before { + content: "\ef86"; +} + +.ti-tags-off:before { + content: "\efc1"; +} + +.ti-tallymark-1:before { + content: "\ec46"; +} + +.ti-tallymark-2:before { + content: "\ec47"; +} + +.ti-tallymark-3:before { + content: "\ec48"; +} + +.ti-tallymark-4:before { + content: "\ec49"; +} + +.ti-tallymarks:before { + content: "\ec4a"; +} + +.ti-tank:before { + content: "\ed95"; +} + +.ti-target:before { + content: "\eb35"; +} + +.ti-target-arrow:before { + content: "\f51a"; +} + +.ti-target-off:before { + content: "\f1ad"; +} + +.ti-teapot:before { + content: "\f552"; +} + +.ti-telescope:before { + content: "\f07d"; +} + +.ti-telescope-off:before { + content: "\f1ae"; +} + +.ti-temperature:before { + content: "\eb38"; +} + +.ti-temperature-celsius:before { + content: "\eb36"; +} + +.ti-temperature-fahrenheit:before { + content: "\eb37"; +} + +.ti-temperature-minus:before { + content: "\ebed"; +} + +.ti-temperature-off:before { + content: "\f1af"; +} + +.ti-temperature-plus:before { + content: "\ebee"; +} + +.ti-template:before { + content: "\eb39"; +} + +.ti-template-off:before { + content: "\f1b0"; +} + +.ti-tent:before { + content: "\eefb"; +} + +.ti-tent-off:before { + content: "\f435"; +} + +.ti-terminal:before { + content: "\ebdc"; +} + +.ti-terminal-2:before { + content: "\ebef"; +} + +.ti-test-pipe:before { + content: "\eb3a"; +} + +.ti-test-pipe-2:before { + content: "\f0a4"; +} + +.ti-test-pipe-off:before { + content: "\f1b1"; +} + +.ti-tex:before { + content: "\f4e0"; +} + +.ti-text-caption:before { + content: "\f4a4"; +} + +.ti-text-color:before { + content: "\f2dc"; +} + +.ti-text-decrease:before { + content: "\f202"; +} + +.ti-text-direction-ltr:before { + content: "\eefc"; +} + +.ti-text-direction-rtl:before { + content: "\eefd"; +} + +.ti-text-increase:before { + content: "\f203"; +} + +.ti-text-orientation:before { + content: "\f2a4"; +} + +.ti-text-plus:before { + content: "\f2a5"; +} + +.ti-text-recognition:before { + content: "\f204"; +} + +.ti-text-resize:before { + content: "\ef87"; +} + +.ti-text-size:before { + content: "\f2b1"; +} + +.ti-text-spellcheck:before { + content: "\f2a6"; +} + +.ti-text-wrap:before { + content: "\ebdd"; +} + +.ti-text-wrap-disabled:before { + content: "\eca7"; +} + +.ti-texture:before { + content: "\f51b"; +} + +.ti-thermometer:before { + content: "\ef67"; +} + +.ti-thumb-down:before { + content: "\eb3b"; +} + +.ti-thumb-down-off:before { + content: "\f436"; +} + +.ti-thumb-up:before { + content: "\eb3c"; +} + +.ti-thumb-up-off:before { + content: "\f437"; +} + +.ti-tic-tac:before { + content: "\f51c"; +} + +.ti-ticket:before { + content: "\eb3d"; +} + +.ti-ticket-off:before { + content: "\f1b2"; +} + +.ti-tie:before { + content: "\f07e"; +} + +.ti-tilde:before { + content: "\f4a5"; +} + +.ti-tilt-shift:before { + content: "\eefe"; +} + +.ti-tilt-shift-off:before { + content: "\f1b3"; +} + +.ti-timeline:before { + content: "\f031"; +} + +.ti-timeline-event:before { + content: "\f553"; +} + +.ti-tir:before { + content: "\ebf0"; +} + +.ti-toggle-left:before { + content: "\eb3e"; +} + +.ti-toggle-right:before { + content: "\eb3f"; +} + +.ti-toilet-paper:before { + content: "\efd3"; +} + +.ti-toilet-paper-off:before { + content: "\f1b4"; +} + +.ti-tool:before { + content: "\eb40"; +} + +.ti-tools:before { + content: "\ebca"; +} + +.ti-tools-kitchen:before { + content: "\ed64"; +} + +.ti-tools-kitchen-2:before { + content: "\eeff"; +} + +.ti-tools-kitchen-2-off:before { + content: "\f1b5"; +} + +.ti-tools-kitchen-off:before { + content: "\f1b6"; +} + +.ti-tools-off:before { + content: "\f1b7"; +} + +.ti-tooltip:before { + content: "\f2dd"; +} + +.ti-topology-bus:before { + content: "\f5d9"; +} + +.ti-topology-complex:before { + content: "\f5da"; +} + +.ti-topology-full:before { + content: "\f5dc"; +} + +.ti-topology-full-hierarchy:before { + content: "\f5db"; +} + +.ti-topology-ring:before { + content: "\f5df"; +} + +.ti-topology-ring-2:before { + content: "\f5dd"; +} + +.ti-topology-ring-3:before { + content: "\f5de"; +} + +.ti-topology-star:before { + content: "\f5e5"; +} + +.ti-topology-star-2:before { + content: "\f5e0"; +} + +.ti-topology-star-3:before { + content: "\f5e1"; +} + +.ti-topology-star-ring:before { + content: "\f5e4"; +} + +.ti-topology-star-ring-2:before { + content: "\f5e2"; +} + +.ti-topology-star-ring-3:before { + content: "\f5e3"; +} + +.ti-torii:before { + content: "\f59b"; +} + +.ti-tornado:before { + content: "\ece2"; +} + +.ti-tournament:before { + content: "\ecd0"; +} + +.ti-tower:before { + content: "\f2cb"; +} + +.ti-tower-off:before { + content: "\f2ca"; +} + +.ti-track:before { + content: "\ef00"; +} + +.ti-tractor:before { + content: "\ec0d"; +} + +.ti-trademark:before { + content: "\ec0e"; +} + +.ti-traffic-cone:before { + content: "\ec0f"; +} + +.ti-traffic-cone-off:before { + content: "\f1b8"; +} + +.ti-traffic-lights:before { + content: "\ed39"; +} + +.ti-traffic-lights-off:before { + content: "\f1b9"; +} + +.ti-train:before { + content: "\ed96"; +} + +.ti-transfer-in:before { + content: "\ef2f"; +} + +.ti-transfer-out:before { + content: "\ef30"; +} + +.ti-transform:before { + content: "\f38e"; +} + +.ti-transition-bottom:before { + content: "\f2b2"; +} + +.ti-transition-left:before { + content: "\f2b3"; +} + +.ti-transition-right:before { + content: "\f2b4"; +} + +.ti-transition-top:before { + content: "\f2b5"; +} + +.ti-trash:before { + content: "\eb41"; +} + +.ti-trash-off:before { + content: "\ed65"; +} + +.ti-trash-x:before { + content: "\ef88"; +} + +.ti-tree:before { + content: "\ef01"; +} + +.ti-trees:before { + content: "\ec10"; +} + +.ti-trekking:before { + content: "\f5ad"; +} + +.ti-trending-down:before { + content: "\eb42"; +} + +.ti-trending-down-2:before { + content: "\edc1"; +} + +.ti-trending-down-3:before { + content: "\edc2"; +} + +.ti-trending-up:before { + content: "\eb43"; +} + +.ti-trending-up-2:before { + content: "\edc3"; +} + +.ti-trending-up-3:before { + content: "\edc4"; +} + +.ti-triangle:before { + content: "\eb44"; +} + +.ti-triangle-inverted:before { + content: "\f01d"; +} + +.ti-triangle-off:before { + content: "\ef02"; +} + +.ti-triangle-square-circle:before { + content: "\ece8"; +} + +.ti-triangles:before { + content: "\f0a5"; +} + +.ti-trident:before { + content: "\ecc5"; +} + +.ti-trolley:before { + content: "\f4cc"; +} + +.ti-trophy:before { + content: "\eb45"; +} + +.ti-trophy-off:before { + content: "\f438"; +} + +.ti-trowel:before { + content: "\f368"; +} + +.ti-truck:before { + content: "\ebc4"; +} + +.ti-truck-delivery:before { + content: "\ec4b"; +} + +.ti-truck-loading:before { + content: "\f1da"; +} + +.ti-truck-off:before { + content: "\ef03"; +} + +.ti-truck-return:before { + content: "\ec4c"; +} + +.ti-txt:before { + content: "\f3b1"; +} + +.ti-typography:before { + content: "\ebc5"; +} + +.ti-typography-off:before { + content: "\f1ba"; +} + +.ti-uf-off:before { + content: "\f26e"; +} + +.ti-ufo:before { + content: "\f26f"; +} + +.ti-umbrella:before { + content: "\ebf1"; +} + +.ti-umbrella-off:before { + content: "\f1bb"; +} + +.ti-underline:before { + content: "\eba2"; +} + +.ti-unlink:before { + content: "\eb46"; +} + +.ti-upload:before { + content: "\eb47"; +} + +.ti-urgent:before { + content: "\eb48"; +} + +.ti-usb:before { + content: "\f00c"; +} + +.ti-user:before { + content: "\eb4d"; +} + +.ti-user-check:before { + content: "\eb49"; +} + +.ti-user-circle:before { + content: "\ef68"; +} + +.ti-user-exclamation:before { + content: "\ec12"; +} + +.ti-user-minus:before { + content: "\eb4a"; +} + +.ti-user-off:before { + content: "\ecf9"; +} + +.ti-user-plus:before { + content: "\eb4b"; +} + +.ti-user-search:before { + content: "\ef89"; +} + +.ti-user-x:before { + content: "\eb4c"; +} + +.ti-users:before { + content: "\ebf2"; +} + +.ti-uv-index:before { + content: "\f3b2"; +} + +.ti-ux-circle:before { + content: "\f369"; +} + +.ti-vaccine:before { + content: "\ef04"; +} + +.ti-vaccine-bottle:before { + content: "\ef69"; +} + +.ti-vaccine-bottle-off:before { + content: "\f439"; +} + +.ti-vaccine-off:before { + content: "\f1bc"; +} + +.ti-vacuum-cleaner:before { + content: "\f5e6"; +} + +.ti-variable:before { + content: "\ef05"; +} + +.ti-variable-minus:before { + content: "\f36a"; +} + +.ti-variable-off:before { + content: "\f1bd"; +} + +.ti-variable-plus:before { + content: "\f36b"; +} + +.ti-vector:before { + content: "\eca9"; +} + +.ti-vector-bezier:before { + content: "\ef1d"; +} + +.ti-vector-bezier-2:before { + content: "\f1a3"; +} + +.ti-vector-bezier-arc:before { + content: "\f4cd"; +} + +.ti-vector-bezier-circle:before { + content: "\f4ce"; +} + +.ti-vector-off:before { + content: "\f1be"; +} + +.ti-vector-spline:before { + content: "\f565"; +} + +.ti-vector-triangle:before { + content: "\eca8"; +} + +.ti-vector-triangle-off:before { + content: "\f1bf"; +} + +.ti-venus:before { + content: "\ec86"; +} + +.ti-versions:before { + content: "\ed52"; +} + +.ti-versions-off:before { + content: "\f1c0"; +} + +.ti-video:before { + content: "\ed22"; +} + +.ti-video-minus:before { + content: "\ed1f"; +} + +.ti-video-off:before { + content: "\ed20"; +} + +.ti-video-plus:before { + content: "\ed21"; +} + +.ti-view-360:before { + content: "\ed84"; +} + +.ti-view-360-off:before { + content: "\f1c1"; +} + +.ti-viewfinder:before { + content: "\eb4e"; +} + +.ti-viewfinder-off:before { + content: "\f1c2"; +} + +.ti-viewport-narrow:before { + content: "\ebf3"; +} + +.ti-viewport-wide:before { + content: "\ebf4"; +} + +.ti-vinyl:before { + content: "\f00d"; +} + +.ti-vip:before { + content: "\f3b3"; +} + +.ti-vip-off:before { + content: "\f43a"; +} + +.ti-virus:before { + content: "\eb74"; +} + +.ti-virus-off:before { + content: "\ed66"; +} + +.ti-virus-search:before { + content: "\ed67"; +} + +.ti-vocabulary:before { + content: "\ef1e"; +} + +.ti-vocabulary-off:before { + content: "\f43b"; +} + +.ti-volume:before { + content: "\eb51"; +} + +.ti-volume-2:before { + content: "\eb4f"; +} + +.ti-volume-3:before { + content: "\eb50"; +} + +.ti-volume-off:before { + content: "\f1c3"; +} + +.ti-walk:before { + content: "\ec87"; +} + +.ti-wall:before { + content: "\ef7a"; +} + +.ti-wall-off:before { + content: "\f43c"; +} + +.ti-wallet:before { + content: "\eb75"; +} + +.ti-wallet-off:before { + content: "\f1c4"; +} + +.ti-wallpaper:before { + content: "\ef56"; +} + +.ti-wallpaper-off:before { + content: "\f1c5"; +} + +.ti-wand:before { + content: "\ebcb"; +} + +.ti-wand-off:before { + content: "\f1c6"; +} + +.ti-wash:before { + content: "\f311"; +} + +.ti-wash-dry:before { + content: "\f304"; +} + +.ti-wash-dry-1:before { + content: "\f2fa"; +} + +.ti-wash-dry-2:before { + content: "\f2fb"; +} + +.ti-wash-dry-3:before { + content: "\f2fc"; +} + +.ti-wash-dry-a:before { + content: "\f2fd"; +} + +.ti-wash-dry-dip:before { + content: "\f2fe"; +} + +.ti-wash-dry-f:before { + content: "\f2ff"; +} + +.ti-wash-dry-hang:before { + content: "\f300"; +} + +.ti-wash-dry-off:before { + content: "\f301"; +} + +.ti-wash-dry-p:before { + content: "\f302"; +} + +.ti-wash-dry-shade:before { + content: "\f303"; +} + +.ti-wash-dry-w:before { + content: "\f322"; +} + +.ti-wash-dryclean:before { + content: "\f305"; +} + +.ti-wash-dryclean-off:before { + content: "\f323"; +} + +.ti-wash-gentle:before { + content: "\f306"; +} + +.ti-wash-machine:before { + content: "\f25e"; +} + +.ti-wash-off:before { + content: "\f307"; +} + +.ti-wash-press:before { + content: "\f308"; +} + +.ti-wash-temperature-1:before { + content: "\f309"; +} + +.ti-wash-temperature-2:before { + content: "\f30a"; +} + +.ti-wash-temperature-3:before { + content: "\f30b"; +} + +.ti-wash-temperature-4:before { + content: "\f30c"; +} + +.ti-wash-temperature-5:before { + content: "\f30d"; +} + +.ti-wash-temperature-6:before { + content: "\f30e"; +} + +.ti-wash-tumble-dry:before { + content: "\f30f"; +} + +.ti-wash-tumble-off:before { + content: "\f310"; +} + +.ti-wave-saw-tool:before { + content: "\ecd3"; +} + +.ti-wave-sine:before { + content: "\ecd4"; +} + +.ti-wave-square:before { + content: "\ecd5"; +} + +.ti-webhook:before { + content: "\f01e"; +} + +.ti-webhook-off:before { + content: "\f43d"; +} + +.ti-weight:before { + content: "\f589"; +} + +.ti-wheelchair:before { + content: "\f1db"; +} + +.ti-wheelchair-off:before { + content: "\f43e"; +} + +.ti-whirl:before { + content: "\f51d"; +} + +.ti-wifi:before { + content: "\eb52"; +} + +.ti-wifi-0:before { + content: "\eba3"; +} + +.ti-wifi-1:before { + content: "\eba4"; +} + +.ti-wifi-2:before { + content: "\eba5"; +} + +.ti-wifi-off:before { + content: "\ecfa"; +} + +.ti-wind:before { + content: "\ec34"; +} + +.ti-wind-off:before { + content: "\f1c7"; +} + +.ti-windmill:before { + content: "\ed85"; +} + +.ti-windmill-off:before { + content: "\f1c8"; +} + +.ti-window:before { + content: "\ef06"; +} + +.ti-window-maximize:before { + content: "\f1f1"; +} + +.ti-window-minimize:before { + content: "\f1f2"; +} + +.ti-window-off:before { + content: "\f1c9"; +} + +.ti-windsock:before { + content: "\f06d"; +} + +.ti-wiper:before { + content: "\ecab"; +} + +.ti-wiper-wash:before { + content: "\ecaa"; +} + +.ti-woman:before { + content: "\eb53"; +} + +.ti-wood:before { + content: "\f359"; +} + +.ti-world:before { + content: "\eb54"; +} + +.ti-world-download:before { + content: "\ef8a"; +} + +.ti-world-latitude:before { + content: "\ed2e"; +} + +.ti-world-longitude:before { + content: "\ed2f"; +} + +.ti-world-off:before { + content: "\f1ca"; +} + +.ti-world-upload:before { + content: "\ef8b"; +} + +.ti-world-www:before { + content: "\f38f"; +} + +.ti-wrecking-ball:before { + content: "\ed97"; +} + +.ti-writing:before { + content: "\ef08"; +} + +.ti-writing-off:before { + content: "\f1cb"; +} + +.ti-writing-sign:before { + content: "\ef07"; +} + +.ti-writing-sign-off:before { + content: "\f1cc"; +} + +.ti-x:before { + content: "\eb55"; +} + +.ti-xbox-a:before { + content: "\f2b6"; +} + +.ti-xbox-b:before { + content: "\f2b7"; +} + +.ti-xbox-x:before { + content: "\f2b8"; +} + +.ti-xbox-y:before { + content: "\f2b9"; +} + +.ti-yin-yang:before { + content: "\ec35"; +} + +.ti-yoga:before { + content: "\f01f"; +} + +.ti-zeppelin:before { + content: "\f270"; +} + +.ti-zeppelin-off:before { + content: "\f43f"; +} + +.ti-zip:before { + content: "\f3b4"; +} + +.ti-zodiac-aquarius:before { + content: "\ecac"; +} + +.ti-zodiac-aries:before { + content: "\ecad"; +} + +.ti-zodiac-cancer:before { + content: "\ecae"; +} + +.ti-zodiac-capricorn:before { + content: "\ecaf"; +} + +.ti-zodiac-gemini:before { + content: "\ecb0"; +} + +.ti-zodiac-leo:before { + content: "\ecb1"; +} + +.ti-zodiac-libra:before { + content: "\ecb2"; +} + +.ti-zodiac-pisces:before { + content: "\ecb3"; +} + +.ti-zodiac-sagittarius:before { + content: "\ecb4"; +} + +.ti-zodiac-scorpio:before { + content: "\ecb5"; +} + +.ti-zodiac-taurus:before { + content: "\ecb6"; +} + +.ti-zodiac-virgo:before { + content: "\ecb7"; +} + +.ti-zoom-cancel:before { + content: "\ec4d"; +} + +.ti-zoom-check:before { + content: "\ef09"; +} + +.ti-zoom-code:before { + content: "\f07f"; +} + +.ti-zoom-exclamation:before { + content: "\f080"; +} + +.ti-zoom-in:before { + content: "\eb56"; +} + +.ti-zoom-in-area:before { + content: "\f1dc"; +} + +.ti-zoom-money:before { + content: "\ef0a"; +} + +.ti-zoom-out:before { + content: "\eb57"; +} + +.ti-zoom-out-area:before { + content: "\f1dd"; +} + +.ti-zoom-pan:before { + content: "\f1de"; +} + +.ti-zoom-question:before { + content: "\edeb"; +} + +.ti-zoom-replace:before { + content: "\f2a7"; +} + +.ti-zoom-reset:before { + content: "\f295"; +} + +.ti-zzz:before { + content: "\f228"; +} + +.ti-zzz-off:before { + content: "\f440"; +} diff --git a/cao_sunyata/static/css/styles.css b/cao_sunyata/static/css/styles.css new file mode 100644 index 0000000..b2ff367 --- /dev/null +++ b/cao_sunyata/static/css/styles.css @@ -0,0 +1,6 @@ +@charset "UTF-8";@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap"); +/*! + * Bootstrap v5.3.0-alpha1 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */@import "../../assets/libs/node_modules/simplebar/dist/simplebar.css";@import "../libs/simplebar/dist/simplebar.css";@import "../css/icons/tabler-icons/tabler-icons.css";:root,[data-bs-theme=light]{--bs-blue:#5D87FF;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#FA896B;--bs-orange:#fd7e14;--bs-yellow:#FFAE1F;--bs-green:#13DEB9;--bs-teal:#20c997;--bs-cyan:#539BFF;--bs-black:#000;--bs-white:#fff;--bs-gray:#2A3547;--bs-gray-dark:#343a40;--bs-gray-100:#F6F9FC;--bs-gray-200:#EAEFF4;--bs-gray-300:#DFE5EF;--bs-gray-400:#7C8FAC;--bs-gray-500:#5A6A85;--bs-gray-600:#2A3547;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#5D87FF;--bs-secondary:#49BEFF;--bs-success:#13DEB9;--bs-info:#539BFF;--bs-warning:#FFAE1F;--bs-danger:#FA896B;--bs-light:#F6F9FC;--bs-dark:#2A3547;--bs-muted:#5A6A85;--bs-indigo:#6610f2;--bs-light-primary:#ECF2FF;--bs-light-secondary:#E8F7FF;--bs-light-info:#EBF3FE;--bs-light-success:#E6FFFA;--bs-light-warning:#FEF5E5;--bs-light-danger:#FBF2EF;--bs-light-indigo:#EBF3FE;--bs-dark-light:#2A3547;--bs-light-gray:#F6F9FC;--bs-primary-rgb:93,135,255;--bs-secondary-rgb:73,190,255;--bs-success-rgb:19,222,185;--bs-info-rgb:83,155,255;--bs-warning-rgb:255,174,31;--bs-danger-rgb:250,137,107;--bs-light-rgb:246,249,252;--bs-dark-rgb:42,53,71;--bs-muted-rgb:90,106,133;--bs-indigo-rgb:102,16,242;--bs-light-primary-rgb:236,242,255;--bs-light-secondary-rgb:232,247,255;--bs-light-info-rgb:235,243,254;--bs-light-success-rgb:230,255,250;--bs-light-warning-rgb:254,245,229;--bs-light-danger-rgb:251,242,239;--bs-light-indigo-rgb:235,243,254;--bs-dark-light-rgb:42,53,71;--bs-light-gray-rgb:246,249,252;--bs-primary-text:#4a6ccc;--bs-secondary-text:#2A3547;--bs-success-text:#0fb294;--bs-info-text:#325d99;--bs-warning-text:#996813;--bs-danger-text:#c86e56;--bs-light-text:#2A3547;--bs-dark-text:#495057;--bs-primary-bg-subtle:#dfe7ff;--bs-secondary-bg-subtle:#F6F9FC;--bs-success-bg-subtle:#d0f8f1;--bs-info-bg-subtle:#ddebff;--bs-warning-bg-subtle:#ffefd2;--bs-danger-bg-subtle:#fee7e1;--bs-light-bg-subtle:#fbfcfe;--bs-dark-bg-subtle:#7C8FAC;--bs-primary-border-subtle:#becfff;--bs-secondary-border-subtle:#EAEFF4;--bs-success-border-subtle:#a1f2e3;--bs-info-border-subtle:#bad7ff;--bs-warning-border-subtle:#ffdfa5;--bs-danger-border-subtle:#fdd0c4;--bs-light-border-subtle:#EAEFF4;--bs-dark-border-subtle:#5A6A85;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:90,106,133;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:"Plus Jakarta Sans",sans-serif;--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg,rgba(255,255,255,0.15),rgba(255,255,255,0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:0.875rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#5A6A85;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(90,106,133,0.75);--bs-secondary-color-rgb:90,106,133;--bs-secondary-bg:#EAEFF4;--bs-secondary-bg-rgb:234,239,244;--bs-tertiary-color:rgba(90,106,133,0.5);--bs-tertiary-color-rgb:90,106,133;--bs-tertiary-bg:#F6F9FC;--bs-tertiary-bg-rgb:246,249,252;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-heading-color:#2A3547;--bs-link-color:#5D87FF;--bs-link-color-rgb:93,135,255;--bs-link-decoration:underline;--bs-link-hover-color:#4a6ccc;--bs-link-hover-color-rgb:74,108,204;--bs-code-color:#d63384;--bs-highlight-bg:#ffefd2;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#ebf1f6;--bs-border-color-translucent:rgba(0,0,0,0.175);--bs-border-radius:7px;--bs-border-radius-sm:5px;--bs-border-radius-lg:15px;--bs-border-radius-xl:12px;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-box-shadow:0px 15px 30px rgba(0,0,0,0.12);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0,0,0,0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0,0,0,0.175);--bs-box-shadow-inset:unset;--bs-emphasis-color:#000;--bs-form-control-bg:var(--bs-body-bg);--bs-form-control-disabled-bg:var(--bs-secondary-bg);--bs-highlight-bg:#ffefd2;--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}[data-bs-theme=dark]{--bs-body-color:#5A6A85;--bs-body-color-rgb:90,106,133;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#F6F9FC;--bs-emphasis-color-rgb:246,249,252;--bs-secondary-color:rgba(90,106,133,0.75);--bs-secondary-color-rgb:90,106,133;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(90,106,133,0.5);--bs-tertiary-color-rgb:90,106,133;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-emphasis-color:#fff;--bs-primary-text:#9eb7ff;--bs-secondary-text:#DFE5EF;--bs-success-text:#71ebd5;--bs-info-text:#98c3ff;--bs-warning-text:#ffce79;--bs-danger-text:#fcb8a6;--bs-light-text:#F6F9FC;--bs-dark-text:#DFE5EF;--bs-primary-bg-subtle:#131b33;--bs-secondary-bg-subtle:#212529;--bs-success-bg-subtle:#042c25;--bs-info-bg-subtle:#111f33;--bs-warning-bg-subtle:#332306;--bs-danger-bg-subtle:#321b15;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#385199;--bs-secondary-border-subtle:#495057;--bs-success-border-subtle:#0b856f;--bs-info-border-subtle:#213e66;--bs-warning-border-subtle:#66460c;--bs-danger-border-subtle:#965240;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:#fff;--bs-link-color:#9eb7ff;--bs-link-hover-color:#becfff;--bs-link-color-rgb:158,183,255;--bs-link-hover-color-rgb:190,207,255;--bs-code-color:#e685b5;--bs-border-color:#495057;--bs-border-color-translucent:rgba(255,255,255,0.15)}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:0.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color,inherit)}.h1,h1{font-size:calc(1.34375rem + 1.125vw)}@media (min-width:1200px){.h1,h1{font-size:2.1875rem}}.h2,h2{font-size:calc(1.3rem + 0.6vw)}@media (min-width:1200px){.h2,h2{font-size:1.75rem}}.h3,h3{font-size:calc(1.278125rem + 0.3375vw)}@media (min-width:1200px){.h3,h3{font-size:1.53125rem}}.h4,h4{font-size:calc(1.25625rem + 0.075vw)}@media (min-width:1200px){.h4,h4{font-size:1.3125rem}}.h5,h5{font-size:1.09375rem}.h6,h6{font-size:0.875rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:0.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:700}.small,small{font-size:0.875em}.mark,mark{padding:0.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:0.75em;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:0.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:0.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:0.1875rem 0.375rem;font-size:0.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:5px}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:16px;padding-bottom:16px;color:#5A6A85;text-align:left}th{font-weight:600;text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:0.5rem;font-size:calc(1.275rem + 0.3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.09375rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:0.5rem}.initialism{font-size:0.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.09375rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:0.875em;color:#2A3547}.blockquote-footer:before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:0.25rem;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);-webkit-box-shadow:var(--bs-box-shadow-sm);box-shadow:var(--bs-box-shadow-sm);max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:0.5rem;line-height:1}.figure-caption{font-size:0.875em;color:var(--bs-secondary-color)}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:24px;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * 0.5);padding-left:calc(var(--bs-gutter-x) * 0.5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:24px;--bs-gutter-y:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-0.5 * var(--bs-gutter-x));margin-left:calc(-0.5 * var(--bs-gutter-x))}.row>*{-ms-flex-negative:0;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * 0.5);padding-left:calc(var(--bs-gutter-x) * 0.5);margin-top:var(--bs-gutter-y)}.col{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-auto>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-1>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-2>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-3>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-5>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-6>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.col-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-1{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-2{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-3{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-4{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-5{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-6{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-7{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-8{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-9{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-10{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-11{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}.g-6,.gx-6{--bs-gutter-x:12px}.g-6,.gy-6{--bs-gutter-y:12px}.g-7,.gx-7{--bs-gutter-x:30px}.g-7,.gy-7{--bs-gutter-y:30px}.g-8,.gx-8{--bs-gutter-x:10px}.g-8,.gy-8{--bs-gutter-y:10px}.g-9,.gx-9{--bs-gutter-x:20px}.g-9,.gy-9{--bs-gutter-y:20px}@media (min-width:576px){.col-sm{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-sm-auto>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-sm-1>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-sm-2>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-sm-3>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-sm-5>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-sm-6>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.col-sm-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-sm-1{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-sm-2{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-sm-3{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-sm-4{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-sm-5{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-sm-6{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-sm-7{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-sm-8{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-sm-9{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-sm-10{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-sm-11{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-sm-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}.g-sm-6,.gx-sm-6{--bs-gutter-x:12px}.g-sm-6,.gy-sm-6{--bs-gutter-y:12px}.g-sm-7,.gx-sm-7{--bs-gutter-x:30px}.g-sm-7,.gy-sm-7{--bs-gutter-y:30px}.g-sm-8,.gx-sm-8{--bs-gutter-x:10px}.g-sm-8,.gy-sm-8{--bs-gutter-y:10px}.g-sm-9,.gx-sm-9{--bs-gutter-x:20px}.g-sm-9,.gy-sm-9{--bs-gutter-y:20px}}@media (min-width:768px){.col-md{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-md-auto>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-md-1>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-md-2>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-md-3>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-md-5>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-md-6>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.col-md-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-md-1{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-md-2{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-md-3{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-md-4{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-md-5{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-md-6{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-md-7{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-md-8{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-md-9{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-md-10{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-md-11{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-md-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}.g-md-6,.gx-md-6{--bs-gutter-x:12px}.g-md-6,.gy-md-6{--bs-gutter-y:12px}.g-md-7,.gx-md-7{--bs-gutter-x:30px}.g-md-7,.gy-md-7{--bs-gutter-y:30px}.g-md-8,.gx-md-8{--bs-gutter-x:10px}.g-md-8,.gy-md-8{--bs-gutter-y:10px}.g-md-9,.gx-md-9{--bs-gutter-x:20px}.g-md-9,.gy-md-9{--bs-gutter-y:20px}}@media (min-width:992px){.col-lg{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-lg-auto>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-lg-1>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-lg-2>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-lg-3>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-lg-5>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-lg-6>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.col-lg-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-lg-1{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-lg-2{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-lg-3{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-lg-4{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-lg-5{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-lg-6{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-lg-7{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-lg-8{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-lg-9{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-lg-10{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-lg-11{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-lg-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}.g-lg-6,.gx-lg-6{--bs-gutter-x:12px}.g-lg-6,.gy-lg-6{--bs-gutter-y:12px}.g-lg-7,.gx-lg-7{--bs-gutter-x:30px}.g-lg-7,.gy-lg-7{--bs-gutter-y:30px}.g-lg-8,.gx-lg-8{--bs-gutter-x:10px}.g-lg-8,.gy-lg-8{--bs-gutter-y:10px}.g-lg-9,.gx-lg-9{--bs-gutter-x:20px}.g-lg-9,.gy-lg-9{--bs-gutter-y:20px}}@media (min-width:1200px){.col-xl{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-xl-auto>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-xl-1>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-xl-2>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-xl-3>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-xl-5>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-xl-6>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.col-xl-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-xl-1{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-xl-2{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-xl-3{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-xl-4{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-xl-5{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-xl-6{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-xl-7{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-xl-8{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-xl-9{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-xl-10{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-xl-11{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-xl-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}.g-xl-6,.gx-xl-6{--bs-gutter-x:12px}.g-xl-6,.gy-xl-6{--bs-gutter-y:12px}.g-xl-7,.gx-xl-7{--bs-gutter-x:30px}.g-xl-7,.gy-xl-7{--bs-gutter-y:30px}.g-xl-8,.gx-xl-8{--bs-gutter-x:10px}.g-xl-8,.gy-xl-8{--bs-gutter-y:10px}.g-xl-9,.gx-xl-9{--bs-gutter-x:20px}.g-xl-9,.gy-xl-9{--bs-gutter-y:20px}}@media (min-width:1400px){.col-xxl{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-xxl-auto>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-xxl-1>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-xxl-2>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-xxl-3>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-xxl-5>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-xxl-6>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-xxl-1{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-xxl-2{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-xxl-3{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-xxl-4{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-xxl-5{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-xxl-6{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-xxl-7{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-xxl-8{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-xxl-9{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-xxl-10{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-xxl-11{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-xxl-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}.g-xxl-6,.gx-xxl-6{--bs-gutter-x:12px}.g-xxl-6,.gy-xxl-6{--bs-gutter-y:12px}.g-xxl-7,.gx-xxl-7{--bs-gutter-x:30px}.g-xxl-7,.gy-xxl-7{--bs-gutter-y:30px}.g-xxl-8,.gx-xxl-8{--bs-gutter-x:10px}.g-xxl-8,.gy-xxl-8{--bs-gutter-y:10px}.g-xxl-9,.gx-xxl-9{--bs-gutter-x:20px}.g-xxl-9,.gy-xxl-9{--bs-gutter-y:20px}}.table{--bs-table-color:var(--bs-body-color);--bs-table-bg:transparent;--bs-table-border-color:#ebf1f6;--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-body-color);--bs-table-striped-bg:#EAEFF4;--bs-table-active-color:var(--bs-body-color);--bs-table-active-bg:rgba(0,0,0,0.1);--bs-table-hover-color:var(--bs-body-color);--bs-table-hover-bg:#F6F9FC;width:100%;margin-bottom:1rem;color:var(--bs-table-color);vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:16px 16px;background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);-webkit-box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg);box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:0.25rem 0.25rem}.table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}.table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-color:#000;--bs-table-bg:#dfe7ff;--bs-table-border-color:#c9d0e6;--bs-table-striped-bg:#d4dbf2;--bs-table-striped-color:#000;--bs-table-active-bg:#c9d0e6;--bs-table-active-color:#000;--bs-table-hover-bg:#ced6ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#dbf2ff;--bs-table-border-color:#c5dae6;--bs-table-striped-bg:#d0e6f2;--bs-table-striped-color:#000;--bs-table-active-bg:#c5dae6;--bs-table-active-color:#000;--bs-table-hover-bg:#cbe0ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d0f8f1;--bs-table-border-color:#bbdfd9;--bs-table-striped-bg:#c6ece5;--bs-table-striped-color:#000;--bs-table-active-bg:#bbdfd9;--bs-table-active-color:#000;--bs-table-hover-bg:#c0e5df;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#ddebff;--bs-table-border-color:#c7d4e6;--bs-table-striped-bg:#d2dff2;--bs-table-striped-color:#000;--bs-table-active-bg:#c7d4e6;--bs-table-active-color:#000;--bs-table-hover-bg:#ccd9ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#ffefd2;--bs-table-border-color:#e6d7bd;--bs-table-striped-bg:#f2e3c8;--bs-table-striped-color:#000;--bs-table-active-bg:#e6d7bd;--bs-table-active-color:#000;--bs-table-hover-bg:#ecddc2;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#fee7e1;--bs-table-border-color:#e5d0cb;--bs-table-striped-bg:#f1dbd6;--bs-table-striped-color:#000;--bs-table-active-bg:#e5d0cb;--bs-table-active-color:#000;--bs-table-hover-bg:#ebd6d0;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#F6F9FC;--bs-table-border-color:#dde0e3;--bs-table-striped-bg:#eaedef;--bs-table-striped-color:#000;--bs-table-active-bg:#dde0e3;--bs-table-active-color:#000;--bs-table-hover-bg:#e4e6e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#2A3547;--bs-table-border-color:#3f4959;--bs-table-striped-bg:#353f50;--bs-table-striped-color:#fff;--bs-table-active-bg:#3f4959;--bs-table-active-color:#fff;--bs-table-hover-bg:#3a4455;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:0.5rem;font-weight:600;color:#2A3547}.col-form-label{padding-top:calc(8px + var(--bs-border-width));padding-bottom:calc(8px + var(--bs-border-width));margin-bottom:0;font-size:inherit;font-weight:600;line-height:1.5;color:#2A3547}.col-form-label-lg{padding-top:calc(0.5rem + var(--bs-border-width));padding-bottom:calc(0.5rem + var(--bs-border-width));font-size:1.09375rem}.col-form-label-sm{padding-top:calc(0.25rem + var(--bs-border-width));padding-bottom:calc(0.25rem + var(--bs-border-width));font-size:0.765625rem}.form-text{margin-top:0.25rem;font-size:0.875em;color:#5A6A85}.form-control{display:block;width:100%;padding:8px 16px;font-size:0.875rem;font-weight:400;line-height:1.5;color:#5A6A85;background-color:transparent;background-clip:padding-box;border:var(--bs-border-width) solid #DFE5EF;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:7px;-webkit-box-shadow:unset;box-shadow:unset;-webkit-transition:border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{-webkit-transition:none;transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#5A6A85;background-color:transparent;border-color:#aec3ff;outline:0;-webkit-box-shadow:unset,0 0 0 0.25rem rgba(93,135,255,0.25);box-shadow:unset,0 0 0 0.25rem rgba(93,135,255,0.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-webkit-datetime-edit{display:block;padding:0}.form-control::-webkit-input-placeholder{color:var(--bs-secondary-color);opacity:1}.form-control::-moz-placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:-ms-input-placeholder{color:var(--bs-secondary-color);opacity:1}.form-control::-ms-input-placeholder{color:var(--bs-secondary-color);opacity:1}.form-control::placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:disabled{background-color:var(--bs-form-control-disabled-bg);opacity:1}.form-control::-webkit-file-upload-button{padding:8px 16px;margin:-8px -16px;-webkit-margin-end:16px;margin-inline-end:16px;color:#5A6A85;background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;-webkit-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out}.form-control::file-selector-button{padding:8px 16px;margin:-8px -16px;-webkit-margin-end:16px;margin-inline-end:16px;color:#5A6A85;background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;-webkit-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:var(--bs-secondary-bg)}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:var(--bs-secondary-bg)}.form-control-plaintext{display:block;width:100%;padding:8px 0;margin-bottom:0;line-height:1.5;color:var(--bs-body-color);background-color:transparent;border:solid transparent;border-width:var(--bs-border-width) 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));padding:0.25rem 0.5rem;font-size:0.765625rem;border-radius:5px}.form-control-sm::-webkit-file-upload-button{padding:0.25rem 0.5rem;margin:-0.25rem -0.5rem;-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}.form-control-sm::file-selector-button{padding:0.25rem 0.5rem;margin:-0.25rem -0.5rem;-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));padding:0.5rem 1rem;font-size:1.09375rem;border-radius:15px}.form-control-lg::-webkit-file-upload-button{padding:0.5rem 1rem;margin:-0.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:0.5rem 1rem;margin:-0.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + 16px + calc(var(--bs-border-width) * 2))}textarea.form-control-sm{min-height:calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2))}textarea.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-control-color{width:3rem;height:calc(1.5em + 16px + calc(var(--bs-border-width) * 2));padding:8px}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:7px}.form-control-color::-webkit-color-swatch{border-radius:7px}.form-control-color.form-control-sm{height:calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2))}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");display:block;width:100%;padding:8px 38px 8px 16px;-moz-padding-start:13px;font-size:0.875rem;font-weight:400;line-height:1.5;color:#5A6A85;background-color:transparent;background-image:var(--bs-form-select-bg-img),var(--bs-form-select-bg-icon,none);background-repeat:no-repeat;background-position:right 16px center;background-size:16px 12px;border:var(--bs-border-width) solid #DFE5EF;border-radius:7px;-webkit-box-shadow:unset;box-shadow:unset;-webkit-transition:border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{-webkit-transition:none;transition:none}}.form-select:focus{border-color:#aec3ff;outline:0;-webkit-box-shadow:unset,0 0 0 0.25rem rgba(93,135,255,0.25);box-shadow:unset,0 0 0 0.25rem rgba(93,135,255,0.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:16px;background-image:none}.form-select:disabled{background-color:var(--bs-form-control-disabled-bg)}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #5A6A85}.form-select-sm{padding-top:0.25rem;padding-bottom:0.25rem;padding-left:0.5rem;font-size:0.765625rem;border-radius:5px}.form-select-lg{padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;font-size:1.09375rem;border-radius:15px}[data-bs-theme=dark] .form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235A6A85' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}.form-check{display:block;min-height:1.188em;padding-left:1.688em;margin-bottom:0.125rem}.form-check .form-check-input{float:left;margin-left:-1.688em}.form-check-reverse{padding-right:1.688em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.688em;margin-left:0}.form-check-input{--bs-form-check-bg:transparent;width:1.188em;height:1.188em;margin-top:0.156em;vertical-align:top;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-repeat:no-repeat;background-position:center;background-size:contain;border:1.25px solid #dfe5ef;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:0.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{-webkit-filter:brightness(90%);filter:brightness(90%)}.form-check-input:focus{border-color:#aec3ff;outline:0;-webkit-box-shadow:0 0 0 0.25rem rgba(93,135,255,0.25);box-shadow:0 0 0 0.25rem rgba(93,135,255,0.25)}.form-check-input:checked{background-color:#5D87FF;border-color:#5D87FF}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#5D87FF;border-color:#5D87FF;--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;-webkit-filter:none;filter:none;opacity:0.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:0.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");width:2em;margin-left:-2.5em;background-image:var(--bs-form-switch-bg);background-position:left center;border-radius:2em;-webkit-transition:background-position 0.15s ease-in-out;transition:background-position 0.15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{-webkit-transition:none;transition:none}}.form-switch .form-check-input:focus{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23aec3ff'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;-webkit-filter:none;filter:none;opacity:0.65}[data-bs-theme=dark] .form-switch .form-check-input:not(:checked):not(:focus){--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e")}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 0.25rem rgba(93,135,255,0.25);box-shadow:0 0 0 1px #fff,0 0 0 0.25rem rgba(93,135,255,0.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 0.25rem rgba(93,135,255,0.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-0.25rem;background-color:#5D87FF;border:0;border-radius:1rem;-webkit-box-shadow:0 0.1rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.1rem 0.25rem rgba(0,0,0,0.1);-webkit-transition:background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#cedbff}.form-range::-webkit-slider-runnable-track{width:100%;height:0.5rem;color:transparent;cursor:pointer;background-color:var(--bs-tertiary-bg);border-color:transparent;border-radius:1rem;-webkit-box-shadow:unset;box-shadow:unset}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#5D87FF;border:0;border-radius:1rem;box-shadow:0 0.1rem 0.25rem rgba(0,0,0,0.1);-moz-transition:background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#cedbff}.form-range::-moz-range-track{width:100%;height:0.5rem;color:transparent;cursor:pointer;background-color:var(--bs-tertiary-bg);border-color:transparent;border-radius:1rem;box-shadow:unset}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}.form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}.form-floating{position:relative}.form-floating:before:not(.form-control:disabled){position:absolute;top:var(--bs-border-width);left:var(--bs-border-width);width:calc(100% - (calc(calc(0.375em + 4px) + calc(0.75em + 8px))));height:1.875em;content:"";background-color:transparent;border-radius:7px}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;width:100%;height:100%;padding:1rem 16px;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transition:opacity 0.1s ease-in-out,-webkit-transform 0.1s ease-in-out;transition:opacity 0.1s ease-in-out,-webkit-transform 0.1s ease-in-out;transition:opacity 0.1s ease-in-out,transform 0.1s ease-in-out;transition:opacity 0.1s ease-in-out,transform 0.1s ease-in-out,-webkit-transform 0.1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{-webkit-transition:none;transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem 16px}.form-floating>.form-control-plaintext::-webkit-input-placeholder,.form-floating>.form-control::-webkit-input-placeholder{color:transparent}.form-floating>.form-control-plaintext::-moz-placeholder,.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control-plaintext:-ms-input-placeholder,.form-floating>.form-control:-ms-input-placeholder{color:transparent}.form-floating>.form-control-plaintext::-ms-input-placeholder,.form-floating>.form-control::-ms-input-placeholder{color:transparent}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown),.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-control-plaintext:not(:-ms-input-placeholder),.form-floating>.form-control:not(:-ms-input-placeholder){padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:0.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:0.65;transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.form-floating>.form-control:not(:-ms-input-placeholder)~label{opacity:0.65;transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:0.65;-webkit-transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem);transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:0.65;-webkit-transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem);transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}.form-floating>.form-control:disabled~label{color:#2A3547}.input-group{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 16px;font-size:0.875rem;font-weight:400;line-height:1.5;color:#5A6A85;text-align:center;white-space:nowrap;background-color:#EAEFF4;border:var(--bs-border-width) solid #F6F9FC;border-radius:7px}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:0.5rem 1rem;font-size:1.09375rem;border-radius:15px}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:0.25rem 0.5rem;font-size:0.765625rem;border-radius:5px}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:54px}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(var(--bs-border-width) * -1);border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-success-text)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:0.25rem 0.5rem;margin-top:0.1rem;font-size:0.75rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:var(--bs-success);padding-right:calc(1.5em + 16px);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2313DEB9' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(0.375em + 4px) center;background-size:calc(0.75em + 8px) calc(0.75em + 8px)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:var(--bs-success);-webkit-box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb),0.25);box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb),0.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + 16px);background-position:top calc(0.375em + 4px) right calc(0.375em + 4px)}.form-select.is-valid,.was-validated .form-select:valid{border-color:var(--bs-success)}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{--bs-form-select-bg-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2313DEB9' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");padding-right:78px;background-position:right 16px center,center right 38px;background-size:16px 12px,calc(0.75em + 8px) calc(0.75em + 8px)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:var(--bs-success);-webkit-box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb),0.25);box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb),0.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + 16px))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:var(--bs-success)}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:var(--bs-success-text)}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{-webkit-box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb),0.25);box-shadow:0 0 0 0.25rem rgba(var(--bs-success-rgb),0.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:var(--bs-success-text)}.form-check-inline .form-check-input~.valid-feedback{margin-left:0.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-danger-text)}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:0.25rem 0.5rem;margin-top:0.1rem;font-size:0.75rem;color:#fff;background-color:var(--bs-danger);border-radius:var(--bs-border-radius)}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:var(--bs-danger);padding-right:calc(1.5em + 16px);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23FA896B'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23FA896B' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(0.375em + 4px) center;background-size:calc(0.75em + 8px) calc(0.75em + 8px)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:var(--bs-danger);-webkit-box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb),0.25);box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb),0.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + 16px);background-position:top calc(0.375em + 4px) right calc(0.375em + 4px)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:var(--bs-danger)}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{--bs-form-select-bg-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23FA896B'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23FA896B' stroke='none'/%3e%3c/svg%3e");padding-right:78px;background-position:right 16px center,center right 38px;background-size:16px 12px,calc(0.75em + 8px) calc(0.75em + 8px)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:var(--bs-danger);-webkit-box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb),0.25);box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb),0.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + 16px))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:var(--bs-danger)}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:var(--bs-danger-text)}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{-webkit-box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb),0.25);box-shadow:0 0 0 0.25rem rgba(var(--bs-danger-rgb),0.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:var(--bs-danger-text)}.form-check-inline .form-check-input~.invalid-feedback{margin-left:0.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:16px;--bs-btn-padding-y:7px;--bs-btn-font-family:;--bs-btn-font-size:14;--bs-btn-font-weight:500;--bs-btn-line-height:1.5;--bs-btn-color:#5A6A85;--bs-btn-bg:transparent;--bs-btn-border-width:var(--bs-border-width);--bs-btn-border-color:transparent;--bs-btn-border-radius:7px;--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:unset;--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb),.5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);-webkit-box-shadow:var(--bs-btn-box-shadow);box-shadow:var(--bs-btn-box-shadow);-webkit-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{-webkit-transition:none;transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;-webkit-box-shadow:var(--bs-btn-box-shadow),var(--bs-btn-focus-box-shadow);box-shadow:var(--bs-btn-box-shadow),var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;-webkit-box-shadow:var(--bs-btn-box-shadow),var(--bs-btn-focus-box-shadow);box-shadow:var(--bs-btn-box-shadow),var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color);-webkit-box-shadow:var(--bs-btn-active-shadow);box-shadow:var(--bs-btn-active-shadow)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{-webkit-box-shadow:var(--bs-btn-active-shadow),var(--bs-btn-focus-box-shadow);box-shadow:var(--bs-btn-active-shadow),var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity);-webkit-box-shadow:none;box-shadow:none}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#5D87FF;--bs-btn-border-color:#5D87FF;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#4f73d9;--bs-btn-hover-border-color:#4a6ccc;--bs-btn-focus-shadow-rgb:117,153,255;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4a6ccc;--bs-btn-active-border-color:#4665bf;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#5D87FF;--bs-btn-disabled-border-color:#5D87FF}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#49BEFF;--bs-btn-border-color:#49BEFF;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#3ea2d9;--bs-btn-hover-border-color:#3a98cc;--bs-btn-focus-shadow-rgb:100,200,255;--bs-btn-active-color:#fff;--bs-btn-active-bg:#3a98cc;--bs-btn-active-border-color:#378fbf;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#49BEFF;--bs-btn-disabled-border-color:#49BEFF}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#13DEB9;--bs-btn-border-color:#13DEB9;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#10bd9d;--bs-btn-hover-border-color:#0fb294;--bs-btn-focus-shadow-rgb:54,227,196;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0fb294;--bs-btn-active-border-color:#0ea78b;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#13DEB9;--bs-btn-disabled-border-color:#13DEB9}.btn-info{--bs-btn-color:#fff;--bs-btn-bg:#539BFF;--bs-btn-border-color:#539BFF;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#4784d9;--bs-btn-hover-border-color:#427ccc;--bs-btn-focus-shadow-rgb:109,170,255;--bs-btn-active-color:#fff;--bs-btn-active-bg:#427ccc;--bs-btn-active-border-color:#3e74bf;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#539BFF;--bs-btn-disabled-border-color:#539BFF}.btn-warning{--bs-btn-color:#fff;--bs-btn-bg:#FFAE1F;--bs-btn-border-color:#FFAE1F;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#d9941a;--bs-btn-hover-border-color:#cc8b19;--bs-btn-focus-shadow-rgb:255,186,65;--bs-btn-active-color:#fff;--bs-btn-active-bg:#cc8b19;--bs-btn-active-border-color:#bf8317;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#FFAE1F;--bs-btn-disabled-border-color:#FFAE1F}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#FA896B;--bs-btn-border-color:#FA896B;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#d5745b;--bs-btn-hover-border-color:#c86e56;--bs-btn-focus-shadow-rgb:251,155,129;--bs-btn-active-color:#fff;--bs-btn-active-bg:#c86e56;--bs-btn-active-border-color:#bc6750;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#FA896B;--bs-btn-disabled-border-color:#FA896B}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#F6F9FC;--bs-btn-border-color:#F6F9FC;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d1d4d6;--bs-btn-hover-border-color:#c5c7ca;--bs-btn-focus-shadow-rgb:209,212,214;--bs-btn-active-color:#000;--bs-btn-active-bg:#c5c7ca;--bs-btn-active-border-color:#b9bbbd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#F6F9FC;--bs-btn-disabled-border-color:#F6F9FC}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#2A3547;--bs-btn-border-color:#2A3547;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#4a5363;--bs-btn-hover-border-color:#3f4959;--bs-btn-focus-shadow-rgb:74,83,99;--bs-btn-active-color:#fff;--bs-btn-active-bg:#555d6c;--bs-btn-active-border-color:#3f4959;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#2A3547;--bs-btn-disabled-border-color:#2A3547}.btn-muted{--bs-btn-color:#fff;--bs-btn-bg:#5A6A85;--bs-btn-border-color:#5A6A85;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#4d5a71;--bs-btn-hover-border-color:#48556a;--bs-btn-focus-shadow-rgb:115,128,151;--bs-btn-active-color:#fff;--bs-btn-active-bg:#48556a;--bs-btn-active-border-color:#445064;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#5A6A85;--bs-btn-disabled-border-color:#5A6A85}.btn-indigo{--bs-btn-color:#fff;--bs-btn-bg:#6610f2;--bs-btn-border-color:#6610f2;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#570ece;--bs-btn-hover-border-color:#520dc2;--bs-btn-focus-shadow-rgb:125,52,244;--bs-btn-active-color:#fff;--bs-btn-active-bg:#520dc2;--bs-btn-active-border-color:#4d0cb6;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6610f2;--bs-btn-disabled-border-color:#6610f2}.btn-light-primary{--bs-btn-color:#000;--bs-btn-bg:#ECF2FF;--bs-btn-border-color:#ECF2FF;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#eff4ff;--bs-btn-hover-border-color:#eef3ff;--bs-btn-focus-shadow-rgb:201,206,217;--bs-btn-active-color:#000;--bs-btn-active-bg:#f0f5ff;--bs-btn-active-border-color:#eef3ff;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ECF2FF;--bs-btn-disabled-border-color:#ECF2FF}.btn-light-secondary{--bs-btn-color:#000;--bs-btn-bg:#E8F7FF;--bs-btn-border-color:#E8F7FF;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ebf8ff;--bs-btn-hover-border-color:#eaf8ff;--bs-btn-focus-shadow-rgb:197,210,217;--bs-btn-active-color:#000;--bs-btn-active-bg:#edf9ff;--bs-btn-active-border-color:#eaf8ff;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#E8F7FF;--bs-btn-disabled-border-color:#E8F7FF}.btn-light-info{--bs-btn-color:#000;--bs-btn-bg:#EBF3FE;--bs-btn-border-color:#EBF3FE;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#eef5fe;--bs-btn-hover-border-color:#edf4fe;--bs-btn-focus-shadow-rgb:200,207,216;--bs-btn-active-color:#000;--bs-btn-active-bg:#eff5fe;--bs-btn-active-border-color:#edf4fe;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#EBF3FE;--bs-btn-disabled-border-color:#EBF3FE}.btn-light-success{--bs-btn-color:#000;--bs-btn-bg:#E6FFFA;--bs-btn-border-color:#E6FFFA;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#eafffb;--bs-btn-hover-border-color:#e9fffb;--bs-btn-focus-shadow-rgb:196,217,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#ebfffb;--bs-btn-active-border-color:#e9fffb;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#E6FFFA;--bs-btn-disabled-border-color:#E6FFFA}.btn-light-warning{--bs-btn-color:#000;--bs-btn-bg:#FEF5E5;--bs-btn-border-color:#FEF5E5;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#fef7e9;--bs-btn-hover-border-color:#fef6e8;--bs-btn-focus-shadow-rgb:216,208,195;--bs-btn-active-color:#000;--bs-btn-active-bg:#fef7ea;--bs-btn-active-border-color:#fef6e8;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#FEF5E5;--bs-btn-disabled-border-color:#FEF5E5}.btn-light-danger{--bs-btn-color:#000;--bs-btn-bg:#FBF2EF;--bs-btn-border-color:#FBF2EF;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#fcf4f1;--bs-btn-hover-border-color:#fbf3f1;--bs-btn-focus-shadow-rgb:213,206,203;--bs-btn-active-color:#000;--bs-btn-active-bg:#fcf5f2;--bs-btn-active-border-color:#fbf3f1;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#FBF2EF;--bs-btn-disabled-border-color:#FBF2EF}.btn-light-indigo{--bs-btn-color:#000;--bs-btn-bg:#EBF3FE;--bs-btn-border-color:#EBF3FE;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#eef5fe;--bs-btn-hover-border-color:#edf4fe;--bs-btn-focus-shadow-rgb:200,207,216;--bs-btn-active-color:#000;--bs-btn-active-bg:#eff5fe;--bs-btn-active-border-color:#edf4fe;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#EBF3FE;--bs-btn-disabled-border-color:#EBF3FE}.btn-dark-light{--bs-btn-color:#fff;--bs-btn-bg:#2A3547;--bs-btn-border-color:#2A3547;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#242d3c;--bs-btn-hover-border-color:#222a39;--bs-btn-focus-shadow-rgb:74,83,99;--bs-btn-active-color:#fff;--bs-btn-active-bg:#222a39;--bs-btn-active-border-color:#202835;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#2A3547;--bs-btn-disabled-border-color:#2A3547}.btn-light-gray{--bs-btn-color:#000;--bs-btn-bg:#F6F9FC;--bs-btn-border-color:#F6F9FC;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f7fafc;--bs-btn-hover-border-color:#f7fafc;--bs-btn-focus-shadow-rgb:209,212,214;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8fafd;--bs-btn-active-border-color:#f7fafc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#F6F9FC;--bs-btn-disabled-border-color:#F6F9FC}.btn-outline-primary{--bs-btn-color:#5D87FF;--bs-btn-border-color:#5D87FF;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5D87FF;--bs-btn-hover-border-color:#5D87FF;--bs-btn-focus-shadow-rgb:93,135,255;--bs-btn-active-color:#fff;--bs-btn-active-bg:#5D87FF;--bs-btn-active-border-color:#5D87FF;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#5D87FF;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#5D87FF;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#49BEFF;--bs-btn-border-color:#49BEFF;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#49BEFF;--bs-btn-hover-border-color:#49BEFF;--bs-btn-focus-shadow-rgb:73,190,255;--bs-btn-active-color:#fff;--bs-btn-active-bg:#49BEFF;--bs-btn-active-border-color:#49BEFF;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#49BEFF;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#49BEFF;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#13DEB9;--bs-btn-border-color:#13DEB9;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#13DEB9;--bs-btn-hover-border-color:#13DEB9;--bs-btn-focus-shadow-rgb:19,222,185;--bs-btn-active-color:#fff;--bs-btn-active-bg:#13DEB9;--bs-btn-active-border-color:#13DEB9;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#13DEB9;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#13DEB9;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#539BFF;--bs-btn-border-color:#539BFF;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#539BFF;--bs-btn-hover-border-color:#539BFF;--bs-btn-focus-shadow-rgb:83,155,255;--bs-btn-active-color:#fff;--bs-btn-active-bg:#539BFF;--bs-btn-active-border-color:#539BFF;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#539BFF;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#539BFF;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#FFAE1F;--bs-btn-border-color:#FFAE1F;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#FFAE1F;--bs-btn-hover-border-color:#FFAE1F;--bs-btn-focus-shadow-rgb:255,174,31;--bs-btn-active-color:#fff;--bs-btn-active-bg:#FFAE1F;--bs-btn-active-border-color:#FFAE1F;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#FFAE1F;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#FFAE1F;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#FA896B;--bs-btn-border-color:#FA896B;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#FA896B;--bs-btn-hover-border-color:#FA896B;--bs-btn-focus-shadow-rgb:250,137,107;--bs-btn-active-color:#fff;--bs-btn-active-bg:#FA896B;--bs-btn-active-border-color:#FA896B;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#FA896B;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#FA896B;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#F6F9FC;--bs-btn-border-color:#F6F9FC;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#F6F9FC;--bs-btn-hover-border-color:#F6F9FC;--bs-btn-focus-shadow-rgb:246,249,252;--bs-btn-active-color:#000;--bs-btn-active-bg:#F6F9FC;--bs-btn-active-border-color:#F6F9FC;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#F6F9FC;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#F6F9FC;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#2A3547;--bs-btn-border-color:#2A3547;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#2A3547;--bs-btn-hover-border-color:#2A3547;--bs-btn-focus-shadow-rgb:42,53,71;--bs-btn-active-color:#fff;--bs-btn-active-bg:#2A3547;--bs-btn-active-border-color:#2A3547;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#2A3547;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#2A3547;--bs-gradient:none}.btn-outline-muted{--bs-btn-color:#5A6A85;--bs-btn-border-color:#5A6A85;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5A6A85;--bs-btn-hover-border-color:#5A6A85;--bs-btn-focus-shadow-rgb:90,106,133;--bs-btn-active-color:#fff;--bs-btn-active-bg:#5A6A85;--bs-btn-active-border-color:#5A6A85;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#5A6A85;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#5A6A85;--bs-gradient:none}.btn-outline-indigo{--bs-btn-color:#6610f2;--bs-btn-border-color:#6610f2;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6610f2;--bs-btn-hover-border-color:#6610f2;--bs-btn-focus-shadow-rgb:102,16,242;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6610f2;--bs-btn-active-border-color:#6610f2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#6610f2;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6610f2;--bs-gradient:none}.btn-outline-light-primary{--bs-btn-color:#ECF2FF;--bs-btn-border-color:#ECF2FF;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ECF2FF;--bs-btn-hover-border-color:#ECF2FF;--bs-btn-focus-shadow-rgb:236,242,255;--bs-btn-active-color:#000;--bs-btn-active-bg:#ECF2FF;--bs-btn-active-border-color:#ECF2FF;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#ECF2FF;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ECF2FF;--bs-gradient:none}.btn-outline-light-secondary{--bs-btn-color:#E8F7FF;--bs-btn-border-color:#E8F7FF;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#E8F7FF;--bs-btn-hover-border-color:#E8F7FF;--bs-btn-focus-shadow-rgb:232,247,255;--bs-btn-active-color:#000;--bs-btn-active-bg:#E8F7FF;--bs-btn-active-border-color:#E8F7FF;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#E8F7FF;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#E8F7FF;--bs-gradient:none}.btn-outline-light-info{--bs-btn-color:#EBF3FE;--bs-btn-border-color:#EBF3FE;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#EBF3FE;--bs-btn-hover-border-color:#EBF3FE;--bs-btn-focus-shadow-rgb:235,243,254;--bs-btn-active-color:#000;--bs-btn-active-bg:#EBF3FE;--bs-btn-active-border-color:#EBF3FE;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#EBF3FE;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#EBF3FE;--bs-gradient:none}.btn-outline-light-success{--bs-btn-color:#E6FFFA;--bs-btn-border-color:#E6FFFA;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#E6FFFA;--bs-btn-hover-border-color:#E6FFFA;--bs-btn-focus-shadow-rgb:230,255,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#E6FFFA;--bs-btn-active-border-color:#E6FFFA;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#E6FFFA;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#E6FFFA;--bs-gradient:none}.btn-outline-light-warning{--bs-btn-color:#FEF5E5;--bs-btn-border-color:#FEF5E5;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#FEF5E5;--bs-btn-hover-border-color:#FEF5E5;--bs-btn-focus-shadow-rgb:254,245,229;--bs-btn-active-color:#000;--bs-btn-active-bg:#FEF5E5;--bs-btn-active-border-color:#FEF5E5;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#FEF5E5;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#FEF5E5;--bs-gradient:none}.btn-outline-light-danger{--bs-btn-color:#FBF2EF;--bs-btn-border-color:#FBF2EF;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#FBF2EF;--bs-btn-hover-border-color:#FBF2EF;--bs-btn-focus-shadow-rgb:251,242,239;--bs-btn-active-color:#000;--bs-btn-active-bg:#FBF2EF;--bs-btn-active-border-color:#FBF2EF;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#FBF2EF;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#FBF2EF;--bs-gradient:none}.btn-outline-light-indigo{--bs-btn-color:#EBF3FE;--bs-btn-border-color:#EBF3FE;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#EBF3FE;--bs-btn-hover-border-color:#EBF3FE;--bs-btn-focus-shadow-rgb:235,243,254;--bs-btn-active-color:#000;--bs-btn-active-bg:#EBF3FE;--bs-btn-active-border-color:#EBF3FE;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#EBF3FE;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#EBF3FE;--bs-gradient:none}.btn-outline-dark-light{--bs-btn-color:#2A3547;--bs-btn-border-color:#2A3547;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#2A3547;--bs-btn-hover-border-color:#2A3547;--bs-btn-focus-shadow-rgb:42,53,71;--bs-btn-active-color:#fff;--bs-btn-active-bg:#2A3547;--bs-btn-active-border-color:#2A3547;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#2A3547;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#2A3547;--bs-gradient:none}.btn-outline-light-gray{--bs-btn-color:#F6F9FC;--bs-btn-border-color:#F6F9FC;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#F6F9FC;--bs-btn-hover-border-color:#F6F9FC;--bs-btn-focus-shadow-rgb:246,249,252;--bs-btn-active-color:#000;--bs-btn-active-bg:#F6F9FC;--bs-btn-active-border-color:#F6F9FC;--bs-btn-active-shadow:inset 0 3px 5px rgba(0,0,0,0.125);--bs-btn-disabled-color:#F6F9FC;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#F6F9FC;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#2A3547;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:none;--bs-btn-focus-shadow-rgb:117,153,255;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.09375rem;--bs-btn-border-radius:9px}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.765625rem;--bs-btn-border-radius:5px}.fade{-webkit-transition:opacity 0.15s linear;transition:opacity 0.15s linear}@media (prefers-reduced-motion:reduce){.fade{-webkit-transition:none;transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;-webkit-transition:height 0.35s ease;transition:height 0.35s ease}@media (prefers-reduced-motion:reduce){.collapsing{-webkit-transition:none;transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;-webkit-transition:width 0.35s ease;transition:width 0.35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{-webkit-transition:none;transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:"";border-top:0.3em solid;border-right:0.3em solid transparent;border-bottom:0;border-left:0.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:0.875rem;--bs-dropdown-color:var(--bs-body-color);--bs-dropdown-bg:var(--bs-body-bg);--bs-dropdown-border-color:transparent;--bs-dropdown-border-radius:7px;--bs-dropdown-border-width:var(--bs-border-width);--bs-dropdown-inner-border-radius:calc(7px - var(--bs-border-width));--bs-dropdown-divider-bg:transparent;--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:rgba(145,158,171,0.2) 0px 0px 2px 0px,rgba(145,158,171,0.12) 0px 12px 24px -4px;--bs-dropdown-link-color:var(--bs-body-color);--bs-dropdown-link-hover-color:var(--bs-body-color);--bs-dropdown-link-hover-bg:#F6F9FC;--bs-dropdown-link-active-color:#2A3547;--bs-dropdown-link-active-bg:#F6F9FC;--bs-dropdown-link-disabled-color:#5A6A85;--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:10px;--bs-dropdown-header-color:#2A3547;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius);-webkit-box-shadow:var(--bs-dropdown-box-shadow);box-shadow:var(--bs-dropdown-box-shadow)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle:after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:"";border-top:0;border-right:0.3em solid transparent;border-bottom:0.3em solid;border-left:0.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle:after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:"";border-top:0.3em solid transparent;border-right:0;border-bottom:0.3em solid transparent;border-left:0.3em solid}.dropend .dropdown-toggle:empty:after{margin-left:0}.dropend .dropdown-toggle:after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle:after{display:inline-block;margin-left:0.255em;vertical-align:0.255em;content:""}.dropstart .dropdown-toggle:after{display:none}.dropstart .dropdown-toggle:before{display:inline-block;margin-right:0.255em;vertical-align:0.255em;content:"";border-top:0.3em solid transparent;border-right:0.3em solid;border-bottom:0.3em solid transparent}.dropstart .dropdown-toggle:empty:after{margin-left:0}.dropstart .dropdown-toggle:before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0;border-radius:var(--bs-dropdown-item-border-radius,0)}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:0.765625rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#DFE5EF;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:transparent;--bs-dropdown-box-shadow:;--bs-dropdown-link-color:#DFE5EF;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:transparent;--bs-dropdown-link-hover-bg:rgba(255,255,255,0.15);--bs-dropdown-link-active-color:#2A3547;--bs-dropdown-link-active-bg:#F6F9FC;--bs-dropdown-link-disabled-color:#5A6A85;--bs-dropdown-header-color:#5A6A85}.btn-group,.btn-group-vertical{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:7px}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:calc(var(--bs-border-width) * -1)}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:12px;padding-left:12px}.dropdown-toggle-split:after,.dropend .dropdown-toggle-split:after,.dropup .dropdown-toggle-split:after{margin-left:0}.dropstart .dropdown-toggle-split:before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:0.375rem;padding-left:0.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:0.75rem;padding-left:0.75rem}.btn-group.show .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.show .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn-group-vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:calc(var(--bs-border-width) * -1)}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-size:1rem;--bs-nav-link-font-weight:400;--bs-nav-link-color:#2A3547;--bs-nav-link-hover-color:#2A3547;--bs-nav-link-disabled-color:var(--bs-secondary-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;-webkit-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{-webkit-transition:none;transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:0;--bs-nav-tabs-border-color:var(--bs-border-color);--bs-nav-tabs-border-radius:10px;--bs-nav-tabs-link-hover-border-color:var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color);--bs-nav-tabs-link-active-color:#fff;--bs-nav-tabs-link-active-bg:#5D87FF;--bs-nav-tabs-link-active-border-color:var(--bs-border-color) var(--bs-border-color) #5D87FF;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:none;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-link.disabled,.nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:7px;--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#5D87FF}.nav-pills .nav-link{background:none;border:0;border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-fill .nav-item,.nav-fill>.nav-link{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:#2a3547;--bs-navbar-hover-color:#5d87ff;--bs-navbar-disabled-color:rgba(var(--bs-emphasis-color-rgb),0.3);--bs-navbar-active-color:rgba(var(--bs-emphasis-color-rgb),1);--bs-navbar-brand-padding-y:0.3359375rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.09375rem;--bs-navbar-brand-color:rgba(var(--bs-emphasis-color-rgb),1);--bs-navbar-brand-hover-color:rgba(var(--bs-emphasis-color-rgb),1);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.09375rem;--bs-navbar-toggler-icon-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2890, 106, 133, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");--bs-navbar-toggler-border-color:rgba(var(--bs-emphasis-color-rgb),0.15);--bs-navbar-toggler-border-radius:7px;--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:inherit;flex-wrap:inherit;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-size:1rem;--bs-nav-link-font-weight:400;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .show>.nav-link{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:0.5rem;padding-bottom:0.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);-webkit-transition:var(--bs-navbar-toggler-transition);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{-webkit-transition:none;transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;-webkit-box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width);box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark{--bs-navbar-color:#dfe5ef;--bs-navbar-hover-color:#5d87ff;--bs-navbar-disabled-color:rgba(255,255,255,0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255,255,255,0.1);--bs-navbar-toggler-icon-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23dfe5ef' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}[data-bs-theme=dark] .navbar{--bs-navbar-toggler-icon-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23dfe5ef' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.card{--bs-card-spacer-y:30px;--bs-card-spacer-x:30px;--bs-card-title-spacer-y:0.5rem;--bs-card-title-color:#2A3547;--bs-card-subtitle-color:#2A3547;--bs-card-border-width:0px;--bs-card-border-color:#ebf1f6;--bs-card-border-radius:7px;--bs-card-box-shadow:rgba(145,158,171,0.2) 0px 0px 2px 0px,rgba(145,158,171,0.12) 0px 12px 24px -4px;--bs-card-inner-border-radius:7px;--bs-card-cap-padding-y:15px;--bs-card-cap-padding-x:30px;--bs-card-cap-bg:rgba(var(--bs-body-color-rgb),0.03);--bs-card-cap-color:;--bs-card-height:;--bs-card-color:;--bs-card-bg:var(--bs-body-bg);--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:12px;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;height:var(--bs-card-height);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius);-webkit-box-shadow:var(--bs-card-box-shadow);box-shadow:var(--bs-card-box-shadow)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y);color:var(--bs-card-title-color)}.card-subtitle{margin-top:calc(-0.5 * var(--bs-card-title-spacer-y));margin-bottom:0;color:var(--bs-card-subtitle-color)}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-0.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-0.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-0.5 * var(--bs-card-cap-padding-x));margin-left:calc(-0.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:var(--bs-body-color);--bs-accordion-bg:var(--bs-body-bg);--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:var(--bs-border-width);--bs-accordion-border-radius:var(--bs-border-radius);--bs-accordion-inner-border-radius:calc(var(--bs-border-radius) - (var(--bs-border-width)));--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:var(--bs-body-color);--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235A6A85'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%234a6ccc'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");--bs-accordion-btn-focus-border-color:#aec3ff;--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(93,135,255,0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:var(--bs-primary-text);--bs-accordion-active-bg:var(--bs-primary-bg-subtle)}.accordion-button{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:0.875rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;-webkit-transition:var(--bs-accordion-transition);transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{-webkit-transition:none;transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);-webkit-box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed):after{background-image:var(--bs-accordion-btn-active-icon);-webkit-transform:var(--bs-accordion-btn-icon-transform);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button:after{-ms-flex-negative:0;flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);-webkit-transition:var(--bs-accordion-btn-icon-transition);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button:after{-webkit-transition:none;transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:var(--bs-accordion-btn-focus-border-color);outline:0;-webkit-box-shadow:var(--bs-accordion-btn-focus-box-shadow);box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button,.accordion-flush .accordion-item .accordion-button.collapsed{border-radius:0}[data-bs-theme=dark] .accordion-button:after{--bs-accordion-btn-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239eb7ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");--bs-accordion-btn-active-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239eb7ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg:;--bs-breadcrumb-border-radius:;--bs-breadcrumb-divider-color:var(--bs-secondary-color);--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:var(--bs-secondary-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item:before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider,"/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:0.875rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:var(--bs-body-bg);--bs-pagination-border-width:var(--bs-border-width);--bs-pagination-border-color:var(--bs-border-color);--bs-pagination-border-radius:var(--bs-border-radius);--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:var(--bs-tertiary-bg);--bs-pagination-hover-border-color:var(--bs-border-color);--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:var(--bs-secondary-bg);--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(93,135,255,0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#5D87FF;--bs-pagination-active-border-color:#5D87FF;--bs-pagination-disabled-color:var(--bs-secondary-color);--bs-pagination-disabled-bg:var(--bs-secondary-bg);--bs-pagination-disabled-border-color:var(--bs-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);-webkit-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{-webkit-transition:none;transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;-webkit-box-shadow:var(--bs-pagination-focus-box-shadow);box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:calc(var(--bs-border-width) * -1)}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.09375rem;--bs-pagination-border-radius:15px}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.765625rem;--bs-pagination-border-radius:5px}.badge{--bs-badge-padding-x:10px;--bs-badge-padding-y:5px;--bs-badge-font-size:0.875rem;--bs-badge-font-weight:400;--bs-badge-color:#fff;--bs-badge-border-radius:4px;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:var(--bs-border-width) solid var(--bs-alert-border-color);--bs-alert-border-radius:7px;--bs-alert-link-color:inherit;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:500;color:var(--bs-alert-link-color)}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:var(--bs-primary-text);--bs-alert-bg:var(--bs-primary-bg-subtle);--bs-alert-border-color:var(--bs-primary-border-subtle);--bs-alert-link-color:var(--bs-primary-text)}.alert-secondary{--bs-alert-color:var(--bs-secondary-text);--bs-alert-bg:var(--bs-secondary-bg-subtle);--bs-alert-border-color:var(--bs-secondary-border-subtle);--bs-alert-link-color:var(--bs-secondary-text)}.alert-success{--bs-alert-color:var(--bs-success-text);--bs-alert-bg:var(--bs-success-bg-subtle);--bs-alert-border-color:var(--bs-success-border-subtle);--bs-alert-link-color:var(--bs-success-text)}.alert-info{--bs-alert-color:var(--bs-info-text);--bs-alert-bg:var(--bs-info-bg-subtle);--bs-alert-border-color:var(--bs-info-border-subtle);--bs-alert-link-color:var(--bs-info-text)}.alert-warning{--bs-alert-color:var(--bs-warning-text);--bs-alert-bg:var(--bs-warning-bg-subtle);--bs-alert-border-color:var(--bs-warning-border-subtle);--bs-alert-link-color:var(--bs-warning-text)}.alert-danger{--bs-alert-color:var(--bs-danger-text);--bs-alert-bg:var(--bs-danger-bg-subtle);--bs-alert-border-color:var(--bs-danger-border-subtle);--bs-alert-link-color:var(--bs-danger-text)}.alert-light{--bs-alert-color:var(--bs-light-text);--bs-alert-bg:var(--bs-light-bg-subtle);--bs-alert-border-color:var(--bs-light-border-subtle);--bs-alert-link-color:var(--bs-light-text)}.alert-dark{--bs-alert-color:var(--bs-dark-text);--bs-alert-bg:var(--bs-dark-bg-subtle);--bs-alert-border-color:var(--bs-dark-border-subtle);--bs-alert-link-color:var(--bs-dark-text)}.alert-muted{--bs-alert-color:var(--bs-muted-text);--bs-alert-bg:var(--bs-muted-bg-subtle);--bs-alert-border-color:var(--bs-muted-border-subtle);--bs-alert-link-color:var(--bs-muted-text)}.alert-indigo{--bs-alert-color:var(--bs-indigo-text);--bs-alert-bg:var(--bs-indigo-bg-subtle);--bs-alert-border-color:var(--bs-indigo-border-subtle);--bs-alert-link-color:var(--bs-indigo-text)}.alert-light-primary{--bs-alert-color:var(--bs-light-primary-text);--bs-alert-bg:var(--bs-light-primary-bg-subtle);--bs-alert-border-color:var(--bs-light-primary-border-subtle);--bs-alert-link-color:var(--bs-light-primary-text)}.alert-light-secondary{--bs-alert-color:var(--bs-light-secondary-text);--bs-alert-bg:var(--bs-light-secondary-bg-subtle);--bs-alert-border-color:var(--bs-light-secondary-border-subtle);--bs-alert-link-color:var(--bs-light-secondary-text)}.alert-light-info{--bs-alert-color:var(--bs-light-info-text);--bs-alert-bg:var(--bs-light-info-bg-subtle);--bs-alert-border-color:var(--bs-light-info-border-subtle);--bs-alert-link-color:var(--bs-light-info-text)}.alert-light-success{--bs-alert-color:var(--bs-light-success-text);--bs-alert-bg:var(--bs-light-success-bg-subtle);--bs-alert-border-color:var(--bs-light-success-border-subtle);--bs-alert-link-color:var(--bs-light-success-text)}.alert-light-warning{--bs-alert-color:var(--bs-light-warning-text);--bs-alert-bg:var(--bs-light-warning-bg-subtle);--bs-alert-border-color:var(--bs-light-warning-border-subtle);--bs-alert-link-color:var(--bs-light-warning-text)}.alert-light-danger{--bs-alert-color:var(--bs-light-danger-text);--bs-alert-bg:var(--bs-light-danger-bg-subtle);--bs-alert-border-color:var(--bs-light-danger-border-subtle);--bs-alert-link-color:var(--bs-light-danger-text)}.alert-light-indigo{--bs-alert-color:var(--bs-light-indigo-text);--bs-alert-bg:var(--bs-light-indigo-bg-subtle);--bs-alert-border-color:var(--bs-light-indigo-border-subtle);--bs-alert-link-color:var(--bs-light-indigo-text)}.alert-dark-light{--bs-alert-color:var(--bs-dark-light-text);--bs-alert-bg:var(--bs-dark-light-bg-subtle);--bs-alert-border-color:var(--bs-dark-light-border-subtle);--bs-alert-link-color:var(--bs-dark-light-text)}.alert-light-gray{--bs-alert-color:var(--bs-light-gray-text);--bs-alert-bg:var(--bs-light-gray-bg-subtle);--bs-alert-border-color:var(--bs-light-gray-border-subtle);--bs-alert-link-color:var(--bs-light-gray-text)}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress,.progress-stacked{--bs-progress-height:1rem;--bs-progress-font-size:0.65625rem;--bs-progress-bg:var(--bs-secondary-bg);--bs-progress-border-radius:var(--bs-border-radius);--bs-progress-box-shadow:var(--bs-box-shadow-inset);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#5D87FF;--bs-progress-bar-transition:width 0.6s ease;display:-webkit-box;display:-ms-flexbox;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius);-webkit-box-shadow:var(--bs-progress-box-shadow);box-shadow:var(--bs-progress-box-shadow)}.progress-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);-webkit-transition:var(--bs-progress-bar-transition);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{-webkit-transition:none;transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-stacked>.progress{overflow:visible}.progress-stacked>.progress>.progress-bar{width:100%}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.list-group{--bs-list-group-color:var(--bs-body-color);--bs-list-group-bg:var(--bs-body-bg);--bs-list-group-border-color:var(--bs-border-color);--bs-list-group-border-width:var(--bs-border-width);--bs-list-group-border-radius:var(--bs-border-radius);--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:var(--bs-secondary-color);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-tertiary-bg);--bs-list-group-action-active-color:var(--bs-body-color);--bs-list-group-action-active-bg:var(--bs-secondary-bg);--bs-list-group-disabled-color:var(--bs-secondary-color);--bs-list-group-disabled-bg:var(--bs-body-bg);--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#5D87FF;--bs-list-group-active-border-color:#5D87FF;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item:before{content:counters(section,".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-horizontal{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{--bs-list-group-color:var(--bs-primary-text);--bs-list-group-bg:var(--bs-primary-bg-subtle);--bs-list-group-border-color:var(--bs-primary-border-subtle)}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-primary-border-subtle)}.list-group-item-primary.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-primary-text);--bs-list-group-active-border-color:var(--bs-primary-text)}.list-group-item-secondary{--bs-list-group-color:var(--bs-secondary-text);--bs-list-group-bg:var(--bs-secondary-bg-subtle);--bs-list-group-border-color:var(--bs-secondary-border-subtle)}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-secondary-border-subtle)}.list-group-item-secondary.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-secondary-text);--bs-list-group-active-border-color:var(--bs-secondary-text)}.list-group-item-success{--bs-list-group-color:var(--bs-success-text);--bs-list-group-bg:var(--bs-success-bg-subtle);--bs-list-group-border-color:var(--bs-success-border-subtle)}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-success-border-subtle)}.list-group-item-success.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-success-text);--bs-list-group-active-border-color:var(--bs-success-text)}.list-group-item-info{--bs-list-group-color:var(--bs-info-text);--bs-list-group-bg:var(--bs-info-bg-subtle);--bs-list-group-border-color:var(--bs-info-border-subtle)}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-info-border-subtle)}.list-group-item-info.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-info-text);--bs-list-group-active-border-color:var(--bs-info-text)}.list-group-item-warning{--bs-list-group-color:var(--bs-warning-text);--bs-list-group-bg:var(--bs-warning-bg-subtle);--bs-list-group-border-color:var(--bs-warning-border-subtle)}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-warning-border-subtle)}.list-group-item-warning.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-warning-text);--bs-list-group-active-border-color:var(--bs-warning-text)}.list-group-item-danger{--bs-list-group-color:var(--bs-danger-text);--bs-list-group-bg:var(--bs-danger-bg-subtle);--bs-list-group-border-color:var(--bs-danger-border-subtle)}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-danger-border-subtle)}.list-group-item-danger.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-danger-text);--bs-list-group-active-border-color:var(--bs-danger-text)}.list-group-item-light{--bs-list-group-color:var(--bs-light-text);--bs-list-group-bg:var(--bs-light-bg-subtle);--bs-list-group-border-color:var(--bs-light-border-subtle)}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-border-subtle)}.list-group-item-light.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-text);--bs-list-group-active-border-color:var(--bs-light-text)}.list-group-item-dark{--bs-list-group-color:var(--bs-dark-text);--bs-list-group-bg:var(--bs-dark-bg-subtle);--bs-list-group-border-color:var(--bs-dark-border-subtle)}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-dark-border-subtle)}.list-group-item-dark.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-dark-text);--bs-list-group-active-border-color:var(--bs-dark-text)}.list-group-item-muted{--bs-list-group-color:var(--bs-muted-text);--bs-list-group-bg:var(--bs-muted-bg-subtle);--bs-list-group-border-color:var(--bs-muted-border-subtle)}.list-group-item-muted.list-group-item-action:focus,.list-group-item-muted.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-muted-border-subtle)}.list-group-item-muted.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-muted-text);--bs-list-group-active-border-color:var(--bs-muted-text)}.list-group-item-indigo{--bs-list-group-color:var(--bs-indigo-text);--bs-list-group-bg:var(--bs-indigo-bg-subtle);--bs-list-group-border-color:var(--bs-indigo-border-subtle)}.list-group-item-indigo.list-group-item-action:focus,.list-group-item-indigo.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-indigo-border-subtle)}.list-group-item-indigo.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-indigo-text);--bs-list-group-active-border-color:var(--bs-indigo-text)}.list-group-item-light-primary{--bs-list-group-color:var(--bs-light-primary-text);--bs-list-group-bg:var(--bs-light-primary-bg-subtle);--bs-list-group-border-color:var(--bs-light-primary-border-subtle)}.list-group-item-light-primary.list-group-item-action:focus,.list-group-item-light-primary.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-primary-border-subtle)}.list-group-item-light-primary.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-primary-text);--bs-list-group-active-border-color:var(--bs-light-primary-text)}.list-group-item-light-secondary{--bs-list-group-color:var(--bs-light-secondary-text);--bs-list-group-bg:var(--bs-light-secondary-bg-subtle);--bs-list-group-border-color:var(--bs-light-secondary-border-subtle)}.list-group-item-light-secondary.list-group-item-action:focus,.list-group-item-light-secondary.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-secondary-border-subtle)}.list-group-item-light-secondary.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-secondary-text);--bs-list-group-active-border-color:var(--bs-light-secondary-text)}.list-group-item-light-info{--bs-list-group-color:var(--bs-light-info-text);--bs-list-group-bg:var(--bs-light-info-bg-subtle);--bs-list-group-border-color:var(--bs-light-info-border-subtle)}.list-group-item-light-info.list-group-item-action:focus,.list-group-item-light-info.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-info-border-subtle)}.list-group-item-light-info.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-info-text);--bs-list-group-active-border-color:var(--bs-light-info-text)}.list-group-item-light-success{--bs-list-group-color:var(--bs-light-success-text);--bs-list-group-bg:var(--bs-light-success-bg-subtle);--bs-list-group-border-color:var(--bs-light-success-border-subtle)}.list-group-item-light-success.list-group-item-action:focus,.list-group-item-light-success.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-success-border-subtle)}.list-group-item-light-success.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-success-text);--bs-list-group-active-border-color:var(--bs-light-success-text)}.list-group-item-light-warning{--bs-list-group-color:var(--bs-light-warning-text);--bs-list-group-bg:var(--bs-light-warning-bg-subtle);--bs-list-group-border-color:var(--bs-light-warning-border-subtle)}.list-group-item-light-warning.list-group-item-action:focus,.list-group-item-light-warning.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-warning-border-subtle)}.list-group-item-light-warning.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-warning-text);--bs-list-group-active-border-color:var(--bs-light-warning-text)}.list-group-item-light-danger{--bs-list-group-color:var(--bs-light-danger-text);--bs-list-group-bg:var(--bs-light-danger-bg-subtle);--bs-list-group-border-color:var(--bs-light-danger-border-subtle)}.list-group-item-light-danger.list-group-item-action:focus,.list-group-item-light-danger.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-danger-border-subtle)}.list-group-item-light-danger.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-danger-text);--bs-list-group-active-border-color:var(--bs-light-danger-text)}.list-group-item-light-indigo{--bs-list-group-color:var(--bs-light-indigo-text);--bs-list-group-bg:var(--bs-light-indigo-bg-subtle);--bs-list-group-border-color:var(--bs-light-indigo-border-subtle)}.list-group-item-light-indigo.list-group-item-action:focus,.list-group-item-light-indigo.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-indigo-border-subtle)}.list-group-item-light-indigo.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-indigo-text);--bs-list-group-active-border-color:var(--bs-light-indigo-text)}.list-group-item-dark-light{--bs-list-group-color:var(--bs-dark-light-text);--bs-list-group-bg:var(--bs-dark-light-bg-subtle);--bs-list-group-border-color:var(--bs-dark-light-border-subtle)}.list-group-item-dark-light.list-group-item-action:focus,.list-group-item-dark-light.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-dark-light-border-subtle)}.list-group-item-dark-light.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-dark-light-text);--bs-list-group-active-border-color:var(--bs-dark-light-text)}.list-group-item-light-gray{--bs-list-group-color:var(--bs-light-gray-text);--bs-list-group-bg:var(--bs-light-gray-bg-subtle);--bs-list-group-border-color:var(--bs-light-gray-border-subtle)}.list-group-item-light-gray.list-group-item-action:focus,.list-group-item-light-gray.list-group-item-action:hover{--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-gray-border-subtle)}.list-group-item-light-gray.list-group-item-action:active{--bs-list-group-active-color:var(--bs-emphasis-color);--bs-list-group-active-bg:var(--bs-light-gray-text);--bs-list-group-active-border-color:var(--bs-light-gray-text)}.btn-close{--bs-btn-close-color:#000;--bs-btn-close-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");--bs-btn-close-opacity:0.5;--bs-btn-close-hover-opacity:0.75;--bs-btn-close-focus-shadow:0 0 0 0.25rem rgba(93,135,255,0.25);--bs-btn-close-focus-opacity:1;--bs-btn-close-disabled-opacity:0.25;--bs-btn-close-white-filter:invert(1) grayscale(100%) brightness(200%);-webkit-box-sizing:content-box;box-sizing:content-box;width:1em;height:1em;padding:0.25em 0.25em;color:var(--bs-btn-close-color);background:transparent var(--bs-btn-close-bg) center/1em auto no-repeat;border:0;border-radius:7px;opacity:var(--bs-btn-close-opacity)}.btn-close:hover{color:var(--bs-btn-close-color);text-decoration:none;opacity:var(--bs-btn-close-hover-opacity)}.btn-close:focus{outline:0;-webkit-box-shadow:var(--bs-btn-close-focus-shadow);box-shadow:var(--bs-btn-close-focus-shadow);opacity:var(--bs-btn-close-focus-opacity)}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--bs-btn-close-disabled-opacity)}.btn-close-white{-webkit-filter:var(--bs-btn-close-white-filter);filter:var(--bs-btn-close-white-filter)}[data-bs-theme=dark] .btn-close{-webkit-filter:var(--bs-btn-close-white-filter);filter:var(--bs-btn-close-white-filter)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:24px;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color:;--bs-toast-bg:rgba(var(--bs-body-bg-rgb),0.85);--bs-toast-border-width:var(--bs-border-width);--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:var(--bs-border-radius);--bs-toast-box-shadow:var(--bs-box-shadow);--bs-toast-header-color:var(--bs-secondary-color);--bs-toast-header-bg:rgba(var(--bs-body-bg-rgb),0.85);--bs-toast-header-border-color:var(--bs-border-color-translucent);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);-webkit-box-shadow:var(--bs-toast-box-shadow);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-0.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color:;--bs-modal-bg:var(--bs-body-bg);--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:0;--bs-modal-border-radius:var(--bs-border-radius-lg);--bs-modal-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.075);--bs-modal-inner-border-radius:calc(var(--bs-border-radius-lg) - 0);--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:0;--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg:;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:0;position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform 0.3s ease-out;transition:-webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out;transition:transform 0.3s ease-out,-webkit-transform 0.3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{-webkit-transition:none;transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);-webkit-box-shadow:var(--bs-modal-box-shadow);box-shadow:var(--bs-modal-box-shadow);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5);margin:calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * 0.5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:0px 15px 30px rgba(0,0,0,0.12)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin:;--bs-tooltip-font-size:0.75rem;--bs-tooltip-color:var(--bs-body-bg);--bs-tooltip-bg:#2A3547;--bs-tooltip-border-radius:var(--bs-border-radius);--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;padding:var(--bs-tooltip-arrow-height);margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow:before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow:before,.bs-tooltip-top .tooltip-arrow:before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow:before,.bs-tooltip-end .tooltip-arrow:before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow:before,.bs-tooltip-bottom .tooltip-arrow:before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow:before,.bs-tooltip-start .tooltip-arrow:before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.765625rem;--bs-popover-bg:var(--bs-body-bg);--bs-popover-border-width:var(--bs-border-width);--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:var(--bs-border-radius-lg);--bs-popover-inner-border-radius:calc(var(--bs-border-radius-lg) - var(--bs-border-width));--bs-popover-box-shadow:0px 15px 30px rgba(0,0,0,0.12);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:0.875rem;--bs-popover-header-color:#2A3547;--bs-popover-header-bg:var(--bs-secondary-bg);--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:var(--bs-body-color);--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius);-webkit-box-shadow:var(--bs-popover-box-shadow);box-shadow:var(--bs-popover-box-shadow)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow:after,.popover .popover-arrow:before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow:after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow:before,.bs-popover-top>.popover-arrow:after,.bs-popover-top>.popover-arrow:before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow:before,.bs-popover-top>.popover-arrow:before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow:after,.bs-popover-top>.popover-arrow:after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow:after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow:before,.bs-popover-end>.popover-arrow:after,.bs-popover-end>.popover-arrow:before{border-width:calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow:before,.bs-popover-end>.popover-arrow:before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow:after,.bs-popover-end>.popover-arrow:after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow:after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow:before,.bs-popover-bottom>.popover-arrow:after,.bs-popover-bottom>.popover-arrow:before{border-width:0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow:before,.bs-popover-bottom>.popover-arrow:before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow:after,.bs-popover-bottom>.popover-arrow:after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header:before,.bs-popover-bottom .popover-header:before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-0.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow:after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow:before,.bs-popover-start>.popover-arrow:after,.bs-popover-start>.popover-arrow:before{border-width:calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow:before,.bs-popover-start>.popover-arrow:before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow:after,.bs-popover-start>.popover-arrow:after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner:after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:-webkit-transform 0.6s ease-in-out;transition:-webkit-transform 0.6s ease-in-out;transition:transform 0.6s ease-in-out;transition:transform 0.6s ease-in-out,-webkit-transform 0.6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{-webkit-transition:none;transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;-webkit-transition:opacity 0s 0.6s;transition:opacity 0s 0.6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{-webkit-transition:none;transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:none;border:0;opacity:0.5;-webkit-transition:opacity 0.15s ease;transition:opacity 0.15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{-webkit-transition:none;transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:0.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:0.5;-webkit-transition:opacity 0.6s ease;transition:opacity 0.6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{-webkit-transition:none;transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{-webkit-filter:invert(1) grayscale(100);filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}[data-bs-theme=dark] .carousel .carousel-control-next-icon,[data-bs-theme=dark] .carousel .carousel-control-prev-icon{-webkit-filter:invert(1) grayscale(100);filter:invert(1) grayscale(100)}[data-bs-theme=dark] .carousel .carousel-indicators [data-bs-target]{background-color:#000}[data-bs-theme=dark] .carousel .carousel-caption{color:#000}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;-webkit-animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name);animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color:var(--bs-body-color);--bs-offcanvas-bg:var(--bs-body-bg);--bs-offcanvas-border-width:0;--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.075);--bs-offcanvas-transition:transform 0.3s ease-in-out;--bs-offcanvas-title-line-height:1.5}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;-webkit-box-shadow:var(--bs-offcanvas-box-shadow);box-shadow:var(--bs-offcanvas-box-shadow);-webkit-transition:var(--bs-offcanvas-transition);transition:var(--bs-offcanvas-transition)}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{-webkit-transition:none;transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(100%);transform:translateX(100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(100%);transform:translateY(100%)}}@media (max-width:575.98px){.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{-webkit-transform:none;transform:none}}@media (max-width:575.98px){.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;-webkit-box-shadow:var(--bs-offcanvas-box-shadow);box-shadow:var(--bs-offcanvas-box-shadow);-webkit-transition:var(--bs-offcanvas-transition);transition:var(--bs-offcanvas-transition)}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{-webkit-transition:none;transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(100%);transform:translateX(100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@media (max-width:767.98px){.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(100%);transform:translateY(100%)}}@media (max-width:767.98px){.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{-webkit-transform:none;transform:none}}@media (max-width:767.98px){.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;-webkit-box-shadow:var(--bs-offcanvas-box-shadow);box-shadow:var(--bs-offcanvas-box-shadow);-webkit-transition:var(--bs-offcanvas-transition);transition:var(--bs-offcanvas-transition)}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{-webkit-transition:none;transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(100%);transform:translateX(100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(100%);transform:translateY(100%)}}@media (max-width:991.98px){.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{-webkit-transform:none;transform:none}}@media (max-width:991.98px){.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;-webkit-box-shadow:var(--bs-offcanvas-box-shadow);box-shadow:var(--bs-offcanvas-box-shadow);-webkit-transition:var(--bs-offcanvas-transition);transition:var(--bs-offcanvas-transition)}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{-webkit-transition:none;transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(100%);transform:translateX(100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(100%);transform:translateY(100%)}}@media (max-width:1199.98px){.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{-webkit-transform:none;transform:none}}@media (max-width:1199.98px){.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;-webkit-box-shadow:var(--bs-offcanvas-box-shadow);box-shadow:var(--bs-offcanvas-box-shadow);-webkit-transition:var(--bs-offcanvas-transition);transition:var(--bs-offcanvas-transition)}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{-webkit-transition:none;transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(100%);transform:translateX(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(100%);transform:translateY(100%)}}@media (max-width:1399.98px){.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{-webkit-transform:none;transform:none}}@media (max-width:1399.98px){.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;-webkit-box-shadow:var(--bs-offcanvas-box-shadow);box-shadow:var(--bs-offcanvas-box-shadow);-webkit-transition:var(--bs-offcanvas-transition);transition:var(--bs-offcanvas-transition)}@media (prefers-reduced-motion:reduce){.offcanvas{-webkit-transition:none;transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(-100%);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateX(100%);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(-100%);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);-webkit-transform:translateY(100%);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{-webkit-transform:none;transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:0.5}.offcanvas-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5);margin-top:calc(-0.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-0.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-0.5 * var(--bs-offcanvas-padding-y))}.offcanvas-title{margin-bottom:0;line-height:var(--bs-offcanvas-title-line-height)}.offcanvas-body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:0.5}.placeholder.btn:before{display:inline-block;content:""}.placeholder-xs{min-height:0.6em}.placeholder-sm{min-height:0.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{-webkit-animation:placeholder-glow 2s ease-in-out infinite;animation:placeholder-glow 2s ease-in-out infinite}@-webkit-keyframes placeholder-glow{50%{opacity:0.2}}@keyframes placeholder-glow{50%{opacity:0.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;-webkit-animation:placeholder-wave 2s linear infinite;animation:placeholder-wave 2s linear infinite}@-webkit-keyframes placeholder-wave{to{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}@keyframes placeholder-wave{to{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix:after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(93,135,255,var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(73,190,255,var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(19,222,185,var(--bs-bg-opacity,1))!important}.text-bg-info{color:#fff!important;background-color:RGBA(83,155,255,var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#fff!important;background-color:RGBA(255,174,31,var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(250,137,107,var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(246,249,252,var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(42,53,71,var(--bs-bg-opacity,1))!important}.text-bg-muted{color:#fff!important;background-color:RGBA(90,106,133,var(--bs-bg-opacity,1))!important}.text-bg-indigo{color:#fff!important;background-color:RGBA(102,16,242,var(--bs-bg-opacity,1))!important}.text-bg-light-primary{color:#000!important;background-color:RGBA(236,242,255,var(--bs-bg-opacity,1))!important}.text-bg-light-secondary{color:#000!important;background-color:RGBA(232,247,255,var(--bs-bg-opacity,1))!important}.text-bg-light-info{color:#000!important;background-color:RGBA(235,243,254,var(--bs-bg-opacity,1))!important}.text-bg-light-success{color:#000!important;background-color:RGBA(230,255,250,var(--bs-bg-opacity,1))!important}.text-bg-light-warning{color:#000!important;background-color:RGBA(254,245,229,var(--bs-bg-opacity,1))!important}.text-bg-light-danger{color:#000!important;background-color:RGBA(251,242,239,var(--bs-bg-opacity,1))!important}.text-bg-light-indigo{color:#000!important;background-color:RGBA(235,243,254,var(--bs-bg-opacity,1))!important}.text-bg-dark-light{color:#fff!important;background-color:RGBA(42,53,71,var(--bs-bg-opacity,1))!important}.text-bg-light-gray{color:#000!important;background-color:RGBA(246,249,252,var(--bs-bg-opacity,1))!important}.link-primary{color:#5D87FF!important}.link-primary:focus,.link-primary:hover{color:#4a6ccc!important}.link-secondary{color:#49BEFF!important}.link-secondary:focus,.link-secondary:hover{color:#3a98cc!important}.link-success{color:#13DEB9!important}.link-success:focus,.link-success:hover{color:#0fb294!important}.link-info{color:#539BFF!important}.link-info:focus,.link-info:hover{color:#427ccc!important}.link-warning{color:#FFAE1F!important}.link-warning:focus,.link-warning:hover{color:#cc8b19!important}.link-danger{color:#FA896B!important}.link-danger:focus,.link-danger:hover{color:#c86e56!important}.link-light{color:#F6F9FC!important}.link-light:focus,.link-light:hover{color:#f8fafd!important}.link-dark{color:#2A3547!important}.link-dark:focus,.link-dark:hover{color:#222a39!important}.link-muted{color:#5A6A85!important}.link-muted:focus,.link-muted:hover{color:#48556a!important}.link-indigo{color:#6610f2!important}.link-indigo:focus,.link-indigo:hover{color:#520dc2!important}.link-light-primary{color:#ECF2FF!important}.link-light-primary:focus,.link-light-primary:hover{color:#f0f5ff!important}.link-light-secondary{color:#E8F7FF!important}.link-light-secondary:focus,.link-light-secondary:hover{color:#edf9ff!important}.link-light-info{color:#EBF3FE!important}.link-light-info:focus,.link-light-info:hover{color:#eff5fe!important}.link-light-success{color:#E6FFFA!important}.link-light-success:focus,.link-light-success:hover{color:#ebfffb!important}.link-light-warning{color:#FEF5E5!important}.link-light-warning:focus,.link-light-warning:hover{color:#fef7ea!important}.link-light-danger{color:#FBF2EF!important}.link-light-danger:focus,.link-light-danger:hover{color:#fcf5f2!important}.link-light-indigo{color:#EBF3FE!important}.link-light-indigo:focus,.link-light-indigo:hover{color:#eff5fe!important}.link-dark-light{color:#2A3547!important}.link-dark-light:focus,.link-dark-light:hover{color:#222a39!important}.link-light-gray{color:#F6F9FC!important}.link-light-gray:focus,.link-light-gray:hover{color:#f8fafd!important}.ratio{position:relative;width:100%}.ratio:before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:sticky;top:0;z-index:1020}.sticky-bottom{position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:sticky;bottom:0;z-index:1020}}.hstack{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}.vstack{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;width:1px;min-height:1em;background-color:currentcolor;opacity:0.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.object-fit-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-none{-o-object-fit:none!important;object-fit:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:0.25!important}.opacity-50{opacity:0.5!important}.opacity-75{opacity:0.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-x-visible{overflow-x:visible!important}.overflow-x-scroll{overflow-x:scroll!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-visible{overflow-y:visible!important}.overflow-y-scroll{overflow-y:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:-ms-grid!important;display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-none{display:none!important}.shadow{-webkit-box-shadow:0px 15px 30px rgba(0,0,0,0.12)!important;box-shadow:0px 15px 30px rgba(0,0,0,0.12)!important}.shadow-sm{-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.075)!important;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.075)!important}.shadow-lg{-webkit-box-shadow:0 1rem 3rem rgba(0,0,0,0.175)!important;box-shadow:0 1rem 3rem rgba(0,0,0,0.175)!important}.shadow-none{-webkit-box-shadow:none!important;box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{-webkit-transform:translate(-50%,-50%)!important;transform:translate(-50%,-50%)!important}.translate-middle-x{-webkit-transform:translateX(-50%)!important;transform:translateX(-50%)!important}.translate-middle-y{-webkit-transform:translateY(-50%)!important;transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-muted{--bs-border-opacity:1;border-color:rgba(var(--bs-muted-rgb),var(--bs-border-opacity))!important}.border-indigo{--bs-border-opacity:1;border-color:rgba(var(--bs-indigo-rgb),var(--bs-border-opacity))!important}.border-light-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-light-primary-rgb),var(--bs-border-opacity))!important}.border-light-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-light-secondary-rgb),var(--bs-border-opacity))!important}.border-light-info{--bs-border-opacity:1;border-color:rgba(var(--bs-light-info-rgb),var(--bs-border-opacity))!important}.border-light-success{--bs-border-opacity:1;border-color:rgba(var(--bs-light-success-rgb),var(--bs-border-opacity))!important}.border-light-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-light-warning-rgb),var(--bs-border-opacity))!important}.border-light-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-light-danger-rgb),var(--bs-border-opacity))!important}.border-light-indigo{--bs-border-opacity:1;border-color:rgba(var(--bs-light-indigo-rgb),var(--bs-border-opacity))!important}.border-dark-light{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-light-rgb),var(--bs-border-opacity))!important}.border-light-gray{--bs-border-opacity:1;border-color:rgba(var(--bs-light-gray-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-primary-subtle{border-color:var(--bs-primary-border-subtle)!important}.border-secondary-subtle{border-color:var(--bs-secondary-border-subtle)!important}.border-success-subtle{border-color:var(--bs-success-border-subtle)!important}.border-info-subtle{border-color:var(--bs-info-border-subtle)!important}.border-warning-subtle{border-color:var(--bs-warning-border-subtle)!important}.border-danger-subtle{border-color:var(--bs-danger-border-subtle)!important}.border-light-subtle{border-color:var(--bs-light-border-subtle)!important}.border-dark-subtle{border-color:var(--bs-dark-border-subtle)!important}.border-1{--bs-border-width:1px}.border-2{--bs-border-width:2px}.border-3{--bs-border-width:3px}.border-4{--bs-border-width:4px}.border-5{--bs-border-width:5px}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-20{width:20%!important}.w-25{width:25%!important}.w-30{width:30%!important}.w-40{width:40%!important}.w-50{width:50%!important}.w-60{width:60%!important}.w-70{width:70%!important}.w-75{width:75%!important}.w-85{width:85%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{-webkit-box-flex:1!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-grow-0{-webkit-box-flex:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-webkit-box-flex:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-evenly{-webkit-box-pack:space-evenly!important;-ms-flex-pack:space-evenly!important;justify-content:space-evenly!important}.align-items-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}.order-first{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important}.order-0{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important}.order-1{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important}.order-2{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important}.order-3{-webkit-box-ordinal-group:4!important;-ms-flex-order:3!important;order:3!important}.order-4{-webkit-box-ordinal-group:5!important;-ms-flex-order:4!important;order:4!important}.order-5{-webkit-box-ordinal-group:6!important;-ms-flex-order:5!important;order:5!important}.order-last{-webkit-box-ordinal-group:7!important;-ms-flex-order:6!important;order:6!important}.m-0{margin:0!important}.m-1{margin:0.25rem!important}.m-2{margin:0.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-6{margin:12px!important}.m-7{margin:30px!important}.m-8{margin:10px!important}.m-9{margin:20px!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:0.25rem!important;margin-left:0.25rem!important}.mx-2{margin-right:0.5rem!important;margin-left:0.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-6{margin-right:12px!important;margin-left:12px!important}.mx-7{margin-right:30px!important;margin-left:30px!important}.mx-8{margin-right:10px!important;margin-left:10px!important}.mx-9{margin-right:20px!important;margin-left:20px!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:0.25rem!important;margin-bottom:0.25rem!important}.my-2{margin-top:0.5rem!important;margin-bottom:0.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-6{margin-top:12px!important;margin-bottom:12px!important}.my-7{margin-top:30px!important;margin-bottom:30px!important}.my-8{margin-top:10px!important;margin-bottom:10px!important}.my-9{margin-top:20px!important;margin-bottom:20px!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:0.25rem!important}.mt-2{margin-top:0.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-6{margin-top:12px!important}.mt-7{margin-top:30px!important}.mt-8{margin-top:10px!important}.mt-9{margin-top:20px!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:0.25rem!important}.me-2{margin-right:0.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-6{margin-right:12px!important}.me-7{margin-right:30px!important}.me-8{margin-right:10px!important}.me-9{margin-right:20px!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:0.25rem!important}.mb-2{margin-bottom:0.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-6{margin-bottom:12px!important}.mb-7{margin-bottom:30px!important}.mb-8{margin-bottom:10px!important}.mb-9{margin-bottom:20px!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:0.25rem!important}.ms-2{margin-left:0.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-6{margin-left:12px!important}.ms-7{margin-left:30px!important}.ms-8{margin-left:10px!important}.ms-9{margin-left:20px!important}.ms-auto{margin-left:auto!important}.m-n1{margin:-0.25rem!important}.m-n2{margin:-0.5rem!important}.m-n3{margin:-1rem!important}.m-n4{margin:-1.5rem!important}.m-n5{margin:-3rem!important}.m-n6{margin:-12px!important}.m-n7{margin:-30px!important}.m-n8{margin:-10px!important}.m-n9{margin:-20px!important}.mx-n1{margin-right:-0.25rem!important;margin-left:-0.25rem!important}.mx-n2{margin-right:-0.5rem!important;margin-left:-0.5rem!important}.mx-n3{margin-right:-1rem!important;margin-left:-1rem!important}.mx-n4{margin-right:-1.5rem!important;margin-left:-1.5rem!important}.mx-n5{margin-right:-3rem!important;margin-left:-3rem!important}.mx-n6{margin-right:-12px!important;margin-left:-12px!important}.mx-n7{margin-right:-30px!important;margin-left:-30px!important}.mx-n8{margin-right:-10px!important;margin-left:-10px!important}.mx-n9{margin-right:-20px!important;margin-left:-20px!important}.my-n1{margin-top:-0.25rem!important;margin-bottom:-0.25rem!important}.my-n2{margin-top:-0.5rem!important;margin-bottom:-0.5rem!important}.my-n3{margin-top:-1rem!important;margin-bottom:-1rem!important}.my-n4{margin-top:-1.5rem!important;margin-bottom:-1.5rem!important}.my-n5{margin-top:-3rem!important;margin-bottom:-3rem!important}.my-n6{margin-top:-12px!important;margin-bottom:-12px!important}.my-n7{margin-top:-30px!important;margin-bottom:-30px!important}.my-n8{margin-top:-10px!important;margin-bottom:-10px!important}.my-n9{margin-top:-20px!important;margin-bottom:-20px!important}.mt-n1{margin-top:-0.25rem!important}.mt-n2{margin-top:-0.5rem!important}.mt-n3{margin-top:-1rem!important}.mt-n4{margin-top:-1.5rem!important}.mt-n5{margin-top:-3rem!important}.mt-n6{margin-top:-12px!important}.mt-n7{margin-top:-30px!important}.mt-n8{margin-top:-10px!important}.mt-n9{margin-top:-20px!important}.me-n1{margin-right:-0.25rem!important}.me-n2{margin-right:-0.5rem!important}.me-n3{margin-right:-1rem!important}.me-n4{margin-right:-1.5rem!important}.me-n5{margin-right:-3rem!important}.me-n6{margin-right:-12px!important}.me-n7{margin-right:-30px!important}.me-n8{margin-right:-10px!important}.me-n9{margin-right:-20px!important}.mb-n1{margin-bottom:-0.25rem!important}.mb-n2{margin-bottom:-0.5rem!important}.mb-n3{margin-bottom:-1rem!important}.mb-n4{margin-bottom:-1.5rem!important}.mb-n5{margin-bottom:-3rem!important}.mb-n6{margin-bottom:-12px!important}.mb-n7{margin-bottom:-30px!important}.mb-n8{margin-bottom:-10px!important}.mb-n9{margin-bottom:-20px!important}.ms-n1{margin-left:-0.25rem!important}.ms-n2{margin-left:-0.5rem!important}.ms-n3{margin-left:-1rem!important}.ms-n4{margin-left:-1.5rem!important}.ms-n5{margin-left:-3rem!important}.ms-n6{margin-left:-12px!important}.ms-n7{margin-left:-30px!important}.ms-n8{margin-left:-10px!important}.ms-n9{margin-left:-20px!important}.p-0{padding:0!important}.p-1{padding:0.25rem!important}.p-2{padding:0.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.p-6{padding:12px!important}.p-7{padding:30px!important}.p-8{padding:10px!important}.p-9{padding:20px!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:0.25rem!important;padding-left:0.25rem!important}.px-2{padding-right:0.5rem!important;padding-left:0.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.px-6{padding-right:12px!important;padding-left:12px!important}.px-7{padding-right:30px!important;padding-left:30px!important}.px-8{padding-right:10px!important;padding-left:10px!important}.px-9{padding-right:20px!important;padding-left:20px!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:0.25rem!important;padding-bottom:0.25rem!important}.py-2{padding-top:0.5rem!important;padding-bottom:0.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.py-6{padding-top:12px!important;padding-bottom:12px!important}.py-7{padding-top:30px!important;padding-bottom:30px!important}.py-8{padding-top:10px!important;padding-bottom:10px!important}.py-9{padding-top:20px!important;padding-bottom:20px!important}.pt-0{padding-top:0!important}.pt-1{padding-top:0.25rem!important}.pt-2{padding-top:0.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pt-6{padding-top:12px!important}.pt-7{padding-top:30px!important}.pt-8{padding-top:10px!important}.pt-9{padding-top:20px!important}.pe-0{padding-right:0!important}.pe-1{padding-right:0.25rem!important}.pe-2{padding-right:0.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pe-6{padding-right:12px!important}.pe-7{padding-right:30px!important}.pe-8{padding-right:10px!important}.pe-9{padding-right:20px!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:0.25rem!important}.pb-2{padding-bottom:0.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.pb-6{padding-bottom:12px!important}.pb-7{padding-bottom:30px!important}.pb-8{padding-bottom:10px!important}.pb-9{padding-bottom:20px!important}.ps-0{padding-left:0!important}.ps-1{padding-left:0.25rem!important}.ps-2{padding-left:0.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.ps-6{padding-left:12px!important}.ps-7{padding-left:30px!important}.ps-8{padding-left:10px!important}.ps-9{padding-left:20px!important}.gap-0{gap:0!important}.gap-1{gap:0.25rem!important}.gap-2{gap:0.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.gap-6{gap:12px!important}.gap-7{gap:30px!important}.gap-8{gap:10px!important}.gap-9{gap:20px!important}.row-gap-0{row-gap:0!important}.row-gap-1{row-gap:0.25rem!important}.row-gap-2{row-gap:0.5rem!important}.row-gap-3{row-gap:1rem!important}.row-gap-4{row-gap:1.5rem!important}.row-gap-5{row-gap:3rem!important}.row-gap-6{row-gap:12px!important}.row-gap-7{row-gap:30px!important}.row-gap-8{row-gap:10px!important}.row-gap-9{row-gap:20px!important}.column-gap-0{-webkit-column-gap:0!important;-moz-column-gap:0!important;column-gap:0!important}.column-gap-1{-webkit-column-gap:0.25rem!important;-moz-column-gap:0.25rem!important;column-gap:0.25rem!important}.column-gap-2{-webkit-column-gap:0.5rem!important;-moz-column-gap:0.5rem!important;column-gap:0.5rem!important}.column-gap-3{-webkit-column-gap:1rem!important;-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-4{-webkit-column-gap:1.5rem!important;-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-5{-webkit-column-gap:3rem!important;-moz-column-gap:3rem!important;column-gap:3rem!important}.column-gap-6{-webkit-column-gap:12px!important;-moz-column-gap:12px!important;column-gap:12px!important}.column-gap-7{-webkit-column-gap:30px!important;-moz-column-gap:30px!important;column-gap:30px!important}.column-gap-8{-webkit-column-gap:10px!important;-moz-column-gap:10px!important;column-gap:10px!important}.column-gap-9{-webkit-column-gap:20px!important;-moz-column-gap:20px!important;column-gap:20px!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:0.625rem!important}.fs-2{font-size:0.75rem!important}.fs-3{font-size:0.875rem!important}.fs-4{font-size:1rem!important}.fs-5{font-size:1.125rem!important}.fs-6{font-size:1.25rem!important}.fs-7{font-size:calc(1.275rem + 0.3vw)!important}.fs-8{font-size:calc(1.3125rem + 0.75vw)!important}.fs-9{font-size:calc(1.35rem + 1.2vw)!important}.fs-10{font-size:calc(1.375rem + 1.5vw)!important}.fs-11{font-size:calc(1.40625rem + 1.875vw)!important}.fs-12{font-size:calc(1.425rem + 2.1vw)!important}.fs-13{font-size:calc(1.46875rem + 2.625vw)!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-lighter{font-weight:300!important}.fw-light{font-weight:300!important}.fw-normal{font-weight:400!important}.fw-medium{font-weight:500!important}.fw-semibold{font-weight:600!important}.fw-bold{font-weight:500!important}.fw-bolder{font-weight:700!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#5A6A85!important}.text-indigo{--bs-text-opacity:1;color:rgba(var(--bs-indigo-rgb),var(--bs-text-opacity))!important}.text-light-primary{--bs-text-opacity:1;color:rgba(var(--bs-light-primary-rgb),var(--bs-text-opacity))!important}.text-light-secondary{--bs-text-opacity:1;color:rgba(var(--bs-light-secondary-rgb),var(--bs-text-opacity))!important}.text-light-info{--bs-text-opacity:1;color:rgba(var(--bs-light-info-rgb),var(--bs-text-opacity))!important}.text-light-success{--bs-text-opacity:1;color:rgba(var(--bs-light-success-rgb),var(--bs-text-opacity))!important}.text-light-warning{--bs-text-opacity:1;color:rgba(var(--bs-light-warning-rgb),var(--bs-text-opacity))!important}.text-light-danger{--bs-text-opacity:1;color:rgba(var(--bs-light-danger-rgb),var(--bs-text-opacity))!important}.text-light-indigo{--bs-text-opacity:1;color:rgba(var(--bs-light-indigo-rgb),var(--bs-text-opacity))!important}.text-dark-light{--bs-text-opacity:1;color:rgba(var(--bs-dark-light-rgb),var(--bs-text-opacity))!important}.text-light-gray{--bs-text-opacity:1;color:rgba(var(--bs-light-gray-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,0.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,0.5)!important}.text-body-secondary{--bs-text-opacity:1;color:var(--bs-secondary-color)!important}.text-body-tertiary{--bs-text-opacity:1;color:var(--bs-tertiary-color)!important}.text-body-emphasis{--bs-text-opacity:1;color:var(--bs-emphasis-color)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.text-primary-emphasis{color:var(--bs-primary-text)!important}.text-secondary-emphasis{color:var(--bs-secondary-text)!important}.text-success-emphasis{color:var(--bs-success-text)!important}.text-info-emphasis{color:var(--bs-info-text)!important}.text-warning-emphasis{color:var(--bs-warning-text)!important}.text-danger-emphasis{color:var(--bs-danger-text)!important}.text-light-emphasis{color:var(--bs-light-text)!important}.text-dark-emphasis{color:var(--bs-dark-text)!important}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-muted{--bs-bg-opacity:1;background-color:rgba(var(--bs-muted-rgb),var(--bs-bg-opacity))!important}.bg-indigo{--bs-bg-opacity:1;background-color:rgba(var(--bs-indigo-rgb),var(--bs-bg-opacity))!important}.bg-light-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-primary-rgb),var(--bs-bg-opacity))!important}.bg-light-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-secondary-rgb),var(--bs-bg-opacity))!important}.bg-light-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-info-rgb),var(--bs-bg-opacity))!important}.bg-light-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-success-rgb),var(--bs-bg-opacity))!important}.bg-light-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-warning-rgb),var(--bs-bg-opacity))!important}.bg-light-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-danger-rgb),var(--bs-bg-opacity))!important}.bg-light-indigo{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-indigo-rgb),var(--bs-bg-opacity))!important}.bg-dark-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-light-rgb),var(--bs-bg-opacity))!important}.bg-light-gray{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-gray-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-body-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-bg-rgb),var(--bs-bg-opacity))!important}.bg-body-tertiary{--bs-bg-opacity:1;background-color:rgba(var(--bs-tertiary-bg-rgb),var(--bs-bg-opacity))!important}.bg-body-emphasis{--bs-bg-opacity:1;background-color:rgba(var(--bs-emphasis-bg-rgb),var(--bs-bg-opacity))!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-primary-subtle{background-color:var(--bs-primary-bg-subtle)!important}.bg-secondary-subtle{background-color:var(--bs-secondary-bg-subtle)!important}.bg-success-subtle{background-color:var(--bs-success-bg-subtle)!important}.bg-info-subtle{background-color:var(--bs-info-bg-subtle)!important}.bg-warning-subtle{background-color:var(--bs-warning-bg-subtle)!important}.bg-danger-subtle{background-color:var(--bs-danger-bg-subtle)!important}.bg-light-subtle{background-color:var(--bs-light-bg-subtle)!important}.bg-dark-subtle{background-color:var(--bs-dark-bg-subtle)!important}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-2xl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-top-0{border-top-left-radius:0!important;border-top-right-radius:0!important}.rounded-top-1{border-top-left-radius:var(--bs-border-radius-sm)!important;border-top-right-radius:var(--bs-border-radius-sm)!important}.rounded-top-2{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-top-3{border-top-left-radius:var(--bs-border-radius-lg)!important;border-top-right-radius:var(--bs-border-radius-lg)!important}.rounded-top-4{border-top-left-radius:var(--bs-border-radius-xl)!important;border-top-right-radius:var(--bs-border-radius-xl)!important}.rounded-top-5{border-top-left-radius:var(--bs-border-radius-2xl)!important;border-top-right-radius:var(--bs-border-radius-2xl)!important}.rounded-top-circle{border-top-left-radius:50%!important;border-top-right-radius:50%!important}.rounded-top-pill{border-top-left-radius:var(--bs-border-radius-pill)!important;border-top-right-radius:var(--bs-border-radius-pill)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-end-0{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.rounded-end-1{border-top-right-radius:var(--bs-border-radius-sm)!important;border-bottom-right-radius:var(--bs-border-radius-sm)!important}.rounded-end-2{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-end-3{border-top-right-radius:var(--bs-border-radius-lg)!important;border-bottom-right-radius:var(--bs-border-radius-lg)!important}.rounded-end-4{border-top-right-radius:var(--bs-border-radius-xl)!important;border-bottom-right-radius:var(--bs-border-radius-xl)!important}.rounded-end-5{border-top-right-radius:var(--bs-border-radius-2xl)!important;border-bottom-right-radius:var(--bs-border-radius-2xl)!important}.rounded-end-circle{border-top-right-radius:50%!important;border-bottom-right-radius:50%!important}.rounded-end-pill{border-top-right-radius:var(--bs-border-radius-pill)!important;border-bottom-right-radius:var(--bs-border-radius-pill)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-bottom-0{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.rounded-bottom-1{border-bottom-right-radius:var(--bs-border-radius-sm)!important;border-bottom-left-radius:var(--bs-border-radius-sm)!important}.rounded-bottom-2{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-bottom-3{border-bottom-right-radius:var(--bs-border-radius-lg)!important;border-bottom-left-radius:var(--bs-border-radius-lg)!important}.rounded-bottom-4{border-bottom-right-radius:var(--bs-border-radius-xl)!important;border-bottom-left-radius:var(--bs-border-radius-xl)!important}.rounded-bottom-5{border-bottom-right-radius:var(--bs-border-radius-2xl)!important;border-bottom-left-radius:var(--bs-border-radius-2xl)!important}.rounded-bottom-circle{border-bottom-right-radius:50%!important;border-bottom-left-radius:50%!important}.rounded-bottom-pill{border-bottom-right-radius:var(--bs-border-radius-pill)!important;border-bottom-left-radius:var(--bs-border-radius-pill)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.rounded-start-0{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.rounded-start-1{border-bottom-left-radius:var(--bs-border-radius-sm)!important;border-top-left-radius:var(--bs-border-radius-sm)!important}.rounded-start-2{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.rounded-start-3{border-bottom-left-radius:var(--bs-border-radius-lg)!important;border-top-left-radius:var(--bs-border-radius-lg)!important}.rounded-start-4{border-bottom-left-radius:var(--bs-border-radius-xl)!important;border-top-left-radius:var(--bs-border-radius-xl)!important}.rounded-start-5{border-bottom-left-radius:var(--bs-border-radius-2xl)!important;border-top-left-radius:var(--bs-border-radius-2xl)!important}.rounded-start-circle{border-bottom-left-radius:50%!important;border-top-left-radius:50%!important}.rounded-start-pill{border-bottom-left-radius:var(--bs-border-radius-pill)!important;border-top-left-radius:var(--bs-border-radius-pill)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.z-n1{z-index:-1!important}.z-0{z-index:0!important}.z-1{z-index:1!important}.z-2{z-index:2!important}.z-3{z-index:3!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.object-fit-sm-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-sm-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-sm-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-sm-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-sm-none{-o-object-fit:none!important;object-fit:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:-ms-grid!important;display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{-webkit-box-flex:1!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-grow-0{-webkit-box-flex:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-webkit-box-flex:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-sm-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-sm-evenly{-webkit-box-pack:space-evenly!important;-ms-flex-pack:space-evenly!important;justify-content:space-evenly!important}.align-items-sm-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}.order-sm-first{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important}.order-sm-0{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important}.order-sm-1{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important}.order-sm-2{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important}.order-sm-3{-webkit-box-ordinal-group:4!important;-ms-flex-order:3!important;order:3!important}.order-sm-4{-webkit-box-ordinal-group:5!important;-ms-flex-order:4!important;order:4!important}.order-sm-5{-webkit-box-ordinal-group:6!important;-ms-flex-order:5!important;order:5!important}.order-sm-last{-webkit-box-ordinal-group:7!important;-ms-flex-order:6!important;order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:0.25rem!important}.m-sm-2{margin:0.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-6{margin:12px!important}.m-sm-7{margin:30px!important}.m-sm-8{margin:10px!important}.m-sm-9{margin:20px!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:0.25rem!important;margin-left:0.25rem!important}.mx-sm-2{margin-right:0.5rem!important;margin-left:0.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-6{margin-right:12px!important;margin-left:12px!important}.mx-sm-7{margin-right:30px!important;margin-left:30px!important}.mx-sm-8{margin-right:10px!important;margin-left:10px!important}.mx-sm-9{margin-right:20px!important;margin-left:20px!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:0.25rem!important;margin-bottom:0.25rem!important}.my-sm-2{margin-top:0.5rem!important;margin-bottom:0.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-6{margin-top:12px!important;margin-bottom:12px!important}.my-sm-7{margin-top:30px!important;margin-bottom:30px!important}.my-sm-8{margin-top:10px!important;margin-bottom:10px!important}.my-sm-9{margin-top:20px!important;margin-bottom:20px!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:0.25rem!important}.mt-sm-2{margin-top:0.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-6{margin-top:12px!important}.mt-sm-7{margin-top:30px!important}.mt-sm-8{margin-top:10px!important}.mt-sm-9{margin-top:20px!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:0.25rem!important}.me-sm-2{margin-right:0.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-6{margin-right:12px!important}.me-sm-7{margin-right:30px!important}.me-sm-8{margin-right:10px!important}.me-sm-9{margin-right:20px!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:0.25rem!important}.mb-sm-2{margin-bottom:0.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-6{margin-bottom:12px!important}.mb-sm-7{margin-bottom:30px!important}.mb-sm-8{margin-bottom:10px!important}.mb-sm-9{margin-bottom:20px!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:0.25rem!important}.ms-sm-2{margin-left:0.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-6{margin-left:12px!important}.ms-sm-7{margin-left:30px!important}.ms-sm-8{margin-left:10px!important}.ms-sm-9{margin-left:20px!important}.ms-sm-auto{margin-left:auto!important}.m-sm-n1{margin:-0.25rem!important}.m-sm-n2{margin:-0.5rem!important}.m-sm-n3{margin:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.m-sm-n6{margin:-12px!important}.m-sm-n7{margin:-30px!important}.m-sm-n8{margin:-10px!important}.m-sm-n9{margin:-20px!important}.mx-sm-n1{margin-right:-0.25rem!important;margin-left:-0.25rem!important}.mx-sm-n2{margin-right:-0.5rem!important;margin-left:-0.5rem!important}.mx-sm-n3{margin-right:-1rem!important;margin-left:-1rem!important}.mx-sm-n4{margin-right:-1.5rem!important;margin-left:-1.5rem!important}.mx-sm-n5{margin-right:-3rem!important;margin-left:-3rem!important}.mx-sm-n6{margin-right:-12px!important;margin-left:-12px!important}.mx-sm-n7{margin-right:-30px!important;margin-left:-30px!important}.mx-sm-n8{margin-right:-10px!important;margin-left:-10px!important}.mx-sm-n9{margin-right:-20px!important;margin-left:-20px!important}.my-sm-n1{margin-top:-0.25rem!important;margin-bottom:-0.25rem!important}.my-sm-n2{margin-top:-0.5rem!important;margin-bottom:-0.5rem!important}.my-sm-n3{margin-top:-1rem!important;margin-bottom:-1rem!important}.my-sm-n4{margin-top:-1.5rem!important;margin-bottom:-1.5rem!important}.my-sm-n5{margin-top:-3rem!important;margin-bottom:-3rem!important}.my-sm-n6{margin-top:-12px!important;margin-bottom:-12px!important}.my-sm-n7{margin-top:-30px!important;margin-bottom:-30px!important}.my-sm-n8{margin-top:-10px!important;margin-bottom:-10px!important}.my-sm-n9{margin-top:-20px!important;margin-bottom:-20px!important}.mt-sm-n1{margin-top:-0.25rem!important}.mt-sm-n2{margin-top:-0.5rem!important}.mt-sm-n3{margin-top:-1rem!important}.mt-sm-n4{margin-top:-1.5rem!important}.mt-sm-n5{margin-top:-3rem!important}.mt-sm-n6{margin-top:-12px!important}.mt-sm-n7{margin-top:-30px!important}.mt-sm-n8{margin-top:-10px!important}.mt-sm-n9{margin-top:-20px!important}.me-sm-n1{margin-right:-0.25rem!important}.me-sm-n2{margin-right:-0.5rem!important}.me-sm-n3{margin-right:-1rem!important}.me-sm-n4{margin-right:-1.5rem!important}.me-sm-n5{margin-right:-3rem!important}.me-sm-n6{margin-right:-12px!important}.me-sm-n7{margin-right:-30px!important}.me-sm-n8{margin-right:-10px!important}.me-sm-n9{margin-right:-20px!important}.mb-sm-n1{margin-bottom:-0.25rem!important}.mb-sm-n2{margin-bottom:-0.5rem!important}.mb-sm-n3{margin-bottom:-1rem!important}.mb-sm-n4{margin-bottom:-1.5rem!important}.mb-sm-n5{margin-bottom:-3rem!important}.mb-sm-n6{margin-bottom:-12px!important}.mb-sm-n7{margin-bottom:-30px!important}.mb-sm-n8{margin-bottom:-10px!important}.mb-sm-n9{margin-bottom:-20px!important}.ms-sm-n1{margin-left:-0.25rem!important}.ms-sm-n2{margin-left:-0.5rem!important}.ms-sm-n3{margin-left:-1rem!important}.ms-sm-n4{margin-left:-1.5rem!important}.ms-sm-n5{margin-left:-3rem!important}.ms-sm-n6{margin-left:-12px!important}.ms-sm-n7{margin-left:-30px!important}.ms-sm-n8{margin-left:-10px!important}.ms-sm-n9{margin-left:-20px!important}.p-sm-0{padding:0!important}.p-sm-1{padding:0.25rem!important}.p-sm-2{padding:0.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.p-sm-6{padding:12px!important}.p-sm-7{padding:30px!important}.p-sm-8{padding:10px!important}.p-sm-9{padding:20px!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:0.25rem!important;padding-left:0.25rem!important}.px-sm-2{padding-right:0.5rem!important;padding-left:0.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.px-sm-6{padding-right:12px!important;padding-left:12px!important}.px-sm-7{padding-right:30px!important;padding-left:30px!important}.px-sm-8{padding-right:10px!important;padding-left:10px!important}.px-sm-9{padding-right:20px!important;padding-left:20px!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:0.25rem!important;padding-bottom:0.25rem!important}.py-sm-2{padding-top:0.5rem!important;padding-bottom:0.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.py-sm-6{padding-top:12px!important;padding-bottom:12px!important}.py-sm-7{padding-top:30px!important;padding-bottom:30px!important}.py-sm-8{padding-top:10px!important;padding-bottom:10px!important}.py-sm-9{padding-top:20px!important;padding-bottom:20px!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:0.25rem!important}.pt-sm-2{padding-top:0.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pt-sm-6{padding-top:12px!important}.pt-sm-7{padding-top:30px!important}.pt-sm-8{padding-top:10px!important}.pt-sm-9{padding-top:20px!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:0.25rem!important}.pe-sm-2{padding-right:0.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pe-sm-6{padding-right:12px!important}.pe-sm-7{padding-right:30px!important}.pe-sm-8{padding-right:10px!important}.pe-sm-9{padding-right:20px!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:0.25rem!important}.pb-sm-2{padding-bottom:0.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.pb-sm-6{padding-bottom:12px!important}.pb-sm-7{padding-bottom:30px!important}.pb-sm-8{padding-bottom:10px!important}.pb-sm-9{padding-bottom:20px!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:0.25rem!important}.ps-sm-2{padding-left:0.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.ps-sm-6{padding-left:12px!important}.ps-sm-7{padding-left:30px!important}.ps-sm-8{padding-left:10px!important}.ps-sm-9{padding-left:20px!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:0.25rem!important}.gap-sm-2{gap:0.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.gap-sm-6{gap:12px!important}.gap-sm-7{gap:30px!important}.gap-sm-8{gap:10px!important}.gap-sm-9{gap:20px!important}.row-gap-sm-0{row-gap:0!important}.row-gap-sm-1{row-gap:0.25rem!important}.row-gap-sm-2{row-gap:0.5rem!important}.row-gap-sm-3{row-gap:1rem!important}.row-gap-sm-4{row-gap:1.5rem!important}.row-gap-sm-5{row-gap:3rem!important}.row-gap-sm-6{row-gap:12px!important}.row-gap-sm-7{row-gap:30px!important}.row-gap-sm-8{row-gap:10px!important}.row-gap-sm-9{row-gap:20px!important}.column-gap-sm-0{-webkit-column-gap:0!important;-moz-column-gap:0!important;column-gap:0!important}.column-gap-sm-1{-webkit-column-gap:0.25rem!important;-moz-column-gap:0.25rem!important;column-gap:0.25rem!important}.column-gap-sm-2{-webkit-column-gap:0.5rem!important;-moz-column-gap:0.5rem!important;column-gap:0.5rem!important}.column-gap-sm-3{-webkit-column-gap:1rem!important;-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-sm-4{-webkit-column-gap:1.5rem!important;-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-sm-5{-webkit-column-gap:3rem!important;-moz-column-gap:3rem!important;column-gap:3rem!important}.column-gap-sm-6{-webkit-column-gap:12px!important;-moz-column-gap:12px!important;column-gap:12px!important}.column-gap-sm-7{-webkit-column-gap:30px!important;-moz-column-gap:30px!important;column-gap:30px!important}.column-gap-sm-8{-webkit-column-gap:10px!important;-moz-column-gap:10px!important;column-gap:10px!important}.column-gap-sm-9{-webkit-column-gap:20px!important;-moz-column-gap:20px!important;column-gap:20px!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.object-fit-md-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-md-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-md-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-md-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-md-none{-o-object-fit:none!important;object-fit:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:-ms-grid!important;display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{-webkit-box-flex:1!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-grow-0{-webkit-box-flex:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-webkit-box-flex:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-md-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-md-evenly{-webkit-box-pack:space-evenly!important;-ms-flex-pack:space-evenly!important;justify-content:space-evenly!important}.align-items-md-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}.order-md-first{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important}.order-md-0{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important}.order-md-1{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important}.order-md-2{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important}.order-md-3{-webkit-box-ordinal-group:4!important;-ms-flex-order:3!important;order:3!important}.order-md-4{-webkit-box-ordinal-group:5!important;-ms-flex-order:4!important;order:4!important}.order-md-5{-webkit-box-ordinal-group:6!important;-ms-flex-order:5!important;order:5!important}.order-md-last{-webkit-box-ordinal-group:7!important;-ms-flex-order:6!important;order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:0.25rem!important}.m-md-2{margin:0.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-6{margin:12px!important}.m-md-7{margin:30px!important}.m-md-8{margin:10px!important}.m-md-9{margin:20px!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:0.25rem!important;margin-left:0.25rem!important}.mx-md-2{margin-right:0.5rem!important;margin-left:0.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-6{margin-right:12px!important;margin-left:12px!important}.mx-md-7{margin-right:30px!important;margin-left:30px!important}.mx-md-8{margin-right:10px!important;margin-left:10px!important}.mx-md-9{margin-right:20px!important;margin-left:20px!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:0.25rem!important;margin-bottom:0.25rem!important}.my-md-2{margin-top:0.5rem!important;margin-bottom:0.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-6{margin-top:12px!important;margin-bottom:12px!important}.my-md-7{margin-top:30px!important;margin-bottom:30px!important}.my-md-8{margin-top:10px!important;margin-bottom:10px!important}.my-md-9{margin-top:20px!important;margin-bottom:20px!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:0.25rem!important}.mt-md-2{margin-top:0.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-6{margin-top:12px!important}.mt-md-7{margin-top:30px!important}.mt-md-8{margin-top:10px!important}.mt-md-9{margin-top:20px!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:0.25rem!important}.me-md-2{margin-right:0.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-6{margin-right:12px!important}.me-md-7{margin-right:30px!important}.me-md-8{margin-right:10px!important}.me-md-9{margin-right:20px!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:0.25rem!important}.mb-md-2{margin-bottom:0.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-6{margin-bottom:12px!important}.mb-md-7{margin-bottom:30px!important}.mb-md-8{margin-bottom:10px!important}.mb-md-9{margin-bottom:20px!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:0.25rem!important}.ms-md-2{margin-left:0.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-6{margin-left:12px!important}.ms-md-7{margin-left:30px!important}.ms-md-8{margin-left:10px!important}.ms-md-9{margin-left:20px!important}.ms-md-auto{margin-left:auto!important}.m-md-n1{margin:-0.25rem!important}.m-md-n2{margin:-0.5rem!important}.m-md-n3{margin:-1rem!important}.m-md-n4{margin:-1.5rem!important}.m-md-n5{margin:-3rem!important}.m-md-n6{margin:-12px!important}.m-md-n7{margin:-30px!important}.m-md-n8{margin:-10px!important}.m-md-n9{margin:-20px!important}.mx-md-n1{margin-right:-0.25rem!important;margin-left:-0.25rem!important}.mx-md-n2{margin-right:-0.5rem!important;margin-left:-0.5rem!important}.mx-md-n3{margin-right:-1rem!important;margin-left:-1rem!important}.mx-md-n4{margin-right:-1.5rem!important;margin-left:-1.5rem!important}.mx-md-n5{margin-right:-3rem!important;margin-left:-3rem!important}.mx-md-n6{margin-right:-12px!important;margin-left:-12px!important}.mx-md-n7{margin-right:-30px!important;margin-left:-30px!important}.mx-md-n8{margin-right:-10px!important;margin-left:-10px!important}.mx-md-n9{margin-right:-20px!important;margin-left:-20px!important}.my-md-n1{margin-top:-0.25rem!important;margin-bottom:-0.25rem!important}.my-md-n2{margin-top:-0.5rem!important;margin-bottom:-0.5rem!important}.my-md-n3{margin-top:-1rem!important;margin-bottom:-1rem!important}.my-md-n4{margin-top:-1.5rem!important;margin-bottom:-1.5rem!important}.my-md-n5{margin-top:-3rem!important;margin-bottom:-3rem!important}.my-md-n6{margin-top:-12px!important;margin-bottom:-12px!important}.my-md-n7{margin-top:-30px!important;margin-bottom:-30px!important}.my-md-n8{margin-top:-10px!important;margin-bottom:-10px!important}.my-md-n9{margin-top:-20px!important;margin-bottom:-20px!important}.mt-md-n1{margin-top:-0.25rem!important}.mt-md-n2{margin-top:-0.5rem!important}.mt-md-n3{margin-top:-1rem!important}.mt-md-n4{margin-top:-1.5rem!important}.mt-md-n5{margin-top:-3rem!important}.mt-md-n6{margin-top:-12px!important}.mt-md-n7{margin-top:-30px!important}.mt-md-n8{margin-top:-10px!important}.mt-md-n9{margin-top:-20px!important}.me-md-n1{margin-right:-0.25rem!important}.me-md-n2{margin-right:-0.5rem!important}.me-md-n3{margin-right:-1rem!important}.me-md-n4{margin-right:-1.5rem!important}.me-md-n5{margin-right:-3rem!important}.me-md-n6{margin-right:-12px!important}.me-md-n7{margin-right:-30px!important}.me-md-n8{margin-right:-10px!important}.me-md-n9{margin-right:-20px!important}.mb-md-n1{margin-bottom:-0.25rem!important}.mb-md-n2{margin-bottom:-0.5rem!important}.mb-md-n3{margin-bottom:-1rem!important}.mb-md-n4{margin-bottom:-1.5rem!important}.mb-md-n5{margin-bottom:-3rem!important}.mb-md-n6{margin-bottom:-12px!important}.mb-md-n7{margin-bottom:-30px!important}.mb-md-n8{margin-bottom:-10px!important}.mb-md-n9{margin-bottom:-20px!important}.ms-md-n1{margin-left:-0.25rem!important}.ms-md-n2{margin-left:-0.5rem!important}.ms-md-n3{margin-left:-1rem!important}.ms-md-n4{margin-left:-1.5rem!important}.ms-md-n5{margin-left:-3rem!important}.ms-md-n6{margin-left:-12px!important}.ms-md-n7{margin-left:-30px!important}.ms-md-n8{margin-left:-10px!important}.ms-md-n9{margin-left:-20px!important}.p-md-0{padding:0!important}.p-md-1{padding:0.25rem!important}.p-md-2{padding:0.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.p-md-6{padding:12px!important}.p-md-7{padding:30px!important}.p-md-8{padding:10px!important}.p-md-9{padding:20px!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:0.25rem!important;padding-left:0.25rem!important}.px-md-2{padding-right:0.5rem!important;padding-left:0.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.px-md-6{padding-right:12px!important;padding-left:12px!important}.px-md-7{padding-right:30px!important;padding-left:30px!important}.px-md-8{padding-right:10px!important;padding-left:10px!important}.px-md-9{padding-right:20px!important;padding-left:20px!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:0.25rem!important;padding-bottom:0.25rem!important}.py-md-2{padding-top:0.5rem!important;padding-bottom:0.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.py-md-6{padding-top:12px!important;padding-bottom:12px!important}.py-md-7{padding-top:30px!important;padding-bottom:30px!important}.py-md-8{padding-top:10px!important;padding-bottom:10px!important}.py-md-9{padding-top:20px!important;padding-bottom:20px!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:0.25rem!important}.pt-md-2{padding-top:0.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pt-md-6{padding-top:12px!important}.pt-md-7{padding-top:30px!important}.pt-md-8{padding-top:10px!important}.pt-md-9{padding-top:20px!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:0.25rem!important}.pe-md-2{padding-right:0.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pe-md-6{padding-right:12px!important}.pe-md-7{padding-right:30px!important}.pe-md-8{padding-right:10px!important}.pe-md-9{padding-right:20px!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:0.25rem!important}.pb-md-2{padding-bottom:0.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.pb-md-6{padding-bottom:12px!important}.pb-md-7{padding-bottom:30px!important}.pb-md-8{padding-bottom:10px!important}.pb-md-9{padding-bottom:20px!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:0.25rem!important}.ps-md-2{padding-left:0.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.ps-md-6{padding-left:12px!important}.ps-md-7{padding-left:30px!important}.ps-md-8{padding-left:10px!important}.ps-md-9{padding-left:20px!important}.gap-md-0{gap:0!important}.gap-md-1{gap:0.25rem!important}.gap-md-2{gap:0.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.gap-md-6{gap:12px!important}.gap-md-7{gap:30px!important}.gap-md-8{gap:10px!important}.gap-md-9{gap:20px!important}.row-gap-md-0{row-gap:0!important}.row-gap-md-1{row-gap:0.25rem!important}.row-gap-md-2{row-gap:0.5rem!important}.row-gap-md-3{row-gap:1rem!important}.row-gap-md-4{row-gap:1.5rem!important}.row-gap-md-5{row-gap:3rem!important}.row-gap-md-6{row-gap:12px!important}.row-gap-md-7{row-gap:30px!important}.row-gap-md-8{row-gap:10px!important}.row-gap-md-9{row-gap:20px!important}.column-gap-md-0{-webkit-column-gap:0!important;-moz-column-gap:0!important;column-gap:0!important}.column-gap-md-1{-webkit-column-gap:0.25rem!important;-moz-column-gap:0.25rem!important;column-gap:0.25rem!important}.column-gap-md-2{-webkit-column-gap:0.5rem!important;-moz-column-gap:0.5rem!important;column-gap:0.5rem!important}.column-gap-md-3{-webkit-column-gap:1rem!important;-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-md-4{-webkit-column-gap:1.5rem!important;-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-md-5{-webkit-column-gap:3rem!important;-moz-column-gap:3rem!important;column-gap:3rem!important}.column-gap-md-6{-webkit-column-gap:12px!important;-moz-column-gap:12px!important;column-gap:12px!important}.column-gap-md-7{-webkit-column-gap:30px!important;-moz-column-gap:30px!important;column-gap:30px!important}.column-gap-md-8{-webkit-column-gap:10px!important;-moz-column-gap:10px!important;column-gap:10px!important}.column-gap-md-9{-webkit-column-gap:20px!important;-moz-column-gap:20px!important;column-gap:20px!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.object-fit-lg-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-lg-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-lg-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-lg-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-lg-none{-o-object-fit:none!important;object-fit:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:-ms-grid!important;display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{-webkit-box-flex:1!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-grow-0{-webkit-box-flex:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-webkit-box-flex:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-lg-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-lg-evenly{-webkit-box-pack:space-evenly!important;-ms-flex-pack:space-evenly!important;justify-content:space-evenly!important}.align-items-lg-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}.order-lg-first{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important}.order-lg-0{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important}.order-lg-1{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important}.order-lg-2{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important}.order-lg-3{-webkit-box-ordinal-group:4!important;-ms-flex-order:3!important;order:3!important}.order-lg-4{-webkit-box-ordinal-group:5!important;-ms-flex-order:4!important;order:4!important}.order-lg-5{-webkit-box-ordinal-group:6!important;-ms-flex-order:5!important;order:5!important}.order-lg-last{-webkit-box-ordinal-group:7!important;-ms-flex-order:6!important;order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:0.25rem!important}.m-lg-2{margin:0.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-6{margin:12px!important}.m-lg-7{margin:30px!important}.m-lg-8{margin:10px!important}.m-lg-9{margin:20px!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:0.25rem!important;margin-left:0.25rem!important}.mx-lg-2{margin-right:0.5rem!important;margin-left:0.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-6{margin-right:12px!important;margin-left:12px!important}.mx-lg-7{margin-right:30px!important;margin-left:30px!important}.mx-lg-8{margin-right:10px!important;margin-left:10px!important}.mx-lg-9{margin-right:20px!important;margin-left:20px!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:0.25rem!important;margin-bottom:0.25rem!important}.my-lg-2{margin-top:0.5rem!important;margin-bottom:0.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-6{margin-top:12px!important;margin-bottom:12px!important}.my-lg-7{margin-top:30px!important;margin-bottom:30px!important}.my-lg-8{margin-top:10px!important;margin-bottom:10px!important}.my-lg-9{margin-top:20px!important;margin-bottom:20px!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:0.25rem!important}.mt-lg-2{margin-top:0.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-6{margin-top:12px!important}.mt-lg-7{margin-top:30px!important}.mt-lg-8{margin-top:10px!important}.mt-lg-9{margin-top:20px!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:0.25rem!important}.me-lg-2{margin-right:0.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-6{margin-right:12px!important}.me-lg-7{margin-right:30px!important}.me-lg-8{margin-right:10px!important}.me-lg-9{margin-right:20px!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:0.25rem!important}.mb-lg-2{margin-bottom:0.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-6{margin-bottom:12px!important}.mb-lg-7{margin-bottom:30px!important}.mb-lg-8{margin-bottom:10px!important}.mb-lg-9{margin-bottom:20px!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:0.25rem!important}.ms-lg-2{margin-left:0.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-6{margin-left:12px!important}.ms-lg-7{margin-left:30px!important}.ms-lg-8{margin-left:10px!important}.ms-lg-9{margin-left:20px!important}.ms-lg-auto{margin-left:auto!important}.m-lg-n1{margin:-0.25rem!important}.m-lg-n2{margin:-0.5rem!important}.m-lg-n3{margin:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.m-lg-n6{margin:-12px!important}.m-lg-n7{margin:-30px!important}.m-lg-n8{margin:-10px!important}.m-lg-n9{margin:-20px!important}.mx-lg-n1{margin-right:-0.25rem!important;margin-left:-0.25rem!important}.mx-lg-n2{margin-right:-0.5rem!important;margin-left:-0.5rem!important}.mx-lg-n3{margin-right:-1rem!important;margin-left:-1rem!important}.mx-lg-n4{margin-right:-1.5rem!important;margin-left:-1.5rem!important}.mx-lg-n5{margin-right:-3rem!important;margin-left:-3rem!important}.mx-lg-n6{margin-right:-12px!important;margin-left:-12px!important}.mx-lg-n7{margin-right:-30px!important;margin-left:-30px!important}.mx-lg-n8{margin-right:-10px!important;margin-left:-10px!important}.mx-lg-n9{margin-right:-20px!important;margin-left:-20px!important}.my-lg-n1{margin-top:-0.25rem!important;margin-bottom:-0.25rem!important}.my-lg-n2{margin-top:-0.5rem!important;margin-bottom:-0.5rem!important}.my-lg-n3{margin-top:-1rem!important;margin-bottom:-1rem!important}.my-lg-n4{margin-top:-1.5rem!important;margin-bottom:-1.5rem!important}.my-lg-n5{margin-top:-3rem!important;margin-bottom:-3rem!important}.my-lg-n6{margin-top:-12px!important;margin-bottom:-12px!important}.my-lg-n7{margin-top:-30px!important;margin-bottom:-30px!important}.my-lg-n8{margin-top:-10px!important;margin-bottom:-10px!important}.my-lg-n9{margin-top:-20px!important;margin-bottom:-20px!important}.mt-lg-n1{margin-top:-0.25rem!important}.mt-lg-n2{margin-top:-0.5rem!important}.mt-lg-n3{margin-top:-1rem!important}.mt-lg-n4{margin-top:-1.5rem!important}.mt-lg-n5{margin-top:-3rem!important}.mt-lg-n6{margin-top:-12px!important}.mt-lg-n7{margin-top:-30px!important}.mt-lg-n8{margin-top:-10px!important}.mt-lg-n9{margin-top:-20px!important}.me-lg-n1{margin-right:-0.25rem!important}.me-lg-n2{margin-right:-0.5rem!important}.me-lg-n3{margin-right:-1rem!important}.me-lg-n4{margin-right:-1.5rem!important}.me-lg-n5{margin-right:-3rem!important}.me-lg-n6{margin-right:-12px!important}.me-lg-n7{margin-right:-30px!important}.me-lg-n8{margin-right:-10px!important}.me-lg-n9{margin-right:-20px!important}.mb-lg-n1{margin-bottom:-0.25rem!important}.mb-lg-n2{margin-bottom:-0.5rem!important}.mb-lg-n3{margin-bottom:-1rem!important}.mb-lg-n4{margin-bottom:-1.5rem!important}.mb-lg-n5{margin-bottom:-3rem!important}.mb-lg-n6{margin-bottom:-12px!important}.mb-lg-n7{margin-bottom:-30px!important}.mb-lg-n8{margin-bottom:-10px!important}.mb-lg-n9{margin-bottom:-20px!important}.ms-lg-n1{margin-left:-0.25rem!important}.ms-lg-n2{margin-left:-0.5rem!important}.ms-lg-n3{margin-left:-1rem!important}.ms-lg-n4{margin-left:-1.5rem!important}.ms-lg-n5{margin-left:-3rem!important}.ms-lg-n6{margin-left:-12px!important}.ms-lg-n7{margin-left:-30px!important}.ms-lg-n8{margin-left:-10px!important}.ms-lg-n9{margin-left:-20px!important}.p-lg-0{padding:0!important}.p-lg-1{padding:0.25rem!important}.p-lg-2{padding:0.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.p-lg-6{padding:12px!important}.p-lg-7{padding:30px!important}.p-lg-8{padding:10px!important}.p-lg-9{padding:20px!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:0.25rem!important;padding-left:0.25rem!important}.px-lg-2{padding-right:0.5rem!important;padding-left:0.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.px-lg-6{padding-right:12px!important;padding-left:12px!important}.px-lg-7{padding-right:30px!important;padding-left:30px!important}.px-lg-8{padding-right:10px!important;padding-left:10px!important}.px-lg-9{padding-right:20px!important;padding-left:20px!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:0.25rem!important;padding-bottom:0.25rem!important}.py-lg-2{padding-top:0.5rem!important;padding-bottom:0.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.py-lg-6{padding-top:12px!important;padding-bottom:12px!important}.py-lg-7{padding-top:30px!important;padding-bottom:30px!important}.py-lg-8{padding-top:10px!important;padding-bottom:10px!important}.py-lg-9{padding-top:20px!important;padding-bottom:20px!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:0.25rem!important}.pt-lg-2{padding-top:0.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pt-lg-6{padding-top:12px!important}.pt-lg-7{padding-top:30px!important}.pt-lg-8{padding-top:10px!important}.pt-lg-9{padding-top:20px!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:0.25rem!important}.pe-lg-2{padding-right:0.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pe-lg-6{padding-right:12px!important}.pe-lg-7{padding-right:30px!important}.pe-lg-8{padding-right:10px!important}.pe-lg-9{padding-right:20px!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:0.25rem!important}.pb-lg-2{padding-bottom:0.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.pb-lg-6{padding-bottom:12px!important}.pb-lg-7{padding-bottom:30px!important}.pb-lg-8{padding-bottom:10px!important}.pb-lg-9{padding-bottom:20px!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:0.25rem!important}.ps-lg-2{padding-left:0.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.ps-lg-6{padding-left:12px!important}.ps-lg-7{padding-left:30px!important}.ps-lg-8{padding-left:10px!important}.ps-lg-9{padding-left:20px!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:0.25rem!important}.gap-lg-2{gap:0.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.gap-lg-6{gap:12px!important}.gap-lg-7{gap:30px!important}.gap-lg-8{gap:10px!important}.gap-lg-9{gap:20px!important}.row-gap-lg-0{row-gap:0!important}.row-gap-lg-1{row-gap:0.25rem!important}.row-gap-lg-2{row-gap:0.5rem!important}.row-gap-lg-3{row-gap:1rem!important}.row-gap-lg-4{row-gap:1.5rem!important}.row-gap-lg-5{row-gap:3rem!important}.row-gap-lg-6{row-gap:12px!important}.row-gap-lg-7{row-gap:30px!important}.row-gap-lg-8{row-gap:10px!important}.row-gap-lg-9{row-gap:20px!important}.column-gap-lg-0{-webkit-column-gap:0!important;-moz-column-gap:0!important;column-gap:0!important}.column-gap-lg-1{-webkit-column-gap:0.25rem!important;-moz-column-gap:0.25rem!important;column-gap:0.25rem!important}.column-gap-lg-2{-webkit-column-gap:0.5rem!important;-moz-column-gap:0.5rem!important;column-gap:0.5rem!important}.column-gap-lg-3{-webkit-column-gap:1rem!important;-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-lg-4{-webkit-column-gap:1.5rem!important;-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-lg-5{-webkit-column-gap:3rem!important;-moz-column-gap:3rem!important;column-gap:3rem!important}.column-gap-lg-6{-webkit-column-gap:12px!important;-moz-column-gap:12px!important;column-gap:12px!important}.column-gap-lg-7{-webkit-column-gap:30px!important;-moz-column-gap:30px!important;column-gap:30px!important}.column-gap-lg-8{-webkit-column-gap:10px!important;-moz-column-gap:10px!important;column-gap:10px!important}.column-gap-lg-9{-webkit-column-gap:20px!important;-moz-column-gap:20px!important;column-gap:20px!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.object-fit-xl-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-xl-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-xl-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-xl-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-xl-none{-o-object-fit:none!important;object-fit:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:-ms-grid!important;display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{-webkit-box-flex:1!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-grow-0{-webkit-box-flex:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-webkit-box-flex:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-xl-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-xl-evenly{-webkit-box-pack:space-evenly!important;-ms-flex-pack:space-evenly!important;justify-content:space-evenly!important}.align-items-xl-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}.order-xl-first{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important}.order-xl-0{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important}.order-xl-1{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important}.order-xl-2{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important}.order-xl-3{-webkit-box-ordinal-group:4!important;-ms-flex-order:3!important;order:3!important}.order-xl-4{-webkit-box-ordinal-group:5!important;-ms-flex-order:4!important;order:4!important}.order-xl-5{-webkit-box-ordinal-group:6!important;-ms-flex-order:5!important;order:5!important}.order-xl-last{-webkit-box-ordinal-group:7!important;-ms-flex-order:6!important;order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:0.25rem!important}.m-xl-2{margin:0.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-6{margin:12px!important}.m-xl-7{margin:30px!important}.m-xl-8{margin:10px!important}.m-xl-9{margin:20px!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:0.25rem!important;margin-left:0.25rem!important}.mx-xl-2{margin-right:0.5rem!important;margin-left:0.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-6{margin-right:12px!important;margin-left:12px!important}.mx-xl-7{margin-right:30px!important;margin-left:30px!important}.mx-xl-8{margin-right:10px!important;margin-left:10px!important}.mx-xl-9{margin-right:20px!important;margin-left:20px!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:0.25rem!important;margin-bottom:0.25rem!important}.my-xl-2{margin-top:0.5rem!important;margin-bottom:0.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-6{margin-top:12px!important;margin-bottom:12px!important}.my-xl-7{margin-top:30px!important;margin-bottom:30px!important}.my-xl-8{margin-top:10px!important;margin-bottom:10px!important}.my-xl-9{margin-top:20px!important;margin-bottom:20px!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:0.25rem!important}.mt-xl-2{margin-top:0.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-6{margin-top:12px!important}.mt-xl-7{margin-top:30px!important}.mt-xl-8{margin-top:10px!important}.mt-xl-9{margin-top:20px!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:0.25rem!important}.me-xl-2{margin-right:0.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-6{margin-right:12px!important}.me-xl-7{margin-right:30px!important}.me-xl-8{margin-right:10px!important}.me-xl-9{margin-right:20px!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:0.25rem!important}.mb-xl-2{margin-bottom:0.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-6{margin-bottom:12px!important}.mb-xl-7{margin-bottom:30px!important}.mb-xl-8{margin-bottom:10px!important}.mb-xl-9{margin-bottom:20px!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:0.25rem!important}.ms-xl-2{margin-left:0.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-6{margin-left:12px!important}.ms-xl-7{margin-left:30px!important}.ms-xl-8{margin-left:10px!important}.ms-xl-9{margin-left:20px!important}.ms-xl-auto{margin-left:auto!important}.m-xl-n1{margin:-0.25rem!important}.m-xl-n2{margin:-0.5rem!important}.m-xl-n3{margin:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.m-xl-n6{margin:-12px!important}.m-xl-n7{margin:-30px!important}.m-xl-n8{margin:-10px!important}.m-xl-n9{margin:-20px!important}.mx-xl-n1{margin-right:-0.25rem!important;margin-left:-0.25rem!important}.mx-xl-n2{margin-right:-0.5rem!important;margin-left:-0.5rem!important}.mx-xl-n3{margin-right:-1rem!important;margin-left:-1rem!important}.mx-xl-n4{margin-right:-1.5rem!important;margin-left:-1.5rem!important}.mx-xl-n5{margin-right:-3rem!important;margin-left:-3rem!important}.mx-xl-n6{margin-right:-12px!important;margin-left:-12px!important}.mx-xl-n7{margin-right:-30px!important;margin-left:-30px!important}.mx-xl-n8{margin-right:-10px!important;margin-left:-10px!important}.mx-xl-n9{margin-right:-20px!important;margin-left:-20px!important}.my-xl-n1{margin-top:-0.25rem!important;margin-bottom:-0.25rem!important}.my-xl-n2{margin-top:-0.5rem!important;margin-bottom:-0.5rem!important}.my-xl-n3{margin-top:-1rem!important;margin-bottom:-1rem!important}.my-xl-n4{margin-top:-1.5rem!important;margin-bottom:-1.5rem!important}.my-xl-n5{margin-top:-3rem!important;margin-bottom:-3rem!important}.my-xl-n6{margin-top:-12px!important;margin-bottom:-12px!important}.my-xl-n7{margin-top:-30px!important;margin-bottom:-30px!important}.my-xl-n8{margin-top:-10px!important;margin-bottom:-10px!important}.my-xl-n9{margin-top:-20px!important;margin-bottom:-20px!important}.mt-xl-n1{margin-top:-0.25rem!important}.mt-xl-n2{margin-top:-0.5rem!important}.mt-xl-n3{margin-top:-1rem!important}.mt-xl-n4{margin-top:-1.5rem!important}.mt-xl-n5{margin-top:-3rem!important}.mt-xl-n6{margin-top:-12px!important}.mt-xl-n7{margin-top:-30px!important}.mt-xl-n8{margin-top:-10px!important}.mt-xl-n9{margin-top:-20px!important}.me-xl-n1{margin-right:-0.25rem!important}.me-xl-n2{margin-right:-0.5rem!important}.me-xl-n3{margin-right:-1rem!important}.me-xl-n4{margin-right:-1.5rem!important}.me-xl-n5{margin-right:-3rem!important}.me-xl-n6{margin-right:-12px!important}.me-xl-n7{margin-right:-30px!important}.me-xl-n8{margin-right:-10px!important}.me-xl-n9{margin-right:-20px!important}.mb-xl-n1{margin-bottom:-0.25rem!important}.mb-xl-n2{margin-bottom:-0.5rem!important}.mb-xl-n3{margin-bottom:-1rem!important}.mb-xl-n4{margin-bottom:-1.5rem!important}.mb-xl-n5{margin-bottom:-3rem!important}.mb-xl-n6{margin-bottom:-12px!important}.mb-xl-n7{margin-bottom:-30px!important}.mb-xl-n8{margin-bottom:-10px!important}.mb-xl-n9{margin-bottom:-20px!important}.ms-xl-n1{margin-left:-0.25rem!important}.ms-xl-n2{margin-left:-0.5rem!important}.ms-xl-n3{margin-left:-1rem!important}.ms-xl-n4{margin-left:-1.5rem!important}.ms-xl-n5{margin-left:-3rem!important}.ms-xl-n6{margin-left:-12px!important}.ms-xl-n7{margin-left:-30px!important}.ms-xl-n8{margin-left:-10px!important}.ms-xl-n9{margin-left:-20px!important}.p-xl-0{padding:0!important}.p-xl-1{padding:0.25rem!important}.p-xl-2{padding:0.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.p-xl-6{padding:12px!important}.p-xl-7{padding:30px!important}.p-xl-8{padding:10px!important}.p-xl-9{padding:20px!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:0.25rem!important;padding-left:0.25rem!important}.px-xl-2{padding-right:0.5rem!important;padding-left:0.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.px-xl-6{padding-right:12px!important;padding-left:12px!important}.px-xl-7{padding-right:30px!important;padding-left:30px!important}.px-xl-8{padding-right:10px!important;padding-left:10px!important}.px-xl-9{padding-right:20px!important;padding-left:20px!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:0.25rem!important;padding-bottom:0.25rem!important}.py-xl-2{padding-top:0.5rem!important;padding-bottom:0.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.py-xl-6{padding-top:12px!important;padding-bottom:12px!important}.py-xl-7{padding-top:30px!important;padding-bottom:30px!important}.py-xl-8{padding-top:10px!important;padding-bottom:10px!important}.py-xl-9{padding-top:20px!important;padding-bottom:20px!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:0.25rem!important}.pt-xl-2{padding-top:0.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pt-xl-6{padding-top:12px!important}.pt-xl-7{padding-top:30px!important}.pt-xl-8{padding-top:10px!important}.pt-xl-9{padding-top:20px!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:0.25rem!important}.pe-xl-2{padding-right:0.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pe-xl-6{padding-right:12px!important}.pe-xl-7{padding-right:30px!important}.pe-xl-8{padding-right:10px!important}.pe-xl-9{padding-right:20px!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:0.25rem!important}.pb-xl-2{padding-bottom:0.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.pb-xl-6{padding-bottom:12px!important}.pb-xl-7{padding-bottom:30px!important}.pb-xl-8{padding-bottom:10px!important}.pb-xl-9{padding-bottom:20px!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:0.25rem!important}.ps-xl-2{padding-left:0.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.ps-xl-6{padding-left:12px!important}.ps-xl-7{padding-left:30px!important}.ps-xl-8{padding-left:10px!important}.ps-xl-9{padding-left:20px!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:0.25rem!important}.gap-xl-2{gap:0.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.gap-xl-6{gap:12px!important}.gap-xl-7{gap:30px!important}.gap-xl-8{gap:10px!important}.gap-xl-9{gap:20px!important}.row-gap-xl-0{row-gap:0!important}.row-gap-xl-1{row-gap:0.25rem!important}.row-gap-xl-2{row-gap:0.5rem!important}.row-gap-xl-3{row-gap:1rem!important}.row-gap-xl-4{row-gap:1.5rem!important}.row-gap-xl-5{row-gap:3rem!important}.row-gap-xl-6{row-gap:12px!important}.row-gap-xl-7{row-gap:30px!important}.row-gap-xl-8{row-gap:10px!important}.row-gap-xl-9{row-gap:20px!important}.column-gap-xl-0{-webkit-column-gap:0!important;-moz-column-gap:0!important;column-gap:0!important}.column-gap-xl-1{-webkit-column-gap:0.25rem!important;-moz-column-gap:0.25rem!important;column-gap:0.25rem!important}.column-gap-xl-2{-webkit-column-gap:0.5rem!important;-moz-column-gap:0.5rem!important;column-gap:0.5rem!important}.column-gap-xl-3{-webkit-column-gap:1rem!important;-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-xl-4{-webkit-column-gap:1.5rem!important;-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-xl-5{-webkit-column-gap:3rem!important;-moz-column-gap:3rem!important;column-gap:3rem!important}.column-gap-xl-6{-webkit-column-gap:12px!important;-moz-column-gap:12px!important;column-gap:12px!important}.column-gap-xl-7{-webkit-column-gap:30px!important;-moz-column-gap:30px!important;column-gap:30px!important}.column-gap-xl-8{-webkit-column-gap:10px!important;-moz-column-gap:10px!important;column-gap:10px!important}.column-gap-xl-9{-webkit-column-gap:20px!important;-moz-column-gap:20px!important;column-gap:20px!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.object-fit-xxl-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-xxl-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-xxl-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-xxl-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-xxl-none{-o-object-fit:none!important;object-fit:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:-ms-grid!important;display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-xxl-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{-webkit-box-flex:1!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xxl-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-xxl-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-xxl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xxl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xxl-grow-0{-webkit-box-flex:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-xxl-grow-1{-webkit-box-flex:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-xxl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xxl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.flex-xxl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xxl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.justify-content-xxl-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xxl-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xxl-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xxl-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xxl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-xxl-evenly{-webkit-box-pack:space-evenly!important;-ms-flex-pack:space-evenly!important;justify-content:space-evenly!important}.align-items-xxl-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xxl-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xxl-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-xxl-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xxl-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xxl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xxl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xxl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xxl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xxl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xxl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xxl-auto{-ms-flex-item-align:auto!important;-ms-grid-row-align:auto!important;align-self:auto!important}.align-self-xxl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xxl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xxl-center{-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.align-self-xxl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xxl-stretch{-ms-flex-item-align:stretch!important;-ms-grid-row-align:stretch!important;align-self:stretch!important}.order-xxl-first{-webkit-box-ordinal-group:0!important;-ms-flex-order:-1!important;order:-1!important}.order-xxl-0{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important}.order-xxl-1{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important}.order-xxl-2{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important}.order-xxl-3{-webkit-box-ordinal-group:4!important;-ms-flex-order:3!important;order:3!important}.order-xxl-4{-webkit-box-ordinal-group:5!important;-ms-flex-order:4!important;order:4!important}.order-xxl-5{-webkit-box-ordinal-group:6!important;-ms-flex-order:5!important;order:5!important}.order-xxl-last{-webkit-box-ordinal-group:7!important;-ms-flex-order:6!important;order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:0.25rem!important}.m-xxl-2{margin:0.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-6{margin:12px!important}.m-xxl-7{margin:30px!important}.m-xxl-8{margin:10px!important}.m-xxl-9{margin:20px!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:0.25rem!important;margin-left:0.25rem!important}.mx-xxl-2{margin-right:0.5rem!important;margin-left:0.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-6{margin-right:12px!important;margin-left:12px!important}.mx-xxl-7{margin-right:30px!important;margin-left:30px!important}.mx-xxl-8{margin-right:10px!important;margin-left:10px!important}.mx-xxl-9{margin-right:20px!important;margin-left:20px!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:0.25rem!important;margin-bottom:0.25rem!important}.my-xxl-2{margin-top:0.5rem!important;margin-bottom:0.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-6{margin-top:12px!important;margin-bottom:12px!important}.my-xxl-7{margin-top:30px!important;margin-bottom:30px!important}.my-xxl-8{margin-top:10px!important;margin-bottom:10px!important}.my-xxl-9{margin-top:20px!important;margin-bottom:20px!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:0.25rem!important}.mt-xxl-2{margin-top:0.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-6{margin-top:12px!important}.mt-xxl-7{margin-top:30px!important}.mt-xxl-8{margin-top:10px!important}.mt-xxl-9{margin-top:20px!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:0.25rem!important}.me-xxl-2{margin-right:0.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-6{margin-right:12px!important}.me-xxl-7{margin-right:30px!important}.me-xxl-8{margin-right:10px!important}.me-xxl-9{margin-right:20px!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:0.25rem!important}.mb-xxl-2{margin-bottom:0.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-6{margin-bottom:12px!important}.mb-xxl-7{margin-bottom:30px!important}.mb-xxl-8{margin-bottom:10px!important}.mb-xxl-9{margin-bottom:20px!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:0.25rem!important}.ms-xxl-2{margin-left:0.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-6{margin-left:12px!important}.ms-xxl-7{margin-left:30px!important}.ms-xxl-8{margin-left:10px!important}.ms-xxl-9{margin-left:20px!important}.ms-xxl-auto{margin-left:auto!important}.m-xxl-n1{margin:-0.25rem!important}.m-xxl-n2{margin:-0.5rem!important}.m-xxl-n3{margin:-1rem!important}.m-xxl-n4{margin:-1.5rem!important}.m-xxl-n5{margin:-3rem!important}.m-xxl-n6{margin:-12px!important}.m-xxl-n7{margin:-30px!important}.m-xxl-n8{margin:-10px!important}.m-xxl-n9{margin:-20px!important}.mx-xxl-n1{margin-right:-0.25rem!important;margin-left:-0.25rem!important}.mx-xxl-n2{margin-right:-0.5rem!important;margin-left:-0.5rem!important}.mx-xxl-n3{margin-right:-1rem!important;margin-left:-1rem!important}.mx-xxl-n4{margin-right:-1.5rem!important;margin-left:-1.5rem!important}.mx-xxl-n5{margin-right:-3rem!important;margin-left:-3rem!important}.mx-xxl-n6{margin-right:-12px!important;margin-left:-12px!important}.mx-xxl-n7{margin-right:-30px!important;margin-left:-30px!important}.mx-xxl-n8{margin-right:-10px!important;margin-left:-10px!important}.mx-xxl-n9{margin-right:-20px!important;margin-left:-20px!important}.my-xxl-n1{margin-top:-0.25rem!important;margin-bottom:-0.25rem!important}.my-xxl-n2{margin-top:-0.5rem!important;margin-bottom:-0.5rem!important}.my-xxl-n3{margin-top:-1rem!important;margin-bottom:-1rem!important}.my-xxl-n4{margin-top:-1.5rem!important;margin-bottom:-1.5rem!important}.my-xxl-n5{margin-top:-3rem!important;margin-bottom:-3rem!important}.my-xxl-n6{margin-top:-12px!important;margin-bottom:-12px!important}.my-xxl-n7{margin-top:-30px!important;margin-bottom:-30px!important}.my-xxl-n8{margin-top:-10px!important;margin-bottom:-10px!important}.my-xxl-n9{margin-top:-20px!important;margin-bottom:-20px!important}.mt-xxl-n1{margin-top:-0.25rem!important}.mt-xxl-n2{margin-top:-0.5rem!important}.mt-xxl-n3{margin-top:-1rem!important}.mt-xxl-n4{margin-top:-1.5rem!important}.mt-xxl-n5{margin-top:-3rem!important}.mt-xxl-n6{margin-top:-12px!important}.mt-xxl-n7{margin-top:-30px!important}.mt-xxl-n8{margin-top:-10px!important}.mt-xxl-n9{margin-top:-20px!important}.me-xxl-n1{margin-right:-0.25rem!important}.me-xxl-n2{margin-right:-0.5rem!important}.me-xxl-n3{margin-right:-1rem!important}.me-xxl-n4{margin-right:-1.5rem!important}.me-xxl-n5{margin-right:-3rem!important}.me-xxl-n6{margin-right:-12px!important}.me-xxl-n7{margin-right:-30px!important}.me-xxl-n8{margin-right:-10px!important}.me-xxl-n9{margin-right:-20px!important}.mb-xxl-n1{margin-bottom:-0.25rem!important}.mb-xxl-n2{margin-bottom:-0.5rem!important}.mb-xxl-n3{margin-bottom:-1rem!important}.mb-xxl-n4{margin-bottom:-1.5rem!important}.mb-xxl-n5{margin-bottom:-3rem!important}.mb-xxl-n6{margin-bottom:-12px!important}.mb-xxl-n7{margin-bottom:-30px!important}.mb-xxl-n8{margin-bottom:-10px!important}.mb-xxl-n9{margin-bottom:-20px!important}.ms-xxl-n1{margin-left:-0.25rem!important}.ms-xxl-n2{margin-left:-0.5rem!important}.ms-xxl-n3{margin-left:-1rem!important}.ms-xxl-n4{margin-left:-1.5rem!important}.ms-xxl-n5{margin-left:-3rem!important}.ms-xxl-n6{margin-left:-12px!important}.ms-xxl-n7{margin-left:-30px!important}.ms-xxl-n8{margin-left:-10px!important}.ms-xxl-n9{margin-left:-20px!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:0.25rem!important}.p-xxl-2{padding:0.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.p-xxl-6{padding:12px!important}.p-xxl-7{padding:30px!important}.p-xxl-8{padding:10px!important}.p-xxl-9{padding:20px!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:0.25rem!important;padding-left:0.25rem!important}.px-xxl-2{padding-right:0.5rem!important;padding-left:0.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.px-xxl-6{padding-right:12px!important;padding-left:12px!important}.px-xxl-7{padding-right:30px!important;padding-left:30px!important}.px-xxl-8{padding-right:10px!important;padding-left:10px!important}.px-xxl-9{padding-right:20px!important;padding-left:20px!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:0.25rem!important;padding-bottom:0.25rem!important}.py-xxl-2{padding-top:0.5rem!important;padding-bottom:0.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.py-xxl-6{padding-top:12px!important;padding-bottom:12px!important}.py-xxl-7{padding-top:30px!important;padding-bottom:30px!important}.py-xxl-8{padding-top:10px!important;padding-bottom:10px!important}.py-xxl-9{padding-top:20px!important;padding-bottom:20px!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:0.25rem!important}.pt-xxl-2{padding-top:0.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pt-xxl-6{padding-top:12px!important}.pt-xxl-7{padding-top:30px!important}.pt-xxl-8{padding-top:10px!important}.pt-xxl-9{padding-top:20px!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:0.25rem!important}.pe-xxl-2{padding-right:0.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pe-xxl-6{padding-right:12px!important}.pe-xxl-7{padding-right:30px!important}.pe-xxl-8{padding-right:10px!important}.pe-xxl-9{padding-right:20px!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:0.25rem!important}.pb-xxl-2{padding-bottom:0.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.pb-xxl-6{padding-bottom:12px!important}.pb-xxl-7{padding-bottom:30px!important}.pb-xxl-8{padding-bottom:10px!important}.pb-xxl-9{padding-bottom:20px!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:0.25rem!important}.ps-xxl-2{padding-left:0.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.ps-xxl-6{padding-left:12px!important}.ps-xxl-7{padding-left:30px!important}.ps-xxl-8{padding-left:10px!important}.ps-xxl-9{padding-left:20px!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:0.25rem!important}.gap-xxl-2{gap:0.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.gap-xxl-6{gap:12px!important}.gap-xxl-7{gap:30px!important}.gap-xxl-8{gap:10px!important}.gap-xxl-9{gap:20px!important}.row-gap-xxl-0{row-gap:0!important}.row-gap-xxl-1{row-gap:0.25rem!important}.row-gap-xxl-2{row-gap:0.5rem!important}.row-gap-xxl-3{row-gap:1rem!important}.row-gap-xxl-4{row-gap:1.5rem!important}.row-gap-xxl-5{row-gap:3rem!important}.row-gap-xxl-6{row-gap:12px!important}.row-gap-xxl-7{row-gap:30px!important}.row-gap-xxl-8{row-gap:10px!important}.row-gap-xxl-9{row-gap:20px!important}.column-gap-xxl-0{-webkit-column-gap:0!important;-moz-column-gap:0!important;column-gap:0!important}.column-gap-xxl-1{-webkit-column-gap:0.25rem!important;-moz-column-gap:0.25rem!important;column-gap:0.25rem!important}.column-gap-xxl-2{-webkit-column-gap:0.5rem!important;-moz-column-gap:0.5rem!important;column-gap:0.5rem!important}.column-gap-xxl-3{-webkit-column-gap:1rem!important;-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-xxl-4{-webkit-column-gap:1.5rem!important;-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-xxl-5{-webkit-column-gap:3rem!important;-moz-column-gap:3rem!important;column-gap:3rem!important}.column-gap-xxl-6{-webkit-column-gap:12px!important;-moz-column-gap:12px!important;column-gap:12px!important}.column-gap-xxl-7{-webkit-column-gap:30px!important;-moz-column-gap:30px!important;column-gap:30px!important}.column-gap-xxl-8{-webkit-column-gap:10px!important;-moz-column-gap:10px!important;column-gap:10px!important}.column-gap-xxl-9{-webkit-column-gap:20px!important;-moz-column-gap:20px!important;column-gap:20px!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-7{font-size:1.5rem!important}.fs-8{font-size:1.875rem!important}.fs-9{font-size:2.25rem!important}.fs-10{font-size:2.5rem!important}.fs-11{font-size:2.8125rem!important}.fs-12{font-size:3rem!important}.fs-13{font-size:3.4375rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:-ms-grid!important;display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.d-print-none{display:none!important}}.left-sidebar{width:270px;background-color:#fff;position:absolute;-webkit-transition:0.2s ease-in;transition:0.2s ease-in;height:100%;z-index:11;border-right:1px solid rgb(229,234,239)}.left-sidebar .scroll-sidebar{overflow-y:auto;padding:0 24px;height:calc(100vh - 190px);border-radius:7px}.left-sidebar .scroll-sidebar .simplebar-track.simplebar-horizontal{visibility:hidden!important}.brand-logo{min-height:70px;padding:0 24px}.unlimited-access{padding:18px 22px 25px;margin:0 -5px}.unlimited-access .unlimited-access-img{margin:-35px -5px 0 -43px}.nav-small-cap{margin-top:24px;color:#2A3547;font-size:12px;font-weight:700;padding:3px 12px;line-height:26px;text-transform:uppercase}.nav-small-cap .nav-small-cap-icon{display:none}.sidebar-nav ul .sidebar-item .sidebar-link{color:#2A3547;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;white-space:nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:25px;position:relative;margin:0px 0px 2px;padding:10px;border-radius:7px;gap:15px;font-weight:400}.sidebar-nav ul .sidebar-item .sidebar-link span:first-child{display:-webkit-box;display:-ms-flexbox;display:flex}.sidebar-nav ul .sidebar-item .sidebar-link .ti{-ms-flex-negative:0;flex-shrink:0;font-size:21px}.sidebar-nav ul .sidebar-item .sidebar-link:hover{background-color:rgba(93,135,255,0.1);color:#5D87FF}.sidebar-nav ul .sidebar-item .sidebar-link:hover.has-arrow:after{border-color:#5D87FF}.sidebar-nav ul .sidebar-item .sidebar-link.active:hover.has-arrow:after{border-color:#fff}.sidebar-nav ul .sidebar-item .link-disabled{opacity:0.38}.sidebar-nav ul .sidebar-item .first-level .sidebar-item{-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out;border-bottom:0}.sidebar-nav ul .sidebar-item .first-level .sidebar-item .sidebar-link:hover{background-color:transparent;color:#5D87FF}.sidebar-nav ul .sidebar-item .first-level .sidebar-item .sidebar-link.active.has-arrow:after{border-color:#5D87FF}.sidebar-nav ul .sidebar-item .first-level .sidebar-item>.sidebar-link{padding:8px 10px;border-radius:7px;font-size:14px;gap:23px}.sidebar-nav ul .sidebar-item .first-level .sidebar-item>.sidebar-link .sidebar-icon{-ms-flex-negative:0;flex-shrink:0;margin-left:12px;margin-right:35px;width:14px;height:14px}.sidebar-nav ul .sidebar-item .first-level .sidebar-item:last-child{margin-bottom:16px}.sidebar-nav ul .sidebar-item .first-level .sidebar-link .ti{font-size:7px}.sidebar-nav ul .sidebar-item .first-level .sidebar-item .sidebar-link.active{background-color:transparent!important;color:#5D87FF!important}.sidebar-nav ul .sidebar-item .two-level .sidebar-item .sidebar-link{padding:8px 10px 8px 45px}.sidebar-nav ul .sidebar-item .three-level .sidebar-item .sidebar-link{padding:8px 10px 8px 60px}.sidebar-nav ul .sidebar-item.selected>.sidebar-link,.sidebar-nav ul .sidebar-item.selected>.sidebar-link.active,.sidebar-nav ul .sidebar-item>.sidebar-link.active{background-color:#5D87FF;color:#fff}.sidebar-nav .sidebar-list .sidebar-list-item{padding:8px 0}.collapse.in{display:block}.sidebar-nav .has-arrow{position:relative}.sidebar-nav .has-arrow:after{position:absolute;content:"";width:7px;height:7px;border-width:1px 0 0 1px;border-style:solid;border-color:#2A3547;margin-left:10px;-webkit-transform:rotate(135deg) translate(0,-50%);transform:rotate(135deg) translate(0,-50%);-webkit-transform-origin:top;transform-origin:top;top:22px;right:15px;-webkit-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.sidebar-nav .has-arrow[aria-expanded=true]:after,.sidebar-nav li.active>.has-arrow:after,.sidebar-nav li>.has-arrow.active:after{top:18px;margin-top:1px;border-color:#fff;-webkit-transform:rotate(-135deg) translate(0,-50%);transform:rotate(-135deg) translate(0,-50%)}.app-header{position:relative;z-index:50;width:100%;background:#fff;padding:0 25px}.app-header .container-fluid,.app-header .container-lg,.app-header .container-md,.app-header .container-sm,.app-header .container-xl,.app-header .container-xxl{max-width:1200px;margin:0 auto;padding:0 30px}.app-header .navbar{min-height:70px;padding:0}.app-header .navbar .navbar-nav .nav-item .nav-link{padding:8px 16px;line-height:70px;height:70px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;font-size:20px;z-index:2}.app-header .navbar .navbar-nav.quick-links .nav-item .nav-link{font-size:0.875rem;position:relative;z-index:2}.app-header .navbar .navbar-nav.quick-links .nav-item:hover .nav-link{-webkit-transition:all 0.1s ease-in-out;transition:all 0.1s ease-in-out;color:#5D87FF!important}.app-header .navbar .navbar-nav.quick-links .nav-item:hover .nav-link:before{content:"";position:absolute;left:0;right:0;height:36px;width:100%;border-radius:7px;background:#ECF2FF;z-index:-1}.{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}.:hover:before{content:"";position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);height:40px;width:40px;z-index:-1;border-radius:100px;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;background-color:#ECF2FF}.profile-name{color:#fff}.message-body{max-height:360px}.arrow-none.dropdown-toggle:after{display:none}.navbar-nav .dropdown-menu{position:absolute;min-width:200px}.navbar-nav .dropdown-menu .dropdown-item{border-radius:8px}.navbar-nav .hover-dd{position:static}.navbar-nav .hover-dd .dropdown-menu-nav{max-width:860px;width:100%}.navbar-nav .hover-dd:hover .dropdown-menu{display:block}.notification{content:"";position:absolute;top:22px;right:9px;width:8px;height:8px}.notify-badge{position:relative}.notify-badge .badge{width:18px;height:18px;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute;top:16px;right:6px}.profile-dropdown{max-height:100vh}.mobile-navbar{height:calc(100vh - 40px)}.shopping-cart{width:330px!important}@media (max-width:991.98px){.app-header.fixed-header .navbar-collapse{padding:0 0px}.app-header .navbar{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.app-header .navbar .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-collapse{border-top:1px solid #ebf1f6;padding:0 15px;background-color:#fff;border-bottom-left-radius:15px;border-bottom-right-radius:15px}}@media (max-width:767.98px){.app-header .container-fluid,.app-header .container-lg,.app-header .container-md,.app-header .container-sm,.app-header .container-xl,.app-header .container-xxl{padding:0 20px}.navbar-nav .dropdown-menu{position:absolute;width:100%}.navbar-nav .nav-item.dropdown{position:static}}.searchbar{position:absolute;left:0;top:0;width:100%;z-index:110}@-webkit-keyframes animation-dropdown-menu-move-up-scroll{0%{top:71px}to{top:70px}}@keyframes animation-dropdown-menu-move-up-scroll{0%{top:71px}to{top:70px}}@-webkit-keyframes animation-dropdown-menu-fade-in{0%{opacity:0}to{opacity:1}}@keyframes animation-dropdown-menu-fade-in{0%{opacity:0}to{opacity:1}}.dropdown-menu-animate-up{-webkit-animation:animation-dropdown-menu-fade-in 0.5s ease 1,animation-dropdown-menu-move-up 0.5s ease-out 1;animation:animation-dropdown-menu-fade-in 0.5s ease 1,animation-dropdown-menu-move-up 0.5s ease-out 1}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@media (max-width:991.98px){.w-xs-100{width:100%!important}}#main-wrapper[data-layout=vertical] .app-header.fixed-header{-webkit-transition:0.2s ease-in;transition:0.2s ease-in}#main-wrapper[data-layout=vertical] .app-header.fixed-header .notification{top:20px}#main-wrapper[data-layout=vertical] .app-header.fixed-header .navbar{background:#fff;padding:0 15px;border-radius:15px;-webkit-box-shadow:1px 0px 20px 0px rgba(0,0,0,0.12);box-shadow:1px 0px 20px 0px rgba(0,0,0,0.12);margin-top:15px}.page-wrapper{position:relative}.body-wrapper{position:relative}.body-wrapper>.container-fluid,.body-wrapper>.container-lg,.body-wrapper>.container-md,.body-wrapper>.container-sm,.body-wrapper>.container-xl,.body-wrapper>.container-xxl{max-width:1200px;margin:0 auto;padding:24px;-webkit-transition:0.2s ease-in;transition:0.2s ease-in}@media (max-width:767.98px){.body-wrapper>.container-fluid,.body-wrapper>.container-lg,.body-wrapper>.container-md,.body-wrapper>.container-sm,.body-wrapper>.container-xl,.body-wrapper>.container-xxl{padding:30px 20px}}.simplebar-scrollbar:before{background:rgba(0,0,0,0.5)!important}#main-wrapper[data-layout=vertical][data-sidebar-position=fixed] .left-sidebar{position:fixed;top:0}#main-wrapper[data-layout=vertical][data-header-position=fixed] .app-header{position:fixed;z-index:10}#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper>.container-fluid,#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper>.container-lg,#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper>.container-md,#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper>.container-sm,#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper>.container-xl,#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper>.container-xxl{padding-top:calc(70px + 15px)}@media (min-width:1200px){#main-wrapper[data-layout=vertical][data-header-position=fixed][data-sidebartype=mini-sidebar] .app-header{width:100%}#main-wrapper[data-layout=vertical][data-header-position=fixed] .app-header{width:calc(100% - 270px)}#main-wrapper[data-layout=vertical][data-sidebartype=full] .body-wrapper{margin-left:270px}}@media (max-width:1199px){#main-wrapper[data-layout=vertical][data-sidebartype=full] .left-sidebar,#main-wrapper[data-layout=vertical][data-sidebartype=mini-sidebar] .left-sidebar{left:-270px}#main-wrapper[data-layout=vertical][data-sidebartype=full].show-sidebar .left-sidebar,#main-wrapper[data-layout=vertical][data-sidebartype=mini-sidebar].show-sidebar .left-sidebar{left:0}}.hover-img{-webkit-transition:all 0.2s ease-in 0s;transition:all 0.2s ease-in 0s}.hover-img:hover{-webkit-transform:scale(1.01);transform:scale(1.01)}.z-1{position:relative;z-index:1}.text-bodycolor{color:#5A6A85!important}*{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}a{text-decoration:none}a:hover{color:#5D87FF}ul{list-style:none;padding-left:0}:focus{outline:0;-webkit-box-shadow:none!important;box-shadow:none!important}.cursor-pointer{cursor:pointer}.calendar-events{cursor:move}.object-fit-cover{-o-object-fit:cover;object-fit:cover}.card-title{font-size:18px}.card-subtitle{font-size:14px}.card{margin-bottom:30px}.card-hover{-webkit-transition:0.2s ease-in;transition:0.2s ease-in}.card-hover:hover{-webkit-transform:translate3d(0px,-5px,0px);transform:translate3d(0px,-5px,0px)}.round-8{width:8px;height:8px}.round-20{width:20px!important;height:20px!important}.radial-gradient{position:relative}.radial-gradient:before{content:"";position:absolute;height:100%;width:100%;opacity:0.3;background:radial-gradient(rgb(210,241,223),rgb(211,215,250),rgb(186,216,244)) 0% 0%/400% 400%;-webkit-animation:15s ease 0s infinite normal none running gradient;animation:15s ease 0s infinite normal none running gradient}.timeline-widget .timeline-item{min-height:70px}.timeline-widget .timeline-item .timeline-time{padding:6px 16px 6px 0;min-width:90px}.timeline-widget .timeline-item .timeline-badge-wrap .timeline-badge{width:12px;height:12px;border-radius:50px;background-color:transparent}.timeline-widget .timeline-item .timeline-badge-wrap .timeline-badge-border{width:1px;height:100%;background-color:#ebf1f6}.timeline-widget .timeline-item .timeline-desc{padding:6px 16px}.timeline-widget .timeline-item .timeline-badge.badge-primary{border:2px solid #5D87FF} \ No newline at end of file diff --git a/cao_sunyata/static/css/styles.min.css b/cao_sunyata/static/css/styles.min.css new file mode 100644 index 0000000..9e54adc --- /dev/null +++ b/cao_sunyata/static/css/styles.min.css @@ -0,0 +1,16978 @@ +@charset "UTF-8"; +@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"); +/*! + * Bootstrap v5.3.0 (https://getbootstrap.com/) + * Copyright 2011-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +@import "../libs/simplebar/dist/simplebar.css"; +@import "../css/icons/tabler-icons/tabler-icons.css"; +:root, +[data-bs-theme=light] { + --bs-blue: #2952ff; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #f25a5a; + --bs-orange: #fd7e14; + --bs-yellow: #f2d15a; + --bs-green: #85d446; + --bs-teal: #20c997; + --bs-cyan: #74dbf7; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #707a82; + --bs-gray-dark: #343a40; + --bs-gray-100: #f6f8fa; + --bs-gray-200: #f5f8fb; + --bs-gray-300: #dbe1e6; + --bs-gray-400: #fbfcfd; + --bs-gray-500: #adb5bd; + --bs-gray-600: #707a82; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #3a4752; + --bs-primary: #2952ff; + --bs-secondary: #74dbf7; + --bs-success: #85d446; + --bs-inverse: #3a4752; + --bs-info: #745af2; + --bs-warning: #f2d15a; + --bs-danger: #f25a5a; + --bs-light: #f6f8fa; + --bs-dark: #3a4752; + --bs-primary-rgb: 41, 82, 255; + --bs-secondary-rgb: 116, 219, 247; + --bs-success-rgb: 133, 212, 70; + --bs-inverse-rgb: 58, 71, 82; + --bs-info-rgb: 116, 90, 242; + --bs-warning-rgb: 242, 209, 90; + --bs-danger-rgb: 242, 90, 90; + --bs-light-rgb: 246, 248, 250; + --bs-dark-rgb: 58, 71, 82; + --bs-primary-text-emphasis: #102166; + --bs-secondary-text-emphasis: #2e5863; + --bs-success-text-emphasis: #35551c; + --bs-info-text-emphasis: #2e2461; + --bs-warning-text-emphasis: #615424; + --bs-danger-text-emphasis: #612424; + --bs-light-text-emphasis: #495057; + --bs-dark-text-emphasis: #495057; + --bs-primary-bg-subtle: #e4f1fc; + --bs-secondary-bg-subtle: #e4f8fb; + --bs-success-bg-subtle: #e4f5d6; + --bs-info-bg-subtle: #e7e3fd; + --bs-warning-bg-subtle: #fdf7e3; + --bs-danger-bg-subtle: #fde3e3; + --bs-light-bg-subtle: #fbfcfd; + --bs-dark-bg-subtle: #fbfcfd; + --bs-primary-border-subtle: #a9baff; + --bs-secondary-border-subtle: #c7f1fc; + --bs-success-border-subtle: #ceeeb5; + --bs-info-border-subtle: #c7bdfa; + --bs-warning-border-subtle: #faedbd; + --bs-danger-border-subtle: #fabdbd; + --bs-light-border-subtle: #f5f8fb; + --bs-dark-border-subtle: #adb5bd; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-font-sans-serif: "Montserrat", sans-serif; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 0.875rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #768b9e; + --bs-body-color-rgb: 118, 139, 158; + --bs-body-bg: #fff; + --bs-body-bg-rgb: 255, 255, 255; + --bs-emphasis-color: #000; + --bs-emphasis-color-rgb: 0, 0, 0; + --bs-secondary-color: rgba(118, 139, 158, 0.75); + --bs-secondary-color-rgb: 118, 139, 158; + --bs-secondary-bg: #f5f8fb; + --bs-secondary-bg-rgb: 245, 248, 251; + --bs-tertiary-color: rgba(118, 139, 158, 0.5); + --bs-tertiary-color-rgb: 118, 139, 158; + --bs-tertiary-bg: #f6f8fa; + --bs-tertiary-bg-rgb: 246, 248, 250; + --bs-heading-color: #3a4752; + --bs-link-color: #2952ff; + --bs-link-color-rgb: 41, 82, 255; + --bs-link-decoration: underline; + --bs-link-hover-color: #2142cc; + --bs-link-hover-color-rgb: 33, 66, 204; + --bs-code-color: #d63384; + --bs-highlight-bg: #fcf6de; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #f1f1f4; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.25rem; + --bs-border-radius-sm: 0.5rem; + --bs-border-radius-lg: 12px; + --bs-border-radius-xl: 1rem; + --bs-border-radius-xxl: 2rem; + --bs-border-radius-2xl: var(--bs-border-radius-xxl); + --bs-border-radius-pill: 50rem; + --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175); + --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-focus-ring-width: 0.25rem; + --bs-focus-ring-opacity: 0.25; + --bs-focus-ring-color: rgba(41, 82, 255, 0.25); + --bs-form-valid-color: #85d446; + --bs-form-valid-border-color: #85d446; + --bs-form-invalid-color: #f25a5a; + --bs-form-invalid-border-color: #f25a5a; +} + +[data-bs-theme=dark] { + color-scheme: dark; + --bs-body-color: #adb5bd; + --bs-body-color-rgb: 173, 181, 189; + --bs-body-bg: #3a4752; + --bs-body-bg-rgb: 58, 71, 82; + --bs-emphasis-color: #fff; + --bs-emphasis-color-rgb: 255, 255, 255; + --bs-secondary-color: rgba(173, 181, 189, 0.75); + --bs-secondary-color-rgb: 173, 181, 189; + --bs-secondary-bg: #343a40; + --bs-secondary-bg-rgb: 52, 58, 64; + --bs-tertiary-color: rgba(173, 181, 189, 0.5); + --bs-tertiary-color-rgb: 173, 181, 189; + --bs-tertiary-bg: #374149; + --bs-tertiary-bg-rgb: 55, 65, 73; + --bs-primary-text-emphasis: #7f97ff; + --bs-secondary-text-emphasis: #ace9fa; + --bs-success-text-emphasis: #b6e590; + --bs-info-text-emphasis: #ac9cf7; + --bs-warning-text-emphasis: #f7e39c; + --bs-danger-text-emphasis: #f79c9c; + --bs-light-text-emphasis: #f6f8fa; + --bs-dark-text-emphasis: #dbe1e6; + --bs-primary-bg-subtle: #081033; + --bs-secondary-bg-subtle: #172c31; + --bs-success-bg-subtle: #1b2a0e; + --bs-info-bg-subtle: #171230; + --bs-warning-bg-subtle: #302a12; + --bs-danger-bg-subtle: #301212; + --bs-light-bg-subtle: #343a40; + --bs-dark-bg-subtle: #1a1d20; + --bs-primary-border-subtle: #193199; + --bs-secondary-border-subtle: #468394; + --bs-success-border-subtle: #507f2a; + --bs-info-border-subtle: #463691; + --bs-warning-border-subtle: #917d36; + --bs-danger-border-subtle: #913636; + --bs-light-border-subtle: #495057; + --bs-dark-border-subtle: #343a40; + --bs-heading-color: inherit; + --bs-link-color: #7f97ff; + --bs-link-hover-color: #99acff; + --bs-link-color-rgb: 127, 151, 255; + --bs-link-hover-color-rgb: 153, 172, 255; + --bs-code-color: #e685b5; + --bs-border-color: #495057; + --bs-border-color-translucent: rgba(255, 255, 255, 0.15); + --bs-form-valid-color: #b6e590; + --bs-form-valid-border-color: #b6e590; + --bs-form-invalid-color: #f79c9c; + --bs-form-invalid-border-color: #f79c9c; +} + +*, +*::before, +*::after { + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} + +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: var(--bs-border-width) solid; + opacity: 0.25; +} + +h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 600; + line-height: 1.2; + color: var(--bs-heading-color); +} + +h1, .h1 { + font-size: calc(1.34375rem + 1.125vw); +} +@media (min-width: 1200px) { + h1, .h1 { + font-size: 2.1875rem; + } +} + +h2, .h2 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + h2, .h2 { + font-size: 1.75rem; + } +} + +h3, .h3 { + font-size: calc(1.278125rem + 0.3375vw); +} +@media (min-width: 1200px) { + h3, .h3 { + font-size: 1.53125rem; + } +} + +h4, .h4 { + font-size: calc(1.25625rem + 0.075vw); +} +@media (min-width: 1200px) { + h4, .h4 { + font-size: 1.3125rem; + } +} + +h5, .h5 { + font-size: 1.09375rem; +} + +h6, .h6 { + font-size: 0.875rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul { + padding-left: 2rem; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 600; +} + +dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +b, +strong { + font-weight: 700; +} + +small, .small { + font-size: 0.875em; +} + +mark, .mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} + +sub, +sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +a { + color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1)); + text-decoration: underline; +} +a:hover { + --bs-link-color-rgb: var(--bs-link-hover-color-rgb); +} + +a:not([href]):not([class]), a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +pre, +code, +kbd, +samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} +a > code { + color: inherit; +} + +kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.5rem; +} +kbd kbd { + padding: 0; + font-size: 1em; +} + +figure { + margin: 0 0 1rem; +} + +img, +svg { + vertical-align: middle; +} + +table { + caption-side: bottom; + border-collapse: collapse; +} + +caption { + padding-top: 17px; + padding-bottom: 17px; + color: var(--bs-secondary-color); + text-align: left; +} + +th { + font-weight: 600; + text-align: inherit; + text-align: -webkit-match-parent; +} + +thead, +tbody, +tfoot, +tr, +td, +th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +label { + display: inline-block; +} + +button { + border-radius: 0; +} + +button:focus:not(:focus-visible) { + outline: 0; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +select { + text-transform: none; +} + +[role=button] { + cursor: pointer; +} + +select { + word-wrap: normal; +} +select:disabled { + opacity: 1; +} + +[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +button, +[type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button; +} +button:not(:disabled), +[type=button]:not(:disabled), +[type=reset]:not(:disabled), +[type=submit]:not(:disabled) { + cursor: pointer; +} + +::-moz-focus-inner { + padding: 0; + border-style: none; +} + +textarea { + resize: vertical; +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} +@media (min-width: 1200px) { + legend { + font-size: 1.5rem; + } +} +legend + * { + clear: left; +} + +::-webkit-datetime-edit-fields-wrapper, +::-webkit-datetime-edit-text, +::-webkit-datetime-edit-minute, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-year-field { + padding: 0; +} + +::-webkit-inner-spin-button { + height: auto; +} + +[type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +/* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ +::-webkit-search-decoration { + -webkit-appearance: none; +} + +::-webkit-color-swatch-wrapper { + padding: 0; +} + +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +output { + display: inline-block; +} + +iframe { + border: 0; +} + +summary { + display: list-item; + cursor: pointer; +} + +progress { + vertical-align: baseline; +} + +[hidden] { + display: none !important; +} + +.lead { + font-size: 1.09375rem; + font-weight: 300; +} + +.display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-1 { + font-size: 5rem; + } +} + +.display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-2 { + font-size: 4.5rem; + } +} + +.display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-3 { + font-size: 4rem; + } +} + +.display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-4 { + font-size: 3.5rem; + } +} + +.display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-5 { + font-size: 3rem; + } +} + +.display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-6 { + font-size: 2.5rem; + } +} + +.list-unstyled { + padding-left: 0; + list-style: none; +} + +.list-inline { + padding-left: 0; + list-style: none; +} + +.list-inline-item { + display: inline-block; +} +.list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.initialism { + font-size: 0.875em; + text-transform: uppercase; +} + +.blockquote { + margin-bottom: 1rem; + font-size: 1.09375rem; +} +.blockquote > :last-child { + margin-bottom: 0; +} + +.blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #707a82; +} +.blockquote-footer::before { + content: "— "; +} + +.img-fluid { + max-width: 100%; + height: auto; +} + +.img-thumbnail { + padding: 0.25rem; + background-color: var(--bs-body-bg); + border: var(--bs-border-width) solid var(--bs-border-color); + border-radius: var(--bs-border-radius); + -webkit-box-shadow: var(--bs-box-shadow-sm); + box-shadow: var(--bs-box-shadow-sm); + max-width: 100%; + height: auto; +} + +.figure { + display: inline-block; +} + +.figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.figure-caption { + font-size: 0.875em; + color: var(--bs-secondary-color); +} + +.container, +.container-fluid, +.container-xxl, +.container-xl, +.container-lg, +.container-md, +.container-sm { + --bs-gutter-x: 30px; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .container-sm, .container { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container-md, .container-sm, .container { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container-lg, .container-md, .container-sm, .container { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1320px; + } +} +:root { + --bs-breakpoint-xs: 0; + --bs-breakpoint-sm: 576px; + --bs-breakpoint-md: 768px; + --bs-breakpoint-lg: 992px; + --bs-breakpoint-xl: 1200px; + --bs-breakpoint-xxl: 1400px; +} + +.row { + --bs-gutter-x: 30px; + --bs-gutter-y: 0; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} +.row > * { + -ms-flex-negative: 0; + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.col { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; +} + +.row-cols-auto > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.3333333333%; +} + +.row-cols-4 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.6666666667%; +} + +.col-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; +} + +.col-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-left: 8.33333333%; +} + +.offset-2 { + margin-left: 16.66666667%; +} + +.offset-3 { + margin-left: 25%; +} + +.offset-4 { + margin-left: 33.33333333%; +} + +.offset-5 { + margin-left: 41.66666667%; +} + +.offset-6 { + margin-left: 50%; +} + +.offset-7 { + margin-left: 58.33333333%; +} + +.offset-8 { + margin-left: 66.66666667%; +} + +.offset-9 { + margin-left: 75%; +} + +.offset-10 { + margin-left: 83.33333333%; +} + +.offset-11 { + margin-left: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +.g-6, +.gx-6 { + --bs-gutter-x: 12px; +} + +.g-6, +.gy-6 { + --bs-gutter-y: 12px; +} + +.g-7, +.gx-7 { + --bs-gutter-x: 30px; +} + +.g-7, +.gy-7 { + --bs-gutter-y: 30px; +} + +.g-8, +.gx-8 { + --bs-gutter-x: 10px; +} + +.g-8, +.gy-8 { + --bs-gutter-y: 10px; +} + +.g-9, +.gx-9 { + --bs-gutter-x: 20px; +} + +.g-9, +.gy-9 { + --bs-gutter-y: 20px; +} + +@media (min-width: 576px) { + .col-sm { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + } + .row-cols-sm-auto > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .row-cols-sm-1 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .row-cols-sm-2 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .row-cols-sm-3 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-sm-4 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .row-cols-sm-5 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 20%; + } + .row-cols-sm-6 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-sm-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .col-sm-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 8.33333333%; + } + .col-sm-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.66666667%; + } + .col-sm-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .col-sm-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.33333333%; + } + .col-sm-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 41.66666667%; + } + .col-sm-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .col-sm-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 58.33333333%; + } + .col-sm-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 66.66666667%; + } + .col-sm-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 75%; + } + .col-sm-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 83.33333333%; + } + .col-sm-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 91.66666667%; + } + .col-sm-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .offset-sm-0 { + margin-left: 0; + } + .offset-sm-1 { + margin-left: 8.33333333%; + } + .offset-sm-2 { + margin-left: 16.66666667%; + } + .offset-sm-3 { + margin-left: 25%; + } + .offset-sm-4 { + margin-left: 33.33333333%; + } + .offset-sm-5 { + margin-left: 41.66666667%; + } + .offset-sm-6 { + margin-left: 50%; + } + .offset-sm-7 { + margin-left: 58.33333333%; + } + .offset-sm-8 { + margin-left: 66.66666667%; + } + .offset-sm-9 { + margin-left: 75%; + } + .offset-sm-10 { + margin-left: 83.33333333%; + } + .offset-sm-11 { + margin-left: 91.66666667%; + } + .g-sm-0, + .gx-sm-0 { + --bs-gutter-x: 0; + } + .g-sm-0, + .gy-sm-0 { + --bs-gutter-y: 0; + } + .g-sm-1, + .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + .g-sm-1, + .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + .g-sm-2, + .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + .g-sm-2, + .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + .g-sm-3, + .gx-sm-3 { + --bs-gutter-x: 1rem; + } + .g-sm-3, + .gy-sm-3 { + --bs-gutter-y: 1rem; + } + .g-sm-4, + .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + .g-sm-4, + .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + .g-sm-5, + .gx-sm-5 { + --bs-gutter-x: 3rem; + } + .g-sm-5, + .gy-sm-5 { + --bs-gutter-y: 3rem; + } + .g-sm-6, + .gx-sm-6 { + --bs-gutter-x: 12px; + } + .g-sm-6, + .gy-sm-6 { + --bs-gutter-y: 12px; + } + .g-sm-7, + .gx-sm-7 { + --bs-gutter-x: 30px; + } + .g-sm-7, + .gy-sm-7 { + --bs-gutter-y: 30px; + } + .g-sm-8, + .gx-sm-8 { + --bs-gutter-x: 10px; + } + .g-sm-8, + .gy-sm-8 { + --bs-gutter-y: 10px; + } + .g-sm-9, + .gx-sm-9 { + --bs-gutter-x: 20px; + } + .g-sm-9, + .gy-sm-9 { + --bs-gutter-y: 20px; + } +} +@media (min-width: 768px) { + .col-md { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + } + .row-cols-md-auto > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .row-cols-md-1 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .row-cols-md-2 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .row-cols-md-3 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-md-4 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .row-cols-md-5 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 20%; + } + .row-cols-md-6 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-md-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .col-md-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 8.33333333%; + } + .col-md-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.66666667%; + } + .col-md-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .col-md-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.33333333%; + } + .col-md-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 41.66666667%; + } + .col-md-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .col-md-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 58.33333333%; + } + .col-md-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 66.66666667%; + } + .col-md-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 75%; + } + .col-md-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 83.33333333%; + } + .col-md-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 91.66666667%; + } + .col-md-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.33333333%; + } + .offset-md-2 { + margin-left: 16.66666667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.33333333%; + } + .offset-md-5 { + margin-left: 41.66666667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.33333333%; + } + .offset-md-8 { + margin-left: 66.66666667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.33333333%; + } + .offset-md-11 { + margin-left: 91.66666667%; + } + .g-md-0, + .gx-md-0 { + --bs-gutter-x: 0; + } + .g-md-0, + .gy-md-0 { + --bs-gutter-y: 0; + } + .g-md-1, + .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + .g-md-1, + .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + .g-md-2, + .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + .g-md-2, + .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + .g-md-3, + .gx-md-3 { + --bs-gutter-x: 1rem; + } + .g-md-3, + .gy-md-3 { + --bs-gutter-y: 1rem; + } + .g-md-4, + .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + .g-md-4, + .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + .g-md-5, + .gx-md-5 { + --bs-gutter-x: 3rem; + } + .g-md-5, + .gy-md-5 { + --bs-gutter-y: 3rem; + } + .g-md-6, + .gx-md-6 { + --bs-gutter-x: 12px; + } + .g-md-6, + .gy-md-6 { + --bs-gutter-y: 12px; + } + .g-md-7, + .gx-md-7 { + --bs-gutter-x: 30px; + } + .g-md-7, + .gy-md-7 { + --bs-gutter-y: 30px; + } + .g-md-8, + .gx-md-8 { + --bs-gutter-x: 10px; + } + .g-md-8, + .gy-md-8 { + --bs-gutter-y: 10px; + } + .g-md-9, + .gx-md-9 { + --bs-gutter-x: 20px; + } + .g-md-9, + .gy-md-9 { + --bs-gutter-y: 20px; + } +} +@media (min-width: 992px) { + .col-lg { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + } + .row-cols-lg-auto > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .row-cols-lg-1 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .row-cols-lg-2 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .row-cols-lg-3 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-lg-4 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .row-cols-lg-5 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 20%; + } + .row-cols-lg-6 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-lg-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .col-lg-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 8.33333333%; + } + .col-lg-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.66666667%; + } + .col-lg-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .col-lg-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.33333333%; + } + .col-lg-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 41.66666667%; + } + .col-lg-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .col-lg-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 58.33333333%; + } + .col-lg-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 66.66666667%; + } + .col-lg-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 75%; + } + .col-lg-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 83.33333333%; + } + .col-lg-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 91.66666667%; + } + .col-lg-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .offset-lg-0 { + margin-left: 0; + } + .offset-lg-1 { + margin-left: 8.33333333%; + } + .offset-lg-2 { + margin-left: 16.66666667%; + } + .offset-lg-3 { + margin-left: 25%; + } + .offset-lg-4 { + margin-left: 33.33333333%; + } + .offset-lg-5 { + margin-left: 41.66666667%; + } + .offset-lg-6 { + margin-left: 50%; + } + .offset-lg-7 { + margin-left: 58.33333333%; + } + .offset-lg-8 { + margin-left: 66.66666667%; + } + .offset-lg-9 { + margin-left: 75%; + } + .offset-lg-10 { + margin-left: 83.33333333%; + } + .offset-lg-11 { + margin-left: 91.66666667%; + } + .g-lg-0, + .gx-lg-0 { + --bs-gutter-x: 0; + } + .g-lg-0, + .gy-lg-0 { + --bs-gutter-y: 0; + } + .g-lg-1, + .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + .g-lg-1, + .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + .g-lg-2, + .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + .g-lg-2, + .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + .g-lg-3, + .gx-lg-3 { + --bs-gutter-x: 1rem; + } + .g-lg-3, + .gy-lg-3 { + --bs-gutter-y: 1rem; + } + .g-lg-4, + .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + .g-lg-4, + .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + .g-lg-5, + .gx-lg-5 { + --bs-gutter-x: 3rem; + } + .g-lg-5, + .gy-lg-5 { + --bs-gutter-y: 3rem; + } + .g-lg-6, + .gx-lg-6 { + --bs-gutter-x: 12px; + } + .g-lg-6, + .gy-lg-6 { + --bs-gutter-y: 12px; + } + .g-lg-7, + .gx-lg-7 { + --bs-gutter-x: 30px; + } + .g-lg-7, + .gy-lg-7 { + --bs-gutter-y: 30px; + } + .g-lg-8, + .gx-lg-8 { + --bs-gutter-x: 10px; + } + .g-lg-8, + .gy-lg-8 { + --bs-gutter-y: 10px; + } + .g-lg-9, + .gx-lg-9 { + --bs-gutter-x: 20px; + } + .g-lg-9, + .gy-lg-9 { + --bs-gutter-y: 20px; + } +} +@media (min-width: 1200px) { + .col-xl { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + } + .row-cols-xl-auto > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .row-cols-xl-1 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .row-cols-xl-2 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .row-cols-xl-3 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-xl-4 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .row-cols-xl-5 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 20%; + } + .row-cols-xl-6 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-xl-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .col-xl-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xl-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xl-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .col-xl-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xl-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xl-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .col-xl-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xl-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xl-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 75%; + } + .col-xl-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xl-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xl-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.33333333%; + } + .offset-xl-2 { + margin-left: 16.66666667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.33333333%; + } + .offset-xl-5 { + margin-left: 41.66666667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.33333333%; + } + .offset-xl-8 { + margin-left: 66.66666667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.33333333%; + } + .offset-xl-11 { + margin-left: 91.66666667%; + } + .g-xl-0, + .gx-xl-0 { + --bs-gutter-x: 0; + } + .g-xl-0, + .gy-xl-0 { + --bs-gutter-y: 0; + } + .g-xl-1, + .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xl-1, + .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xl-2, + .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xl-2, + .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xl-3, + .gx-xl-3 { + --bs-gutter-x: 1rem; + } + .g-xl-3, + .gy-xl-3 { + --bs-gutter-y: 1rem; + } + .g-xl-4, + .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xl-4, + .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xl-5, + .gx-xl-5 { + --bs-gutter-x: 3rem; + } + .g-xl-5, + .gy-xl-5 { + --bs-gutter-y: 3rem; + } + .g-xl-6, + .gx-xl-6 { + --bs-gutter-x: 12px; + } + .g-xl-6, + .gy-xl-6 { + --bs-gutter-y: 12px; + } + .g-xl-7, + .gx-xl-7 { + --bs-gutter-x: 30px; + } + .g-xl-7, + .gy-xl-7 { + --bs-gutter-y: 30px; + } + .g-xl-8, + .gx-xl-8 { + --bs-gutter-x: 10px; + } + .g-xl-8, + .gy-xl-8 { + --bs-gutter-y: 10px; + } + .g-xl-9, + .gx-xl-9 { + --bs-gutter-x: 20px; + } + .g-xl-9, + .gy-xl-9 { + --bs-gutter-y: 20px; + } +} +@media (min-width: 1400px) { + .col-xxl { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + } + .row-cols-xxl-auto > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .row-cols-xxl-1 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .row-cols-xxl-2 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .row-cols-xxl-3 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-xxl-4 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .row-cols-xxl-5 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 20%; + } + .row-cols-xxl-6 > * { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-xxl-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + } + .col-xxl-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xxl-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xxl-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 25%; + } + .col-xxl-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xxl-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xxl-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 50%; + } + .col-xxl-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xxl-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xxl-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 75%; + } + .col-xxl-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xxl-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xxl-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: 100%; + } + .offset-xxl-0 { + margin-left: 0; + } + .offset-xxl-1 { + margin-left: 8.33333333%; + } + .offset-xxl-2 { + margin-left: 16.66666667%; + } + .offset-xxl-3 { + margin-left: 25%; + } + .offset-xxl-4 { + margin-left: 33.33333333%; + } + .offset-xxl-5 { + margin-left: 41.66666667%; + } + .offset-xxl-6 { + margin-left: 50%; + } + .offset-xxl-7 { + margin-left: 58.33333333%; + } + .offset-xxl-8 { + margin-left: 66.66666667%; + } + .offset-xxl-9 { + margin-left: 75%; + } + .offset-xxl-10 { + margin-left: 83.33333333%; + } + .offset-xxl-11 { + margin-left: 91.66666667%; + } + .g-xxl-0, + .gx-xxl-0 { + --bs-gutter-x: 0; + } + .g-xxl-0, + .gy-xxl-0 { + --bs-gutter-y: 0; + } + .g-xxl-1, + .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xxl-1, + .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xxl-2, + .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xxl-2, + .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xxl-3, + .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + .g-xxl-3, + .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + .g-xxl-4, + .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xxl-4, + .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xxl-5, + .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + .g-xxl-5, + .gy-xxl-5 { + --bs-gutter-y: 3rem; + } + .g-xxl-6, + .gx-xxl-6 { + --bs-gutter-x: 12px; + } + .g-xxl-6, + .gy-xxl-6 { + --bs-gutter-y: 12px; + } + .g-xxl-7, + .gx-xxl-7 { + --bs-gutter-x: 30px; + } + .g-xxl-7, + .gy-xxl-7 { + --bs-gutter-y: 30px; + } + .g-xxl-8, + .gx-xxl-8 { + --bs-gutter-x: 10px; + } + .g-xxl-8, + .gy-xxl-8 { + --bs-gutter-y: 10px; + } + .g-xxl-9, + .gx-xxl-9 { + --bs-gutter-x: 20px; + } + .g-xxl-9, + .gy-xxl-9 { + --bs-gutter-y: 20px; + } +} +.table { + --bs-table-color-type: initial; + --bs-table-bg-type: initial; + --bs-table-color-state: initial; + --bs-table-bg-state: initial; + --bs-table-color: #3a4752; + --bs-table-bg: var(--bs-body-bg); + --bs-table-border-color: var(--bs-border-color); + --bs-table-accent-bg: transparent; + --bs-table-striped-color: #3a4752; + --bs-table-striped-bg: #f5f8fb; + --bs-table-active-color: #3a4752; + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: #3a4752; + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + vertical-align: top; + border-color: var(--bs-table-border-color); +} +.table > :not(caption) > * > * { + padding: 17px 10px; + color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color))); + background-color: var(--bs-table-bg); + border-bottom-width: var(--bs-border-width); + -webkit-box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))); + box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))); +} +.table > tbody { + vertical-align: inherit; +} +.table > thead { + vertical-align: bottom; +} + +.table-group-divider { + border-top: calc(var(--bs-border-width) * 2) solid currentcolor; +} + +.caption-top { + caption-side: top; +} + +.table-sm > :not(caption) > * > * { + padding: 14px 10px; +} + +.table-bordered > :not(caption) > * { + border-width: var(--bs-border-width) 0; +} +.table-bordered > :not(caption) > * > * { + border-width: 0 var(--bs-border-width); +} + +.table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} +.table-borderless > :not(:first-child) { + border-top-width: 0; +} + +.table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-color-type: var(--bs-table-striped-color); + --bs-table-bg-type: var(--bs-table-striped-bg); +} + +.table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-color-type: var(--bs-table-striped-color); + --bs-table-bg-type: var(--bs-table-striped-bg); +} + +.table-active { + --bs-table-color-state: var(--bs-table-active-color); + --bs-table-bg-state: var(--bs-table-active-bg); +} + +.table-hover > tbody > tr:hover > * { + --bs-table-color-state: var(--bs-table-hover-color); + --bs-table-bg-state: var(--bs-table-hover-bg); +} + +.table-primary { + --bs-table-color: #000; + --bs-table-bg: #d4dcff; + --bs-table-border-color: #bfc6e6; + --bs-table-striped-bg: #c9d1f2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bfc6e6; + --bs-table-active-color: #000; + --bs-table-hover-bg: #c4ccec; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-secondary { + --bs-table-color: #000; + --bs-table-bg: #e3f8fd; + --bs-table-border-color: #ccdfe4; + --bs-table-striped-bg: #d8ecf0; + --bs-table-striped-color: #000; + --bs-table-active-bg: #ccdfe4; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d2e5ea; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-success { + --bs-table-color: #000; + --bs-table-bg: #e7f6da; + --bs-table-border-color: #d0ddc4; + --bs-table-striped-bg: #dbeacf; + --bs-table-striped-color: #000; + --bs-table-active-bg: #d0ddc4; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d6e4ca; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-info { + --bs-table-color: #000; + --bs-table-bg: #e3defc; + --bs-table-border-color: #ccc8e3; + --bs-table-striped-bg: #d8d3ef; + --bs-table-striped-color: #000; + --bs-table-active-bg: #ccc8e3; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d2cde9; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-warning { + --bs-table-color: #000; + --bs-table-bg: #fcf6de; + --bs-table-border-color: #e3ddc8; + --bs-table-striped-bg: #efead3; + --bs-table-striped-color: #000; + --bs-table-active-bg: #e3ddc8; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e9e4cd; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-danger { + --bs-table-color: #000; + --bs-table-bg: #fcdede; + --bs-table-border-color: #e3c8c8; + --bs-table-striped-bg: #efd3d3; + --bs-table-striped-color: #000; + --bs-table-active-bg: #e3c8c8; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e9cdcd; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-light { + --bs-table-color: #000; + --bs-table-bg: #f6f8fa; + --bs-table-border-color: #dddfe1; + --bs-table-striped-bg: #eaecee; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dddfe1; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e4e5e7; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-dark { + --bs-table-color: #fff; + --bs-table-bg: #3a4752; + --bs-table-border-color: #4e5963; + --bs-table-striped-bg: #44505b; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #4e5963; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #49555f; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +@media (max-width: 575.98px) { + .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 767.98px) { + .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 991.98px) { + .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1199.98px) { + .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1399.98px) { + .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +.form-label { + margin-bottom: 0.5rem; + color: #3a4752; +} + +.col-form-label { + padding-top: calc(8px + var(--bs-border-width)); + padding-bottom: calc(8px + var(--bs-border-width)); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; + color: #3a4752; +} + +.col-form-label-lg { + padding-top: calc(9px + var(--bs-border-width)); + padding-bottom: calc(9px + var(--bs-border-width)); + font-size: 1.09375rem; +} + +.col-form-label-sm { + padding-top: calc(0.25rem + var(--bs-border-width)); + padding-bottom: calc(0.25rem + var(--bs-border-width)); + font-size: 0.765625rem; +} + +.form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: var(--bs-secondary-color); +} + +.form-control { + display: block; + width: 100%; + padding: 8px 16px; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.5; + color: var(--bs-body-color); + background-color: transparent; + background-clip: padding-box; + border: var(--bs-border-width) solid #dbe1e6; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.5rem; + -webkit-box-shadow: unset; + box-shadow: unset; + -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-control { + -webkit-transition: none; + transition: none; + } +} +.form-control[type=file] { + overflow: hidden; +} +.form-control[type=file]:not(:disabled):not([readonly]) { + cursor: pointer; +} +.form-control:focus { + color: var(--bs-body-color); + background-color: transparent; + border-color: #94a9ff; + outline: 0; + -webkit-box-shadow: unset, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + box-shadow: unset, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); +} +.form-control::-webkit-date-and-time-value { + min-width: 85px; + height: 1.5em; + margin: 0; +} +.form-control::-webkit-datetime-edit { + display: block; + padding: 0; +} +.form-control::-webkit-input-placeholder { + color: #3a4752; + opacity: 1; +} +.form-control::-moz-placeholder { + color: #3a4752; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #3a4752; + opacity: 1; +} +.form-control::-ms-input-placeholder { + color: #3a4752; + opacity: 1; +} +.form-control::placeholder { + color: #3a4752; + opacity: 1; +} +.form-control:disabled { + background-color: var(--bs-secondary-bg); + opacity: 1; +} +.form-control::-webkit-file-upload-button { + padding: 8px 16px; + margin: -8px -16px; + -webkit-margin-end: 16px; + margin-inline-end: 16px; + color: var(--bs-body-color); + background-color: var(--bs-tertiary-bg); + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: var(--bs-border-width); + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; +} +.form-control::file-selector-button { + padding: 8px 16px; + margin: -8px -16px; + -webkit-margin-end: 16px; + margin-inline-end: 16px; + color: var(--bs-body-color); + background-color: var(--bs-tertiary-bg); + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: var(--bs-border-width); + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-control::-webkit-file-upload-button { + -webkit-transition: none; + transition: none; + } + .form-control::file-selector-button { + -webkit-transition: none; + transition: none; + } +} +.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: var(--bs-secondary-bg); +} +.form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: var(--bs-secondary-bg); +} + +.form-control-plaintext { + display: block; + width: 100%; + padding: 8px 0; + margin-bottom: 0; + line-height: 1.5; + color: var(--bs-body-color); + background-color: transparent; + border: solid transparent; + border-width: var(--bs-border-width) 0; +} +.form-control-plaintext:focus { + outline: 0; +} +.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.form-control-sm { + min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); + padding: 0.25rem 0.5rem; + font-size: 0.765625rem; + border-radius: var(--bs-border-radius-sm); +} +.form-control-sm::-webkit-file-upload-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} +.form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.form-control-lg { + min-height: calc(1.5em + 18px + calc(var(--bs-border-width) * 2)); + padding: 9px 16px; + font-size: 1.09375rem; + border-radius: var(--bs-border-radius-lg); +} +.form-control-lg::-webkit-file-upload-button { + padding: 9px 16px; + margin: -9px -16px; + -webkit-margin-end: 16px; + margin-inline-end: 16px; +} +.form-control-lg::file-selector-button { + padding: 9px 16px; + margin: -9px -16px; + -webkit-margin-end: 16px; + margin-inline-end: 16px; +} + +textarea.form-control { + min-height: calc(1.5em + 16px + calc(var(--bs-border-width) * 2)); +} +textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); +} +textarea.form-control-lg { + min-height: calc(1.5em + 18px + calc(var(--bs-border-width) * 2)); +} + +.form-control-color { + width: 3rem; + height: calc(1.5em + 16px + calc(var(--bs-border-width) * 2)); + padding: 8px; +} +.form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} +.form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.5rem; +} +.form-control-color::-webkit-color-swatch { + border: 0 !important; + border-radius: 0.5rem; +} +.form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); +} +.form-control-color.form-control-lg { + height: calc(1.5em + 18px + calc(var(--bs-border-width) * 2)); +} + +.form-select { + --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + display: block; + width: 100%; + padding: 10px 48px 10px 16px; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.5; + color: var(--bs-body-color); + background-color: transparent; + background-image: var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none); + background-repeat: no-repeat; + background-position: right 16px center; + background-size: 16px 12px; + border: var(--bs-border-width) solid #dbe1e6; + border-radius: 0.5rem; + -webkit-box-shadow: unset; + box-shadow: unset; + -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-select { + -webkit-transition: none; + transition: none; + } +} +.form-select:focus { + border-color: #94a9ff; + outline: 0; + -webkit-box-shadow: unset, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + box-shadow: unset, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); +} +.form-select[multiple], .form-select[size]:not([size="1"]) { + padding-right: 16px; + background-image: none; +} +.form-select:disabled { + background-color: var(--bs-secondary-bg); +} +.form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 var(--bs-body-color); +} + +.form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.765625rem; + border-radius: var(--bs-border-radius-sm); +} + +.form-select-lg { + padding-top: 9px; + padding-bottom: 9px; + padding-left: 16px; + font-size: 1.09375rem; + border-radius: var(--bs-border-radius-lg); +} + +[data-bs-theme=dark] .form-select { + --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); +} + +.form-check { + display: block; + min-height: 1.45em; + padding-left: 1.95em; + margin-bottom: 0.125rem; +} +.form-check .form-check-input { + float: left; + margin-left: -1.95em; +} + +.form-check-reverse { + padding-right: 1.95em; + padding-left: 0; + text-align: right; +} +.form-check-reverse .form-check-input { + float: right; + margin-right: -1.95em; + margin-left: 0; +} + +.form-check-input { + --bs-form-check-bg: transparent; + width: 1.45em; + height: 1.45em; + margin-top: 0.025em; + vertical-align: top; + background-color: var(--bs-form-check-bg); + background-image: var(--bs-form-check-bg-image); + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid #dbe1e6; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} +.form-check-input[type=checkbox] { + border-radius: 0.25em; +} +.form-check-input[type=radio] { + border-radius: 50%; +} +.form-check-input:active { + -webkit-filter: brightness(90%); + filter: brightness(90%); +} +.form-check-input:focus { + border-color: #94a9ff; + outline: 0; + -webkit-box-shadow: unset; + box-shadow: unset; +} +.form-check-input:checked { + background-color: #2952ff; + border-color: #2952ff; +} +.form-check-input:checked[type=checkbox] { + --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} +.form-check-input:checked[type=radio] { + --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} +.form-check-input[type=checkbox]:indeterminate { + background-color: #2952ff; + border-color: #2952ff; + --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} +.form-check-input:disabled { + pointer-events: none; + -webkit-filter: none; + filter: none; + opacity: 0.5; +} +.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { + cursor: default; + opacity: 0.5; +} + +.form-switch { + padding-left: 2.5em; +} +.form-switch .form-check-input { + --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + width: 2em; + margin-left: -2.5em; + background-image: var(--bs-form-switch-bg); + background-position: left center; + border-radius: 2em; + -webkit-transition: background-position 0.15s ease-in-out; + transition: background-position 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-switch .form-check-input { + -webkit-transition: none; + transition: none; + } +} +.form-switch .form-check-input:focus { + --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2394a9ff'/%3e%3c/svg%3e"); +} +.form-switch .form-check-input:checked { + background-position: right center; + --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} +.form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} +.form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} + +.form-check-inline { + display: inline-block; + margin-right: 1rem; +} + +.btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.btn-check[disabled] + .btn, .btn-check:disabled + .btn { + pointer-events: none; + -webkit-filter: none; + filter: none; + opacity: 0.65; +} + +[data-bs-theme=dark] .form-switch .form-check-input:not(:checked):not(:focus) { + --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e"); +} + +.form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.form-range:focus { + outline: 0; +} +.form-range:focus::-webkit-slider-thumb { + -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); +} +.form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(41, 82, 255, 0.25); +} +.form-range::-moz-focus-outer { + border: 0; +} +.form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #2952ff; + border: 0; + border-radius: 1rem; + -webkit-box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1); + box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1); + -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-range::-webkit-slider-thumb { + -webkit-transition: none; + transition: none; + } +} +.form-range::-webkit-slider-thumb:active { + background-color: #bfcbff; +} +.form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: var(--bs-tertiary-bg); + border-color: transparent; + border-radius: 1rem; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); +} +.form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #2952ff; + border: 0; + border-radius: 1rem; + box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1); + -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-range::-moz-range-thumb { + -moz-transition: none; + transition: none; + } +} +.form-range::-moz-range-thumb:active { + background-color: #bfcbff; +} +.form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: var(--bs-tertiary-bg); + border-color: transparent; + border-radius: 1rem; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); +} +.form-range:disabled { + pointer-events: none; +} +.form-range:disabled::-webkit-slider-thumb { + background-color: var(--bs-secondary-color); +} +.form-range:disabled::-moz-range-thumb { + background-color: var(--bs-secondary-color); +} + +.form-floating { + position: relative; +} +.form-floating > .form-control, +.form-floating > .form-control-plaintext, +.form-floating > .form-select { + height: calc(3.5rem + calc(var(--bs-border-width) * 2)); + min-height: calc(3.5rem + calc(var(--bs-border-width) * 2)); + line-height: 1.25; +} +.form-floating > label { + position: absolute; + top: 0; + left: 0; + z-index: 2; + height: 100%; + padding: 1rem 16px; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: var(--bs-border-width) solid transparent; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transition: opacity 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-floating > label { + -webkit-transition: none; + transition: none; + } +} +.form-floating > .form-control, +.form-floating > .form-control-plaintext { + padding: 1rem 16px; +} +.form-floating > .form-control::-webkit-input-placeholder, .form-floating > .form-control-plaintext::-webkit-input-placeholder { + color: transparent; +} +.form-floating > .form-control::-moz-placeholder, .form-floating > .form-control-plaintext::-moz-placeholder { + color: transparent; +} +.form-floating > .form-control:-ms-input-placeholder, .form-floating > .form-control-plaintext:-ms-input-placeholder { + color: transparent; +} +.form-floating > .form-control::-ms-input-placeholder, .form-floating > .form-control-plaintext::-ms-input-placeholder { + color: transparent; +} +.form-floating > .form-control::placeholder, +.form-floating > .form-control-plaintext::placeholder { + color: transparent; +} +.form-floating > .form-control:not(:-moz-placeholder-shown), .form-floating > .form-control-plaintext:not(:-moz-placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:not(:-ms-input-placeholder), .form-floating > .form-control-plaintext:not(:-ms-input-placeholder) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown), +.form-floating > .form-control-plaintext:focus, +.form-floating > .form-control-plaintext:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:-webkit-autofill, +.form-floating > .form-control-plaintext:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { + color: rgba(var(--bs-body-color-rgb), 0.65); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control:not(:-ms-input-placeholder) ~ label { + color: rgba(var(--bs-body-color-rgb), 0.65); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control:focus ~ label, +.form-floating > .form-control:not(:placeholder-shown) ~ label, +.form-floating > .form-control-plaintext ~ label, +.form-floating > .form-select ~ label { + color: rgba(var(--bs-body-color-rgb), 0.65); + -webkit-transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control:not(:-moz-placeholder-shown) ~ label::after { + position: absolute; + inset: 1rem 8px; + z-index: -1; + height: 1.5em; + content: ""; + background-color: transparent; + border-radius: 0.5rem; +} +.form-floating > .form-control:not(:-ms-input-placeholder) ~ label::after { + position: absolute; + inset: 1rem 8px; + z-index: -1; + height: 1.5em; + content: ""; + background-color: transparent; + border-radius: 0.5rem; +} +.form-floating > .form-control:focus ~ label::after, +.form-floating > .form-control:not(:placeholder-shown) ~ label::after, +.form-floating > .form-control-plaintext ~ label::after, +.form-floating > .form-select ~ label::after { + position: absolute; + inset: 1rem 8px; + z-index: -1; + height: 1.5em; + content: ""; + background-color: transparent; + border-radius: 0.5rem; +} +.form-floating > .form-control:-webkit-autofill ~ label { + color: rgba(var(--bs-body-color-rgb), 0.65); + -webkit-transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control-plaintext ~ label { + border-width: var(--bs-border-width) 0; +} +.form-floating > :disabled ~ label { + color: #707a82; +} +.form-floating > :disabled ~ label::after { + background-color: var(--bs-secondary-bg); +} + +.input-group { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + width: 100%; +} +.input-group > .form-control, +.input-group > .form-select, +.input-group > .form-floating { + position: relative; + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} +.input-group > .form-control:focus, +.input-group > .form-select:focus, +.input-group > .form-floating:focus-within { + z-index: 5; +} +.input-group .btn { + position: relative; + z-index: 2; +} +.input-group .btn:focus { + z-index: 5; +} + +.input-group-text { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 8px 16px; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.5; + color: var(--bs-body-color); + text-align: center; + white-space: nowrap; + background-color: #f5f8fb; + border: var(--bs-border-width) solid #dbe1e6; + border-radius: 0.5rem; +} + +.input-group-lg > .form-control, +.input-group-lg > .form-select, +.input-group-lg > .input-group-text, +.input-group-lg > .btn { + padding: 9px 16px; + font-size: 1.09375rem; + border-radius: var(--bs-border-radius-lg); +} + +.input-group-sm > .form-control, +.input-group-sm > .form-select, +.input-group-sm > .input-group-text, +.input-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.765625rem; + border-radius: var(--bs-border-radius-sm); +} + +.input-group-lg > .form-select, +.input-group-sm > .form-select { + padding-right: 64px; +} + +.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), +.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), +.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, +.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), +.input-group.has-validation > .dropdown-toggle:nth-last-child(n+4), +.input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-control, +.input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: calc(var(--bs-border-width) * -1); + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group > .form-floating:not(:first-child) > .form-control, +.input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: var(--bs-form-valid-color); +} + +.valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.765625rem; + color: #fff; + background-color: var(--bs-success); + border-radius: var(--bs-border-radius); +} + +.was-validated :valid ~ .valid-feedback, +.was-validated :valid ~ .valid-tooltip, +.is-valid ~ .valid-feedback, +.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .form-control:valid, .form-control.is-valid { + border-color: var(--bs-form-valid-border-color); + padding-right: calc(1.5em + 16px); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2385d446' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 4px) center; + background-size: calc(0.75em + 8px) calc(0.75em + 8px); +} +.was-validated .form-control:valid:focus, .form-control.is-valid:focus { + border-color: var(--bs-form-valid-border-color); + -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); +} + +.was-validated textarea.form-control:valid, textarea.form-control.is-valid { + padding-right: calc(1.5em + 16px); + background-position: top calc(0.375em + 4px) right calc(0.375em + 4px); +} + +.was-validated .form-select:valid, .form-select.is-valid { + border-color: var(--bs-form-valid-border-color); +} +.was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] { + --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2385d446' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + padding-right: 88px; + background-position: right 16px center, center right 48px; + background-size: 16px 12px, calc(0.75em + 8px) calc(0.75em + 8px); +} +.was-validated .form-select:valid:focus, .form-select.is-valid:focus { + border-color: var(--bs-form-valid-border-color); + -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); +} + +.was-validated .form-control-color:valid, .form-control-color.is-valid { + width: calc(3rem + calc(1.5em + 16px)); +} + +.was-validated .form-check-input:valid, .form-check-input.is-valid { + border-color: var(--bs-form-valid-border-color); +} +.was-validated .form-check-input:valid:checked, .form-check-input.is-valid:checked { + background-color: var(--bs-form-valid-color); +} +.was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus { + -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); +} +.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label { + color: var(--bs-form-valid-color); +} + +.form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} + +.was-validated .input-group > .form-control:not(:focus):valid, .input-group > .form-control:not(:focus).is-valid, +.was-validated .input-group > .form-select:not(:focus):valid, +.input-group > .form-select:not(:focus).is-valid, +.was-validated .input-group > .form-floating:not(:focus-within):valid, +.input-group > .form-floating:not(:focus-within).is-valid { + z-index: 3; +} + +.invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: red; +} + +.invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.765625rem; + color: #fff; + background-color: var(--bs-danger); + border-radius: var(--bs-border-radius); +} + +.was-validated :invalid ~ .invalid-feedback, +.was-validated :invalid ~ .invalid-tooltip, +.is-invalid ~ .invalid-feedback, +.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .form-control:invalid, .form-control.is-invalid { + border-color: var(--bs-form-invalid-border-color); + padding-right: calc(1.5em + 16px); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23f25a5a'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23f25a5a' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 4px) center; + background-size: calc(0.75em + 8px) calc(0.75em + 8px); +} +.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { + border-color: var(--bs-form-invalid-border-color); + -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); +} + +.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { + padding-right: calc(1.5em + 16px); + background-position: top calc(0.375em + 4px) right calc(0.375em + 4px); +} + +.was-validated .form-select:invalid, .form-select.is-invalid { + border-color: var(--bs-form-invalid-border-color); +} +.was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size="1"], .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size="1"] { + --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23f25a5a'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23f25a5a' stroke='none'/%3e%3c/svg%3e"); + padding-right: 88px; + background-position: right 16px center, center right 48px; + background-size: 16px 12px, calc(0.75em + 8px) calc(0.75em + 8px); +} +.was-validated .form-select:invalid:focus, .form-select.is-invalid:focus { + border-color: var(--bs-form-invalid-border-color); + -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); +} + +.was-validated .form-control-color:invalid, .form-control-color.is-invalid { + width: calc(3rem + calc(1.5em + 16px)); +} + +.was-validated .form-check-input:invalid, .form-check-input.is-invalid { + border-color: var(--bs-form-invalid-border-color); +} +.was-validated .form-check-input:invalid:checked, .form-check-input.is-invalid:checked { + background-color: var(--bs-form-invalid-color); +} +.was-validated .form-check-input:invalid:focus, .form-check-input.is-invalid:focus { + -webkit-box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); +} +.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { + color: var(--bs-form-invalid-color); +} + +.form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} + +.was-validated .input-group > .form-control:not(:focus):invalid, .input-group > .form-control:not(:focus).is-invalid, +.was-validated .input-group > .form-select:not(:focus):invalid, +.input-group > .form-select:not(:focus).is-invalid, +.was-validated .input-group > .form-floating:not(:focus-within):invalid, +.input-group > .form-floating:not(:focus-within).is-invalid { + z-index: 4; +} + +.btn { + --bs-btn-padding-x: 20px; + --bs-btn-padding-y: 9px; + --bs-btn-font-family: ; + --bs-btn-font-size: 0.875rem; + --bs-btn-font-weight: 600; + --bs-btn-line-height: 1.5; + --bs-btn-color: var(--bs-body-color); + --bs-btn-bg: transparent; + --bs-btn-border-width: var(--bs-border-width); + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 30px; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: unset; + --bs-btn-disabled-opacity: 0.65; + --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5); + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + -webkit-box-shadow: var(--bs-btn-box-shadow); + box-shadow: var(--bs-btn-box-shadow); + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .btn { + -webkit-transition: none; + transition: none; + } +} +.btn:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} +.btn-check + .btn:hover { + color: var(--bs-btn-color); + background-color: var(--bs-btn-bg); + border-color: var(--bs-btn-border-color); +} +.btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + -webkit-box-shadow: var(--bs-btn-box-shadow), var(--bs-btn-focus-box-shadow); + box-shadow: var(--bs-btn-box-shadow), var(--bs-btn-focus-box-shadow); +} +.btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + -webkit-box-shadow: var(--bs-btn-box-shadow), var(--bs-btn-focus-box-shadow); + box-shadow: var(--bs-btn-box-shadow), var(--bs-btn-focus-box-shadow); +} +.btn-check:checked + .btn, :not(.btn-check) + .btn:active, .btn:first-child:active, .btn.active, .btn.show { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); + -webkit-box-shadow: var(--bs-btn-active-shadow); + box-shadow: var(--bs-btn-active-shadow); +} +.btn-check:checked + .btn:focus-visible, :not(.btn-check) + .btn:active:focus-visible, .btn:first-child:active:focus-visible, .btn.active:focus-visible, .btn.show:focus-visible { + -webkit-box-shadow: var(--bs-btn-active-shadow), var(--bs-btn-focus-box-shadow); + box-shadow: var(--bs-btn-active-shadow), var(--bs-btn-focus-box-shadow); +} +.btn:disabled, .btn.disabled, fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); + -webkit-box-shadow: none; + box-shadow: none; +} + +.btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #2952ff; + --bs-btn-border-color: #2952ff; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #2346d9; + --bs-btn-hover-border-color: #2142cc; + --bs-btn-focus-shadow-rgb: 73, 108, 255; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2142cc; + --bs-btn-active-border-color: #1f3ebf; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #2952ff; + --bs-btn-disabled-border-color: #2952ff; +} + +.btn-secondary { + --bs-btn-color: #000; + --bs-btn-bg: #74dbf7; + --bs-btn-border-color: #74dbf7; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #89e0f8; + --bs-btn-hover-border-color: #82dff8; + --bs-btn-focus-shadow-rgb: 99, 186, 210; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #90e2f9; + --bs-btn-active-border-color: #82dff8; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #74dbf7; + --bs-btn-disabled-border-color: #74dbf7; +} + +.btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #85d446; + --bs-btn-border-color: #85d446; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #71b43c; + --bs-btn-hover-border-color: #6aaa38; + --bs-btn-focus-shadow-rgb: 151, 218, 98; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #6aaa38; + --bs-btn-active-border-color: #649f35; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #85d446; + --bs-btn-disabled-border-color: #85d446; +} + +.btn-inverse { + --bs-btn-color: #fff; + --bs-btn-bg: #3a4752; + --bs-btn-border-color: #3a4752; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #313c46; + --bs-btn-hover-border-color: #2e3942; + --bs-btn-focus-shadow-rgb: 88, 99, 108; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2e3942; + --bs-btn-active-border-color: #2c353e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #3a4752; + --bs-btn-disabled-border-color: #3a4752; +} + +.btn-info { + --bs-btn-color: #fff; + --bs-btn-bg: #745af2; + --bs-btn-border-color: #745af2; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #634dce; + --bs-btn-hover-border-color: #5d48c2; + --bs-btn-focus-shadow-rgb: 137, 115, 244; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #5d48c2; + --bs-btn-active-border-color: #5744b6; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #745af2; + --bs-btn-disabled-border-color: #745af2; +} + +.btn-warning { + --bs-btn-color: #000; + --bs-btn-bg: #f2d15a; + --bs-btn-border-color: #f2d15a; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f4d873; + --bs-btn-hover-border-color: #f3d66b; + --bs-btn-focus-shadow-rgb: 206, 178, 77; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f5da7b; + --bs-btn-active-border-color: #f3d66b; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f2d15a; + --bs-btn-disabled-border-color: #f2d15a; +} + +.btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #f25a5a; + --bs-btn-border-color: #f25a5a; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #ce4d4d; + --bs-btn-hover-border-color: #c24848; + --bs-btn-focus-shadow-rgb: 244, 115, 115; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #c24848; + --bs-btn-active-border-color: #b64444; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #f25a5a; + --bs-btn-disabled-border-color: #f25a5a; +} + +.btn-light { + --bs-btn-color: #000; + --bs-btn-bg: #f6f8fa; + --bs-btn-border-color: #f6f8fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #d1d3d5; + --bs-btn-hover-border-color: #c5c6c8; + --bs-btn-focus-shadow-rgb: 209, 211, 213; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #c5c6c8; + --bs-btn-active-border-color: #b9babc; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f6f8fa; + --bs-btn-disabled-border-color: #f6f8fa; +} + +.btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #3a4752; + --bs-btn-border-color: #3a4752; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #58636c; + --bs-btn-hover-border-color: #4e5963; + --bs-btn-focus-shadow-rgb: 88, 99, 108; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #616c75; + --bs-btn-active-border-color: #4e5963; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #3a4752; + --bs-btn-disabled-border-color: #3a4752; +} + +.btn-outline-primary { + --bs-btn-color: #2952ff; + --bs-btn-border-color: #2952ff; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #2952ff; + --bs-btn-hover-border-color: #2952ff; + --bs-btn-focus-shadow-rgb: 41, 82, 255; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2952ff; + --bs-btn-active-border-color: #2952ff; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #2952ff; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #2952ff; + --bs-gradient: none; +} + +.btn-outline-secondary { + --bs-btn-color: #74dbf7; + --bs-btn-border-color: #74dbf7; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #74dbf7; + --bs-btn-hover-border-color: #74dbf7; + --bs-btn-focus-shadow-rgb: 116, 219, 247; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #74dbf7; + --bs-btn-active-border-color: #74dbf7; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #74dbf7; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #74dbf7; + --bs-gradient: none; +} + +.btn-outline-success { + --bs-btn-color: #85d446; + --bs-btn-border-color: #85d446; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #85d446; + --bs-btn-hover-border-color: #85d446; + --bs-btn-focus-shadow-rgb: 133, 212, 70; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #85d446; + --bs-btn-active-border-color: #85d446; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #85d446; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #85d446; + --bs-gradient: none; +} + +.btn-outline-inverse { + --bs-btn-color: #3a4752; + --bs-btn-border-color: #3a4752; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #3a4752; + --bs-btn-hover-border-color: #3a4752; + --bs-btn-focus-shadow-rgb: 58, 71, 82; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #3a4752; + --bs-btn-active-border-color: #3a4752; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #3a4752; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #3a4752; + --bs-gradient: none; +} + +.btn-outline-info { + --bs-btn-color: #745af2; + --bs-btn-border-color: #745af2; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #745af2; + --bs-btn-hover-border-color: #745af2; + --bs-btn-focus-shadow-rgb: 116, 90, 242; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #745af2; + --bs-btn-active-border-color: #745af2; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #745af2; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #745af2; + --bs-gradient: none; +} + +.btn-outline-warning { + --bs-btn-color: #f2d15a; + --bs-btn-border-color: #f2d15a; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f2d15a; + --bs-btn-hover-border-color: #f2d15a; + --bs-btn-focus-shadow-rgb: 242, 209, 90; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f2d15a; + --bs-btn-active-border-color: #f2d15a; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f2d15a; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f2d15a; + --bs-gradient: none; +} + +.btn-outline-danger { + --bs-btn-color: #f25a5a; + --bs-btn-border-color: #f25a5a; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #f25a5a; + --bs-btn-hover-border-color: #f25a5a; + --bs-btn-focus-shadow-rgb: 242, 90, 90; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #f25a5a; + --bs-btn-active-border-color: #f25a5a; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f25a5a; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f25a5a; + --bs-gradient: none; +} + +.btn-outline-light { + --bs-btn-color: #f6f8fa; + --bs-btn-border-color: #f6f8fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f6f8fa; + --bs-btn-hover-border-color: #f6f8fa; + --bs-btn-focus-shadow-rgb: 246, 248, 250; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f6f8fa; + --bs-btn-active-border-color: #f6f8fa; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f6f8fa; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f6f8fa; + --bs-gradient: none; +} + +.btn-outline-dark { + --bs-btn-color: #3a4752; + --bs-btn-border-color: #3a4752; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #3a4752; + --bs-btn-hover-border-color: #3a4752; + --bs-btn-focus-shadow-rgb: 58, 71, 82; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #3a4752; + --bs-btn-active-border-color: #3a4752; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #3a4752; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #3a4752; + --bs-gradient: none; +} + +.btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #707a82; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: 0 0 0 #000; + --bs-btn-focus-shadow-rgb: 73, 108, 255; + text-decoration: underline; +} +.btn-link:focus-visible { + color: var(--bs-btn-color); +} +.btn-link:hover { + color: var(--bs-btn-hover-color); +} + +.btn-lg, .btn-group-lg > .btn { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.09375rem; + --bs-btn-border-radius: var(--bs-border-radius-lg); +} + +.btn-sm, .btn-group-sm > .btn { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.765625rem; + --bs-btn-border-radius: var(--bs-border-radius-sm); +} + +.fade { + -webkit-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +@media (prefers-reduced-motion: reduce) { + .fade { + -webkit-transition: none; + transition: none; + } +} +.fade:not(.show) { + opacity: 0; +} + +.collapse:not(.show) { + display: none; +} + +.collapsing { + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + transition: height 0.35s ease; +} +@media (prefers-reduced-motion: reduce) { + .collapsing { + -webkit-transition: none; + transition: none; + } +} +.collapsing.collapse-horizontal { + width: 0; + height: auto; + -webkit-transition: width 0.35s ease; + transition: width 0.35s ease; +} +@media (prefers-reduced-motion: reduce) { + .collapsing.collapse-horizontal { + -webkit-transition: none; + transition: none; + } +} + +.dropup, +.dropend, +.dropdown, +.dropstart, +.dropup-center, +.dropdown-center { + position: relative; +} + +.dropdown-toggle { + white-space: nowrap; +} +.dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} +.dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 0.875rem; + --bs-dropdown-color: var(--bs-body-color); + --bs-dropdown-bg: var(--bs-body-bg); + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-border-radius: 1.125rem; + --bs-dropdown-border-width: 0; + --bs-dropdown-inner-border-radius: calc(1.125rem - 0); + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: var(--bs-body-color); + --bs-dropdown-link-hover-color: var(--bs-body-color); + --bs-dropdown-link-hover-bg: #f5f8fb; + --bs-dropdown-link-active-color: #3a4752; + --bs-dropdown-link-active-bg: #f5f8fb; + --bs-dropdown-link-disabled-color: var(--bs-tertiary-color); + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 10px; + --bs-dropdown-header-color: #707a82; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: var(--bs-dropdown-zindex); + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); + -webkit-box-shadow: var(--bs-dropdown-box-shadow); + box-shadow: var(--bs-dropdown-box-shadow); +} +.dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} + +.dropdown-menu-start { + --bs-position: start; +} +.dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} + +.dropdown-menu-end { + --bs-position: end; +} +.dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} + +@media (min-width: 576px) { + .dropdown-menu-sm-start { + --bs-position: start; + } + .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-sm-end { + --bs-position: end; + } + .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 768px) { + .dropdown-menu-md-start { + --bs-position: start; + } + .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-md-end { + --bs-position: end; + } + .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 992px) { + .dropdown-menu-lg-start { + --bs-position: start; + } + .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-lg-end { + --bs-position: end; + } + .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 1200px) { + .dropdown-menu-xl-start { + --bs-position: start; + } + .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-xl-end { + --bs-position: end; + } + .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 1400px) { + .dropdown-menu-xxl-start { + --bs-position: start; + } + .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-xxl-end { + --bs-position: end; + } + .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} +.dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} +.dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} +.dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} +.dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} +.dropend .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropend .dropdown-toggle::after { + vertical-align: 0; +} + +.dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} +.dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} +.dropstart .dropdown-toggle::after { + display: none; +} +.dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} +.dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropstart .dropdown-toggle::before { + vertical-align: 0; +} + +.dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} + +.dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; + border-radius: var(--bs-dropdown-item-border-radius, 0); +} +.dropdown-item:hover, .dropdown-item:focus { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} +.dropdown-item.active, .dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} +.dropdown-item.disabled, .dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} + +.dropdown-menu.show { + display: block; +} + +.dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.765625rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} + +.dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} + +.dropdown-menu-dark { + --bs-dropdown-color: #dbe1e6; + --bs-dropdown-bg: #343a40; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-box-shadow: ; + --bs-dropdown-link-color: #dbe1e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #3a4752; + --bs-dropdown-link-active-bg: #f5f8fb; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} + +.btn-group, +.btn-group-vertical { + position: relative; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; +} +.btn-group > .btn-check:checked + .btn, +.btn-group > .btn-check:focus + .btn, +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn-check:checked + .btn, +.btn-group-vertical > .btn-check:focus + .btn, +.btn-group-vertical > .btn:hover, +.btn-group-vertical > .btn:focus, +.btn-group-vertical > .btn:active, +.btn-group-vertical > .btn.active { + z-index: 1; +} + +.btn-toolbar { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; +} +.btn-toolbar .input-group { + width: auto; +} + +.btn-group { + border-radius: 30px; +} +.btn-group > :not(.btn-check:first-child) + .btn, +.btn-group > .btn-group:not(:first-child) { + margin-left: calc(var(--bs-border-width) * -1); +} +.btn-group > .btn:not(:last-child):not(.dropdown-toggle), +.btn-group > .btn.dropdown-toggle-split:first-child, +.btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:nth-child(n+3), +.btn-group > :not(.btn-check) + .btn, +.btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.dropdown-toggle-split { + padding-right: 15px; + padding-left: 15px; +} +.dropdown-toggle-split::after, .dropup .dropdown-toggle-split::after, .dropend .dropdown-toggle-split::after { + margin-left: 0; +} +.dropstart .dropdown-toggle-split::before { + margin-right: 0; +} + +.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.btn-group.show .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.btn-group.show .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} + +.btn-group-vertical { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group { + width: 100%; +} +.btn-group-vertical > .btn:not(:first-child), +.btn-group-vertical > .btn-group:not(:first-child) { + margin-top: calc(var(--bs-border-width) * -1); +} +.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), +.btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn ~ .btn, +.btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.nav { + --bs-nav-link-padding-x: 1rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: var(--bs-secondary-color); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + background: none; + border: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .nav-link { + -webkit-transition: none; + transition: none; + } +} +.nav-link:hover, .nav-link:focus { + color: var(--bs-nav-link-hover-color); +} +.nav-link:focus-visible { + outline: 0; + -webkit-box-shadow: 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + box-shadow: 0 0 0 0.25rem rgba(41, 82, 255, 0.25); +} +.nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} + +.nav-tabs { + --bs-nav-tabs-border-width: var(--bs-border-width); + --bs-nav-tabs-border-color: var(--bs-border-color); + --bs-nav-tabs-border-radius: var(--bs-border-radius); + --bs-nav-tabs-link-hover-border-color: var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color); + --bs-nav-tabs-link-active-color: var(--bs-emphasis-color); + --bs-nav-tabs-link-active-bg: var(--bs-body-bg); + --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg); + border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); +} +.nav-tabs .nav-link { + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} +.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} +.nav-tabs .nav-link.disabled, .nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} +.nav-tabs .nav-link.active, +.nav-tabs .nav-item.show .nav-link { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} +.nav-tabs .dropdown-menu { + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.nav-pills { + --bs-nav-pills-border-radius: var(--bs-border-radius); + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #2952ff; +} +.nav-pills .nav-link { + border-radius: var(--bs-nav-pills-border-radius); +} +.nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} +.nav-pills .nav-link.active, +.nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} + +.nav-underline { + --bs-nav-underline-gap: 1rem; + --bs-nav-underline-border-width: 0.125rem; + --bs-nav-underline-link-active-color: var(--bs-emphasis-color); + gap: var(--bs-nav-underline-gap); +} +.nav-underline .nav-link { + padding-right: 0; + padding-left: 0; + border-bottom: var(--bs-nav-underline-border-width) solid transparent; +} +.nav-underline .nav-link:hover, .nav-underline .nav-link:focus { + border-bottom-color: currentcolor; +} +.nav-underline .nav-link.active, +.nav-underline .show > .nav-link { + font-weight: 600; + color: var(--bs-nav-underline-link-active-color); + border-bottom-color: currentcolor; +} + +.nav-fill > .nav-link, +.nav-fill .nav-item { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + text-align: center; +} + +.nav-justified > .nav-link, +.nav-justified .nav-item { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + text-align: center; +} + +.nav-fill .nav-item .nav-link, +.nav-justified .nav-item .nav-link { + width: 100%; +} + +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} + +.navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 0.5rem; + --bs-navbar-color: #707a82; + --bs-navbar-hover-color: #2952ff; + --bs-navbar-disabled-color: rgba(var(--bs-emphasis-color-rgb), 0.3); + --bs-navbar-active-color: rgba(var(--bs-emphasis-color-rgb), 1); + --bs-navbar-brand-padding-y: 0.3359375rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.09375rem; + --bs-navbar-brand-color: rgba(var(--bs-emphasis-color-rgb), 1); + --bs-navbar-brand-hover-color: rgba(var(--bs-emphasis-color-rgb), 1); + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.09375rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28118, 139, 158, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(var(--bs-emphasis-color-rgb), 0.15); + --bs-navbar-toggler-border-radius: 30px; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} +.navbar > .container, +.navbar > .container-fluid, +.navbar > .container-sm, +.navbar > .container-md, +.navbar > .container-lg, +.navbar > .container-xl, +.navbar > .container-xxl { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: inherit; + flex-wrap: inherit; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; +} +.navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} +.navbar-brand:hover, .navbar-brand:focus { + color: var(--bs-navbar-brand-hover-color); +} + +.navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.navbar-nav .nav-link.active, .navbar-nav .nav-link.show { + color: var(--bs-navbar-active-color); +} +.navbar-nav .dropdown-menu { + position: static; +} + +.navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} +.navbar-text a, +.navbar-text a:hover, +.navbar-text a:focus { + color: var(--bs-navbar-active-color); +} + +.navbar-collapse { + -ms-flex-preferred-size: 100%; + flex-basis: 100%; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + -webkit-transition: var(--bs-navbar-toggler-transition); + transition: var(--bs-navbar-toggler-transition); +} +@media (prefers-reduced-motion: reduce) { + .navbar-toggler { + -webkit-transition: none; + transition: none; + } +} +.navbar-toggler:hover { + text-decoration: none; +} +.navbar-toggler:focus { + text-decoration: none; + outline: 0; + -webkit-box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} + +.navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} + +.navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} + +@media (min-width: 576px) { + .navbar-expand-sm { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-sm .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-sm .navbar-collapse { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-sm .navbar-toggler { + display: none; + } + .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + -webkit-transform: none !important; + transform: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: none; + transition: none; + } + .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-sm .offcanvas .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 768px) { + .navbar-expand-md { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-md .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-md .navbar-collapse { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-md .navbar-toggler { + display: none; + } + .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + -webkit-transform: none !important; + transform: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: none; + transition: none; + } + .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-md .offcanvas .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 992px) { + .navbar-expand-lg { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-lg .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-lg .navbar-collapse { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-lg .navbar-toggler { + display: none; + } + .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + -webkit-transform: none !important; + transform: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: none; + transition: none; + } + .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-lg .offcanvas .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 1200px) { + .navbar-expand-xl { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-xl .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-xl .navbar-collapse { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-xl .navbar-toggler { + display: none; + } + .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + -webkit-transform: none !important; + transform: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: none; + transition: none; + } + .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-xl .offcanvas .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 1400px) { + .navbar-expand-xxl { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-xxl .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-xxl .navbar-collapse { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-xxl .navbar-toggler { + display: none; + } + .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + -webkit-transform: none !important; + transform: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: none; + transition: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +.navbar-expand { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; +} +.navbar-expand .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; +} +.navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} +.navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} +.navbar-expand .navbar-nav-scroll { + overflow: visible; +} +.navbar-expand .navbar-collapse { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; +} +.navbar-expand .navbar-toggler { + display: none; +} +.navbar-expand .offcanvas { + position: static; + z-index: auto; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + -webkit-transform: none !important; + transform: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-transition: none; + transition: none; +} +.navbar-expand .offcanvas .offcanvas-header { + display: none; +} +.navbar-expand .offcanvas .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} + +.navbar-dark, +.navbar[data-bs-theme=dark] { + --bs-navbar-color: #dbe1e6; + --bs-navbar-hover-color: #2952ff; + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23dbe1e6' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +[data-bs-theme=dark] .navbar-toggler-icon { + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23dbe1e6' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.card { + --bs-card-spacer-y: 30px; + --bs-card-spacer-x: 30px; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-title-color: #3a4752; + --bs-card-subtitle-color: #3a4752; + --bs-card-border-width: 0px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 12px; + --bs-card-box-shadow: 0px 3px 4px 0px rgba(0, 0, 0, 0.031372549); + --bs-card-inner-border-radius: 12px; + --bs-card-cap-padding-y: 15px; + --bs-card-cap-padding-x: 30px; + --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.03); + --bs-card-cap-color: ; + --bs-card-height: ; + --bs-card-color: ; + --bs-card-bg: var(--bs-body-bg); + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 15px; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + color: var(--bs-body-color); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); + -webkit-box-shadow: var(--bs-card-box-shadow); + box-shadow: var(--bs-card-box-shadow); +} +.card > hr { + margin-right: 0; + margin-left: 0; +} +.card > .list-group { + border-top: inherit; + border-bottom: inherit; +} +.card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} +.card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} +.card > .card-header + .list-group, +.card > .list-group + .card-footer { + border-top: 0; +} + +.card-body { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} + +.card-title { + margin-bottom: var(--bs-card-title-spacer-y); + color: var(--bs-card-title-color); +} + +.card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; + color: var(--bs-card-subtitle-color); +} + +.card-text:last-child { + margin-bottom: 0; +} + +.card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} + +.card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} +.card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; +} + +.card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} +.card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); +} + +.card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} +.card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} + +.card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} + +.card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} + +.card-img, +.card-img-top, +.card-img-bottom { + width: 100%; +} + +.card-img, +.card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.card-img, +.card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} +@media (min-width: 576px) { + .card-group { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-flow: row wrap; + flex-flow: row wrap; + } + .card-group > .card { + -webkit-box-flex: 1; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + margin-bottom: 0; + } + .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .card-group > .card:not(:last-child) .card-img-top, + .card-group > .card:not(:last-child) .card-header { + border-top-right-radius: 0; + } + .card-group > .card:not(:last-child) .card-img-bottom, + .card-group > .card:not(:last-child) .card-footer { + border-bottom-right-radius: 0; + } + .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .card-group > .card:not(:first-child) .card-img-top, + .card-group > .card:not(:first-child) .card-header { + border-top-left-radius: 0; + } + .card-group > .card:not(:first-child) .card-img-bottom, + .card-group > .card:not(:first-child) .card-footer { + border-bottom-left-radius: 0; + } +} + +.accordion { + --bs-accordion-color: var(--bs-body-color); + --bs-accordion-bg: var(--bs-body-bg); + --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: var(--bs-border-width); + --bs-accordion-border-radius: var(--bs-border-radius); + --bs-accordion-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width))); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: var(--bs-body-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23768b9e'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23102166'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #94a9ff; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: var(--bs-primary-text-emphasis); + --bs-accordion-active-bg: var(--bs-primary-bg-subtle); +} + +.accordion-button { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 0.875rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + -webkit-transition: var(--bs-accordion-transition); + transition: var(--bs-accordion-transition); +} +@media (prefers-reduced-motion: reduce) { + .accordion-button { + -webkit-transition: none; + transition: none; + } +} +.accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + -webkit-box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); +} +.accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + -webkit-transform: var(--bs-accordion-btn-icon-transform); + transform: var(--bs-accordion-btn-icon-transform); +} +.accordion-button::after { + -ms-flex-negative: 0; + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + -webkit-transition: var(--bs-accordion-btn-icon-transition); + transition: var(--bs-accordion-btn-icon-transition); +} +@media (prefers-reduced-motion: reduce) { + .accordion-button::after { + -webkit-transition: none; + transition: none; + } +} +.accordion-button:hover { + z-index: 2; +} +.accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + -webkit-box-shadow: var(--bs-accordion-btn-focus-box-shadow); + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} + +.accordion-header { + margin-bottom: 0; +} + +.accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); +} +.accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} +.accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} +.accordion-item:not(:first-of-type) { + border-top: 0; +} +.accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} +.accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} +.accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} + +.accordion-flush .accordion-collapse { + border-width: 0; +} +.accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} +.accordion-flush .accordion-item:first-child { + border-top: 0; +} +.accordion-flush .accordion-item:last-child { + border-bottom: 0; +} +.accordion-flush .accordion-item .accordion-button, .accordion-flush .accordion-item .accordion-button.collapsed { + border-radius: 0; +} + +[data-bs-theme=dark] .accordion-button::after { + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%237f97ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%237f97ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.breadcrumb { + --bs-breadcrumb-padding-x: 0; + --bs-breadcrumb-padding-y: 0; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-bg: ; + --bs-breadcrumb-border-radius: ; + --bs-breadcrumb-divider-color: var(--bs-secondary-color); + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: var(--bs-secondary-color); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} + +.breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} +.breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, "/") /* rtl: var(--bs-breadcrumb-divider, "/") */; +} +.breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} + +.pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-color: var(--bs-link-color); + --bs-pagination-bg: var(--bs-body-bg); + --bs-pagination-border-width: var(--bs-border-width); + --bs-pagination-border-color: var(--bs-border-color); + --bs-pagination-border-radius: var(--bs-border-radius); + --bs-pagination-hover-color: var(--bs-link-hover-color); + --bs-pagination-hover-bg: var(--bs-tertiary-bg); + --bs-pagination-hover-border-color: var(--bs-border-color); + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: var(--bs-secondary-bg); + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #2952ff; + --bs-pagination-active-border-color: #2952ff; + --bs-pagination-disabled-color: var(--bs-secondary-color); + --bs-pagination-disabled-bg: var(--bs-secondary-bg); + --bs-pagination-disabled-border-color: var(--bs-border-color); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + padding-left: 0; + list-style: none; +} + +.page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .page-link { + -webkit-transition: none; + transition: none; + } +} +.page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} +.page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + -webkit-box-shadow: var(--bs-pagination-focus-box-shadow); + box-shadow: var(--bs-pagination-focus-box-shadow); +} +.page-link.active, .active > .page-link { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} +.page-link.disabled, .disabled > .page-link { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} + +.page-item:not(:first-child) .page-link { + margin-left: calc(var(--bs-border-width) * -1); +} +.page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} +.page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} + +.pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.09375rem; + --bs-pagination-border-radius: var(--bs-border-radius-lg); +} + +.pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.765625rem; + --bs-pagination-border-radius: var(--bs-border-radius-sm); +} + +.badge { + --bs-badge-padding-x: 8px; + --bs-badge-padding-y: 7px; + --bs-badge-font-size: 0.8125rem; + --bs-badge-font-weight: 500; + --bs-badge-color: #fff; + --bs-badge-border-radius: 4px; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} +.badge:empty { + display: none; +} + +.btn .badge { + position: relative; + top: -1px; +} + +.alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: var(--bs-border-width) solid var(--bs-alert-border-color); + --bs-alert-border-radius: var(--bs-border-radius); + --bs-alert-link-color: inherit; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} + +.alert-heading { + color: inherit; +} + +.alert-link { + font-weight: 600; + color: var(--bs-alert-link-color); +} + +.alert-dismissible { + padding-right: 3rem; +} +.alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} + +.alert-primary { + --bs-alert-color: var(--bs-primary-text-emphasis); + --bs-alert-bg: var(--bs-primary-bg-subtle); + --bs-alert-border-color: var(--bs-primary-border-subtle); + --bs-alert-link-color: var(--bs-primary-text-emphasis); +} + +.alert-secondary { + --bs-alert-color: var(--bs-secondary-text-emphasis); + --bs-alert-bg: var(--bs-secondary-bg-subtle); + --bs-alert-border-color: var(--bs-secondary-border-subtle); + --bs-alert-link-color: var(--bs-secondary-text-emphasis); +} + +.alert-success { + --bs-alert-color: var(--bs-success-text-emphasis); + --bs-alert-bg: var(--bs-success-bg-subtle); + --bs-alert-border-color: var(--bs-success-border-subtle); + --bs-alert-link-color: var(--bs-success-text-emphasis); +} + +.alert-inverse { + --bs-alert-color: var(--bs-inverse-text-emphasis); + --bs-alert-bg: var(--bs-inverse-bg-subtle); + --bs-alert-border-color: var(--bs-inverse-border-subtle); + --bs-alert-link-color: var(--bs-inverse-text-emphasis); +} + +.alert-info { + --bs-alert-color: var(--bs-info-text-emphasis); + --bs-alert-bg: var(--bs-info-bg-subtle); + --bs-alert-border-color: var(--bs-info-border-subtle); + --bs-alert-link-color: var(--bs-info-text-emphasis); +} + +.alert-warning { + --bs-alert-color: var(--bs-warning-text-emphasis); + --bs-alert-bg: var(--bs-warning-bg-subtle); + --bs-alert-border-color: var(--bs-warning-border-subtle); + --bs-alert-link-color: var(--bs-warning-text-emphasis); +} + +.alert-danger { + --bs-alert-color: var(--bs-danger-text-emphasis); + --bs-alert-bg: var(--bs-danger-bg-subtle); + --bs-alert-border-color: var(--bs-danger-border-subtle); + --bs-alert-link-color: var(--bs-danger-text-emphasis); +} + +.alert-light { + --bs-alert-color: var(--bs-light-text-emphasis); + --bs-alert-bg: var(--bs-light-bg-subtle); + --bs-alert-border-color: var(--bs-light-border-subtle); + --bs-alert-link-color: var(--bs-light-text-emphasis); +} + +.alert-dark { + --bs-alert-color: var(--bs-dark-text-emphasis); + --bs-alert-bg: var(--bs-dark-bg-subtle); + --bs-alert-border-color: var(--bs-dark-border-subtle); + --bs-alert-link-color: var(--bs-dark-text-emphasis); +} + +@-webkit-keyframes progress-bar-stripes { + 0% { + background-position-x: 3px; + } +} + +@keyframes progress-bar-stripes { + 0% { + background-position-x: 3px; + } +} +.progress, +.progress-stacked { + --bs-progress-height: 3px; + --bs-progress-font-size: 0.65625rem; + --bs-progress-bg: var(--bs-secondary-bg); + --bs-progress-border-radius: var(--bs-border-radius); + --bs-progress-box-shadow: var(--bs-box-shadow-inset); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #2952ff; + --bs-progress-bar-transition: width 0.6s ease; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); + -webkit-box-shadow: var(--bs-progress-box-shadow); + box-shadow: var(--bs-progress-box-shadow); +} + +.progress-bar { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + -webkit-transition: var(--bs-progress-bar-transition); + transition: var(--bs-progress-bar-transition); +} +@media (prefers-reduced-motion: reduce) { + .progress-bar { + -webkit-transition: none; + transition: none; + } +} + +.progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} + +.progress-stacked > .progress { + overflow: visible; +} + +.progress-stacked > .progress > .progress-bar { + width: 100%; +} + +.progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + +.list-group { + --bs-list-group-color: var(--bs-body-color); + --bs-list-group-bg: var(--bs-body-bg); + --bs-list-group-border-color: var(--bs-border-color); + --bs-list-group-border-width: var(--bs-border-width); + --bs-list-group-border-radius: var(--bs-border-radius); + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: var(--bs-secondary-color); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-tertiary-bg); + --bs-list-group-action-active-color: var(--bs-body-color); + --bs-list-group-action-active-bg: var(--bs-secondary-bg); + --bs-list-group-disabled-color: var(--bs-secondary-color); + --bs-list-group-disabled-bg: var(--bs-body-bg); + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #2952ff; + --bs-list-group-active-border-color: #2952ff; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} + +.list-group-numbered { + list-style-type: none; + counter-reset: section; +} +.list-group-numbered > .list-group-item::before { + content: counters(section, ".") ". "; + counter-increment: section; +} + +.list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} +.list-group-item-action:hover, .list-group-item-action:focus { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} +.list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} + +.list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); +} +.list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} +.list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} +.list-group-item.disabled, .list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} +.list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} +.list-group-item + .list-group-item { + border-top-width: 0; +} +.list-group-item + .list-group-item.active { + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); +} + +.list-group-horizontal { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; +} +.list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} +.list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} +.list-group-horizontal > .list-group-item.active { + margin-top: 0; +} +.list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} +.list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); +} + +@media (min-width: 576px) { + .list-group-horizontal-sm { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 768px) { + .list-group-horizontal-md { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 992px) { + .list-group-horizontal-lg { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 1200px) { + .list-group-horizontal-xl { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 1400px) { + .list-group-horizontal-xxl { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +.list-group-flush { + border-radius: 0; +} +.list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} +.list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} + +.list-group-item-primary { + --bs-list-group-color: var(--bs-primary-text-emphasis); + --bs-list-group-bg: var(--bs-primary-bg-subtle); + --bs-list-group-border-color: var(--bs-primary-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-primary-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-primary-border-subtle); + --bs-list-group-active-color: var(--bs-primary-bg-subtle); + --bs-list-group-active-bg: var(--bs-primary-text-emphasis); + --bs-list-group-active-border-color: var(--bs-primary-text-emphasis); +} + +.list-group-item-secondary { + --bs-list-group-color: var(--bs-secondary-text-emphasis); + --bs-list-group-bg: var(--bs-secondary-bg-subtle); + --bs-list-group-border-color: var(--bs-secondary-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-secondary-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-secondary-border-subtle); + --bs-list-group-active-color: var(--bs-secondary-bg-subtle); + --bs-list-group-active-bg: var(--bs-secondary-text-emphasis); + --bs-list-group-active-border-color: var(--bs-secondary-text-emphasis); +} + +.list-group-item-success { + --bs-list-group-color: var(--bs-success-text-emphasis); + --bs-list-group-bg: var(--bs-success-bg-subtle); + --bs-list-group-border-color: var(--bs-success-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-success-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-success-border-subtle); + --bs-list-group-active-color: var(--bs-success-bg-subtle); + --bs-list-group-active-bg: var(--bs-success-text-emphasis); + --bs-list-group-active-border-color: var(--bs-success-text-emphasis); +} + +.list-group-item-inverse { + --bs-list-group-color: var(--bs-inverse-text-emphasis); + --bs-list-group-bg: var(--bs-inverse-bg-subtle); + --bs-list-group-border-color: var(--bs-inverse-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-inverse-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-inverse-border-subtle); + --bs-list-group-active-color: var(--bs-inverse-bg-subtle); + --bs-list-group-active-bg: var(--bs-inverse-text-emphasis); + --bs-list-group-active-border-color: var(--bs-inverse-text-emphasis); +} + +.list-group-item-info { + --bs-list-group-color: var(--bs-info-text-emphasis); + --bs-list-group-bg: var(--bs-info-bg-subtle); + --bs-list-group-border-color: var(--bs-info-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-info-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-info-border-subtle); + --bs-list-group-active-color: var(--bs-info-bg-subtle); + --bs-list-group-active-bg: var(--bs-info-text-emphasis); + --bs-list-group-active-border-color: var(--bs-info-text-emphasis); +} + +.list-group-item-warning { + --bs-list-group-color: var(--bs-warning-text-emphasis); + --bs-list-group-bg: var(--bs-warning-bg-subtle); + --bs-list-group-border-color: var(--bs-warning-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-warning-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-warning-border-subtle); + --bs-list-group-active-color: var(--bs-warning-bg-subtle); + --bs-list-group-active-bg: var(--bs-warning-text-emphasis); + --bs-list-group-active-border-color: var(--bs-warning-text-emphasis); +} + +.list-group-item-danger { + --bs-list-group-color: var(--bs-danger-text-emphasis); + --bs-list-group-bg: var(--bs-danger-bg-subtle); + --bs-list-group-border-color: var(--bs-danger-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-danger-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-danger-border-subtle); + --bs-list-group-active-color: var(--bs-danger-bg-subtle); + --bs-list-group-active-bg: var(--bs-danger-text-emphasis); + --bs-list-group-active-border-color: var(--bs-danger-text-emphasis); +} + +.list-group-item-light { + --bs-list-group-color: var(--bs-light-text-emphasis); + --bs-list-group-bg: var(--bs-light-bg-subtle); + --bs-list-group-border-color: var(--bs-light-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-light-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-light-border-subtle); + --bs-list-group-active-color: var(--bs-light-bg-subtle); + --bs-list-group-active-bg: var(--bs-light-text-emphasis); + --bs-list-group-active-border-color: var(--bs-light-text-emphasis); +} + +.list-group-item-dark { + --bs-list-group-color: var(--bs-dark-text-emphasis); + --bs-list-group-bg: var(--bs-dark-bg-subtle); + --bs-list-group-border-color: var(--bs-dark-border-subtle); + --bs-list-group-action-hover-color: var(--bs-emphasis-color); + --bs-list-group-action-hover-bg: var(--bs-dark-border-subtle); + --bs-list-group-action-active-color: var(--bs-emphasis-color); + --bs-list-group-action-active-bg: var(--bs-dark-border-subtle); + --bs-list-group-active-color: var(--bs-dark-bg-subtle); + --bs-list-group-active-bg: var(--bs-dark-text-emphasis); + --bs-list-group-active-border-color: var(--bs-dark-text-emphasis); +} + +.btn-close { + --bs-btn-close-color: #000; + --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e"); + --bs-btn-close-opacity: 0.5; + --bs-btn-close-hover-opacity: 0.75; + --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(41, 82, 255, 0.25); + --bs-btn-close-focus-opacity: 1; + --bs-btn-close-disabled-opacity: 0.25; + --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%); + -webkit-box-sizing: content-box; + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: var(--bs-btn-close-color); + background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat; + border: 0; + border-radius: 0.25rem; + opacity: var(--bs-btn-close-opacity); +} +.btn-close:hover { + color: var(--bs-btn-close-color); + text-decoration: none; + opacity: var(--bs-btn-close-hover-opacity); +} +.btn-close:focus { + outline: 0; + -webkit-box-shadow: var(--bs-btn-close-focus-shadow); + box-shadow: var(--bs-btn-close-focus-shadow); + opacity: var(--bs-btn-close-focus-opacity); +} +.btn-close:disabled, .btn-close.disabled { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + opacity: var(--bs-btn-close-disabled-opacity); +} + +.btn-close-white { + -webkit-filter: var(--bs-btn-close-white-filter); + filter: var(--bs-btn-close-white-filter); +} + +[data-bs-theme=dark] .btn-close { + -webkit-filter: var(--bs-btn-close-white-filter); + filter: var(--bs-btn-close-white-filter); +} + +.toast { + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 30px; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-color: ; + --bs-toast-bg: rgba(var(--bs-body-bg-rgb), 0.85); + --bs-toast-border-width: var(--bs-border-width); + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: var(--bs-border-radius); + --bs-toast-box-shadow: var(--bs-box-shadow); + --bs-toast-header-color: var(--bs-secondary-color); + --bs-toast-header-bg: rgba(var(--bs-body-bg-rgb), 0.85); + --bs-toast-header-border-color: var(--bs-border-color-translucent); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + -webkit-box-shadow: var(--bs-toast-box-shadow); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} +.toast.showing { + opacity: 0; +} +.toast:not(.show) { + display: none; +} + +.toast-container { + --bs-toast-zindex: 1090; + position: absolute; + z-index: var(--bs-toast-zindex); + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 100%; + pointer-events: none; +} +.toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} + +.toast-header { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); + border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); + border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); +} +.toast-header .btn-close { + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); +} + +.toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} + +.modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-color: ; + --bs-modal-bg: var(--bs-body-bg); + --bs-modal-border-color: var(--bs-border-color-translucent); + --bs-modal-border-width: 0; + --bs-modal-border-radius: 1.125rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: 1.125rem; + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: var(--bs-border-color); + --bs-modal-header-border-width: 0; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-bg: ; + --bs-modal-footer-border-color: var(--bs-border-color); + --bs-modal-footer-border-width: 0; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} + +.modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform 0.3s ease-out; + transition: -webkit-transform 0.3s ease-out; + transition: transform 0.3s ease-out; + transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out; + -webkit-transform: translate(0, -50px); + transform: translate(0, -50px); +} +@media (prefers-reduced-motion: reduce) { + .modal.fade .modal-dialog { + -webkit-transition: none; + transition: none; + } +} +.modal.show .modal-dialog { + -webkit-transform: none; + transform: none; +} +.modal.modal-static .modal-dialog { + -webkit-transform: scale(1.02); + transform: scale(1.02); +} + +.modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} +.modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} +.modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + +.modal-dialog-centered { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} + +.modal-content { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + -webkit-box-shadow: var(--bs-modal-box-shadow); + box-shadow: var(--bs-modal-box-shadow); + outline: 0; +} + +.modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} + +.modal-header { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-negative: 0; + flex-shrink: 0; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} +.modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto; +} + +.modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} + +.modal-body { + position: relative; + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} + +.modal-footer { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-negative: 0; + flex-shrink: 0; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} +.modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} + +@media (min-width: 576px) { + .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + .modal-sm { + --bs-modal-width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg, + .modal-xl { + --bs-modal-width: 800px; + } +} +@media (min-width: 1200px) { + .modal-xl { + --bs-modal-width: 1140px; + } +} +.modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} +.modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} +.modal-fullscreen .modal-header, +.modal-fullscreen .modal-footer { + border-radius: 0; +} +.modal-fullscreen .modal-body { + overflow-y: auto; +} + +@media (max-width: 575.98px) { + .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-sm-down .modal-header, + .modal-fullscreen-sm-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 767.98px) { + .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-md-down .modal-header, + .modal-fullscreen-md-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 991.98px) { + .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-lg-down .modal-header, + .modal-fullscreen-lg-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 1199.98px) { + .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-xl-down .modal-header, + .modal-fullscreen-xl-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 1399.98px) { + .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-xxl-down .modal-header, + .modal-fullscreen-xxl-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} +.tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-margin: ; + --bs-tooltip-font-size: 0.765625rem; + --bs-tooltip-color: var(--bs-body-bg); + --bs-tooltip-bg: var(--bs-emphasis-color); + --bs-tooltip-border-radius: var(--bs-border-radius); + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} +.tooltip.show { + opacity: var(--bs-tooltip-opacity); +} +.tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} +.tooltip .tooltip-arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bs-tooltip-top .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { + bottom: calc(-1 * var(--bs-tooltip-arrow-height)); +} +.bs-tooltip-top .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} + +/* rtl:begin:ignore */ +.bs-tooltip-end .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { + left: calc(-1 * var(--bs-tooltip-arrow-height)); + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} +.bs-tooltip-end .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} + +/* rtl:end:ignore */ +.bs-tooltip-bottom .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { + top: calc(-1 * var(--bs-tooltip-arrow-height)); +} +.bs-tooltip-bottom .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} + +/* rtl:begin:ignore */ +.bs-tooltip-start .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { + right: calc(-1 * var(--bs-tooltip-arrow-height)); + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} +.bs-tooltip-start .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} + +/* rtl:end:ignore */ +.tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} + +.popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.765625rem; + --bs-popover-bg: var(--bs-body-bg); + --bs-popover-border-width: var(--bs-border-width); + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: var(--bs-border-radius-lg); + --bs-popover-inner-border-radius: calc(var(--bs-border-radius-lg) - var(--bs-border-width)); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 0.875rem; + --bs-popover-header-color: #3a4752; + --bs-popover-header-bg: var(--bs-secondary-bg); + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: var(--bs-body-color); + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); + -webkit-box-shadow: var(--bs-popover-box-shadow); + box-shadow: var(--bs-popover-box-shadow); +} +.popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} +.popover .popover-arrow::before, .popover .popover-arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + border-width: 0; +} + +.bs-popover-top > .popover-arrow, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { + bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} +.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} +.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} +.bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} + +/* rtl:begin:ignore */ +.bs-popover-end > .popover-arrow, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { + left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before, .bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} +.bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} +.bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} + +/* rtl:end:ignore */ +.bs-popover-bottom > .popover-arrow, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { + top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} +.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} +.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} +.bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} +.bs-popover-bottom .popover-header::before, .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); + content: ""; + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); +} + +/* rtl:begin:ignore */ +.bs-popover-start > .popover-arrow, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { + right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before, .bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} +.bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} +.bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} + +/* rtl:end:ignore */ +.popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} +.popover-header:empty { + display: none; +} + +.popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} + +.carousel { + position: relative; +} + +.carousel.pointer-event { + -ms-touch-action: pan-y; + touch-action: pan-y; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner::after { + display: block; + clear: both; + content: ""; +} + +.carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.6s ease-in-out; + transition: -webkit-transform 0.6s ease-in-out; + transition: transform 0.6s ease-in-out; + transition: transform 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .carousel-item { + -webkit-transition: none; + transition: none; + } +} + +.carousel-item.active, +.carousel-item-next, +.carousel-item-prev { + display: block; +} + +.carousel-item-next:not(.carousel-item-start), +.active.carousel-item-end { + -webkit-transform: translateX(100%); + transform: translateX(100%); +} + +.carousel-item-prev:not(.carousel-item-end), +.active.carousel-item-start { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} + +.carousel-fade .carousel-item { + opacity: 0; + -webkit-transition-property: opacity; + transition-property: opacity; + -webkit-transform: none; + transform: none; +} +.carousel-fade .carousel-item.active, +.carousel-fade .carousel-item-next.carousel-item-start, +.carousel-fade .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; +} +.carousel-fade .active.carousel-item-start, +.carousel-fade .active.carousel-item-end { + z-index: 0; + opacity: 0; + -webkit-transition: opacity 0s 0.6s; + transition: opacity 0s 0.6s; +} +@media (prefers-reduced-motion: reduce) { + .carousel-fade .active.carousel-item-start, + .carousel-fade .active.carousel-item-end { + -webkit-transition: none; + transition: none; + } +} + +.carousel-control-prev, +.carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: none; + border: 0; + opacity: 0.5; + -webkit-transition: opacity 0.15s ease; + transition: opacity 0.15s ease; +} +@media (prefers-reduced-motion: reduce) { + .carousel-control-prev, + .carousel-control-next { + -webkit-transition: none; + transition: none; + } +} +.carousel-control-prev:hover, .carousel-control-prev:focus, +.carousel-control-next:hover, +.carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} + +.carousel-control-prev { + left: 0; +} + +.carousel-control-next { + right: 0; +} + +.carousel-control-prev-icon, +.carousel-control-next-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +/* rtl:options: { + "autoRename": true, + "stringMap":[ { + "name" : "prev-next", + "search" : "prev", + "replace" : "next" + } ] +} */ +.carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} + +.carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; +} +.carousel-indicators [data-bs-target] { + -webkit-box-sizing: content-box; + box-sizing: content-box; + -webkit-box-flex: 0; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + -webkit-transition: opacity 0.6s ease; + transition: opacity 0.6s ease; +} +@media (prefers-reduced-motion: reduce) { + .carousel-indicators [data-bs-target] { + -webkit-transition: none; + transition: none; + } +} +.carousel-indicators .active { + opacity: 1; +} + +.carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} + +.carousel-dark .carousel-control-prev-icon, +.carousel-dark .carousel-control-next-icon { + -webkit-filter: invert(1) grayscale(100); + filter: invert(1) grayscale(100); +} +.carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} +.carousel-dark .carousel-caption { + color: #000; +} + +[data-bs-theme=dark] .carousel .carousel-control-prev-icon, +[data-bs-theme=dark] .carousel .carousel-control-next-icon, [data-bs-theme=dark].carousel .carousel-control-prev-icon, +[data-bs-theme=dark].carousel .carousel-control-next-icon { + -webkit-filter: invert(1) grayscale(100); + filter: invert(1) grayscale(100); +} +[data-bs-theme=dark] .carousel .carousel-indicators [data-bs-target], [data-bs-theme=dark].carousel .carousel-indicators [data-bs-target] { + background-color: #000; +} +[data-bs-theme=dark] .carousel .carousel-caption, [data-bs-theme=dark].carousel .carousel-caption { + color: #000; +} + +.spinner-grow, +.spinner-border { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + -webkit-animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); + animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); +} + +@-webkit-keyframes spinner-border { + to { + -webkit-transform: rotate(360deg) /* rtl:ignore */; + transform: rotate(360deg) /* rtl:ignore */; + } +} + +@keyframes spinner-border { + to { + -webkit-transform: rotate(360deg) /* rtl:ignore */; + transform: rotate(360deg) /* rtl:ignore */; + } +} +.spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} + +.spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} + +@-webkit-keyframes spinner-grow { + 0% { + -webkit-transform: scale(0); + transform: scale(0); + } + 50% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes spinner-grow { + 0% { + -webkit-transform: scale(0); + transform: scale(0); + } + 50% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +.spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} + +.spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} + +@media (prefers-reduced-motion: reduce) { + .spinner-border, + .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} +.offcanvas, .offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-color: var(--bs-body-color); + --bs-offcanvas-bg: var(--bs-body-bg); + --bs-offcanvas-border-width: 0; + --bs-offcanvas-border-color: var(--bs-border-color-translucent); + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-offcanvas-transition: transform 0.3s ease-in-out; + --bs-offcanvas-title-line-height: 1.5; +} + +@media (max-width: 575.98px) { + .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + -webkit-box-shadow: var(--bs-offcanvas-box-shadow); + box-shadow: var(--bs-offcanvas-box-shadow); + -webkit-transition: var(--bs-offcanvas-transition); + transition: var(--bs-offcanvas-transition); + } +} +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-sm { + -webkit-transition: none; + transition: none; + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } + .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(100%); + transform: translateX(100%); + } + .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } + .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + .offcanvas-sm.showing, .offcanvas-sm.show:not(.hiding) { + -webkit-transform: none; + transform: none; + } + .offcanvas-sm.showing, .offcanvas-sm.hiding, .offcanvas-sm.show { + visibility: visible; + } +} +@media (min-width: 576px) { + .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-sm .offcanvas-header { + display: none; + } + .offcanvas-sm .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 767.98px) { + .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + -webkit-box-shadow: var(--bs-offcanvas-box-shadow); + box-shadow: var(--bs-offcanvas-box-shadow); + -webkit-transition: var(--bs-offcanvas-transition); + transition: var(--bs-offcanvas-transition); + } +} +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-md { + -webkit-transition: none; + transition: none; + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } + .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(100%); + transform: translateX(100%); + } + .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } + .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + .offcanvas-md.showing, .offcanvas-md.show:not(.hiding) { + -webkit-transform: none; + transform: none; + } + .offcanvas-md.showing, .offcanvas-md.hiding, .offcanvas-md.show { + visibility: visible; + } +} +@media (min-width: 768px) { + .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-md .offcanvas-header { + display: none; + } + .offcanvas-md .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 991.98px) { + .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + -webkit-box-shadow: var(--bs-offcanvas-box-shadow); + box-shadow: var(--bs-offcanvas-box-shadow); + -webkit-transition: var(--bs-offcanvas-transition); + transition: var(--bs-offcanvas-transition); + } +} +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-lg { + -webkit-transition: none; + transition: none; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } + .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(100%); + transform: translateX(100%); + } + .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } + .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + .offcanvas-lg.showing, .offcanvas-lg.show:not(.hiding) { + -webkit-transform: none; + transform: none; + } + .offcanvas-lg.showing, .offcanvas-lg.hiding, .offcanvas-lg.show { + visibility: visible; + } +} +@media (min-width: 992px) { + .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-lg .offcanvas-header { + display: none; + } + .offcanvas-lg .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1199.98px) { + .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + -webkit-box-shadow: var(--bs-offcanvas-box-shadow); + box-shadow: var(--bs-offcanvas-box-shadow); + -webkit-transition: var(--bs-offcanvas-transition); + transition: var(--bs-offcanvas-transition); + } +} +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xl { + -webkit-transition: none; + transition: none; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } + .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(100%); + transform: translateX(100%); + } + .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } + .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + .offcanvas-xl.showing, .offcanvas-xl.show:not(.hiding) { + -webkit-transform: none; + transform: none; + } + .offcanvas-xl.showing, .offcanvas-xl.hiding, .offcanvas-xl.show { + visibility: visible; + } +} +@media (min-width: 1200px) { + .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xl .offcanvas-header { + display: none; + } + .offcanvas-xl .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1399.98px) { + .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + -webkit-box-shadow: var(--bs-offcanvas-box-shadow); + box-shadow: var(--bs-offcanvas-box-shadow); + -webkit-transition: var(--bs-offcanvas-transition); + transition: var(--bs-offcanvas-transition); + } +} +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xxl { + -webkit-transition: none; + transition: none; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } + .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(100%); + transform: translateX(100%); + } + .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } + .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + .offcanvas-xxl.showing, .offcanvas-xxl.show:not(.hiding) { + -webkit-transform: none; + transform: none; + } + .offcanvas-xxl.showing, .offcanvas-xxl.hiding, .offcanvas-xxl.show { + visibility: visible; + } +} +@media (min-width: 1400px) { + .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xxl .offcanvas-header { + display: none; + } + .offcanvas-xxl .offcanvas-body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +.offcanvas { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + -webkit-box-shadow: var(--bs-offcanvas-box-shadow); + box-shadow: var(--bs-offcanvas-box-shadow); + -webkit-transition: var(--bs-offcanvas-transition); + transition: var(--bs-offcanvas-transition); +} +@media (prefers-reduced-motion: reduce) { + .offcanvas { + -webkit-transition: none; + transition: none; + } +} +.offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} +.offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateX(100%); + transform: translateX(100%); +} +.offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); +} +.offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + -webkit-transform: translateY(100%); + transform: translateY(100%); +} +.offcanvas.showing, .offcanvas.show:not(.hiding) { + -webkit-transform: none; + transform: none; +} +.offcanvas.showing, .offcanvas.hiding, .offcanvas.show { + visibility: visible; +} + +.offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} +.offcanvas-backdrop.fade { + opacity: 0; +} +.offcanvas-backdrop.show { + opacity: 0.5; +} + +.offcanvas-header { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} +.offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); +} + +.offcanvas-title { + margin-bottom: 0; + line-height: var(--bs-offcanvas-title-line-height); +} + +.offcanvas-body { + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} + +.placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} +.placeholder.btn::before { + display: inline-block; + content: ""; +} + +.placeholder-xs { + min-height: 0.6em; +} + +.placeholder-sm { + min-height: 0.8em; +} + +.placeholder-lg { + min-height: 1.2em; +} + +.placeholder-glow .placeholder { + -webkit-animation: placeholder-glow 2s ease-in-out infinite; + animation: placeholder-glow 2s ease-in-out infinite; +} + +@-webkit-keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} +.placeholder-wave { + -webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + -webkit-mask-size: 200% 100%; + mask-size: 200% 100%; + -webkit-animation: placeholder-wave 2s linear infinite; + animation: placeholder-wave 2s linear infinite; +} + +@-webkit-keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +@keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} +.clearfix::after { + display: block; + clear: both; + content: ""; +} + +.text-bg-primary { + color: #fff !important; + background-color: RGBA(41, 82, 255, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-secondary { + color: #000 !important; + background-color: RGBA(116, 219, 247, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-success { + color: #fff !important; + background-color: RGBA(133, 212, 70, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-inverse { + color: #fff !important; + background-color: RGBA(58, 71, 82, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-info { + color: #fff !important; + background-color: RGBA(116, 90, 242, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-warning { + color: #000 !important; + background-color: RGBA(242, 209, 90, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-danger { + color: #fff !important; + background-color: RGBA(242, 90, 90, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-light { + color: #000 !important; + background-color: RGBA(246, 248, 250, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-dark { + color: #fff !important; + background-color: RGBA(58, 71, 82, var(--bs-bg-opacity, 1)) !important; +} + +.link-primary { + color: RGBA(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-primary:hover, .link-primary:focus { + color: RGBA(33, 66, 204, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(33, 66, 204, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-secondary { + color: RGBA(var(--bs-secondary-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-secondary-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-secondary:hover, .link-secondary:focus { + color: RGBA(144, 226, 249, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(144, 226, 249, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-success { + color: RGBA(var(--bs-success-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-success-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-success:hover, .link-success:focus { + color: RGBA(106, 170, 56, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(106, 170, 56, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-inverse { + color: RGBA(var(--bs-inverse-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-inverse-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-inverse:hover, .link-inverse:focus { + color: RGBA(46, 57, 66, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(46, 57, 66, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-info { + color: RGBA(var(--bs-info-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-info-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-info:hover, .link-info:focus { + color: RGBA(93, 72, 194, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(93, 72, 194, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-warning { + color: RGBA(var(--bs-warning-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-warning-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-warning:hover, .link-warning:focus { + color: RGBA(245, 218, 123, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(245, 218, 123, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-danger { + color: RGBA(var(--bs-danger-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-danger-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-danger:hover, .link-danger:focus { + color: RGBA(194, 72, 72, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(194, 72, 72, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-light { + color: RGBA(var(--bs-light-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-light-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-light:hover, .link-light:focus { + color: RGBA(248, 249, 251, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(248, 249, 251, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-dark { + color: RGBA(var(--bs-dark-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-dark-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-dark:hover, .link-dark:focus { + color: RGBA(46, 57, 66, var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(46, 57, 66, var(--bs-link-underline-opacity, 1)) !important; +} + +.link-body-emphasis { + color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 1)) !important; + text-decoration-color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 1)) !important; +} +.link-body-emphasis:hover, .link-body-emphasis:focus { + color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 0.75)) !important; + text-decoration-color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 0.75)) !important; +} + +.focus-ring:focus { + outline: 0; + -webkit-box-shadow: var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0) var(--bs-focus-ring-width) var(--bs-focus-ring-color); + box-shadow: var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0) var(--bs-focus-ring-width) var(--bs-focus-ring-color); +} + +.icon-link { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + gap: 0.375rem; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5)); + text-underline-offset: 0.25em; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.icon-link > .bi { + -ms-flex-negative: 0; + flex-shrink: 0; + width: 1em; + height: 1em; + fill: currentcolor; + -webkit-transition: 0.2s ease-in-out transform; + transition: 0.2s ease-in-out transform; +} +@media (prefers-reduced-motion: reduce) { + .icon-link > .bi { + -webkit-transition: none; + transition: none; + } +} + +.icon-link-hover:hover > .bi, .icon-link-hover:focus-visible > .bi { + -webkit-transform: var(--bs-icon-link-transform, translate3d(0.25em, 0, 0)); + transform: var(--bs-icon-link-transform, translate3d(0.25em, 0, 0)); +} + +.ratio { + position: relative; + width: 100%; +} +.ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ""; +} +.ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.ratio-1x1 { + --bs-aspect-ratio: 100%; +} + +.ratio-4x3 { + --bs-aspect-ratio: 75%; +} + +.ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} + +.ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} + +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +.sticky-top { + position: sticky; + top: 0; + z-index: 1020; +} + +.sticky-bottom { + position: sticky; + bottom: 0; + z-index: 1020; +} + +@media (min-width: 576px) { + .sticky-sm-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-sm-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 768px) { + .sticky-md-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-md-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 992px) { + .sticky-lg-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-lg-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 1200px) { + .sticky-xl-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-xl-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 1400px) { + .sticky-xxl-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-xxl-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +.hstack { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-item-align: stretch; + -ms-grid-row-align: stretch; + align-self: stretch; +} + +.vstack { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-item-align: stretch; + -ms-grid-row-align: stretch; + align-self: stretch; +} + +.visually-hidden, +.visually-hidden-focusable:not(:focus):not(:focus-within) { + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} +.visually-hidden:not(caption), +.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption) { + position: absolute !important; +} + +.stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ""; +} + +.text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.vr { + display: inline-block; + -ms-flex-item-align: stretch; + -ms-grid-row-align: stretch; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} + +.align-baseline { + vertical-align: baseline !important; +} + +.align-top { + vertical-align: top !important; +} + +.align-middle { + vertical-align: middle !important; +} + +.align-bottom { + vertical-align: bottom !important; +} + +.align-text-bottom { + vertical-align: text-bottom !important; +} + +.align-text-top { + vertical-align: text-top !important; +} + +.float-start { + float: left !important; +} + +.float-end { + float: right !important; +} + +.float-none { + float: none !important; +} + +.object-fit-contain { + -o-object-fit: contain !important; + object-fit: contain !important; +} + +.object-fit-cover { + -o-object-fit: cover !important; + object-fit: cover !important; +} + +.object-fit-fill { + -o-object-fit: fill !important; + object-fit: fill !important; +} + +.object-fit-scale { + -o-object-fit: scale-down !important; + object-fit: scale-down !important; +} + +.object-fit-none { + -o-object-fit: none !important; + object-fit: none !important; +} + +.opacity-0 { + opacity: 0 !important; +} + +.opacity-25 { + opacity: 0.25 !important; +} + +.opacity-50 { + opacity: 0.5 !important; +} + +.opacity-75 { + opacity: 0.75 !important; +} + +.opacity-100 { + opacity: 1 !important; +} + +.overflow-auto { + overflow: auto !important; +} + +.overflow-hidden { + overflow: hidden !important; +} + +.overflow-visible { + overflow: visible !important; +} + +.overflow-scroll { + overflow: scroll !important; +} + +.overflow-x-auto { + overflow-x: auto !important; +} + +.overflow-x-hidden { + overflow-x: hidden !important; +} + +.overflow-x-visible { + overflow-x: visible !important; +} + +.overflow-x-scroll { + overflow-x: scroll !important; +} + +.overflow-y-auto { + overflow-y: auto !important; +} + +.overflow-y-hidden { + overflow-y: hidden !important; +} + +.overflow-y-visible { + overflow-y: visible !important; +} + +.overflow-y-scroll { + overflow-y: scroll !important; +} + +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: -ms-grid !important; + display: grid !important; +} + +.d-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; +} + +.d-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.shadow { + -webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.shadow-sm { + -webkit-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.shadow-lg { + -webkit-box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.shadow-none { + -webkit-box-shadow: none !important; + box-shadow: none !important; +} + +.focus-ring-primary { + --bs-focus-ring-color: rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-secondary { + --bs-focus-ring-color: rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-success { + --bs-focus-ring-color: rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-inverse { + --bs-focus-ring-color: rgba(var(--bs-inverse-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-info { + --bs-focus-ring-color: rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-warning { + --bs-focus-ring-color: rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-danger { + --bs-focus-ring-color: rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-light { + --bs-focus-ring-color: rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity)); +} + +.focus-ring-dark { + --bs-focus-ring-color: rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity)); +} + +.position-static { + position: static !important; +} + +.position-relative { + position: relative !important; +} + +.position-absolute { + position: absolute !important; +} + +.position-fixed { + position: fixed !important; +} + +.position-sticky { + position: sticky !important; +} + +.top-0 { + top: 0 !important; +} + +.top-50 { + top: 50% !important; +} + +.top-100 { + top: 100% !important; +} + +.bottom-0 { + bottom: 0 !important; +} + +.bottom-50 { + bottom: 50% !important; +} + +.bottom-100 { + bottom: 100% !important; +} + +.start-0 { + left: 0 !important; +} + +.start-50 { + left: 50% !important; +} + +.start-100 { + left: 100% !important; +} + +.end-0 { + right: 0 !important; +} + +.end-50 { + right: 50% !important; +} + +.end-100 { + right: 100% !important; +} + +.translate-middle { + -webkit-transform: translate(-50%, -50%) !important; + transform: translate(-50%, -50%) !important; +} + +.translate-middle-x { + -webkit-transform: translateX(-50%) !important; + transform: translateX(-50%) !important; +} + +.translate-middle-y { + -webkit-transform: translateY(-50%) !important; + transform: translateY(-50%) !important; +} + +.border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-0 { + border: 0 !important; +} + +.border-top { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-top-0 { + border-top: 0 !important; +} + +.border-end { + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-end-0 { + border-right: 0 !important; +} + +.border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-bottom-0 { + border-bottom: 0 !important; +} + +.border-start { + border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-start-0 { + border-left: 0 !important; +} + +.border-primary { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-primary-rgb), var(--bs-border-opacity)) !important; +} + +.border-secondary { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-secondary-rgb), var(--bs-border-opacity)) !important; +} + +.border-success { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-success-rgb), var(--bs-border-opacity)) !important; +} + +.border-inverse { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-inverse-rgb), var(--bs-border-opacity)) !important; +} + +.border-info { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-info-rgb), var(--bs-border-opacity)) !important; +} + +.border-warning { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-warning-rgb), var(--bs-border-opacity)) !important; +} + +.border-danger { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-danger-rgb), var(--bs-border-opacity)) !important; +} + +.border-light { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-light-rgb), var(--bs-border-opacity)) !important; +} + +.border-dark { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important; +} + +.border-black { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-black-rgb), var(--bs-border-opacity)) !important; +} + +.border-white { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-white-rgb), var(--bs-border-opacity)) !important; +} + +.border-primary-subtle { + border-color: var(--bs-primary-border-subtle) !important; +} + +.border-secondary-subtle { + border-color: var(--bs-secondary-border-subtle) !important; +} + +.border-success-subtle { + border-color: var(--bs-success-border-subtle) !important; +} + +.border-info-subtle { + border-color: var(--bs-info-border-subtle) !important; +} + +.border-warning-subtle { + border-color: var(--bs-warning-border-subtle) !important; +} + +.border-danger-subtle { + border-color: var(--bs-danger-border-subtle) !important; +} + +.border-light-subtle { + border-color: var(--bs-light-border-subtle) !important; +} + +.border-dark-subtle { + border-color: var(--bs-dark-border-subtle) !important; +} + +.border-1 { + border-width: 1px !important; +} + +.border-2 { + border-width: 2px !important; +} + +.border-3 { + border-width: 3px !important; +} + +.border-4 { + border-width: 4px !important; +} + +.border-5 { + border-width: 5px !important; +} + +.border-opacity-10 { + --bs-border-opacity: 0.1; +} + +.border-opacity-25 { + --bs-border-opacity: 0.25; +} + +.border-opacity-50 { + --bs-border-opacity: 0.5; +} + +.border-opacity-75 { + --bs-border-opacity: 0.75; +} + +.border-opacity-100 { + --bs-border-opacity: 1; +} + +.w-25 { + width: 25% !important; +} + +.w-50 { + width: 50% !important; +} + +.w-75 { + width: 75% !important; +} + +.w-100 { + width: 100% !important; +} + +.w-auto { + width: auto !important; +} + +.mw-100 { + max-width: 100% !important; +} + +.vw-100 { + width: 100vw !important; +} + +.min-vw-100 { + min-width: 100vw !important; +} + +.h-25 { + height: 25% !important; +} + +.h-50 { + height: 50% !important; +} + +.h-75 { + height: 75% !important; +} + +.h-100 { + height: 100% !important; +} + +.h-auto { + height: auto !important; +} + +.mh-100 { + max-height: 100% !important; +} + +.vh-100 { + height: 100vh !important; +} + +.min-vh-100 { + min-height: 100vh !important; +} + +.flex-fill { + -webkit-box-flex: 1 !important; + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; +} + +.flex-row { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: row !important; + flex-direction: row !important; +} + +.flex-column { + -webkit-box-orient: vertical !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: column !important; + flex-direction: column !important; +} + +.flex-row-reverse { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + -webkit-box-orient: vertical !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + -webkit-box-flex: 0 !important; + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; +} + +.flex-grow-1 { + -webkit-box-flex: 1 !important; + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; +} + +.flex-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; +} + +.flex-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; +} + +.flex-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + -webkit-box-pack: start !important; + -ms-flex-pack: start !important; + justify-content: flex-start !important; +} + +.justify-content-end { + -webkit-box-pack: end !important; + -ms-flex-pack: end !important; + justify-content: flex-end !important; +} + +.justify-content-center { + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; +} + +.justify-content-between { + -webkit-box-pack: justify !important; + -ms-flex-pack: justify !important; + justify-content: space-between !important; +} + +.justify-content-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; +} + +.justify-content-evenly { + -webkit-box-pack: space-evenly !important; + -ms-flex-pack: space-evenly !important; + justify-content: space-evenly !important; +} + +.align-items-start { + -webkit-box-align: start !important; + -ms-flex-align: start !important; + align-items: flex-start !important; +} + +.align-items-end { + -webkit-box-align: end !important; + -ms-flex-align: end !important; + align-items: flex-end !important; +} + +.align-items-center { + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; +} + +.align-items-baseline { + -webkit-box-align: baseline !important; + -ms-flex-align: baseline !important; + align-items: baseline !important; +} + +.align-items-stretch { + -webkit-box-align: stretch !important; + -ms-flex-align: stretch !important; + align-items: stretch !important; +} + +.align-content-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; +} + +.align-content-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; +} + +.align-content-center { + -ms-flex-line-pack: center !important; + align-content: center !important; +} + +.align-content-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; +} + +.align-content-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; +} + +.align-content-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; +} + +.align-self-auto { + -ms-flex-item-align: auto !important; + -ms-grid-row-align: auto !important; + align-self: auto !important; +} + +.align-self-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; +} + +.align-self-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; +} + +.align-self-center { + -ms-flex-item-align: center !important; + -ms-grid-row-align: center !important; + align-self: center !important; +} + +.align-self-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; +} + +.align-self-stretch { + -ms-flex-item-align: stretch !important; + -ms-grid-row-align: stretch !important; + align-self: stretch !important; +} + +.order-first { + -webkit-box-ordinal-group: 0 !important; + -ms-flex-order: -1 !important; + order: -1 !important; +} + +.order-0 { + -webkit-box-ordinal-group: 1 !important; + -ms-flex-order: 0 !important; + order: 0 !important; +} + +.order-1 { + -webkit-box-ordinal-group: 2 !important; + -ms-flex-order: 1 !important; + order: 1 !important; +} + +.order-2 { + -webkit-box-ordinal-group: 3 !important; + -ms-flex-order: 2 !important; + order: 2 !important; +} + +.order-3 { + -webkit-box-ordinal-group: 4 !important; + -ms-flex-order: 3 !important; + order: 3 !important; +} + +.order-4 { + -webkit-box-ordinal-group: 5 !important; + -ms-flex-order: 4 !important; + order: 4 !important; +} + +.order-5 { + -webkit-box-ordinal-group: 6 !important; + -ms-flex-order: 5 !important; + order: 5 !important; +} + +.order-last { + -webkit-box-ordinal-group: 7 !important; + -ms-flex-order: 6 !important; + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-6 { + margin: 12px !important; +} + +.m-7 { + margin: 30px !important; +} + +.m-8 { + margin: 10px !important; +} + +.m-9 { + margin: 20px !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.mx-6 { + margin-right: 12px !important; + margin-left: 12px !important; +} + +.mx-7 { + margin-right: 30px !important; + margin-left: 30px !important; +} + +.mx-8 { + margin-right: 10px !important; + margin-left: 10px !important; +} + +.mx-9 { + margin-right: 20px !important; + margin-left: 20px !important; +} + +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-6 { + margin-top: 12px !important; + margin-bottom: 12px !important; +} + +.my-7 { + margin-top: 30px !important; + margin-bottom: 30px !important; +} + +.my-8 { + margin-top: 10px !important; + margin-bottom: 10px !important; +} + +.my-9 { + margin-top: 20px !important; + margin-bottom: 20px !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-6 { + margin-top: 12px !important; +} + +.mt-7 { + margin-top: 30px !important; +} + +.mt-8 { + margin-top: 10px !important; +} + +.mt-9 { + margin-top: 20px !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-right: 0 !important; +} + +.me-1 { + margin-right: 0.25rem !important; +} + +.me-2 { + margin-right: 0.5rem !important; +} + +.me-3 { + margin-right: 1rem !important; +} + +.me-4 { + margin-right: 1.5rem !important; +} + +.me-5 { + margin-right: 3rem !important; +} + +.me-6 { + margin-right: 12px !important; +} + +.me-7 { + margin-right: 30px !important; +} + +.me-8 { + margin-right: 10px !important; +} + +.me-9 { + margin-right: 20px !important; +} + +.me-auto { + margin-right: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-6 { + margin-bottom: 12px !important; +} + +.mb-7 { + margin-bottom: 30px !important; +} + +.mb-8 { + margin-bottom: 10px !important; +} + +.mb-9 { + margin-bottom: 20px !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-left: 0 !important; +} + +.ms-1 { + margin-left: 0.25rem !important; +} + +.ms-2 { + margin-left: 0.5rem !important; +} + +.ms-3 { + margin-left: 1rem !important; +} + +.ms-4 { + margin-left: 1.5rem !important; +} + +.ms-5 { + margin-left: 3rem !important; +} + +.ms-6 { + margin-left: 12px !important; +} + +.ms-7 { + margin-left: 30px !important; +} + +.ms-8 { + margin-left: 10px !important; +} + +.ms-9 { + margin-left: 20px !important; +} + +.ms-auto { + margin-left: auto !important; +} + +.m-n1 { + margin: -0.25rem !important; +} + +.m-n2 { + margin: -0.5rem !important; +} + +.m-n3 { + margin: -1rem !important; +} + +.m-n4 { + margin: -1.5rem !important; +} + +.m-n5 { + margin: -3rem !important; +} + +.m-n6 { + margin: -12px !important; +} + +.m-n7 { + margin: -30px !important; +} + +.m-n8 { + margin: -10px !important; +} + +.m-n9 { + margin: -20px !important; +} + +.mx-n1 { + margin-right: -0.25rem !important; + margin-left: -0.25rem !important; +} + +.mx-n2 { + margin-right: -0.5rem !important; + margin-left: -0.5rem !important; +} + +.mx-n3 { + margin-right: -1rem !important; + margin-left: -1rem !important; +} + +.mx-n4 { + margin-right: -1.5rem !important; + margin-left: -1.5rem !important; +} + +.mx-n5 { + margin-right: -3rem !important; + margin-left: -3rem !important; +} + +.mx-n6 { + margin-right: -12px !important; + margin-left: -12px !important; +} + +.mx-n7 { + margin-right: -30px !important; + margin-left: -30px !important; +} + +.mx-n8 { + margin-right: -10px !important; + margin-left: -10px !important; +} + +.mx-n9 { + margin-right: -20px !important; + margin-left: -20px !important; +} + +.my-n1 { + margin-top: -0.25rem !important; + margin-bottom: -0.25rem !important; +} + +.my-n2 { + margin-top: -0.5rem !important; + margin-bottom: -0.5rem !important; +} + +.my-n3 { + margin-top: -1rem !important; + margin-bottom: -1rem !important; +} + +.my-n4 { + margin-top: -1.5rem !important; + margin-bottom: -1.5rem !important; +} + +.my-n5 { + margin-top: -3rem !important; + margin-bottom: -3rem !important; +} + +.my-n6 { + margin-top: -12px !important; + margin-bottom: -12px !important; +} + +.my-n7 { + margin-top: -30px !important; + margin-bottom: -30px !important; +} + +.my-n8 { + margin-top: -10px !important; + margin-bottom: -10px !important; +} + +.my-n9 { + margin-top: -20px !important; + margin-bottom: -20px !important; +} + +.mt-n1 { + margin-top: -0.25rem !important; +} + +.mt-n2 { + margin-top: -0.5rem !important; +} + +.mt-n3 { + margin-top: -1rem !important; +} + +.mt-n4 { + margin-top: -1.5rem !important; +} + +.mt-n5 { + margin-top: -3rem !important; +} + +.mt-n6 { + margin-top: -12px !important; +} + +.mt-n7 { + margin-top: -30px !important; +} + +.mt-n8 { + margin-top: -10px !important; +} + +.mt-n9 { + margin-top: -20px !important; +} + +.me-n1 { + margin-right: -0.25rem !important; +} + +.me-n2 { + margin-right: -0.5rem !important; +} + +.me-n3 { + margin-right: -1rem !important; +} + +.me-n4 { + margin-right: -1.5rem !important; +} + +.me-n5 { + margin-right: -3rem !important; +} + +.me-n6 { + margin-right: -12px !important; +} + +.me-n7 { + margin-right: -30px !important; +} + +.me-n8 { + margin-right: -10px !important; +} + +.me-n9 { + margin-right: -20px !important; +} + +.mb-n1 { + margin-bottom: -0.25rem !important; +} + +.mb-n2 { + margin-bottom: -0.5rem !important; +} + +.mb-n3 { + margin-bottom: -1rem !important; +} + +.mb-n4 { + margin-bottom: -1.5rem !important; +} + +.mb-n5 { + margin-bottom: -3rem !important; +} + +.mb-n6 { + margin-bottom: -12px !important; +} + +.mb-n7 { + margin-bottom: -30px !important; +} + +.mb-n8 { + margin-bottom: -10px !important; +} + +.mb-n9 { + margin-bottom: -20px !important; +} + +.ms-n1 { + margin-left: -0.25rem !important; +} + +.ms-n2 { + margin-left: -0.5rem !important; +} + +.ms-n3 { + margin-left: -1rem !important; +} + +.ms-n4 { + margin-left: -1.5rem !important; +} + +.ms-n5 { + margin-left: -3rem !important; +} + +.ms-n6 { + margin-left: -12px !important; +} + +.ms-n7 { + margin-left: -30px !important; +} + +.ms-n8 { + margin-left: -10px !important; +} + +.ms-n9 { + margin-left: -20px !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.p-6 { + padding: 12px !important; +} + +.p-7 { + padding: 30px !important; +} + +.p-8 { + padding: 10px !important; +} + +.p-9 { + padding: 20px !important; +} + +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.px-6 { + padding-right: 12px !important; + padding-left: 12px !important; +} + +.px-7 { + padding-right: 30px !important; + padding-left: 30px !important; +} + +.px-8 { + padding-right: 10px !important; + padding-left: 10px !important; +} + +.px-9 { + padding-right: 20px !important; + padding-left: 20px !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.py-6 { + padding-top: 12px !important; + padding-bottom: 12px !important; +} + +.py-7 { + padding-top: 30px !important; + padding-bottom: 30px !important; +} + +.py-8 { + padding-top: 10px !important; + padding-bottom: 10px !important; +} + +.py-9 { + padding-top: 20px !important; + padding-bottom: 20px !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pt-6 { + padding-top: 12px !important; +} + +.pt-7 { + padding-top: 30px !important; +} + +.pt-8 { + padding-top: 10px !important; +} + +.pt-9 { + padding-top: 20px !important; +} + +.pe-0 { + padding-right: 0 !important; +} + +.pe-1 { + padding-right: 0.25rem !important; +} + +.pe-2 { + padding-right: 0.5rem !important; +} + +.pe-3 { + padding-right: 1rem !important; +} + +.pe-4 { + padding-right: 1.5rem !important; +} + +.pe-5 { + padding-right: 3rem !important; +} + +.pe-6 { + padding-right: 12px !important; +} + +.pe-7 { + padding-right: 30px !important; +} + +.pe-8 { + padding-right: 10px !important; +} + +.pe-9 { + padding-right: 20px !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.pb-6 { + padding-bottom: 12px !important; +} + +.pb-7 { + padding-bottom: 30px !important; +} + +.pb-8 { + padding-bottom: 10px !important; +} + +.pb-9 { + padding-bottom: 20px !important; +} + +.ps-0 { + padding-left: 0 !important; +} + +.ps-1 { + padding-left: 0.25rem !important; +} + +.ps-2 { + padding-left: 0.5rem !important; +} + +.ps-3 { + padding-left: 1rem !important; +} + +.ps-4 { + padding-left: 1.5rem !important; +} + +.ps-5 { + padding-left: 3rem !important; +} + +.ps-6 { + padding-left: 12px !important; +} + +.ps-7 { + padding-left: 30px !important; +} + +.ps-8 { + padding-left: 10px !important; +} + +.ps-9 { + padding-left: 20px !important; +} + +.gap-0 { + gap: 0 !important; +} + +.gap-1 { + gap: 0.25rem !important; +} + +.gap-2 { + gap: 0.5rem !important; +} + +.gap-3 { + gap: 1rem !important; +} + +.gap-4 { + gap: 1.5rem !important; +} + +.gap-5 { + gap: 3rem !important; +} + +.gap-6 { + gap: 12px !important; +} + +.gap-7 { + gap: 30px !important; +} + +.gap-8 { + gap: 10px !important; +} + +.gap-9 { + gap: 20px !important; +} + +.row-gap-0 { + row-gap: 0 !important; +} + +.row-gap-1 { + row-gap: 0.25rem !important; +} + +.row-gap-2 { + row-gap: 0.5rem !important; +} + +.row-gap-3 { + row-gap: 1rem !important; +} + +.row-gap-4 { + row-gap: 1.5rem !important; +} + +.row-gap-5 { + row-gap: 3rem !important; +} + +.row-gap-6 { + row-gap: 12px !important; +} + +.row-gap-7 { + row-gap: 30px !important; +} + +.row-gap-8 { + row-gap: 10px !important; +} + +.row-gap-9 { + row-gap: 20px !important; +} + +.column-gap-0 { + -webkit-column-gap: 0 !important; + -moz-column-gap: 0 !important; + column-gap: 0 !important; +} + +.column-gap-1 { + -webkit-column-gap: 0.25rem !important; + -moz-column-gap: 0.25rem !important; + column-gap: 0.25rem !important; +} + +.column-gap-2 { + -webkit-column-gap: 0.5rem !important; + -moz-column-gap: 0.5rem !important; + column-gap: 0.5rem !important; +} + +.column-gap-3 { + -webkit-column-gap: 1rem !important; + -moz-column-gap: 1rem !important; + column-gap: 1rem !important; +} + +.column-gap-4 { + -webkit-column-gap: 1.5rem !important; + -moz-column-gap: 1.5rem !important; + column-gap: 1.5rem !important; +} + +.column-gap-5 { + -webkit-column-gap: 3rem !important; + -moz-column-gap: 3rem !important; + column-gap: 3rem !important; +} + +.column-gap-6 { + -webkit-column-gap: 12px !important; + -moz-column-gap: 12px !important; + column-gap: 12px !important; +} + +.column-gap-7 { + -webkit-column-gap: 30px !important; + -moz-column-gap: 30px !important; + column-gap: 30px !important; +} + +.column-gap-8 { + -webkit-column-gap: 10px !important; + -moz-column-gap: 10px !important; + column-gap: 10px !important; +} + +.column-gap-9 { + -webkit-column-gap: 20px !important; + -moz-column-gap: 20px !important; + column-gap: 20px !important; +} + +.font-monospace { + font-family: var(--bs-font-monospace) !important; +} + +.fs-1 { + font-size: 0.625rem !important; +} + +.fs-2 { + font-size: 0.75rem !important; +} + +.fs-3 { + font-size: 0.875rem !important; +} + +.fs-4 { + font-size: 1rem !important; +} + +.fs-5 { + font-size: 1.125rem !important; +} + +.fs-6 { + font-size: 1.25rem !important; +} + +.fs-7 { + font-size: calc(1.275rem + 0.3vw) !important; +} + +.fs-8 { + font-size: calc(1.3125rem + 0.75vw) !important; +} + +.fs-9 { + font-size: calc(1.35rem + 1.2vw) !important; +} + +.fs-10 { + font-size: calc(1.375rem + 1.5vw) !important; +} + +.fs-11 { + font-size: 0.8125rem !important; +} + +.fst-italic { + font-style: italic !important; +} + +.fst-normal { + font-style: normal !important; +} + +.fw-lighter { + font-weight: 300 !important; +} + +.fw-light { + font-weight: 400 !important; +} + +.fw-normal { + font-weight: 400 !important; +} + +.fw-medium { + font-weight: 500 !important; +} + +.fw-semibold { + font-weight: 600 !important; +} + +.fw-bold { + font-weight: 600 !important; +} + +.fw-bolder { + font-weight: 700 !important; +} + +.lh-1 { + line-height: 1 !important; +} + +.lh-sm { + line-height: 1.25 !important; +} + +.lh-base { + line-height: 1.5 !important; +} + +.lh-lg { + line-height: 2 !important; +} + +.text-start { + text-align: left !important; +} + +.text-end { + text-align: right !important; +} + +.text-center { + text-align: center !important; +} + +.text-decoration-none { + text-decoration: none !important; +} + +.text-decoration-underline { + text-decoration: underline !important; +} + +.text-decoration-line-through { + text-decoration: line-through !important; +} + +.text-lowercase { + text-transform: lowercase !important; +} + +.text-uppercase { + text-transform: uppercase !important; +} + +.text-capitalize { + text-transform: capitalize !important; +} + +.text-wrap { + white-space: normal !important; +} + +.text-nowrap { + white-space: nowrap !important; +} + +/* rtl:begin:remove */ +.text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} + +/* rtl:end:remove */ +.text-primary { + --bs-text-opacity: 1; + color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important; +} + +.text-secondary { + --bs-text-opacity: 1; + color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important; +} + +.text-success { + --bs-text-opacity: 1; + color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important; +} + +.text-inverse { + --bs-text-opacity: 1; + color: rgba(var(--bs-inverse-rgb), var(--bs-text-opacity)) !important; +} + +.text-info { + --bs-text-opacity: 1; + color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important; +} + +.text-warning { + --bs-text-opacity: 1; + color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important; +} + +.text-danger { + --bs-text-opacity: 1; + color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important; +} + +.text-light { + --bs-text-opacity: 1; + color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important; +} + +.text-dark { + --bs-text-opacity: 1; + color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important; +} + +.text-black { + --bs-text-opacity: 1; + color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important; +} + +.text-white { + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} + +.text-body { + --bs-text-opacity: 1; + color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important; +} + +.text-muted { + --bs-text-opacity: 1; + color: var(--bs-secondary-color) !important; +} + +.text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} + +.text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} + +.text-body-secondary { + --bs-text-opacity: 1; + color: var(--bs-secondary-color) !important; +} + +.text-body-tertiary { + --bs-text-opacity: 1; + color: var(--bs-tertiary-color) !important; +} + +.text-body-emphasis { + --bs-text-opacity: 1; + color: var(--bs-emphasis-color) !important; +} + +.text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} + +.text-opacity-25 { + --bs-text-opacity: 0.25; +} + +.text-opacity-50 { + --bs-text-opacity: 0.5; +} + +.text-opacity-75 { + --bs-text-opacity: 0.75; +} + +.text-opacity-100 { + --bs-text-opacity: 1; +} + +.text-primary-emphasis { + color: var(--bs-primary-text-emphasis) !important; +} + +.text-secondary-emphasis { + color: var(--bs-secondary-text-emphasis) !important; +} + +.text-success-emphasis { + color: var(--bs-success-text-emphasis) !important; +} + +.text-info-emphasis { + color: var(--bs-info-text-emphasis) !important; +} + +.text-warning-emphasis { + color: var(--bs-warning-text-emphasis) !important; +} + +.text-danger-emphasis { + color: var(--bs-danger-text-emphasis) !important; +} + +.text-light-emphasis { + color: var(--bs-light-text-emphasis) !important; +} + +.text-dark-emphasis { + color: var(--bs-dark-text-emphasis) !important; +} + +.link-opacity-10 { + --bs-link-opacity: 0.1; +} + +.link-opacity-10-hover:hover { + --bs-link-opacity: 0.1; +} + +.link-opacity-25 { + --bs-link-opacity: 0.25; +} + +.link-opacity-25-hover:hover { + --bs-link-opacity: 0.25; +} + +.link-opacity-50 { + --bs-link-opacity: 0.5; +} + +.link-opacity-50-hover:hover { + --bs-link-opacity: 0.5; +} + +.link-opacity-75 { + --bs-link-opacity: 0.75; +} + +.link-opacity-75-hover:hover { + --bs-link-opacity: 0.75; +} + +.link-opacity-100 { + --bs-link-opacity: 1; +} + +.link-opacity-100-hover:hover { + --bs-link-opacity: 1; +} + +.link-offset-1 { + text-underline-offset: 0.125em !important; +} + +.link-offset-1-hover:hover { + text-underline-offset: 0.125em !important; +} + +.link-offset-2 { + text-underline-offset: 0.25em !important; +} + +.link-offset-2-hover:hover { + text-underline-offset: 0.25em !important; +} + +.link-offset-3 { + text-underline-offset: 0.375em !important; +} + +.link-offset-3-hover:hover { + text-underline-offset: 0.375em !important; +} + +.link-underline-primary { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-primary-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-secondary { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-secondary-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-success { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-success-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-inverse { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-inverse-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-info { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-info-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-warning { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-warning-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-danger { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-danger-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-light { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-light-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline-dark { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-dark-rgb), var(--bs-link-underline-opacity)) !important; +} + +.link-underline { + --bs-link-underline-opacity: 1; + text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-underline-opacity, 1)) !important; +} + +.link-underline-opacity-0 { + --bs-link-underline-opacity: 0; +} + +.link-underline-opacity-0-hover:hover { + --bs-link-underline-opacity: 0; +} + +.link-underline-opacity-10 { + --bs-link-underline-opacity: 0.1; +} + +.link-underline-opacity-10-hover:hover { + --bs-link-underline-opacity: 0.1; +} + +.link-underline-opacity-25 { + --bs-link-underline-opacity: 0.25; +} + +.link-underline-opacity-25-hover:hover { + --bs-link-underline-opacity: 0.25; +} + +.link-underline-opacity-50 { + --bs-link-underline-opacity: 0.5; +} + +.link-underline-opacity-50-hover:hover { + --bs-link-underline-opacity: 0.5; +} + +.link-underline-opacity-75 { + --bs-link-underline-opacity: 0.75; +} + +.link-underline-opacity-75-hover:hover { + --bs-link-underline-opacity: 0.75; +} + +.link-underline-opacity-100 { + --bs-link-underline-opacity: 1; +} + +.link-underline-opacity-100-hover:hover { + --bs-link-underline-opacity: 1; +} + +.bg-primary { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-secondary { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-success { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-inverse { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-inverse-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-info { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-warning { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-danger { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-light { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-dark { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-black { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-white { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-body { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-transparent { + --bs-bg-opacity: 1; + background-color: transparent !important; +} + +.bg-body-secondary { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-secondary-bg-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-body-tertiary { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-tertiary-bg-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-opacity-10 { + --bs-bg-opacity: 0.1; +} + +.bg-opacity-25 { + --bs-bg-opacity: 0.25; +} + +.bg-opacity-50 { + --bs-bg-opacity: 0.5; +} + +.bg-opacity-75 { + --bs-bg-opacity: 0.75; +} + +.bg-opacity-100 { + --bs-bg-opacity: 1; +} + +.bg-primary-subtle { + background-color: var(--bs-primary-bg-subtle) !important; +} + +.bg-secondary-subtle { + background-color: var(--bs-secondary-bg-subtle) !important; +} + +.bg-success-subtle { + background-color: var(--bs-success-bg-subtle) !important; +} + +.bg-info-subtle { + background-color: var(--bs-info-bg-subtle) !important; +} + +.bg-warning-subtle { + background-color: var(--bs-warning-bg-subtle) !important; +} + +.bg-danger-subtle { + background-color: var(--bs-danger-bg-subtle) !important; +} + +.bg-light-subtle { + background-color: var(--bs-light-bg-subtle) !important; +} + +.bg-dark-subtle { + background-color: var(--bs-dark-bg-subtle) !important; +} + +.bg-gradient { + background-image: var(--bs-gradient) !important; +} + +.user-select-all { + -webkit-user-select: all !important; + -moz-user-select: all !important; + user-select: all !important; +} + +.user-select-auto { + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + -ms-user-select: auto !important; + user-select: auto !important; +} + +.user-select-none { + -webkit-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; +} + +.pe-none { + pointer-events: none !important; +} + +.pe-auto { + pointer-events: auto !important; +} + +.rounded { + border-radius: var(--bs-border-radius) !important; +} + +.rounded-0 { + border-radius: 0 !important; +} + +.rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} + +.rounded-2 { + border-radius: var(--bs-border-radius) !important; +} + +.rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} + +.rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} + +.rounded-5 { + border-radius: var(--bs-border-radius-xxl) !important; +} + +.rounded-circle { + border-radius: 50% !important; +} + +.rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} + +.rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.rounded-top-0 { + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; +} + +.rounded-top-1 { + border-top-left-radius: var(--bs-border-radius-sm) !important; + border-top-right-radius: var(--bs-border-radius-sm) !important; +} + +.rounded-top-2 { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.rounded-top-3 { + border-top-left-radius: var(--bs-border-radius-lg) !important; + border-top-right-radius: var(--bs-border-radius-lg) !important; +} + +.rounded-top-4 { + border-top-left-radius: var(--bs-border-radius-xl) !important; + border-top-right-radius: var(--bs-border-radius-xl) !important; +} + +.rounded-top-5 { + border-top-left-radius: var(--bs-border-radius-xxl) !important; + border-top-right-radius: var(--bs-border-radius-xxl) !important; +} + +.rounded-top-circle { + border-top-left-radius: 50% !important; + border-top-right-radius: 50% !important; +} + +.rounded-top-pill { + border-top-left-radius: var(--bs-border-radius-pill) !important; + border-top-right-radius: var(--bs-border-radius-pill) !important; +} + +.rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.rounded-end-0 { + border-top-right-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +.rounded-end-1 { + border-top-right-radius: var(--bs-border-radius-sm) !important; + border-bottom-right-radius: var(--bs-border-radius-sm) !important; +} + +.rounded-end-2 { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.rounded-end-3 { + border-top-right-radius: var(--bs-border-radius-lg) !important; + border-bottom-right-radius: var(--bs-border-radius-lg) !important; +} + +.rounded-end-4 { + border-top-right-radius: var(--bs-border-radius-xl) !important; + border-bottom-right-radius: var(--bs-border-radius-xl) !important; +} + +.rounded-end-5 { + border-top-right-radius: var(--bs-border-radius-xxl) !important; + border-bottom-right-radius: var(--bs-border-radius-xxl) !important; +} + +.rounded-end-circle { + border-top-right-radius: 50% !important; + border-bottom-right-radius: 50% !important; +} + +.rounded-end-pill { + border-top-right-radius: var(--bs-border-radius-pill) !important; + border-bottom-right-radius: var(--bs-border-radius-pill) !important; +} + +.rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.rounded-bottom-0 { + border-bottom-right-radius: 0 !important; + border-bottom-left-radius: 0 !important; +} + +.rounded-bottom-1 { + border-bottom-right-radius: var(--bs-border-radius-sm) !important; + border-bottom-left-radius: var(--bs-border-radius-sm) !important; +} + +.rounded-bottom-2 { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.rounded-bottom-3 { + border-bottom-right-radius: var(--bs-border-radius-lg) !important; + border-bottom-left-radius: var(--bs-border-radius-lg) !important; +} + +.rounded-bottom-4 { + border-bottom-right-radius: var(--bs-border-radius-xl) !important; + border-bottom-left-radius: var(--bs-border-radius-xl) !important; +} + +.rounded-bottom-5 { + border-bottom-right-radius: var(--bs-border-radius-xxl) !important; + border-bottom-left-radius: var(--bs-border-radius-xxl) !important; +} + +.rounded-bottom-circle { + border-bottom-right-radius: 50% !important; + border-bottom-left-radius: 50% !important; +} + +.rounded-bottom-pill { + border-bottom-right-radius: var(--bs-border-radius-pill) !important; + border-bottom-left-radius: var(--bs-border-radius-pill) !important; +} + +.rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.rounded-start-0 { + border-bottom-left-radius: 0 !important; + border-top-left-radius: 0 !important; +} + +.rounded-start-1 { + border-bottom-left-radius: var(--bs-border-radius-sm) !important; + border-top-left-radius: var(--bs-border-radius-sm) !important; +} + +.rounded-start-2 { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.rounded-start-3 { + border-bottom-left-radius: var(--bs-border-radius-lg) !important; + border-top-left-radius: var(--bs-border-radius-lg) !important; +} + +.rounded-start-4 { + border-bottom-left-radius: var(--bs-border-radius-xl) !important; + border-top-left-radius: var(--bs-border-radius-xl) !important; +} + +.rounded-start-5 { + border-bottom-left-radius: var(--bs-border-radius-xxl) !important; + border-top-left-radius: var(--bs-border-radius-xxl) !important; +} + +.rounded-start-circle { + border-bottom-left-radius: 50% !important; + border-top-left-radius: 50% !important; +} + +.rounded-start-pill { + border-bottom-left-radius: var(--bs-border-radius-pill) !important; + border-top-left-radius: var(--bs-border-radius-pill) !important; +} + +.visible { + visibility: visible !important; +} + +.invisible { + visibility: hidden !important; +} + +.z-n1 { + z-index: -1 !important; +} + +.z-0 { + z-index: 0 !important; +} + +.z-1 { + z-index: 1 !important; +} + +.z-2 { + z-index: 2 !important; +} + +.z-3 { + z-index: 3 !important; +} + +@media (min-width: 576px) { + .float-sm-start { + float: left !important; + } + .float-sm-end { + float: right !important; + } + .float-sm-none { + float: none !important; + } + .object-fit-sm-contain { + -o-object-fit: contain !important; + object-fit: contain !important; + } + .object-fit-sm-cover { + -o-object-fit: cover !important; + object-fit: cover !important; + } + .object-fit-sm-fill { + -o-object-fit: fill !important; + object-fit: fill !important; + } + .object-fit-sm-scale { + -o-object-fit: scale-down !important; + object-fit: scale-down !important; + } + .object-fit-sm-none { + -o-object-fit: none !important; + object-fit: none !important; + } + .d-sm-inline { + display: inline !important; + } + .d-sm-inline-block { + display: inline-block !important; + } + .d-sm-block { + display: block !important; + } + .d-sm-grid { + display: -ms-grid !important; + display: grid !important; + } + .d-sm-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; + } + .d-sm-table { + display: table !important; + } + .d-sm-table-row { + display: table-row !important; + } + .d-sm-table-cell { + display: table-cell !important; + } + .d-sm-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + } + .d-sm-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } + .d-sm-none { + display: none !important; + } + .flex-sm-fill { + -webkit-box-flex: 1 !important; + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-sm-row { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-sm-column { + -webkit-box-orient: vertical !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-sm-row-reverse { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-sm-column-reverse { + -webkit-box-orient: vertical !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-sm-grow-0 { + -webkit-box-flex: 0 !important; + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-sm-grow-1 { + -webkit-box-flex: 1 !important; + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-sm-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-sm-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .flex-sm-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-sm-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-sm-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .justify-content-sm-start { + -webkit-box-pack: start !important; + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-sm-end { + -webkit-box-pack: end !important; + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-sm-center { + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-sm-between { + -webkit-box-pack: justify !important; + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-sm-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .justify-content-sm-evenly { + -webkit-box-pack: space-evenly !important; + -ms-flex-pack: space-evenly !important; + justify-content: space-evenly !important; + } + .align-items-sm-start { + -webkit-box-align: start !important; + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-sm-end { + -webkit-box-align: end !important; + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-sm-center { + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-sm-baseline { + -webkit-box-align: baseline !important; + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-sm-stretch { + -webkit-box-align: stretch !important; + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-sm-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-sm-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-sm-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-sm-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-sm-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-sm-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-sm-auto { + -ms-flex-item-align: auto !important; + -ms-grid-row-align: auto !important; + align-self: auto !important; + } + .align-self-sm-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-sm-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-sm-center { + -ms-flex-item-align: center !important; + -ms-grid-row-align: center !important; + align-self: center !important; + } + .align-self-sm-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-sm-stretch { + -ms-flex-item-align: stretch !important; + -ms-grid-row-align: stretch !important; + align-self: stretch !important; + } + .order-sm-first { + -webkit-box-ordinal-group: 0 !important; + -ms-flex-order: -1 !important; + order: -1 !important; + } + .order-sm-0 { + -webkit-box-ordinal-group: 1 !important; + -ms-flex-order: 0 !important; + order: 0 !important; + } + .order-sm-1 { + -webkit-box-ordinal-group: 2 !important; + -ms-flex-order: 1 !important; + order: 1 !important; + } + .order-sm-2 { + -webkit-box-ordinal-group: 3 !important; + -ms-flex-order: 2 !important; + order: 2 !important; + } + .order-sm-3 { + -webkit-box-ordinal-group: 4 !important; + -ms-flex-order: 3 !important; + order: 3 !important; + } + .order-sm-4 { + -webkit-box-ordinal-group: 5 !important; + -ms-flex-order: 4 !important; + order: 4 !important; + } + .order-sm-5 { + -webkit-box-ordinal-group: 6 !important; + -ms-flex-order: 5 !important; + order: 5 !important; + } + .order-sm-last { + -webkit-box-ordinal-group: 7 !important; + -ms-flex-order: 6 !important; + order: 6 !important; + } + .m-sm-0 { + margin: 0 !important; + } + .m-sm-1 { + margin: 0.25rem !important; + } + .m-sm-2 { + margin: 0.5rem !important; + } + .m-sm-3 { + margin: 1rem !important; + } + .m-sm-4 { + margin: 1.5rem !important; + } + .m-sm-5 { + margin: 3rem !important; + } + .m-sm-6 { + margin: 12px !important; + } + .m-sm-7 { + margin: 30px !important; + } + .m-sm-8 { + margin: 10px !important; + } + .m-sm-9 { + margin: 20px !important; + } + .m-sm-auto { + margin: auto !important; + } + .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-sm-6 { + margin-right: 12px !important; + margin-left: 12px !important; + } + .mx-sm-7 { + margin-right: 30px !important; + margin-left: 30px !important; + } + .mx-sm-8 { + margin-right: 10px !important; + margin-left: 10px !important; + } + .mx-sm-9 { + margin-right: 20px !important; + margin-left: 20px !important; + } + .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-sm-6 { + margin-top: 12px !important; + margin-bottom: 12px !important; + } + .my-sm-7 { + margin-top: 30px !important; + margin-bottom: 30px !important; + } + .my-sm-8 { + margin-top: 10px !important; + margin-bottom: 10px !important; + } + .my-sm-9 { + margin-top: 20px !important; + margin-bottom: 20px !important; + } + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-sm-0 { + margin-top: 0 !important; + } + .mt-sm-1 { + margin-top: 0.25rem !important; + } + .mt-sm-2 { + margin-top: 0.5rem !important; + } + .mt-sm-3 { + margin-top: 1rem !important; + } + .mt-sm-4 { + margin-top: 1.5rem !important; + } + .mt-sm-5 { + margin-top: 3rem !important; + } + .mt-sm-6 { + margin-top: 12px !important; + } + .mt-sm-7 { + margin-top: 30px !important; + } + .mt-sm-8 { + margin-top: 10px !important; + } + .mt-sm-9 { + margin-top: 20px !important; + } + .mt-sm-auto { + margin-top: auto !important; + } + .me-sm-0 { + margin-right: 0 !important; + } + .me-sm-1 { + margin-right: 0.25rem !important; + } + .me-sm-2 { + margin-right: 0.5rem !important; + } + .me-sm-3 { + margin-right: 1rem !important; + } + .me-sm-4 { + margin-right: 1.5rem !important; + } + .me-sm-5 { + margin-right: 3rem !important; + } + .me-sm-6 { + margin-right: 12px !important; + } + .me-sm-7 { + margin-right: 30px !important; + } + .me-sm-8 { + margin-right: 10px !important; + } + .me-sm-9 { + margin-right: 20px !important; + } + .me-sm-auto { + margin-right: auto !important; + } + .mb-sm-0 { + margin-bottom: 0 !important; + } + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + .mb-sm-3 { + margin-bottom: 1rem !important; + } + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + .mb-sm-5 { + margin-bottom: 3rem !important; + } + .mb-sm-6 { + margin-bottom: 12px !important; + } + .mb-sm-7 { + margin-bottom: 30px !important; + } + .mb-sm-8 { + margin-bottom: 10px !important; + } + .mb-sm-9 { + margin-bottom: 20px !important; + } + .mb-sm-auto { + margin-bottom: auto !important; + } + .ms-sm-0 { + margin-left: 0 !important; + } + .ms-sm-1 { + margin-left: 0.25rem !important; + } + .ms-sm-2 { + margin-left: 0.5rem !important; + } + .ms-sm-3 { + margin-left: 1rem !important; + } + .ms-sm-4 { + margin-left: 1.5rem !important; + } + .ms-sm-5 { + margin-left: 3rem !important; + } + .ms-sm-6 { + margin-left: 12px !important; + } + .ms-sm-7 { + margin-left: 30px !important; + } + .ms-sm-8 { + margin-left: 10px !important; + } + .ms-sm-9 { + margin-left: 20px !important; + } + .ms-sm-auto { + margin-left: auto !important; + } + .m-sm-n1 { + margin: -0.25rem !important; + } + .m-sm-n2 { + margin: -0.5rem !important; + } + .m-sm-n3 { + margin: -1rem !important; + } + .m-sm-n4 { + margin: -1.5rem !important; + } + .m-sm-n5 { + margin: -3rem !important; + } + .m-sm-n6 { + margin: -12px !important; + } + .m-sm-n7 { + margin: -30px !important; + } + .m-sm-n8 { + margin: -10px !important; + } + .m-sm-n9 { + margin: -20px !important; + } + .mx-sm-n1 { + margin-right: -0.25rem !important; + margin-left: -0.25rem !important; + } + .mx-sm-n2 { + margin-right: -0.5rem !important; + margin-left: -0.5rem !important; + } + .mx-sm-n3 { + margin-right: -1rem !important; + margin-left: -1rem !important; + } + .mx-sm-n4 { + margin-right: -1.5rem !important; + margin-left: -1.5rem !important; + } + .mx-sm-n5 { + margin-right: -3rem !important; + margin-left: -3rem !important; + } + .mx-sm-n6 { + margin-right: -12px !important; + margin-left: -12px !important; + } + .mx-sm-n7 { + margin-right: -30px !important; + margin-left: -30px !important; + } + .mx-sm-n8 { + margin-right: -10px !important; + margin-left: -10px !important; + } + .mx-sm-n9 { + margin-right: -20px !important; + margin-left: -20px !important; + } + .my-sm-n1 { + margin-top: -0.25rem !important; + margin-bottom: -0.25rem !important; + } + .my-sm-n2 { + margin-top: -0.5rem !important; + margin-bottom: -0.5rem !important; + } + .my-sm-n3 { + margin-top: -1rem !important; + margin-bottom: -1rem !important; + } + .my-sm-n4 { + margin-top: -1.5rem !important; + margin-bottom: -1.5rem !important; + } + .my-sm-n5 { + margin-top: -3rem !important; + margin-bottom: -3rem !important; + } + .my-sm-n6 { + margin-top: -12px !important; + margin-bottom: -12px !important; + } + .my-sm-n7 { + margin-top: -30px !important; + margin-bottom: -30px !important; + } + .my-sm-n8 { + margin-top: -10px !important; + margin-bottom: -10px !important; + } + .my-sm-n9 { + margin-top: -20px !important; + margin-bottom: -20px !important; + } + .mt-sm-n1 { + margin-top: -0.25rem !important; + } + .mt-sm-n2 { + margin-top: -0.5rem !important; + } + .mt-sm-n3 { + margin-top: -1rem !important; + } + .mt-sm-n4 { + margin-top: -1.5rem !important; + } + .mt-sm-n5 { + margin-top: -3rem !important; + } + .mt-sm-n6 { + margin-top: -12px !important; + } + .mt-sm-n7 { + margin-top: -30px !important; + } + .mt-sm-n8 { + margin-top: -10px !important; + } + .mt-sm-n9 { + margin-top: -20px !important; + } + .me-sm-n1 { + margin-right: -0.25rem !important; + } + .me-sm-n2 { + margin-right: -0.5rem !important; + } + .me-sm-n3 { + margin-right: -1rem !important; + } + .me-sm-n4 { + margin-right: -1.5rem !important; + } + .me-sm-n5 { + margin-right: -3rem !important; + } + .me-sm-n6 { + margin-right: -12px !important; + } + .me-sm-n7 { + margin-right: -30px !important; + } + .me-sm-n8 { + margin-right: -10px !important; + } + .me-sm-n9 { + margin-right: -20px !important; + } + .mb-sm-n1 { + margin-bottom: -0.25rem !important; + } + .mb-sm-n2 { + margin-bottom: -0.5rem !important; + } + .mb-sm-n3 { + margin-bottom: -1rem !important; + } + .mb-sm-n4 { + margin-bottom: -1.5rem !important; + } + .mb-sm-n5 { + margin-bottom: -3rem !important; + } + .mb-sm-n6 { + margin-bottom: -12px !important; + } + .mb-sm-n7 { + margin-bottom: -30px !important; + } + .mb-sm-n8 { + margin-bottom: -10px !important; + } + .mb-sm-n9 { + margin-bottom: -20px !important; + } + .ms-sm-n1 { + margin-left: -0.25rem !important; + } + .ms-sm-n2 { + margin-left: -0.5rem !important; + } + .ms-sm-n3 { + margin-left: -1rem !important; + } + .ms-sm-n4 { + margin-left: -1.5rem !important; + } + .ms-sm-n5 { + margin-left: -3rem !important; + } + .ms-sm-n6 { + margin-left: -12px !important; + } + .ms-sm-n7 { + margin-left: -30px !important; + } + .ms-sm-n8 { + margin-left: -10px !important; + } + .ms-sm-n9 { + margin-left: -20px !important; + } + .p-sm-0 { + padding: 0 !important; + } + .p-sm-1 { + padding: 0.25rem !important; + } + .p-sm-2 { + padding: 0.5rem !important; + } + .p-sm-3 { + padding: 1rem !important; + } + .p-sm-4 { + padding: 1.5rem !important; + } + .p-sm-5 { + padding: 3rem !important; + } + .p-sm-6 { + padding: 12px !important; + } + .p-sm-7 { + padding: 30px !important; + } + .p-sm-8 { + padding: 10px !important; + } + .p-sm-9 { + padding: 20px !important; + } + .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .px-sm-6 { + padding-right: 12px !important; + padding-left: 12px !important; + } + .px-sm-7 { + padding-right: 30px !important; + padding-left: 30px !important; + } + .px-sm-8 { + padding-right: 10px !important; + padding-left: 10px !important; + } + .px-sm-9 { + padding-right: 20px !important; + padding-left: 20px !important; + } + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .py-sm-6 { + padding-top: 12px !important; + padding-bottom: 12px !important; + } + .py-sm-7 { + padding-top: 30px !important; + padding-bottom: 30px !important; + } + .py-sm-8 { + padding-top: 10px !important; + padding-bottom: 10px !important; + } + .py-sm-9 { + padding-top: 20px !important; + padding-bottom: 20px !important; + } + .pt-sm-0 { + padding-top: 0 !important; + } + .pt-sm-1 { + padding-top: 0.25rem !important; + } + .pt-sm-2 { + padding-top: 0.5rem !important; + } + .pt-sm-3 { + padding-top: 1rem !important; + } + .pt-sm-4 { + padding-top: 1.5rem !important; + } + .pt-sm-5 { + padding-top: 3rem !important; + } + .pt-sm-6 { + padding-top: 12px !important; + } + .pt-sm-7 { + padding-top: 30px !important; + } + .pt-sm-8 { + padding-top: 10px !important; + } + .pt-sm-9 { + padding-top: 20px !important; + } + .pe-sm-0 { + padding-right: 0 !important; + } + .pe-sm-1 { + padding-right: 0.25rem !important; + } + .pe-sm-2 { + padding-right: 0.5rem !important; + } + .pe-sm-3 { + padding-right: 1rem !important; + } + .pe-sm-4 { + padding-right: 1.5rem !important; + } + .pe-sm-5 { + padding-right: 3rem !important; + } + .pe-sm-6 { + padding-right: 12px !important; + } + .pe-sm-7 { + padding-right: 30px !important; + } + .pe-sm-8 { + padding-right: 10px !important; + } + .pe-sm-9 { + padding-right: 20px !important; + } + .pb-sm-0 { + padding-bottom: 0 !important; + } + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + .pb-sm-3 { + padding-bottom: 1rem !important; + } + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + .pb-sm-5 { + padding-bottom: 3rem !important; + } + .pb-sm-6 { + padding-bottom: 12px !important; + } + .pb-sm-7 { + padding-bottom: 30px !important; + } + .pb-sm-8 { + padding-bottom: 10px !important; + } + .pb-sm-9 { + padding-bottom: 20px !important; + } + .ps-sm-0 { + padding-left: 0 !important; + } + .ps-sm-1 { + padding-left: 0.25rem !important; + } + .ps-sm-2 { + padding-left: 0.5rem !important; + } + .ps-sm-3 { + padding-left: 1rem !important; + } + .ps-sm-4 { + padding-left: 1.5rem !important; + } + .ps-sm-5 { + padding-left: 3rem !important; + } + .ps-sm-6 { + padding-left: 12px !important; + } + .ps-sm-7 { + padding-left: 30px !important; + } + .ps-sm-8 { + padding-left: 10px !important; + } + .ps-sm-9 { + padding-left: 20px !important; + } + .gap-sm-0 { + gap: 0 !important; + } + .gap-sm-1 { + gap: 0.25rem !important; + } + .gap-sm-2 { + gap: 0.5rem !important; + } + .gap-sm-3 { + gap: 1rem !important; + } + .gap-sm-4 { + gap: 1.5rem !important; + } + .gap-sm-5 { + gap: 3rem !important; + } + .gap-sm-6 { + gap: 12px !important; + } + .gap-sm-7 { + gap: 30px !important; + } + .gap-sm-8 { + gap: 10px !important; + } + .gap-sm-9 { + gap: 20px !important; + } + .row-gap-sm-0 { + row-gap: 0 !important; + } + .row-gap-sm-1 { + row-gap: 0.25rem !important; + } + .row-gap-sm-2 { + row-gap: 0.5rem !important; + } + .row-gap-sm-3 { + row-gap: 1rem !important; + } + .row-gap-sm-4 { + row-gap: 1.5rem !important; + } + .row-gap-sm-5 { + row-gap: 3rem !important; + } + .row-gap-sm-6 { + row-gap: 12px !important; + } + .row-gap-sm-7 { + row-gap: 30px !important; + } + .row-gap-sm-8 { + row-gap: 10px !important; + } + .row-gap-sm-9 { + row-gap: 20px !important; + } + .column-gap-sm-0 { + -webkit-column-gap: 0 !important; + -moz-column-gap: 0 !important; + column-gap: 0 !important; + } + .column-gap-sm-1 { + -webkit-column-gap: 0.25rem !important; + -moz-column-gap: 0.25rem !important; + column-gap: 0.25rem !important; + } + .column-gap-sm-2 { + -webkit-column-gap: 0.5rem !important; + -moz-column-gap: 0.5rem !important; + column-gap: 0.5rem !important; + } + .column-gap-sm-3 { + -webkit-column-gap: 1rem !important; + -moz-column-gap: 1rem !important; + column-gap: 1rem !important; + } + .column-gap-sm-4 { + -webkit-column-gap: 1.5rem !important; + -moz-column-gap: 1.5rem !important; + column-gap: 1.5rem !important; + } + .column-gap-sm-5 { + -webkit-column-gap: 3rem !important; + -moz-column-gap: 3rem !important; + column-gap: 3rem !important; + } + .column-gap-sm-6 { + -webkit-column-gap: 12px !important; + -moz-column-gap: 12px !important; + column-gap: 12px !important; + } + .column-gap-sm-7 { + -webkit-column-gap: 30px !important; + -moz-column-gap: 30px !important; + column-gap: 30px !important; + } + .column-gap-sm-8 { + -webkit-column-gap: 10px !important; + -moz-column-gap: 10px !important; + column-gap: 10px !important; + } + .column-gap-sm-9 { + -webkit-column-gap: 20px !important; + -moz-column-gap: 20px !important; + column-gap: 20px !important; + } + .text-sm-start { + text-align: left !important; + } + .text-sm-end { + text-align: right !important; + } + .text-sm-center { + text-align: center !important; + } +} +@media (min-width: 768px) { + .float-md-start { + float: left !important; + } + .float-md-end { + float: right !important; + } + .float-md-none { + float: none !important; + } + .object-fit-md-contain { + -o-object-fit: contain !important; + object-fit: contain !important; + } + .object-fit-md-cover { + -o-object-fit: cover !important; + object-fit: cover !important; + } + .object-fit-md-fill { + -o-object-fit: fill !important; + object-fit: fill !important; + } + .object-fit-md-scale { + -o-object-fit: scale-down !important; + object-fit: scale-down !important; + } + .object-fit-md-none { + -o-object-fit: none !important; + object-fit: none !important; + } + .d-md-inline { + display: inline !important; + } + .d-md-inline-block { + display: inline-block !important; + } + .d-md-block { + display: block !important; + } + .d-md-grid { + display: -ms-grid !important; + display: grid !important; + } + .d-md-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; + } + .d-md-table { + display: table !important; + } + .d-md-table-row { + display: table-row !important; + } + .d-md-table-cell { + display: table-cell !important; + } + .d-md-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + } + .d-md-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } + .d-md-none { + display: none !important; + } + .flex-md-fill { + -webkit-box-flex: 1 !important; + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-md-row { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-md-column { + -webkit-box-orient: vertical !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-md-row-reverse { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-md-column-reverse { + -webkit-box-orient: vertical !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-md-grow-0 { + -webkit-box-flex: 0 !important; + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-md-grow-1 { + -webkit-box-flex: 1 !important; + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-md-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-md-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .flex-md-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-md-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-md-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .justify-content-md-start { + -webkit-box-pack: start !important; + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-md-end { + -webkit-box-pack: end !important; + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-md-center { + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-md-between { + -webkit-box-pack: justify !important; + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-md-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .justify-content-md-evenly { + -webkit-box-pack: space-evenly !important; + -ms-flex-pack: space-evenly !important; + justify-content: space-evenly !important; + } + .align-items-md-start { + -webkit-box-align: start !important; + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-md-end { + -webkit-box-align: end !important; + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-md-center { + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-md-baseline { + -webkit-box-align: baseline !important; + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-md-stretch { + -webkit-box-align: stretch !important; + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-md-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-md-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-md-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-md-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-md-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-md-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-md-auto { + -ms-flex-item-align: auto !important; + -ms-grid-row-align: auto !important; + align-self: auto !important; + } + .align-self-md-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-md-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-md-center { + -ms-flex-item-align: center !important; + -ms-grid-row-align: center !important; + align-self: center !important; + } + .align-self-md-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-md-stretch { + -ms-flex-item-align: stretch !important; + -ms-grid-row-align: stretch !important; + align-self: stretch !important; + } + .order-md-first { + -webkit-box-ordinal-group: 0 !important; + -ms-flex-order: -1 !important; + order: -1 !important; + } + .order-md-0 { + -webkit-box-ordinal-group: 1 !important; + -ms-flex-order: 0 !important; + order: 0 !important; + } + .order-md-1 { + -webkit-box-ordinal-group: 2 !important; + -ms-flex-order: 1 !important; + order: 1 !important; + } + .order-md-2 { + -webkit-box-ordinal-group: 3 !important; + -ms-flex-order: 2 !important; + order: 2 !important; + } + .order-md-3 { + -webkit-box-ordinal-group: 4 !important; + -ms-flex-order: 3 !important; + order: 3 !important; + } + .order-md-4 { + -webkit-box-ordinal-group: 5 !important; + -ms-flex-order: 4 !important; + order: 4 !important; + } + .order-md-5 { + -webkit-box-ordinal-group: 6 !important; + -ms-flex-order: 5 !important; + order: 5 !important; + } + .order-md-last { + -webkit-box-ordinal-group: 7 !important; + -ms-flex-order: 6 !important; + order: 6 !important; + } + .m-md-0 { + margin: 0 !important; + } + .m-md-1 { + margin: 0.25rem !important; + } + .m-md-2 { + margin: 0.5rem !important; + } + .m-md-3 { + margin: 1rem !important; + } + .m-md-4 { + margin: 1.5rem !important; + } + .m-md-5 { + margin: 3rem !important; + } + .m-md-6 { + margin: 12px !important; + } + .m-md-7 { + margin: 30px !important; + } + .m-md-8 { + margin: 10px !important; + } + .m-md-9 { + margin: 20px !important; + } + .m-md-auto { + margin: auto !important; + } + .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-md-6 { + margin-right: 12px !important; + margin-left: 12px !important; + } + .mx-md-7 { + margin-right: 30px !important; + margin-left: 30px !important; + } + .mx-md-8 { + margin-right: 10px !important; + margin-left: 10px !important; + } + .mx-md-9 { + margin-right: 20px !important; + margin-left: 20px !important; + } + .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-md-6 { + margin-top: 12px !important; + margin-bottom: 12px !important; + } + .my-md-7 { + margin-top: 30px !important; + margin-bottom: 30px !important; + } + .my-md-8 { + margin-top: 10px !important; + margin-bottom: 10px !important; + } + .my-md-9 { + margin-top: 20px !important; + margin-bottom: 20px !important; + } + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-md-0 { + margin-top: 0 !important; + } + .mt-md-1 { + margin-top: 0.25rem !important; + } + .mt-md-2 { + margin-top: 0.5rem !important; + } + .mt-md-3 { + margin-top: 1rem !important; + } + .mt-md-4 { + margin-top: 1.5rem !important; + } + .mt-md-5 { + margin-top: 3rem !important; + } + .mt-md-6 { + margin-top: 12px !important; + } + .mt-md-7 { + margin-top: 30px !important; + } + .mt-md-8 { + margin-top: 10px !important; + } + .mt-md-9 { + margin-top: 20px !important; + } + .mt-md-auto { + margin-top: auto !important; + } + .me-md-0 { + margin-right: 0 !important; + } + .me-md-1 { + margin-right: 0.25rem !important; + } + .me-md-2 { + margin-right: 0.5rem !important; + } + .me-md-3 { + margin-right: 1rem !important; + } + .me-md-4 { + margin-right: 1.5rem !important; + } + .me-md-5 { + margin-right: 3rem !important; + } + .me-md-6 { + margin-right: 12px !important; + } + .me-md-7 { + margin-right: 30px !important; + } + .me-md-8 { + margin-right: 10px !important; + } + .me-md-9 { + margin-right: 20px !important; + } + .me-md-auto { + margin-right: auto !important; + } + .mb-md-0 { + margin-bottom: 0 !important; + } + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + .mb-md-3 { + margin-bottom: 1rem !important; + } + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + .mb-md-5 { + margin-bottom: 3rem !important; + } + .mb-md-6 { + margin-bottom: 12px !important; + } + .mb-md-7 { + margin-bottom: 30px !important; + } + .mb-md-8 { + margin-bottom: 10px !important; + } + .mb-md-9 { + margin-bottom: 20px !important; + } + .mb-md-auto { + margin-bottom: auto !important; + } + .ms-md-0 { + margin-left: 0 !important; + } + .ms-md-1 { + margin-left: 0.25rem !important; + } + .ms-md-2 { + margin-left: 0.5rem !important; + } + .ms-md-3 { + margin-left: 1rem !important; + } + .ms-md-4 { + margin-left: 1.5rem !important; + } + .ms-md-5 { + margin-left: 3rem !important; + } + .ms-md-6 { + margin-left: 12px !important; + } + .ms-md-7 { + margin-left: 30px !important; + } + .ms-md-8 { + margin-left: 10px !important; + } + .ms-md-9 { + margin-left: 20px !important; + } + .ms-md-auto { + margin-left: auto !important; + } + .m-md-n1 { + margin: -0.25rem !important; + } + .m-md-n2 { + margin: -0.5rem !important; + } + .m-md-n3 { + margin: -1rem !important; + } + .m-md-n4 { + margin: -1.5rem !important; + } + .m-md-n5 { + margin: -3rem !important; + } + .m-md-n6 { + margin: -12px !important; + } + .m-md-n7 { + margin: -30px !important; + } + .m-md-n8 { + margin: -10px !important; + } + .m-md-n9 { + margin: -20px !important; + } + .mx-md-n1 { + margin-right: -0.25rem !important; + margin-left: -0.25rem !important; + } + .mx-md-n2 { + margin-right: -0.5rem !important; + margin-left: -0.5rem !important; + } + .mx-md-n3 { + margin-right: -1rem !important; + margin-left: -1rem !important; + } + .mx-md-n4 { + margin-right: -1.5rem !important; + margin-left: -1.5rem !important; + } + .mx-md-n5 { + margin-right: -3rem !important; + margin-left: -3rem !important; + } + .mx-md-n6 { + margin-right: -12px !important; + margin-left: -12px !important; + } + .mx-md-n7 { + margin-right: -30px !important; + margin-left: -30px !important; + } + .mx-md-n8 { + margin-right: -10px !important; + margin-left: -10px !important; + } + .mx-md-n9 { + margin-right: -20px !important; + margin-left: -20px !important; + } + .my-md-n1 { + margin-top: -0.25rem !important; + margin-bottom: -0.25rem !important; + } + .my-md-n2 { + margin-top: -0.5rem !important; + margin-bottom: -0.5rem !important; + } + .my-md-n3 { + margin-top: -1rem !important; + margin-bottom: -1rem !important; + } + .my-md-n4 { + margin-top: -1.5rem !important; + margin-bottom: -1.5rem !important; + } + .my-md-n5 { + margin-top: -3rem !important; + margin-bottom: -3rem !important; + } + .my-md-n6 { + margin-top: -12px !important; + margin-bottom: -12px !important; + } + .my-md-n7 { + margin-top: -30px !important; + margin-bottom: -30px !important; + } + .my-md-n8 { + margin-top: -10px !important; + margin-bottom: -10px !important; + } + .my-md-n9 { + margin-top: -20px !important; + margin-bottom: -20px !important; + } + .mt-md-n1 { + margin-top: -0.25rem !important; + } + .mt-md-n2 { + margin-top: -0.5rem !important; + } + .mt-md-n3 { + margin-top: -1rem !important; + } + .mt-md-n4 { + margin-top: -1.5rem !important; + } + .mt-md-n5 { + margin-top: -3rem !important; + } + .mt-md-n6 { + margin-top: -12px !important; + } + .mt-md-n7 { + margin-top: -30px !important; + } + .mt-md-n8 { + margin-top: -10px !important; + } + .mt-md-n9 { + margin-top: -20px !important; + } + .me-md-n1 { + margin-right: -0.25rem !important; + } + .me-md-n2 { + margin-right: -0.5rem !important; + } + .me-md-n3 { + margin-right: -1rem !important; + } + .me-md-n4 { + margin-right: -1.5rem !important; + } + .me-md-n5 { + margin-right: -3rem !important; + } + .me-md-n6 { + margin-right: -12px !important; + } + .me-md-n7 { + margin-right: -30px !important; + } + .me-md-n8 { + margin-right: -10px !important; + } + .me-md-n9 { + margin-right: -20px !important; + } + .mb-md-n1 { + margin-bottom: -0.25rem !important; + } + .mb-md-n2 { + margin-bottom: -0.5rem !important; + } + .mb-md-n3 { + margin-bottom: -1rem !important; + } + .mb-md-n4 { + margin-bottom: -1.5rem !important; + } + .mb-md-n5 { + margin-bottom: -3rem !important; + } + .mb-md-n6 { + margin-bottom: -12px !important; + } + .mb-md-n7 { + margin-bottom: -30px !important; + } + .mb-md-n8 { + margin-bottom: -10px !important; + } + .mb-md-n9 { + margin-bottom: -20px !important; + } + .ms-md-n1 { + margin-left: -0.25rem !important; + } + .ms-md-n2 { + margin-left: -0.5rem !important; + } + .ms-md-n3 { + margin-left: -1rem !important; + } + .ms-md-n4 { + margin-left: -1.5rem !important; + } + .ms-md-n5 { + margin-left: -3rem !important; + } + .ms-md-n6 { + margin-left: -12px !important; + } + .ms-md-n7 { + margin-left: -30px !important; + } + .ms-md-n8 { + margin-left: -10px !important; + } + .ms-md-n9 { + margin-left: -20px !important; + } + .p-md-0 { + padding: 0 !important; + } + .p-md-1 { + padding: 0.25rem !important; + } + .p-md-2 { + padding: 0.5rem !important; + } + .p-md-3 { + padding: 1rem !important; + } + .p-md-4 { + padding: 1.5rem !important; + } + .p-md-5 { + padding: 3rem !important; + } + .p-md-6 { + padding: 12px !important; + } + .p-md-7 { + padding: 30px !important; + } + .p-md-8 { + padding: 10px !important; + } + .p-md-9 { + padding: 20px !important; + } + .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .px-md-6 { + padding-right: 12px !important; + padding-left: 12px !important; + } + .px-md-7 { + padding-right: 30px !important; + padding-left: 30px !important; + } + .px-md-8 { + padding-right: 10px !important; + padding-left: 10px !important; + } + .px-md-9 { + padding-right: 20px !important; + padding-left: 20px !important; + } + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .py-md-6 { + padding-top: 12px !important; + padding-bottom: 12px !important; + } + .py-md-7 { + padding-top: 30px !important; + padding-bottom: 30px !important; + } + .py-md-8 { + padding-top: 10px !important; + padding-bottom: 10px !important; + } + .py-md-9 { + padding-top: 20px !important; + padding-bottom: 20px !important; + } + .pt-md-0 { + padding-top: 0 !important; + } + .pt-md-1 { + padding-top: 0.25rem !important; + } + .pt-md-2 { + padding-top: 0.5rem !important; + } + .pt-md-3 { + padding-top: 1rem !important; + } + .pt-md-4 { + padding-top: 1.5rem !important; + } + .pt-md-5 { + padding-top: 3rem !important; + } + .pt-md-6 { + padding-top: 12px !important; + } + .pt-md-7 { + padding-top: 30px !important; + } + .pt-md-8 { + padding-top: 10px !important; + } + .pt-md-9 { + padding-top: 20px !important; + } + .pe-md-0 { + padding-right: 0 !important; + } + .pe-md-1 { + padding-right: 0.25rem !important; + } + .pe-md-2 { + padding-right: 0.5rem !important; + } + .pe-md-3 { + padding-right: 1rem !important; + } + .pe-md-4 { + padding-right: 1.5rem !important; + } + .pe-md-5 { + padding-right: 3rem !important; + } + .pe-md-6 { + padding-right: 12px !important; + } + .pe-md-7 { + padding-right: 30px !important; + } + .pe-md-8 { + padding-right: 10px !important; + } + .pe-md-9 { + padding-right: 20px !important; + } + .pb-md-0 { + padding-bottom: 0 !important; + } + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + .pb-md-3 { + padding-bottom: 1rem !important; + } + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + .pb-md-5 { + padding-bottom: 3rem !important; + } + .pb-md-6 { + padding-bottom: 12px !important; + } + .pb-md-7 { + padding-bottom: 30px !important; + } + .pb-md-8 { + padding-bottom: 10px !important; + } + .pb-md-9 { + padding-bottom: 20px !important; + } + .ps-md-0 { + padding-left: 0 !important; + } + .ps-md-1 { + padding-left: 0.25rem !important; + } + .ps-md-2 { + padding-left: 0.5rem !important; + } + .ps-md-3 { + padding-left: 1rem !important; + } + .ps-md-4 { + padding-left: 1.5rem !important; + } + .ps-md-5 { + padding-left: 3rem !important; + } + .ps-md-6 { + padding-left: 12px !important; + } + .ps-md-7 { + padding-left: 30px !important; + } + .ps-md-8 { + padding-left: 10px !important; + } + .ps-md-9 { + padding-left: 20px !important; + } + .gap-md-0 { + gap: 0 !important; + } + .gap-md-1 { + gap: 0.25rem !important; + } + .gap-md-2 { + gap: 0.5rem !important; + } + .gap-md-3 { + gap: 1rem !important; + } + .gap-md-4 { + gap: 1.5rem !important; + } + .gap-md-5 { + gap: 3rem !important; + } + .gap-md-6 { + gap: 12px !important; + } + .gap-md-7 { + gap: 30px !important; + } + .gap-md-8 { + gap: 10px !important; + } + .gap-md-9 { + gap: 20px !important; + } + .row-gap-md-0 { + row-gap: 0 !important; + } + .row-gap-md-1 { + row-gap: 0.25rem !important; + } + .row-gap-md-2 { + row-gap: 0.5rem !important; + } + .row-gap-md-3 { + row-gap: 1rem !important; + } + .row-gap-md-4 { + row-gap: 1.5rem !important; + } + .row-gap-md-5 { + row-gap: 3rem !important; + } + .row-gap-md-6 { + row-gap: 12px !important; + } + .row-gap-md-7 { + row-gap: 30px !important; + } + .row-gap-md-8 { + row-gap: 10px !important; + } + .row-gap-md-9 { + row-gap: 20px !important; + } + .column-gap-md-0 { + -webkit-column-gap: 0 !important; + -moz-column-gap: 0 !important; + column-gap: 0 !important; + } + .column-gap-md-1 { + -webkit-column-gap: 0.25rem !important; + -moz-column-gap: 0.25rem !important; + column-gap: 0.25rem !important; + } + .column-gap-md-2 { + -webkit-column-gap: 0.5rem !important; + -moz-column-gap: 0.5rem !important; + column-gap: 0.5rem !important; + } + .column-gap-md-3 { + -webkit-column-gap: 1rem !important; + -moz-column-gap: 1rem !important; + column-gap: 1rem !important; + } + .column-gap-md-4 { + -webkit-column-gap: 1.5rem !important; + -moz-column-gap: 1.5rem !important; + column-gap: 1.5rem !important; + } + .column-gap-md-5 { + -webkit-column-gap: 3rem !important; + -moz-column-gap: 3rem !important; + column-gap: 3rem !important; + } + .column-gap-md-6 { + -webkit-column-gap: 12px !important; + -moz-column-gap: 12px !important; + column-gap: 12px !important; + } + .column-gap-md-7 { + -webkit-column-gap: 30px !important; + -moz-column-gap: 30px !important; + column-gap: 30px !important; + } + .column-gap-md-8 { + -webkit-column-gap: 10px !important; + -moz-column-gap: 10px !important; + column-gap: 10px !important; + } + .column-gap-md-9 { + -webkit-column-gap: 20px !important; + -moz-column-gap: 20px !important; + column-gap: 20px !important; + } + .text-md-start { + text-align: left !important; + } + .text-md-end { + text-align: right !important; + } + .text-md-center { + text-align: center !important; + } +} +@media (min-width: 992px) { + .float-lg-start { + float: left !important; + } + .float-lg-end { + float: right !important; + } + .float-lg-none { + float: none !important; + } + .object-fit-lg-contain { + -o-object-fit: contain !important; + object-fit: contain !important; + } + .object-fit-lg-cover { + -o-object-fit: cover !important; + object-fit: cover !important; + } + .object-fit-lg-fill { + -o-object-fit: fill !important; + object-fit: fill !important; + } + .object-fit-lg-scale { + -o-object-fit: scale-down !important; + object-fit: scale-down !important; + } + .object-fit-lg-none { + -o-object-fit: none !important; + object-fit: none !important; + } + .d-lg-inline { + display: inline !important; + } + .d-lg-inline-block { + display: inline-block !important; + } + .d-lg-block { + display: block !important; + } + .d-lg-grid { + display: -ms-grid !important; + display: grid !important; + } + .d-lg-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; + } + .d-lg-table { + display: table !important; + } + .d-lg-table-row { + display: table-row !important; + } + .d-lg-table-cell { + display: table-cell !important; + } + .d-lg-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + } + .d-lg-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } + .d-lg-none { + display: none !important; + } + .flex-lg-fill { + -webkit-box-flex: 1 !important; + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-lg-row { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-lg-column { + -webkit-box-orient: vertical !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-lg-row-reverse { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-lg-column-reverse { + -webkit-box-orient: vertical !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-lg-grow-0 { + -webkit-box-flex: 0 !important; + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-lg-grow-1 { + -webkit-box-flex: 1 !important; + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-lg-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-lg-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .flex-lg-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-lg-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-lg-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .justify-content-lg-start { + -webkit-box-pack: start !important; + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-lg-end { + -webkit-box-pack: end !important; + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-lg-center { + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-lg-between { + -webkit-box-pack: justify !important; + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-lg-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .justify-content-lg-evenly { + -webkit-box-pack: space-evenly !important; + -ms-flex-pack: space-evenly !important; + justify-content: space-evenly !important; + } + .align-items-lg-start { + -webkit-box-align: start !important; + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-lg-end { + -webkit-box-align: end !important; + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-lg-center { + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-lg-baseline { + -webkit-box-align: baseline !important; + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-lg-stretch { + -webkit-box-align: stretch !important; + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-lg-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-lg-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-lg-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-lg-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-lg-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-lg-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-lg-auto { + -ms-flex-item-align: auto !important; + -ms-grid-row-align: auto !important; + align-self: auto !important; + } + .align-self-lg-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-lg-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-lg-center { + -ms-flex-item-align: center !important; + -ms-grid-row-align: center !important; + align-self: center !important; + } + .align-self-lg-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-lg-stretch { + -ms-flex-item-align: stretch !important; + -ms-grid-row-align: stretch !important; + align-self: stretch !important; + } + .order-lg-first { + -webkit-box-ordinal-group: 0 !important; + -ms-flex-order: -1 !important; + order: -1 !important; + } + .order-lg-0 { + -webkit-box-ordinal-group: 1 !important; + -ms-flex-order: 0 !important; + order: 0 !important; + } + .order-lg-1 { + -webkit-box-ordinal-group: 2 !important; + -ms-flex-order: 1 !important; + order: 1 !important; + } + .order-lg-2 { + -webkit-box-ordinal-group: 3 !important; + -ms-flex-order: 2 !important; + order: 2 !important; + } + .order-lg-3 { + -webkit-box-ordinal-group: 4 !important; + -ms-flex-order: 3 !important; + order: 3 !important; + } + .order-lg-4 { + -webkit-box-ordinal-group: 5 !important; + -ms-flex-order: 4 !important; + order: 4 !important; + } + .order-lg-5 { + -webkit-box-ordinal-group: 6 !important; + -ms-flex-order: 5 !important; + order: 5 !important; + } + .order-lg-last { + -webkit-box-ordinal-group: 7 !important; + -ms-flex-order: 6 !important; + order: 6 !important; + } + .m-lg-0 { + margin: 0 !important; + } + .m-lg-1 { + margin: 0.25rem !important; + } + .m-lg-2 { + margin: 0.5rem !important; + } + .m-lg-3 { + margin: 1rem !important; + } + .m-lg-4 { + margin: 1.5rem !important; + } + .m-lg-5 { + margin: 3rem !important; + } + .m-lg-6 { + margin: 12px !important; + } + .m-lg-7 { + margin: 30px !important; + } + .m-lg-8 { + margin: 10px !important; + } + .m-lg-9 { + margin: 20px !important; + } + .m-lg-auto { + margin: auto !important; + } + .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-lg-6 { + margin-right: 12px !important; + margin-left: 12px !important; + } + .mx-lg-7 { + margin-right: 30px !important; + margin-left: 30px !important; + } + .mx-lg-8 { + margin-right: 10px !important; + margin-left: 10px !important; + } + .mx-lg-9 { + margin-right: 20px !important; + margin-left: 20px !important; + } + .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-lg-6 { + margin-top: 12px !important; + margin-bottom: 12px !important; + } + .my-lg-7 { + margin-top: 30px !important; + margin-bottom: 30px !important; + } + .my-lg-8 { + margin-top: 10px !important; + margin-bottom: 10px !important; + } + .my-lg-9 { + margin-top: 20px !important; + margin-bottom: 20px !important; + } + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-lg-0 { + margin-top: 0 !important; + } + .mt-lg-1 { + margin-top: 0.25rem !important; + } + .mt-lg-2 { + margin-top: 0.5rem !important; + } + .mt-lg-3 { + margin-top: 1rem !important; + } + .mt-lg-4 { + margin-top: 1.5rem !important; + } + .mt-lg-5 { + margin-top: 3rem !important; + } + .mt-lg-6 { + margin-top: 12px !important; + } + .mt-lg-7 { + margin-top: 30px !important; + } + .mt-lg-8 { + margin-top: 10px !important; + } + .mt-lg-9 { + margin-top: 20px !important; + } + .mt-lg-auto { + margin-top: auto !important; + } + .me-lg-0 { + margin-right: 0 !important; + } + .me-lg-1 { + margin-right: 0.25rem !important; + } + .me-lg-2 { + margin-right: 0.5rem !important; + } + .me-lg-3 { + margin-right: 1rem !important; + } + .me-lg-4 { + margin-right: 1.5rem !important; + } + .me-lg-5 { + margin-right: 3rem !important; + } + .me-lg-6 { + margin-right: 12px !important; + } + .me-lg-7 { + margin-right: 30px !important; + } + .me-lg-8 { + margin-right: 10px !important; + } + .me-lg-9 { + margin-right: 20px !important; + } + .me-lg-auto { + margin-right: auto !important; + } + .mb-lg-0 { + margin-bottom: 0 !important; + } + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + .mb-lg-3 { + margin-bottom: 1rem !important; + } + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + .mb-lg-5 { + margin-bottom: 3rem !important; + } + .mb-lg-6 { + margin-bottom: 12px !important; + } + .mb-lg-7 { + margin-bottom: 30px !important; + } + .mb-lg-8 { + margin-bottom: 10px !important; + } + .mb-lg-9 { + margin-bottom: 20px !important; + } + .mb-lg-auto { + margin-bottom: auto !important; + } + .ms-lg-0 { + margin-left: 0 !important; + } + .ms-lg-1 { + margin-left: 0.25rem !important; + } + .ms-lg-2 { + margin-left: 0.5rem !important; + } + .ms-lg-3 { + margin-left: 1rem !important; + } + .ms-lg-4 { + margin-left: 1.5rem !important; + } + .ms-lg-5 { + margin-left: 3rem !important; + } + .ms-lg-6 { + margin-left: 12px !important; + } + .ms-lg-7 { + margin-left: 30px !important; + } + .ms-lg-8 { + margin-left: 10px !important; + } + .ms-lg-9 { + margin-left: 20px !important; + } + .ms-lg-auto { + margin-left: auto !important; + } + .m-lg-n1 { + margin: -0.25rem !important; + } + .m-lg-n2 { + margin: -0.5rem !important; + } + .m-lg-n3 { + margin: -1rem !important; + } + .m-lg-n4 { + margin: -1.5rem !important; + } + .m-lg-n5 { + margin: -3rem !important; + } + .m-lg-n6 { + margin: -12px !important; + } + .m-lg-n7 { + margin: -30px !important; + } + .m-lg-n8 { + margin: -10px !important; + } + .m-lg-n9 { + margin: -20px !important; + } + .mx-lg-n1 { + margin-right: -0.25rem !important; + margin-left: -0.25rem !important; + } + .mx-lg-n2 { + margin-right: -0.5rem !important; + margin-left: -0.5rem !important; + } + .mx-lg-n3 { + margin-right: -1rem !important; + margin-left: -1rem !important; + } + .mx-lg-n4 { + margin-right: -1.5rem !important; + margin-left: -1.5rem !important; + } + .mx-lg-n5 { + margin-right: -3rem !important; + margin-left: -3rem !important; + } + .mx-lg-n6 { + margin-right: -12px !important; + margin-left: -12px !important; + } + .mx-lg-n7 { + margin-right: -30px !important; + margin-left: -30px !important; + } + .mx-lg-n8 { + margin-right: -10px !important; + margin-left: -10px !important; + } + .mx-lg-n9 { + margin-right: -20px !important; + margin-left: -20px !important; + } + .my-lg-n1 { + margin-top: -0.25rem !important; + margin-bottom: -0.25rem !important; + } + .my-lg-n2 { + margin-top: -0.5rem !important; + margin-bottom: -0.5rem !important; + } + .my-lg-n3 { + margin-top: -1rem !important; + margin-bottom: -1rem !important; + } + .my-lg-n4 { + margin-top: -1.5rem !important; + margin-bottom: -1.5rem !important; + } + .my-lg-n5 { + margin-top: -3rem !important; + margin-bottom: -3rem !important; + } + .my-lg-n6 { + margin-top: -12px !important; + margin-bottom: -12px !important; + } + .my-lg-n7 { + margin-top: -30px !important; + margin-bottom: -30px !important; + } + .my-lg-n8 { + margin-top: -10px !important; + margin-bottom: -10px !important; + } + .my-lg-n9 { + margin-top: -20px !important; + margin-bottom: -20px !important; + } + .mt-lg-n1 { + margin-top: -0.25rem !important; + } + .mt-lg-n2 { + margin-top: -0.5rem !important; + } + .mt-lg-n3 { + margin-top: -1rem !important; + } + .mt-lg-n4 { + margin-top: -1.5rem !important; + } + .mt-lg-n5 { + margin-top: -3rem !important; + } + .mt-lg-n6 { + margin-top: -12px !important; + } + .mt-lg-n7 { + margin-top: -30px !important; + } + .mt-lg-n8 { + margin-top: -10px !important; + } + .mt-lg-n9 { + margin-top: -20px !important; + } + .me-lg-n1 { + margin-right: -0.25rem !important; + } + .me-lg-n2 { + margin-right: -0.5rem !important; + } + .me-lg-n3 { + margin-right: -1rem !important; + } + .me-lg-n4 { + margin-right: -1.5rem !important; + } + .me-lg-n5 { + margin-right: -3rem !important; + } + .me-lg-n6 { + margin-right: -12px !important; + } + .me-lg-n7 { + margin-right: -30px !important; + } + .me-lg-n8 { + margin-right: -10px !important; + } + .me-lg-n9 { + margin-right: -20px !important; + } + .mb-lg-n1 { + margin-bottom: -0.25rem !important; + } + .mb-lg-n2 { + margin-bottom: -0.5rem !important; + } + .mb-lg-n3 { + margin-bottom: -1rem !important; + } + .mb-lg-n4 { + margin-bottom: -1.5rem !important; + } + .mb-lg-n5 { + margin-bottom: -3rem !important; + } + .mb-lg-n6 { + margin-bottom: -12px !important; + } + .mb-lg-n7 { + margin-bottom: -30px !important; + } + .mb-lg-n8 { + margin-bottom: -10px !important; + } + .mb-lg-n9 { + margin-bottom: -20px !important; + } + .ms-lg-n1 { + margin-left: -0.25rem !important; + } + .ms-lg-n2 { + margin-left: -0.5rem !important; + } + .ms-lg-n3 { + margin-left: -1rem !important; + } + .ms-lg-n4 { + margin-left: -1.5rem !important; + } + .ms-lg-n5 { + margin-left: -3rem !important; + } + .ms-lg-n6 { + margin-left: -12px !important; + } + .ms-lg-n7 { + margin-left: -30px !important; + } + .ms-lg-n8 { + margin-left: -10px !important; + } + .ms-lg-n9 { + margin-left: -20px !important; + } + .p-lg-0 { + padding: 0 !important; + } + .p-lg-1 { + padding: 0.25rem !important; + } + .p-lg-2 { + padding: 0.5rem !important; + } + .p-lg-3 { + padding: 1rem !important; + } + .p-lg-4 { + padding: 1.5rem !important; + } + .p-lg-5 { + padding: 3rem !important; + } + .p-lg-6 { + padding: 12px !important; + } + .p-lg-7 { + padding: 30px !important; + } + .p-lg-8 { + padding: 10px !important; + } + .p-lg-9 { + padding: 20px !important; + } + .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .px-lg-6 { + padding-right: 12px !important; + padding-left: 12px !important; + } + .px-lg-7 { + padding-right: 30px !important; + padding-left: 30px !important; + } + .px-lg-8 { + padding-right: 10px !important; + padding-left: 10px !important; + } + .px-lg-9 { + padding-right: 20px !important; + padding-left: 20px !important; + } + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .py-lg-6 { + padding-top: 12px !important; + padding-bottom: 12px !important; + } + .py-lg-7 { + padding-top: 30px !important; + padding-bottom: 30px !important; + } + .py-lg-8 { + padding-top: 10px !important; + padding-bottom: 10px !important; + } + .py-lg-9 { + padding-top: 20px !important; + padding-bottom: 20px !important; + } + .pt-lg-0 { + padding-top: 0 !important; + } + .pt-lg-1 { + padding-top: 0.25rem !important; + } + .pt-lg-2 { + padding-top: 0.5rem !important; + } + .pt-lg-3 { + padding-top: 1rem !important; + } + .pt-lg-4 { + padding-top: 1.5rem !important; + } + .pt-lg-5 { + padding-top: 3rem !important; + } + .pt-lg-6 { + padding-top: 12px !important; + } + .pt-lg-7 { + padding-top: 30px !important; + } + .pt-lg-8 { + padding-top: 10px !important; + } + .pt-lg-9 { + padding-top: 20px !important; + } + .pe-lg-0 { + padding-right: 0 !important; + } + .pe-lg-1 { + padding-right: 0.25rem !important; + } + .pe-lg-2 { + padding-right: 0.5rem !important; + } + .pe-lg-3 { + padding-right: 1rem !important; + } + .pe-lg-4 { + padding-right: 1.5rem !important; + } + .pe-lg-5 { + padding-right: 3rem !important; + } + .pe-lg-6 { + padding-right: 12px !important; + } + .pe-lg-7 { + padding-right: 30px !important; + } + .pe-lg-8 { + padding-right: 10px !important; + } + .pe-lg-9 { + padding-right: 20px !important; + } + .pb-lg-0 { + padding-bottom: 0 !important; + } + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + .pb-lg-3 { + padding-bottom: 1rem !important; + } + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + .pb-lg-5 { + padding-bottom: 3rem !important; + } + .pb-lg-6 { + padding-bottom: 12px !important; + } + .pb-lg-7 { + padding-bottom: 30px !important; + } + .pb-lg-8 { + padding-bottom: 10px !important; + } + .pb-lg-9 { + padding-bottom: 20px !important; + } + .ps-lg-0 { + padding-left: 0 !important; + } + .ps-lg-1 { + padding-left: 0.25rem !important; + } + .ps-lg-2 { + padding-left: 0.5rem !important; + } + .ps-lg-3 { + padding-left: 1rem !important; + } + .ps-lg-4 { + padding-left: 1.5rem !important; + } + .ps-lg-5 { + padding-left: 3rem !important; + } + .ps-lg-6 { + padding-left: 12px !important; + } + .ps-lg-7 { + padding-left: 30px !important; + } + .ps-lg-8 { + padding-left: 10px !important; + } + .ps-lg-9 { + padding-left: 20px !important; + } + .gap-lg-0 { + gap: 0 !important; + } + .gap-lg-1 { + gap: 0.25rem !important; + } + .gap-lg-2 { + gap: 0.5rem !important; + } + .gap-lg-3 { + gap: 1rem !important; + } + .gap-lg-4 { + gap: 1.5rem !important; + } + .gap-lg-5 { + gap: 3rem !important; + } + .gap-lg-6 { + gap: 12px !important; + } + .gap-lg-7 { + gap: 30px !important; + } + .gap-lg-8 { + gap: 10px !important; + } + .gap-lg-9 { + gap: 20px !important; + } + .row-gap-lg-0 { + row-gap: 0 !important; + } + .row-gap-lg-1 { + row-gap: 0.25rem !important; + } + .row-gap-lg-2 { + row-gap: 0.5rem !important; + } + .row-gap-lg-3 { + row-gap: 1rem !important; + } + .row-gap-lg-4 { + row-gap: 1.5rem !important; + } + .row-gap-lg-5 { + row-gap: 3rem !important; + } + .row-gap-lg-6 { + row-gap: 12px !important; + } + .row-gap-lg-7 { + row-gap: 30px !important; + } + .row-gap-lg-8 { + row-gap: 10px !important; + } + .row-gap-lg-9 { + row-gap: 20px !important; + } + .column-gap-lg-0 { + -webkit-column-gap: 0 !important; + -moz-column-gap: 0 !important; + column-gap: 0 !important; + } + .column-gap-lg-1 { + -webkit-column-gap: 0.25rem !important; + -moz-column-gap: 0.25rem !important; + column-gap: 0.25rem !important; + } + .column-gap-lg-2 { + -webkit-column-gap: 0.5rem !important; + -moz-column-gap: 0.5rem !important; + column-gap: 0.5rem !important; + } + .column-gap-lg-3 { + -webkit-column-gap: 1rem !important; + -moz-column-gap: 1rem !important; + column-gap: 1rem !important; + } + .column-gap-lg-4 { + -webkit-column-gap: 1.5rem !important; + -moz-column-gap: 1.5rem !important; + column-gap: 1.5rem !important; + } + .column-gap-lg-5 { + -webkit-column-gap: 3rem !important; + -moz-column-gap: 3rem !important; + column-gap: 3rem !important; + } + .column-gap-lg-6 { + -webkit-column-gap: 12px !important; + -moz-column-gap: 12px !important; + column-gap: 12px !important; + } + .column-gap-lg-7 { + -webkit-column-gap: 30px !important; + -moz-column-gap: 30px !important; + column-gap: 30px !important; + } + .column-gap-lg-8 { + -webkit-column-gap: 10px !important; + -moz-column-gap: 10px !important; + column-gap: 10px !important; + } + .column-gap-lg-9 { + -webkit-column-gap: 20px !important; + -moz-column-gap: 20px !important; + column-gap: 20px !important; + } + .text-lg-start { + text-align: left !important; + } + .text-lg-end { + text-align: right !important; + } + .text-lg-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .float-xl-start { + float: left !important; + } + .float-xl-end { + float: right !important; + } + .float-xl-none { + float: none !important; + } + .object-fit-xl-contain { + -o-object-fit: contain !important; + object-fit: contain !important; + } + .object-fit-xl-cover { + -o-object-fit: cover !important; + object-fit: cover !important; + } + .object-fit-xl-fill { + -o-object-fit: fill !important; + object-fit: fill !important; + } + .object-fit-xl-scale { + -o-object-fit: scale-down !important; + object-fit: scale-down !important; + } + .object-fit-xl-none { + -o-object-fit: none !important; + object-fit: none !important; + } + .d-xl-inline { + display: inline !important; + } + .d-xl-inline-block { + display: inline-block !important; + } + .d-xl-block { + display: block !important; + } + .d-xl-grid { + display: -ms-grid !important; + display: grid !important; + } + .d-xl-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; + } + .d-xl-table { + display: table !important; + } + .d-xl-table-row { + display: table-row !important; + } + .d-xl-table-cell { + display: table-cell !important; + } + .d-xl-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + } + .d-xl-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } + .d-xl-none { + display: none !important; + } + .flex-xl-fill { + -webkit-box-flex: 1 !important; + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-xl-row { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-xl-column { + -webkit-box-orient: vertical !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-xl-row-reverse { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-xl-column-reverse { + -webkit-box-orient: vertical !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-xl-grow-0 { + -webkit-box-flex: 0 !important; + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-xl-grow-1 { + -webkit-box-flex: 1 !important; + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-xl-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-xl-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .flex-xl-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-xl-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-xl-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .justify-content-xl-start { + -webkit-box-pack: start !important; + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-xl-end { + -webkit-box-pack: end !important; + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-xl-center { + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-xl-between { + -webkit-box-pack: justify !important; + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-xl-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .justify-content-xl-evenly { + -webkit-box-pack: space-evenly !important; + -ms-flex-pack: space-evenly !important; + justify-content: space-evenly !important; + } + .align-items-xl-start { + -webkit-box-align: start !important; + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-xl-end { + -webkit-box-align: end !important; + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-xl-center { + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-xl-baseline { + -webkit-box-align: baseline !important; + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-xl-stretch { + -webkit-box-align: stretch !important; + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-xl-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-xl-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-xl-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-xl-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-xl-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-xl-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-xl-auto { + -ms-flex-item-align: auto !important; + -ms-grid-row-align: auto !important; + align-self: auto !important; + } + .align-self-xl-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-xl-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-xl-center { + -ms-flex-item-align: center !important; + -ms-grid-row-align: center !important; + align-self: center !important; + } + .align-self-xl-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-xl-stretch { + -ms-flex-item-align: stretch !important; + -ms-grid-row-align: stretch !important; + align-self: stretch !important; + } + .order-xl-first { + -webkit-box-ordinal-group: 0 !important; + -ms-flex-order: -1 !important; + order: -1 !important; + } + .order-xl-0 { + -webkit-box-ordinal-group: 1 !important; + -ms-flex-order: 0 !important; + order: 0 !important; + } + .order-xl-1 { + -webkit-box-ordinal-group: 2 !important; + -ms-flex-order: 1 !important; + order: 1 !important; + } + .order-xl-2 { + -webkit-box-ordinal-group: 3 !important; + -ms-flex-order: 2 !important; + order: 2 !important; + } + .order-xl-3 { + -webkit-box-ordinal-group: 4 !important; + -ms-flex-order: 3 !important; + order: 3 !important; + } + .order-xl-4 { + -webkit-box-ordinal-group: 5 !important; + -ms-flex-order: 4 !important; + order: 4 !important; + } + .order-xl-5 { + -webkit-box-ordinal-group: 6 !important; + -ms-flex-order: 5 !important; + order: 5 !important; + } + .order-xl-last { + -webkit-box-ordinal-group: 7 !important; + -ms-flex-order: 6 !important; + order: 6 !important; + } + .m-xl-0 { + margin: 0 !important; + } + .m-xl-1 { + margin: 0.25rem !important; + } + .m-xl-2 { + margin: 0.5rem !important; + } + .m-xl-3 { + margin: 1rem !important; + } + .m-xl-4 { + margin: 1.5rem !important; + } + .m-xl-5 { + margin: 3rem !important; + } + .m-xl-6 { + margin: 12px !important; + } + .m-xl-7 { + margin: 30px !important; + } + .m-xl-8 { + margin: 10px !important; + } + .m-xl-9 { + margin: 20px !important; + } + .m-xl-auto { + margin: auto !important; + } + .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xl-6 { + margin-right: 12px !important; + margin-left: 12px !important; + } + .mx-xl-7 { + margin-right: 30px !important; + margin-left: 30px !important; + } + .mx-xl-8 { + margin-right: 10px !important; + margin-left: 10px !important; + } + .mx-xl-9 { + margin-right: 20px !important; + margin-left: 20px !important; + } + .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xl-6 { + margin-top: 12px !important; + margin-bottom: 12px !important; + } + .my-xl-7 { + margin-top: 30px !important; + margin-bottom: 30px !important; + } + .my-xl-8 { + margin-top: 10px !important; + margin-bottom: 10px !important; + } + .my-xl-9 { + margin-top: 20px !important; + margin-bottom: 20px !important; + } + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xl-0 { + margin-top: 0 !important; + } + .mt-xl-1 { + margin-top: 0.25rem !important; + } + .mt-xl-2 { + margin-top: 0.5rem !important; + } + .mt-xl-3 { + margin-top: 1rem !important; + } + .mt-xl-4 { + margin-top: 1.5rem !important; + } + .mt-xl-5 { + margin-top: 3rem !important; + } + .mt-xl-6 { + margin-top: 12px !important; + } + .mt-xl-7 { + margin-top: 30px !important; + } + .mt-xl-8 { + margin-top: 10px !important; + } + .mt-xl-9 { + margin-top: 20px !important; + } + .mt-xl-auto { + margin-top: auto !important; + } + .me-xl-0 { + margin-right: 0 !important; + } + .me-xl-1 { + margin-right: 0.25rem !important; + } + .me-xl-2 { + margin-right: 0.5rem !important; + } + .me-xl-3 { + margin-right: 1rem !important; + } + .me-xl-4 { + margin-right: 1.5rem !important; + } + .me-xl-5 { + margin-right: 3rem !important; + } + .me-xl-6 { + margin-right: 12px !important; + } + .me-xl-7 { + margin-right: 30px !important; + } + .me-xl-8 { + margin-right: 10px !important; + } + .me-xl-9 { + margin-right: 20px !important; + } + .me-xl-auto { + margin-right: auto !important; + } + .mb-xl-0 { + margin-bottom: 0 !important; + } + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xl-3 { + margin-bottom: 1rem !important; + } + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xl-5 { + margin-bottom: 3rem !important; + } + .mb-xl-6 { + margin-bottom: 12px !important; + } + .mb-xl-7 { + margin-bottom: 30px !important; + } + .mb-xl-8 { + margin-bottom: 10px !important; + } + .mb-xl-9 { + margin-bottom: 20px !important; + } + .mb-xl-auto { + margin-bottom: auto !important; + } + .ms-xl-0 { + margin-left: 0 !important; + } + .ms-xl-1 { + margin-left: 0.25rem !important; + } + .ms-xl-2 { + margin-left: 0.5rem !important; + } + .ms-xl-3 { + margin-left: 1rem !important; + } + .ms-xl-4 { + margin-left: 1.5rem !important; + } + .ms-xl-5 { + margin-left: 3rem !important; + } + .ms-xl-6 { + margin-left: 12px !important; + } + .ms-xl-7 { + margin-left: 30px !important; + } + .ms-xl-8 { + margin-left: 10px !important; + } + .ms-xl-9 { + margin-left: 20px !important; + } + .ms-xl-auto { + margin-left: auto !important; + } + .m-xl-n1 { + margin: -0.25rem !important; + } + .m-xl-n2 { + margin: -0.5rem !important; + } + .m-xl-n3 { + margin: -1rem !important; + } + .m-xl-n4 { + margin: -1.5rem !important; + } + .m-xl-n5 { + margin: -3rem !important; + } + .m-xl-n6 { + margin: -12px !important; + } + .m-xl-n7 { + margin: -30px !important; + } + .m-xl-n8 { + margin: -10px !important; + } + .m-xl-n9 { + margin: -20px !important; + } + .mx-xl-n1 { + margin-right: -0.25rem !important; + margin-left: -0.25rem !important; + } + .mx-xl-n2 { + margin-right: -0.5rem !important; + margin-left: -0.5rem !important; + } + .mx-xl-n3 { + margin-right: -1rem !important; + margin-left: -1rem !important; + } + .mx-xl-n4 { + margin-right: -1.5rem !important; + margin-left: -1.5rem !important; + } + .mx-xl-n5 { + margin-right: -3rem !important; + margin-left: -3rem !important; + } + .mx-xl-n6 { + margin-right: -12px !important; + margin-left: -12px !important; + } + .mx-xl-n7 { + margin-right: -30px !important; + margin-left: -30px !important; + } + .mx-xl-n8 { + margin-right: -10px !important; + margin-left: -10px !important; + } + .mx-xl-n9 { + margin-right: -20px !important; + margin-left: -20px !important; + } + .my-xl-n1 { + margin-top: -0.25rem !important; + margin-bottom: -0.25rem !important; + } + .my-xl-n2 { + margin-top: -0.5rem !important; + margin-bottom: -0.5rem !important; + } + .my-xl-n3 { + margin-top: -1rem !important; + margin-bottom: -1rem !important; + } + .my-xl-n4 { + margin-top: -1.5rem !important; + margin-bottom: -1.5rem !important; + } + .my-xl-n5 { + margin-top: -3rem !important; + margin-bottom: -3rem !important; + } + .my-xl-n6 { + margin-top: -12px !important; + margin-bottom: -12px !important; + } + .my-xl-n7 { + margin-top: -30px !important; + margin-bottom: -30px !important; + } + .my-xl-n8 { + margin-top: -10px !important; + margin-bottom: -10px !important; + } + .my-xl-n9 { + margin-top: -20px !important; + margin-bottom: -20px !important; + } + .mt-xl-n1 { + margin-top: -0.25rem !important; + } + .mt-xl-n2 { + margin-top: -0.5rem !important; + } + .mt-xl-n3 { + margin-top: -1rem !important; + } + .mt-xl-n4 { + margin-top: -1.5rem !important; + } + .mt-xl-n5 { + margin-top: -3rem !important; + } + .mt-xl-n6 { + margin-top: -12px !important; + } + .mt-xl-n7 { + margin-top: -30px !important; + } + .mt-xl-n8 { + margin-top: -10px !important; + } + .mt-xl-n9 { + margin-top: -20px !important; + } + .me-xl-n1 { + margin-right: -0.25rem !important; + } + .me-xl-n2 { + margin-right: -0.5rem !important; + } + .me-xl-n3 { + margin-right: -1rem !important; + } + .me-xl-n4 { + margin-right: -1.5rem !important; + } + .me-xl-n5 { + margin-right: -3rem !important; + } + .me-xl-n6 { + margin-right: -12px !important; + } + .me-xl-n7 { + margin-right: -30px !important; + } + .me-xl-n8 { + margin-right: -10px !important; + } + .me-xl-n9 { + margin-right: -20px !important; + } + .mb-xl-n1 { + margin-bottom: -0.25rem !important; + } + .mb-xl-n2 { + margin-bottom: -0.5rem !important; + } + .mb-xl-n3 { + margin-bottom: -1rem !important; + } + .mb-xl-n4 { + margin-bottom: -1.5rem !important; + } + .mb-xl-n5 { + margin-bottom: -3rem !important; + } + .mb-xl-n6 { + margin-bottom: -12px !important; + } + .mb-xl-n7 { + margin-bottom: -30px !important; + } + .mb-xl-n8 { + margin-bottom: -10px !important; + } + .mb-xl-n9 { + margin-bottom: -20px !important; + } + .ms-xl-n1 { + margin-left: -0.25rem !important; + } + .ms-xl-n2 { + margin-left: -0.5rem !important; + } + .ms-xl-n3 { + margin-left: -1rem !important; + } + .ms-xl-n4 { + margin-left: -1.5rem !important; + } + .ms-xl-n5 { + margin-left: -3rem !important; + } + .ms-xl-n6 { + margin-left: -12px !important; + } + .ms-xl-n7 { + margin-left: -30px !important; + } + .ms-xl-n8 { + margin-left: -10px !important; + } + .ms-xl-n9 { + margin-left: -20px !important; + } + .p-xl-0 { + padding: 0 !important; + } + .p-xl-1 { + padding: 0.25rem !important; + } + .p-xl-2 { + padding: 0.5rem !important; + } + .p-xl-3 { + padding: 1rem !important; + } + .p-xl-4 { + padding: 1.5rem !important; + } + .p-xl-5 { + padding: 3rem !important; + } + .p-xl-6 { + padding: 12px !important; + } + .p-xl-7 { + padding: 30px !important; + } + .p-xl-8 { + padding: 10px !important; + } + .p-xl-9 { + padding: 20px !important; + } + .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .px-xl-6 { + padding-right: 12px !important; + padding-left: 12px !important; + } + .px-xl-7 { + padding-right: 30px !important; + padding-left: 30px !important; + } + .px-xl-8 { + padding-right: 10px !important; + padding-left: 10px !important; + } + .px-xl-9 { + padding-right: 20px !important; + padding-left: 20px !important; + } + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .py-xl-6 { + padding-top: 12px !important; + padding-bottom: 12px !important; + } + .py-xl-7 { + padding-top: 30px !important; + padding-bottom: 30px !important; + } + .py-xl-8 { + padding-top: 10px !important; + padding-bottom: 10px !important; + } + .py-xl-9 { + padding-top: 20px !important; + padding-bottom: 20px !important; + } + .pt-xl-0 { + padding-top: 0 !important; + } + .pt-xl-1 { + padding-top: 0.25rem !important; + } + .pt-xl-2 { + padding-top: 0.5rem !important; + } + .pt-xl-3 { + padding-top: 1rem !important; + } + .pt-xl-4 { + padding-top: 1.5rem !important; + } + .pt-xl-5 { + padding-top: 3rem !important; + } + .pt-xl-6 { + padding-top: 12px !important; + } + .pt-xl-7 { + padding-top: 30px !important; + } + .pt-xl-8 { + padding-top: 10px !important; + } + .pt-xl-9 { + padding-top: 20px !important; + } + .pe-xl-0 { + padding-right: 0 !important; + } + .pe-xl-1 { + padding-right: 0.25rem !important; + } + .pe-xl-2 { + padding-right: 0.5rem !important; + } + .pe-xl-3 { + padding-right: 1rem !important; + } + .pe-xl-4 { + padding-right: 1.5rem !important; + } + .pe-xl-5 { + padding-right: 3rem !important; + } + .pe-xl-6 { + padding-right: 12px !important; + } + .pe-xl-7 { + padding-right: 30px !important; + } + .pe-xl-8 { + padding-right: 10px !important; + } + .pe-xl-9 { + padding-right: 20px !important; + } + .pb-xl-0 { + padding-bottom: 0 !important; + } + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xl-3 { + padding-bottom: 1rem !important; + } + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xl-5 { + padding-bottom: 3rem !important; + } + .pb-xl-6 { + padding-bottom: 12px !important; + } + .pb-xl-7 { + padding-bottom: 30px !important; + } + .pb-xl-8 { + padding-bottom: 10px !important; + } + .pb-xl-9 { + padding-bottom: 20px !important; + } + .ps-xl-0 { + padding-left: 0 !important; + } + .ps-xl-1 { + padding-left: 0.25rem !important; + } + .ps-xl-2 { + padding-left: 0.5rem !important; + } + .ps-xl-3 { + padding-left: 1rem !important; + } + .ps-xl-4 { + padding-left: 1.5rem !important; + } + .ps-xl-5 { + padding-left: 3rem !important; + } + .ps-xl-6 { + padding-left: 12px !important; + } + .ps-xl-7 { + padding-left: 30px !important; + } + .ps-xl-8 { + padding-left: 10px !important; + } + .ps-xl-9 { + padding-left: 20px !important; + } + .gap-xl-0 { + gap: 0 !important; + } + .gap-xl-1 { + gap: 0.25rem !important; + } + .gap-xl-2 { + gap: 0.5rem !important; + } + .gap-xl-3 { + gap: 1rem !important; + } + .gap-xl-4 { + gap: 1.5rem !important; + } + .gap-xl-5 { + gap: 3rem !important; + } + .gap-xl-6 { + gap: 12px !important; + } + .gap-xl-7 { + gap: 30px !important; + } + .gap-xl-8 { + gap: 10px !important; + } + .gap-xl-9 { + gap: 20px !important; + } + .row-gap-xl-0 { + row-gap: 0 !important; + } + .row-gap-xl-1 { + row-gap: 0.25rem !important; + } + .row-gap-xl-2 { + row-gap: 0.5rem !important; + } + .row-gap-xl-3 { + row-gap: 1rem !important; + } + .row-gap-xl-4 { + row-gap: 1.5rem !important; + } + .row-gap-xl-5 { + row-gap: 3rem !important; + } + .row-gap-xl-6 { + row-gap: 12px !important; + } + .row-gap-xl-7 { + row-gap: 30px !important; + } + .row-gap-xl-8 { + row-gap: 10px !important; + } + .row-gap-xl-9 { + row-gap: 20px !important; + } + .column-gap-xl-0 { + -webkit-column-gap: 0 !important; + -moz-column-gap: 0 !important; + column-gap: 0 !important; + } + .column-gap-xl-1 { + -webkit-column-gap: 0.25rem !important; + -moz-column-gap: 0.25rem !important; + column-gap: 0.25rem !important; + } + .column-gap-xl-2 { + -webkit-column-gap: 0.5rem !important; + -moz-column-gap: 0.5rem !important; + column-gap: 0.5rem !important; + } + .column-gap-xl-3 { + -webkit-column-gap: 1rem !important; + -moz-column-gap: 1rem !important; + column-gap: 1rem !important; + } + .column-gap-xl-4 { + -webkit-column-gap: 1.5rem !important; + -moz-column-gap: 1.5rem !important; + column-gap: 1.5rem !important; + } + .column-gap-xl-5 { + -webkit-column-gap: 3rem !important; + -moz-column-gap: 3rem !important; + column-gap: 3rem !important; + } + .column-gap-xl-6 { + -webkit-column-gap: 12px !important; + -moz-column-gap: 12px !important; + column-gap: 12px !important; + } + .column-gap-xl-7 { + -webkit-column-gap: 30px !important; + -moz-column-gap: 30px !important; + column-gap: 30px !important; + } + .column-gap-xl-8 { + -webkit-column-gap: 10px !important; + -moz-column-gap: 10px !important; + column-gap: 10px !important; + } + .column-gap-xl-9 { + -webkit-column-gap: 20px !important; + -moz-column-gap: 20px !important; + column-gap: 20px !important; + } + .text-xl-start { + text-align: left !important; + } + .text-xl-end { + text-align: right !important; + } + .text-xl-center { + text-align: center !important; + } +} +@media (min-width: 1400px) { + .float-xxl-start { + float: left !important; + } + .float-xxl-end { + float: right !important; + } + .float-xxl-none { + float: none !important; + } + .object-fit-xxl-contain { + -o-object-fit: contain !important; + object-fit: contain !important; + } + .object-fit-xxl-cover { + -o-object-fit: cover !important; + object-fit: cover !important; + } + .object-fit-xxl-fill { + -o-object-fit: fill !important; + object-fit: fill !important; + } + .object-fit-xxl-scale { + -o-object-fit: scale-down !important; + object-fit: scale-down !important; + } + .object-fit-xxl-none { + -o-object-fit: none !important; + object-fit: none !important; + } + .d-xxl-inline { + display: inline !important; + } + .d-xxl-inline-block { + display: inline-block !important; + } + .d-xxl-block { + display: block !important; + } + .d-xxl-grid { + display: -ms-grid !important; + display: grid !important; + } + .d-xxl-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; + } + .d-xxl-table { + display: table !important; + } + .d-xxl-table-row { + display: table-row !important; + } + .d-xxl-table-cell { + display: table-cell !important; + } + .d-xxl-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + } + .d-xxl-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } + .d-xxl-none { + display: none !important; + } + .flex-xxl-fill { + -webkit-box-flex: 1 !important; + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-xxl-row { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-xxl-column { + -webkit-box-orient: vertical !important; + -webkit-box-direction: normal !important; + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-xxl-row-reverse { + -webkit-box-orient: horizontal !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-xxl-column-reverse { + -webkit-box-orient: vertical !important; + -webkit-box-direction: reverse !important; + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-xxl-grow-0 { + -webkit-box-flex: 0 !important; + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-xxl-grow-1 { + -webkit-box-flex: 1 !important; + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-xxl-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-xxl-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .flex-xxl-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-xxl-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-xxl-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .justify-content-xxl-start { + -webkit-box-pack: start !important; + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-xxl-end { + -webkit-box-pack: end !important; + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-xxl-center { + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-xxl-between { + -webkit-box-pack: justify !important; + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-xxl-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .justify-content-xxl-evenly { + -webkit-box-pack: space-evenly !important; + -ms-flex-pack: space-evenly !important; + justify-content: space-evenly !important; + } + .align-items-xxl-start { + -webkit-box-align: start !important; + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-xxl-end { + -webkit-box-align: end !important; + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-xxl-center { + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-xxl-baseline { + -webkit-box-align: baseline !important; + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-xxl-stretch { + -webkit-box-align: stretch !important; + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-xxl-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-xxl-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-xxl-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-xxl-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-xxl-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-xxl-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-xxl-auto { + -ms-flex-item-align: auto !important; + -ms-grid-row-align: auto !important; + align-self: auto !important; + } + .align-self-xxl-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-xxl-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-xxl-center { + -ms-flex-item-align: center !important; + -ms-grid-row-align: center !important; + align-self: center !important; + } + .align-self-xxl-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-xxl-stretch { + -ms-flex-item-align: stretch !important; + -ms-grid-row-align: stretch !important; + align-self: stretch !important; + } + .order-xxl-first { + -webkit-box-ordinal-group: 0 !important; + -ms-flex-order: -1 !important; + order: -1 !important; + } + .order-xxl-0 { + -webkit-box-ordinal-group: 1 !important; + -ms-flex-order: 0 !important; + order: 0 !important; + } + .order-xxl-1 { + -webkit-box-ordinal-group: 2 !important; + -ms-flex-order: 1 !important; + order: 1 !important; + } + .order-xxl-2 { + -webkit-box-ordinal-group: 3 !important; + -ms-flex-order: 2 !important; + order: 2 !important; + } + .order-xxl-3 { + -webkit-box-ordinal-group: 4 !important; + -ms-flex-order: 3 !important; + order: 3 !important; + } + .order-xxl-4 { + -webkit-box-ordinal-group: 5 !important; + -ms-flex-order: 4 !important; + order: 4 !important; + } + .order-xxl-5 { + -webkit-box-ordinal-group: 6 !important; + -ms-flex-order: 5 !important; + order: 5 !important; + } + .order-xxl-last { + -webkit-box-ordinal-group: 7 !important; + -ms-flex-order: 6 !important; + order: 6 !important; + } + .m-xxl-0 { + margin: 0 !important; + } + .m-xxl-1 { + margin: 0.25rem !important; + } + .m-xxl-2 { + margin: 0.5rem !important; + } + .m-xxl-3 { + margin: 1rem !important; + } + .m-xxl-4 { + margin: 1.5rem !important; + } + .m-xxl-5 { + margin: 3rem !important; + } + .m-xxl-6 { + margin: 12px !important; + } + .m-xxl-7 { + margin: 30px !important; + } + .m-xxl-8 { + margin: 10px !important; + } + .m-xxl-9 { + margin: 20px !important; + } + .m-xxl-auto { + margin: auto !important; + } + .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xxl-6 { + margin-right: 12px !important; + margin-left: 12px !important; + } + .mx-xxl-7 { + margin-right: 30px !important; + margin-left: 30px !important; + } + .mx-xxl-8 { + margin-right: 10px !important; + margin-left: 10px !important; + } + .mx-xxl-9 { + margin-right: 20px !important; + margin-left: 20px !important; + } + .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xxl-6 { + margin-top: 12px !important; + margin-bottom: 12px !important; + } + .my-xxl-7 { + margin-top: 30px !important; + margin-bottom: 30px !important; + } + .my-xxl-8 { + margin-top: 10px !important; + margin-bottom: 10px !important; + } + .my-xxl-9 { + margin-top: 20px !important; + margin-bottom: 20px !important; + } + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xxl-0 { + margin-top: 0 !important; + } + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + .mt-xxl-3 { + margin-top: 1rem !important; + } + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + .mt-xxl-5 { + margin-top: 3rem !important; + } + .mt-xxl-6 { + margin-top: 12px !important; + } + .mt-xxl-7 { + margin-top: 30px !important; + } + .mt-xxl-8 { + margin-top: 10px !important; + } + .mt-xxl-9 { + margin-top: 20px !important; + } + .mt-xxl-auto { + margin-top: auto !important; + } + .me-xxl-0 { + margin-right: 0 !important; + } + .me-xxl-1 { + margin-right: 0.25rem !important; + } + .me-xxl-2 { + margin-right: 0.5rem !important; + } + .me-xxl-3 { + margin-right: 1rem !important; + } + .me-xxl-4 { + margin-right: 1.5rem !important; + } + .me-xxl-5 { + margin-right: 3rem !important; + } + .me-xxl-6 { + margin-right: 12px !important; + } + .me-xxl-7 { + margin-right: 30px !important; + } + .me-xxl-8 { + margin-right: 10px !important; + } + .me-xxl-9 { + margin-right: 20px !important; + } + .me-xxl-auto { + margin-right: auto !important; + } + .mb-xxl-0 { + margin-bottom: 0 !important; + } + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + .mb-xxl-6 { + margin-bottom: 12px !important; + } + .mb-xxl-7 { + margin-bottom: 30px !important; + } + .mb-xxl-8 { + margin-bottom: 10px !important; + } + .mb-xxl-9 { + margin-bottom: 20px !important; + } + .mb-xxl-auto { + margin-bottom: auto !important; + } + .ms-xxl-0 { + margin-left: 0 !important; + } + .ms-xxl-1 { + margin-left: 0.25rem !important; + } + .ms-xxl-2 { + margin-left: 0.5rem !important; + } + .ms-xxl-3 { + margin-left: 1rem !important; + } + .ms-xxl-4 { + margin-left: 1.5rem !important; + } + .ms-xxl-5 { + margin-left: 3rem !important; + } + .ms-xxl-6 { + margin-left: 12px !important; + } + .ms-xxl-7 { + margin-left: 30px !important; + } + .ms-xxl-8 { + margin-left: 10px !important; + } + .ms-xxl-9 { + margin-left: 20px !important; + } + .ms-xxl-auto { + margin-left: auto !important; + } + .m-xxl-n1 { + margin: -0.25rem !important; + } + .m-xxl-n2 { + margin: -0.5rem !important; + } + .m-xxl-n3 { + margin: -1rem !important; + } + .m-xxl-n4 { + margin: -1.5rem !important; + } + .m-xxl-n5 { + margin: -3rem !important; + } + .m-xxl-n6 { + margin: -12px !important; + } + .m-xxl-n7 { + margin: -30px !important; + } + .m-xxl-n8 { + margin: -10px !important; + } + .m-xxl-n9 { + margin: -20px !important; + } + .mx-xxl-n1 { + margin-right: -0.25rem !important; + margin-left: -0.25rem !important; + } + .mx-xxl-n2 { + margin-right: -0.5rem !important; + margin-left: -0.5rem !important; + } + .mx-xxl-n3 { + margin-right: -1rem !important; + margin-left: -1rem !important; + } + .mx-xxl-n4 { + margin-right: -1.5rem !important; + margin-left: -1.5rem !important; + } + .mx-xxl-n5 { + margin-right: -3rem !important; + margin-left: -3rem !important; + } + .mx-xxl-n6 { + margin-right: -12px !important; + margin-left: -12px !important; + } + .mx-xxl-n7 { + margin-right: -30px !important; + margin-left: -30px !important; + } + .mx-xxl-n8 { + margin-right: -10px !important; + margin-left: -10px !important; + } + .mx-xxl-n9 { + margin-right: -20px !important; + margin-left: -20px !important; + } + .my-xxl-n1 { + margin-top: -0.25rem !important; + margin-bottom: -0.25rem !important; + } + .my-xxl-n2 { + margin-top: -0.5rem !important; + margin-bottom: -0.5rem !important; + } + .my-xxl-n3 { + margin-top: -1rem !important; + margin-bottom: -1rem !important; + } + .my-xxl-n4 { + margin-top: -1.5rem !important; + margin-bottom: -1.5rem !important; + } + .my-xxl-n5 { + margin-top: -3rem !important; + margin-bottom: -3rem !important; + } + .my-xxl-n6 { + margin-top: -12px !important; + margin-bottom: -12px !important; + } + .my-xxl-n7 { + margin-top: -30px !important; + margin-bottom: -30px !important; + } + .my-xxl-n8 { + margin-top: -10px !important; + margin-bottom: -10px !important; + } + .my-xxl-n9 { + margin-top: -20px !important; + margin-bottom: -20px !important; + } + .mt-xxl-n1 { + margin-top: -0.25rem !important; + } + .mt-xxl-n2 { + margin-top: -0.5rem !important; + } + .mt-xxl-n3 { + margin-top: -1rem !important; + } + .mt-xxl-n4 { + margin-top: -1.5rem !important; + } + .mt-xxl-n5 { + margin-top: -3rem !important; + } + .mt-xxl-n6 { + margin-top: -12px !important; + } + .mt-xxl-n7 { + margin-top: -30px !important; + } + .mt-xxl-n8 { + margin-top: -10px !important; + } + .mt-xxl-n9 { + margin-top: -20px !important; + } + .me-xxl-n1 { + margin-right: -0.25rem !important; + } + .me-xxl-n2 { + margin-right: -0.5rem !important; + } + .me-xxl-n3 { + margin-right: -1rem !important; + } + .me-xxl-n4 { + margin-right: -1.5rem !important; + } + .me-xxl-n5 { + margin-right: -3rem !important; + } + .me-xxl-n6 { + margin-right: -12px !important; + } + .me-xxl-n7 { + margin-right: -30px !important; + } + .me-xxl-n8 { + margin-right: -10px !important; + } + .me-xxl-n9 { + margin-right: -20px !important; + } + .mb-xxl-n1 { + margin-bottom: -0.25rem !important; + } + .mb-xxl-n2 { + margin-bottom: -0.5rem !important; + } + .mb-xxl-n3 { + margin-bottom: -1rem !important; + } + .mb-xxl-n4 { + margin-bottom: -1.5rem !important; + } + .mb-xxl-n5 { + margin-bottom: -3rem !important; + } + .mb-xxl-n6 { + margin-bottom: -12px !important; + } + .mb-xxl-n7 { + margin-bottom: -30px !important; + } + .mb-xxl-n8 { + margin-bottom: -10px !important; + } + .mb-xxl-n9 { + margin-bottom: -20px !important; + } + .ms-xxl-n1 { + margin-left: -0.25rem !important; + } + .ms-xxl-n2 { + margin-left: -0.5rem !important; + } + .ms-xxl-n3 { + margin-left: -1rem !important; + } + .ms-xxl-n4 { + margin-left: -1.5rem !important; + } + .ms-xxl-n5 { + margin-left: -3rem !important; + } + .ms-xxl-n6 { + margin-left: -12px !important; + } + .ms-xxl-n7 { + margin-left: -30px !important; + } + .ms-xxl-n8 { + margin-left: -10px !important; + } + .ms-xxl-n9 { + margin-left: -20px !important; + } + .p-xxl-0 { + padding: 0 !important; + } + .p-xxl-1 { + padding: 0.25rem !important; + } + .p-xxl-2 { + padding: 0.5rem !important; + } + .p-xxl-3 { + padding: 1rem !important; + } + .p-xxl-4 { + padding: 1.5rem !important; + } + .p-xxl-5 { + padding: 3rem !important; + } + .p-xxl-6 { + padding: 12px !important; + } + .p-xxl-7 { + padding: 30px !important; + } + .p-xxl-8 { + padding: 10px !important; + } + .p-xxl-9 { + padding: 20px !important; + } + .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .px-xxl-6 { + padding-right: 12px !important; + padding-left: 12px !important; + } + .px-xxl-7 { + padding-right: 30px !important; + padding-left: 30px !important; + } + .px-xxl-8 { + padding-right: 10px !important; + padding-left: 10px !important; + } + .px-xxl-9 { + padding-right: 20px !important; + padding-left: 20px !important; + } + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .py-xxl-6 { + padding-top: 12px !important; + padding-bottom: 12px !important; + } + .py-xxl-7 { + padding-top: 30px !important; + padding-bottom: 30px !important; + } + .py-xxl-8 { + padding-top: 10px !important; + padding-bottom: 10px !important; + } + .py-xxl-9 { + padding-top: 20px !important; + padding-bottom: 20px !important; + } + .pt-xxl-0 { + padding-top: 0 !important; + } + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + .pt-xxl-3 { + padding-top: 1rem !important; + } + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + .pt-xxl-5 { + padding-top: 3rem !important; + } + .pt-xxl-6 { + padding-top: 12px !important; + } + .pt-xxl-7 { + padding-top: 30px !important; + } + .pt-xxl-8 { + padding-top: 10px !important; + } + .pt-xxl-9 { + padding-top: 20px !important; + } + .pe-xxl-0 { + padding-right: 0 !important; + } + .pe-xxl-1 { + padding-right: 0.25rem !important; + } + .pe-xxl-2 { + padding-right: 0.5rem !important; + } + .pe-xxl-3 { + padding-right: 1rem !important; + } + .pe-xxl-4 { + padding-right: 1.5rem !important; + } + .pe-xxl-5 { + padding-right: 3rem !important; + } + .pe-xxl-6 { + padding-right: 12px !important; + } + .pe-xxl-7 { + padding-right: 30px !important; + } + .pe-xxl-8 { + padding-right: 10px !important; + } + .pe-xxl-9 { + padding-right: 20px !important; + } + .pb-xxl-0 { + padding-bottom: 0 !important; + } + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + .pb-xxl-6 { + padding-bottom: 12px !important; + } + .pb-xxl-7 { + padding-bottom: 30px !important; + } + .pb-xxl-8 { + padding-bottom: 10px !important; + } + .pb-xxl-9 { + padding-bottom: 20px !important; + } + .ps-xxl-0 { + padding-left: 0 !important; + } + .ps-xxl-1 { + padding-left: 0.25rem !important; + } + .ps-xxl-2 { + padding-left: 0.5rem !important; + } + .ps-xxl-3 { + padding-left: 1rem !important; + } + .ps-xxl-4 { + padding-left: 1.5rem !important; + } + .ps-xxl-5 { + padding-left: 3rem !important; + } + .ps-xxl-6 { + padding-left: 12px !important; + } + .ps-xxl-7 { + padding-left: 30px !important; + } + .ps-xxl-8 { + padding-left: 10px !important; + } + .ps-xxl-9 { + padding-left: 20px !important; + } + .gap-xxl-0 { + gap: 0 !important; + } + .gap-xxl-1 { + gap: 0.25rem !important; + } + .gap-xxl-2 { + gap: 0.5rem !important; + } + .gap-xxl-3 { + gap: 1rem !important; + } + .gap-xxl-4 { + gap: 1.5rem !important; + } + .gap-xxl-5 { + gap: 3rem !important; + } + .gap-xxl-6 { + gap: 12px !important; + } + .gap-xxl-7 { + gap: 30px !important; + } + .gap-xxl-8 { + gap: 10px !important; + } + .gap-xxl-9 { + gap: 20px !important; + } + .row-gap-xxl-0 { + row-gap: 0 !important; + } + .row-gap-xxl-1 { + row-gap: 0.25rem !important; + } + .row-gap-xxl-2 { + row-gap: 0.5rem !important; + } + .row-gap-xxl-3 { + row-gap: 1rem !important; + } + .row-gap-xxl-4 { + row-gap: 1.5rem !important; + } + .row-gap-xxl-5 { + row-gap: 3rem !important; + } + .row-gap-xxl-6 { + row-gap: 12px !important; + } + .row-gap-xxl-7 { + row-gap: 30px !important; + } + .row-gap-xxl-8 { + row-gap: 10px !important; + } + .row-gap-xxl-9 { + row-gap: 20px !important; + } + .column-gap-xxl-0 { + -webkit-column-gap: 0 !important; + -moz-column-gap: 0 !important; + column-gap: 0 !important; + } + .column-gap-xxl-1 { + -webkit-column-gap: 0.25rem !important; + -moz-column-gap: 0.25rem !important; + column-gap: 0.25rem !important; + } + .column-gap-xxl-2 { + -webkit-column-gap: 0.5rem !important; + -moz-column-gap: 0.5rem !important; + column-gap: 0.5rem !important; + } + .column-gap-xxl-3 { + -webkit-column-gap: 1rem !important; + -moz-column-gap: 1rem !important; + column-gap: 1rem !important; + } + .column-gap-xxl-4 { + -webkit-column-gap: 1.5rem !important; + -moz-column-gap: 1.5rem !important; + column-gap: 1.5rem !important; + } + .column-gap-xxl-5 { + -webkit-column-gap: 3rem !important; + -moz-column-gap: 3rem !important; + column-gap: 3rem !important; + } + .column-gap-xxl-6 { + -webkit-column-gap: 12px !important; + -moz-column-gap: 12px !important; + column-gap: 12px !important; + } + .column-gap-xxl-7 { + -webkit-column-gap: 30px !important; + -moz-column-gap: 30px !important; + column-gap: 30px !important; + } + .column-gap-xxl-8 { + -webkit-column-gap: 10px !important; + -moz-column-gap: 10px !important; + column-gap: 10px !important; + } + .column-gap-xxl-9 { + -webkit-column-gap: 20px !important; + -moz-column-gap: 20px !important; + column-gap: 20px !important; + } + .text-xxl-start { + text-align: left !important; + } + .text-xxl-end { + text-align: right !important; + } + .text-xxl-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .fs-7 { + font-size: 1.5rem !important; + } + .fs-8 { + font-size: 1.875rem !important; + } + .fs-9 { + font-size: 2.25rem !important; + } + .fs-10 { + font-size: 2.5rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + .d-print-inline-block { + display: inline-block !important; + } + .d-print-block { + display: block !important; + } + .d-print-grid { + display: -ms-grid !important; + display: grid !important; + } + .d-print-inline-grid { + display: -ms-inline-grid !important; + display: inline-grid !important; + } + .d-print-table { + display: table !important; + } + .d-print-table-row { + display: table-row !important; + } + .d-print-table-cell { + display: table-cell !important; + } + .d-print-flex { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + } + .d-print-inline-flex { + display: -webkit-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } + .d-print-none { + display: none !important; + } +} +.left-sidebar { + width: 270px; + background-color: #fff; + position: absolute; + -webkit-transition: 0.2s ease-in; + transition: 0.2s ease-in; + height: 100%; + z-index: 11; + border-right: 1px solid rgb(229, 234, 239); +} +.left-sidebar .scroll-sidebar { + overflow-y: auto; + padding: 0 16px; + height: calc(100vh - 70px); + border-radius: 0.25rem; +} +.left-sidebar .scroll-sidebar .simplebar-track.simplebar-horizontal { + visibility: hidden !important; +} + +.brand-logo { + min-height: 70px; + padding: 0 16px; +} + +.unlimited-access { + padding: 18px 22px 25px; + margin: 0 -5px; +} +.unlimited-access .unlimited-access-img { + margin: -35px -5px 0 -43px; +} + +.nav-small-cap { + padding: 5px 2px; + margin-top: 20px; + font-weight: 600; + font-size: 12px; + text-transform: uppercase; + color: var(--bs-heading-color); +} +.nav-small-cap .nav-small-cap-icon { + display: none; +} + +.sidebar-nav ul .sidebar-item .sidebar-link { + color: #3a4752; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 15px; + white-space: nowrap; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + line-height: 20px; + position: relative; + border-radius: 26px; + gap: 5px; + margin-bottom: 2px; + font-weight: 400; +} +.sidebar-nav ul .sidebar-item .sidebar-link span:first-child { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + padding: 5px 11px; +} +.sidebar-nav ul .sidebar-item .sidebar-link .ti { + -ms-flex-negative: 0; + flex-shrink: 0; + font-size: 21px; +} +.sidebar-nav ul .sidebar-item .sidebar-link:hover { + background-color: rgba(41, 82, 255, 0.1); + color: #2952ff; +} +.sidebar-nav ul .sidebar-item .sidebar-link:hover.has-arrow::after { + border-color: #2952ff; +} +.sidebar-nav ul .sidebar-item .sidebar-link.active:hover.has-arrow::after { + border-color: #fff; +} +.sidebar-nav ul .sidebar-item .link-disabled { + opacity: 0.38; +} +.sidebar-nav ul .sidebar-item.selected > .sidebar-link.active, .sidebar-nav ul .sidebar-item.selected > .sidebar-link, +.sidebar-nav ul .sidebar-item > .sidebar-link.active { + background-color: #2952ff; + color: #fff; +} +.sidebar-nav .sidebar-list .sidebar-list-item { + padding: 8px 0; +} + +.collapse.in { + display: block; +} + +.app-header { + position: relative; + z-index: 50; + width: 100%; + background: #f6f8fa; + padding: 0 25px; +} +.app-header .container-fluid, .app-header .container-sm, .app-header .container-md, .app-header .container-lg, .app-header .container-xl, .app-header .container-xxl { + max-width: 1300px; + margin: 0 auto; + padding: 0 30px; +} +.app-header .navbar { + min-height: 70px; + padding: 0; +} +.app-header .navbar .navbar-nav .nav-item .nav-link { + padding: 8px 16px; + line-height: 70px; + height: 70px; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + position: relative; + font-size: 20px; + z-index: 2; +} +.app-header .navbar .navbar-nav.quick-links .nav-item .nav-link { + font-size: 0.875rem; + position: relative; + z-index: 2; +} +.app-header .navbar .navbar-nav.quick-links .nav-item:hover .nav-link { + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + color: #2952ff !important; +} +.app-header .navbar .navbar-nav.quick-links .nav-item:hover .nav-link:before { + content: ""; + position: absolute; + left: 0; + right: 0; + height: 36px; + width: 100%; + border-radius: 0.25rem; + background: var(--bs-primary-bg-subtle); + z-index: -1; +} + +.nav-icon-hover { + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} +.nav-icon-hover:hover::before { + content: ""; + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + height: 40px; + width: 40px; + z-index: -1; + border-radius: 100px; + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; + background-color: var(--bs-primary-bg-subtle); +} + +.navbar-nav .dropdown-menu { + position: absolute; + min-width: 200px; +} +.navbar-nav .dropdown-menu .dropdown-item { + border-radius: 8px; +} + +.notification { + content: ""; + position: absolute; + top: 22px; + right: 9px; + width: 8px; + height: 8px; +} + +@media (max-width: 991.98px) { + .app-header .navbar { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + } + .app-header .navbar .navbar-nav { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + } +} +@media (max-width: 767.98px) { + .navbar-nav .dropdown-menu { + position: absolute; + width: 100%; + } + .navbar-nav .nav-item.dropdown { + position: static; + } +} +@-webkit-keyframes animation-dropdown-menu-move-up-scroll { + from { + top: 71px; + } + to { + top: 70px; + } +} +@keyframes animation-dropdown-menu-move-up-scroll { + from { + top: 71px; + } + to { + top: 70px; + } +} +@-webkit-keyframes animation-dropdown-menu-fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes animation-dropdown-menu-fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +.dropdown-menu-animate-up { + -webkit-animation: animation-dropdown-menu-fade-in 0.5s ease 1, animation-dropdown-menu-move-up 0.5s ease-out 1; + animation: animation-dropdown-menu-fade-in 0.5s ease 1, animation-dropdown-menu-move-up 0.5s ease-out 1; +} + +@-webkit-keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@media (max-width: 991.98px) { + .w-xs-100 { + width: 100% !important; + } +} +.page-wrapper { + position: relative; + background-color: #f6f8fa; +} + +.body-wrapper { + position: relative; +} +.body-wrapper > .container-fluid, .body-wrapper > .container-sm, .body-wrapper > .container-md, .body-wrapper > .container-lg, .body-wrapper > .container-xl, .body-wrapper > .container-xxl { + max-width: 1300px; + margin: 0 auto; + padding: 30px; + -webkit-transition: 0.2s ease-in; + transition: 0.2s ease-in; +} + +@media (max-width: 767.98px) { + .body-wrapper > .container-fluid, .body-wrapper > .container-sm, .body-wrapper > .container-md, .body-wrapper > .container-lg, .body-wrapper > .container-xl, .body-wrapper > .container-xxl { + padding: 30px 20px; + } +} +.simplebar-scrollbar:before { + background: rgba(0, 0, 0, 0.5) !important; +} + +#main-wrapper[data-layout=vertical][data-sidebar-position=fixed] .left-sidebar { + position: fixed; + top: 0; +} +#main-wrapper[data-layout=vertical][data-header-position=fixed] .app-header { + position: fixed; + z-index: 10; +} +/* Cao : enlever le top padding du body +#main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper > .container-fluid, #main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper > .container-sm, #main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper > .container-md, #main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper > .container-lg, #main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper > .container-xl, #main-wrapper[data-layout=vertical][data-header-position=fixed] .body-wrapper > .container-xxl { + padding-top: calc(70px + 15px); +} +*/ + +@media (min-width: 1200px) { + #main-wrapper[data-layout=vertical][data-header-position=fixed][data-sidebartype=mini-sidebar] .app-header { + width: 100%; + } + #main-wrapper[data-layout=vertical][data-header-position=fixed] .app-header { + width: calc(100% - 270px); + } + #main-wrapper[data-layout=vertical][data-sidebartype=full] .body-wrapper { + margin-left: 270px; + } +} +@media (max-width: 1199px) { + #main-wrapper[data-layout=vertical][data-sidebartype=mini-sidebar] .left-sidebar, #main-wrapper[data-layout=vertical][data-sidebartype=full] .left-sidebar { + left: -270px; + } + #main-wrapper[data-layout=vertical][data-sidebartype=mini-sidebar].show-sidebar .left-sidebar, #main-wrapper[data-layout=vertical][data-sidebartype=full].show-sidebar .left-sidebar { + left: 0; + } +} +* { + margin: 0; + padding: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +a { + text-decoration: none; +} + +a:hover { + color: #2952ff; +} + +ul { + list-style: none; + padding-left: 0; +} + +:focus { + outline: 0; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} + +.cursor-pointer { + cursor: pointer; +} + +.calendar-events { + cursor: move; +} + +.object-fit-cover { + -o-object-fit: cover; + object-fit: cover; +} + +.card-title { + font-size: 18px; +} + +.card-subtitle { + font-size: 14px; +} + +.card { + margin-bottom: 30px; +} + +.card-hover { + -webkit-transition: 0.2s ease-in; + transition: 0.2s ease-in; +} +.card-hover:hover { + -webkit-transform: translate3d(0px, -5px, 0px); + transform: translate3d(0px, -5px, 0px); +} + +.round-8 { + width: 8px; + height: 8px; +} + +.round-20 { + width: 20px !important; + height: 20px !important; +} + +.radial-gradient { + position: relative; +} +.radial-gradient::before { + content: ""; + position: absolute; + height: 100%; + width: 100%; + opacity: 0.3; + background: radial-gradient(rgb(210, 241, 223), rgb(211, 215, 250), rgb(186, 216, 244)) 0% 0%/400% 400%; + -webkit-animation: 15s ease 0s infinite normal none running gradient; + animation: 15s ease 0s infinite normal none running gradient; +} + +.timeline-widget .timeline-item { + min-height: 70px; +} +.timeline-widget .timeline-item .timeline-time { + padding: 6px 16px 6px 0; + min-width: 90px; +} +.timeline-widget .timeline-item .timeline-badge-wrap .timeline-badge { + width: 12px; + height: 12px; + border-radius: 50px; + background-color: transparent; +} +.timeline-widget .timeline-item .timeline-badge-wrap .timeline-badge-border { + width: 1px; + height: 100%; + background-color: #f1f1f4; +} +.timeline-widget .timeline-item .timeline-desc { + padding: 6px 16px; +} +.timeline-widget .timeline-item .timeline-badge.badge-primary { + border: 2px solid #2952ff; +} + +/* Ajout par Cao */ +.bg-1 { + background: #df4937; + color: #bdbdbd; + padding: 15px; +} +.bg-1 h5 { + color: #fff; +} + +.required-field::after { + content: "*"; + color: red; + margin-left:2px; +} + diff --git a/cao_sunyata/static/html-SEODash/authentication-login.html b/cao_sunyata/static/html-SEODash/authentication-login.html new file mode 100644 index 0000000..e7d38bd --- /dev/null +++ b/cao_sunyata/static/html-SEODash/authentication-login.html @@ -0,0 +1,63 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + +
+
+
+
+
+
+
+ + + +

Your Social Campaigns

+
+
+ + +
+
+ + +
+
+
+ + +
+ Forgot Password ? +
+ Sign In +
+

New to SeoDash?

+ Create an account +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/authentication-register.html b/cao_sunyata/static/html-SEODash/authentication-register.html new file mode 100644 index 0000000..3b75170 --- /dev/null +++ b/cao_sunyata/static/html-SEODash/authentication-register.html @@ -0,0 +1,58 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + +
+
+
+
+
+
+
+ + + +

Your Social Campaigns

+
+
+ + +
+
+ + +
+
+ + +
+ Sign Up +
+

Already have an Account?

+ Sign In +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/icon-tabler.html b/cao_sunyata/static/html-SEODash/icon-tabler.html new file mode 100644 index 0000000..c3d5dae --- /dev/null +++ b/cao_sunyata/static/html-SEODash/icon-tabler.html @@ -0,0 +1,223 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
Icons
+ +
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/index.html b/cao_sunyata/static/html-SEODash/index.html new file mode 100644 index 0000000..cf23944 --- /dev/null +++ b/cao_sunyata/static/html-SEODash/index.html @@ -0,0 +1,465 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
+
+
+ Traffic Overview + + + +
+
+
+
+
+
+
+
+
+ image +

Productivity Tips!

+

Duis at orci justo nulla in libero id leo + molestie sodales phasellus justo.

+ +
+
+
+
+
+
+
View by page title and screen class
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Page TitleLinkPageviewsPage Value
+ Welcome to our + website + + /index.html + 18,456$2.40
+ Modern Admin + Dashboard Template + + /dashboard + 17,452$0.97
+ Explore our + product catalog + + /product-checkout + 12,180$7,50
+ Comprehensive + User Guide + + /docs + 800$5,50
+ Check out our + services + + /services + 1300$2,15
+
+
+
+
+
+
+
+
Sessions by + device +
+
+
+ + Computers +

87%

+
+
+ + Smartphone +

9.2%

+
+
+ + Tablets +

3.1%

+
+
+ +
+
+
+ Computers +
87%
+
+
+
+
+
+ +
+
+ Smartphones +
9.2%
+
+
+
+
+
+ +
+
+ Tablets +
3.1%
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + matdash-img + + 2 + min Read + matdash-img +
+
+ Social + As yen tumbles, gadget-loving + Japan goes + for secondhand iPhones +
+
+ 9,125 +
+
+ 3 +
+
+ Mon, Dec 19 +
+
+
+
+
+
+
+
+ + matdash-img + + 2 + min Read + matdash-img +
+
+ Gadget + Intel loses bid to revive + antitrust case + against patent foe Fortress +
+
+ 4,150 +
+
+ 38 +
+
+ Sun, Dec 18 +
+
+
+
+
+
+
+
+ + matdash-img + + 2 + min Read + matdash-img +
+
+ Health + COVID outbreak deepens as more + lockdowns + loom in China +
+
+ 9,480 +
+
+ 12 +
+
+ Sat, Dec 17 +
+
+
+
+
+
+

Design and Developed by AdminMart.comDistributed by ThemeWagon

+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/sample-page.html b/cao_sunyata/static/html-SEODash/sample-page.html new file mode 100644 index 0000000..fb74cbb --- /dev/null +++ b/cao_sunyata/static/html-SEODash/sample-page.html @@ -0,0 +1,222 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
Sample Page
+

This is a sample page

+
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/ui-alerts.html b/cao_sunyata/static/html-SEODash/ui-alerts.html new file mode 100644 index 0000000..3628dba --- /dev/null +++ b/cao_sunyata/static/html-SEODash/ui-alerts.html @@ -0,0 +1,249 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
Alerts
+
+
+ + + + + + + + +
+
+
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/ui-buttons.html b/cao_sunyata/static/html-SEODash/ui-buttons.html new file mode 100644 index 0000000..335f8d2 --- /dev/null +++ b/cao_sunyata/static/html-SEODash/ui-buttons.html @@ -0,0 +1,248 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
Buttons
+
+
+ + + + + + + + + +
+
+
Outline buttons
+
+
+ + + + + + + + + +
+
+
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/ui-card.html b/cao_sunyata/static/html-SEODash/ui-card.html new file mode 100644 index 0000000..a5cf7ae --- /dev/null +++ b/cao_sunyata/static/html-SEODash/ui-card.html @@ -0,0 +1,262 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
+
+
Card
+
+ ... +
+
Card title
+

Some quick example text to build on the card title and make up the bulk of + the + card's content.

+ Go somewhere +
+
+
+
+
Header and footer
+
+
+ Featured +
+
+
Special title treatment
+

With supporting text below as a natural lead-in to additional content.

+ Go somewhere +
+
+
+
+
Titles, text, and links
+
+
+
Card title
+
Card subtitle
+

Some quick example text to build on the card title and make up the bulk of + the + card's content.

+ Card link + Another link +
+
+
+
+
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/ui-forms.html b/cao_sunyata/static/html-SEODash/ui-forms.html new file mode 100644 index 0000000..64227e8 --- /dev/null +++ b/cao_sunyata/static/html-SEODash/ui-forms.html @@ -0,0 +1,270 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
Forms
+
+
+
+
+ + +
We'll never share your email with anyone else.
+
+
+ + +
+
+ + +
+ +
+
+
+
Disabled forms
+
+
+
+
+ Disabled fieldset example +
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+
+
+
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/html-SEODash/ui-typography.html b/cao_sunyata/static/html-SEODash/ui-typography.html new file mode 100644 index 0000000..c47c4e8 --- /dev/null +++ b/cao_sunyata/static/html-SEODash/ui-typography.html @@ -0,0 +1,244 @@ + + + + + + + SeoDash Free Bootstrap Admin Template by Adminmart + + + + + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
Headings
+
+
+

h1. Bootstrap heading

+

h2. Bootstrap heading

+

h3. Bootstrap heading

+

h4. Bootstrap heading

+
h5. Bootstrap heading
+
h6. Bootstrap heading
+
+
+
Inline text elements
+
+
+

You can use the mark tag to highlight text.

+

This line of text is meant to be treated as deleted text.

+

This line of text is meant to be treated as no longer accurate.

+

This line of text is meant to be treated as an addition to the document.

+

This line of text will render as underlined.

+

This line of text is meant to be treated as fine print.

+

This line rendered as bold text.

+

This line rendered as italicized text.

+
+
+
+
+
+

Design and Developed by AdminMart.com Distributed by ThemeWagon

+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/images/backgrounds/product-tip.png b/cao_sunyata/static/images/backgrounds/product-tip.png new file mode 100644 index 0000000..c39565f Binary files /dev/null and b/cao_sunyata/static/images/backgrounds/product-tip.png differ diff --git a/cao_sunyata/static/images/backgrounds/rocket.png b/cao_sunyata/static/images/backgrounds/rocket.png new file mode 100644 index 0000000..5ee44a9 Binary files /dev/null and b/cao_sunyata/static/images/backgrounds/rocket.png differ diff --git a/cao_sunyata/static/images/blog/blog-img1.jpg b/cao_sunyata/static/images/blog/blog-img1.jpg new file mode 100644 index 0000000..94204af Binary files /dev/null and b/cao_sunyata/static/images/blog/blog-img1.jpg differ diff --git a/cao_sunyata/static/images/blog/blog-img2.jpg b/cao_sunyata/static/images/blog/blog-img2.jpg new file mode 100644 index 0000000..1595772 Binary files /dev/null and b/cao_sunyata/static/images/blog/blog-img2.jpg differ diff --git a/cao_sunyata/static/images/blog/blog-img3.jpg b/cao_sunyata/static/images/blog/blog-img3.jpg new file mode 100644 index 0000000..b065626 Binary files /dev/null and b/cao_sunyata/static/images/blog/blog-img3.jpg differ diff --git a/cao_sunyata/static/images/logos/logo-light.svg b/cao_sunyata/static/images/logos/logo-light.svg new file mode 100644 index 0000000..229b5d6 --- /dev/null +++ b/cao_sunyata/static/images/logos/logo-light.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/cao_sunyata/static/images/logos/seodashlogo.png b/cao_sunyata/static/images/logos/seodashlogo.png new file mode 100644 index 0000000..40a6a8a Binary files /dev/null and b/cao_sunyata/static/images/logos/seodashlogo.png differ diff --git a/cao_sunyata/static/images/products/s1.jpg b/cao_sunyata/static/images/products/s1.jpg new file mode 100644 index 0000000..144d0e8 Binary files /dev/null and b/cao_sunyata/static/images/products/s1.jpg differ diff --git a/cao_sunyata/static/images/products/s11.jpg b/cao_sunyata/static/images/products/s11.jpg new file mode 100644 index 0000000..8980089 Binary files /dev/null and b/cao_sunyata/static/images/products/s11.jpg differ diff --git a/cao_sunyata/static/images/products/s4.jpg b/cao_sunyata/static/images/products/s4.jpg new file mode 100644 index 0000000..803e397 Binary files /dev/null and b/cao_sunyata/static/images/products/s4.jpg differ diff --git a/cao_sunyata/static/images/products/s5.jpg b/cao_sunyata/static/images/products/s5.jpg new file mode 100644 index 0000000..c40751b Binary files /dev/null and b/cao_sunyata/static/images/products/s5.jpg differ diff --git a/cao_sunyata/static/images/products/s7.jpg b/cao_sunyata/static/images/products/s7.jpg new file mode 100644 index 0000000..d819743 Binary files /dev/null and b/cao_sunyata/static/images/products/s7.jpg differ diff --git a/cao_sunyata/static/images/profile/user-1.jpg b/cao_sunyata/static/images/profile/user-1.jpg new file mode 100644 index 0000000..2a541d7 Binary files /dev/null and b/cao_sunyata/static/images/profile/user-1.jpg differ diff --git a/cao_sunyata/static/images/profile/user-2.jpg b/cao_sunyata/static/images/profile/user-2.jpg new file mode 100644 index 0000000..e60f75e Binary files /dev/null and b/cao_sunyata/static/images/profile/user-2.jpg differ diff --git a/cao_sunyata/static/images/profile/user-3 (1).jpg b/cao_sunyata/static/images/profile/user-3 (1).jpg new file mode 100644 index 0000000..55cbe1e Binary files /dev/null and b/cao_sunyata/static/images/profile/user-3 (1).jpg differ diff --git a/cao_sunyata/static/images/profile/user-3.jpg b/cao_sunyata/static/images/profile/user-3.jpg new file mode 100644 index 0000000..55cbe1e Binary files /dev/null and b/cao_sunyata/static/images/profile/user-3.jpg differ diff --git a/cao_sunyata/static/img/IMG_0029.jpeg b/cao_sunyata/static/img/IMG_0029.jpeg new file mode 100644 index 0000000..f99ccf2 Binary files /dev/null and b/cao_sunyata/static/img/IMG_0029.jpeg differ diff --git a/cao_sunyata/static/js/app.min.js b/cao_sunyata/static/js/app.min.js new file mode 100644 index 0000000..e6a27a6 --- /dev/null +++ b/cao_sunyata/static/js/app.min.js @@ -0,0 +1,37 @@ + +$(function () { + // Admin Panel settings + + //**************************** + /* This is for the mini-sidebar if width is less then 1170*/ + //**************************** + var setsidebartype = function () { + var width = + window.innerWidth > 0 ? window.innerWidth : this.screen.width; + if (width < 1199) { + $("#main-wrapper").attr("data-sidebartype", "mini-sidebar"); + $("#main-wrapper").addClass("mini-sidebar"); + } else { + $("#main-wrapper").attr("data-sidebartype", "full"); + $("#main-wrapper").removeClass("mini-sidebar"); + } + }; + $(window).ready(setsidebartype); + $(window).on("resize", setsidebartype); + //**************************** + /* This is for sidebartoggler*/ + //**************************** + $(".sidebartoggler").on("click", function () { + $("#main-wrapper").toggleClass("mini-sidebar"); + if ($("#main-wrapper").hasClass("mini-sidebar")) { + $(".sidebartoggler").prop("checked", !0); + $("#main-wrapper").attr("data-sidebartype", "mini-sidebar"); + } else { + $(".sidebartoggler").prop("checked", !1); + $("#main-wrapper").attr("data-sidebartype", "full"); + } + }); + $(".sidebartoggler").on("click", function () { + $("#main-wrapper").toggleClass("show-sidebar"); + }); +}) \ No newline at end of file diff --git a/cao_sunyata/static/js/dashboard.js b/cao_sunyata/static/js/dashboard.js new file mode 100644 index 0000000..3a443ec --- /dev/null +++ b/cao_sunyata/static/js/dashboard.js @@ -0,0 +1,82 @@ +$(function () { +// ----------------------------------------------------------------------- + // Traffic Overview + // ----------------------------------------------------------------------- + + var chart = { + series: [ + { + name: "New Users", + data: [5, 1, 17, 6, 15, 9, 6], + }, + { + name: "Users", + data: [7, 11, 4, 16, 10, 14, 10], + }, + ], + chart: { + toolbar: { + show: false, + }, + type: "line", + fontFamily: "inherit", + foreColor: "#adb0bb", + height: 320, + stacked: false, + }, + colors: ["var(--bs-gray-300)", "var(--bs-primary)"], + plotOptions: {}, + dataLabels: { + enabled: false, + }, + legend: { + show: false, + }, + stroke: { + width: 2, + curve: "smooth", + dashArray: [8, 0], + }, + grid: { + borderColor: "rgba(0,0,0,0.1)", + strokeDashArray: 3, + xaxis: { + lines: { + show: false, + }, + }, + }, + yaxis: { + title: { + // text: 'Age', + }, + }, + xaxis: { + axisBorder: { + show: false, + }, + axisTicks: { + show: false, + }, + categories: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + }, + yaxis: { + tickAmount: 4, + }, + markers: { + strokeColor: ["var(--bs-gray-300)", "var(--bs-primary)"], + strokeWidth: 2, + }, + tooltip: { + theme: "dark", + }, + }; + + var chart = new ApexCharts( + document.querySelector("#traffic-overview"), + chart + ); + chart.render(); + + +}) \ No newline at end of file diff --git a/cao_sunyata/static/js/sidebarmenu.js b/cao_sunyata/static/js/sidebarmenu.js new file mode 100644 index 0000000..101dd1e --- /dev/null +++ b/cao_sunyata/static/js/sidebarmenu.js @@ -0,0 +1,52 @@ +/* +Template Name: Admin Template +Author: Wrappixel + +File: js +*/ +// ============================================================== +// Auto select left navbar +// ============================================================== +$(function () { + "use strict"; + var url = window.location + ""; + var path = url.replace( + window.location.protocol + "//" + window.location.host + "/", + "" + ); + var element = $("ul#sidebarnav a").filter(function () { + return this.href === url || this.href === path; // || url.href.indexOf(this.href) === 0; + }); + element.parentsUntil(".sidebar-nav").each(function (index) { + if ($(this).is("li") && $(this).children("a").length !== 0) { + $(this).children("a").addClass("active"); + $(this).parent("ul#sidebarnav").length === 0 + ? $(this).addClass("active") + : $(this).addClass("selected"); + } else if (!$(this).is("ul") && $(this).children("a").length === 0) { + $(this).addClass("selected"); + } else if ($(this).is("ul")) { + $(this).addClass("in"); + } + }); + + element.addClass("active"); + $("#sidebarnav a").on("click", function (e) { + if (!$(this).hasClass("active")) { + // hide any open menus and remove all other classes + $("ul", $(this).parents("ul:first")).removeClass("in"); + $("a", $(this).parents("ul:first")).removeClass("active"); + + // open our new menu and add the open class + $(this).next("ul").addClass("in"); + $(this).addClass("active"); + } else if ($(this).hasClass("active")) { + $(this).removeClass("active"); + $(this).parents("ul:first").removeClass("active"); + $(this).next("ul").removeClass("in"); + } + }); + $("#sidebarnav >li >a.has-arrow").on("click", function (e) { + e.preventDefault(); + }); + }); \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/LICENSE b/cao_sunyata/static/libs/apexcharts/LICENSE new file mode 100644 index 0000000..1702793 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 ApexCharts + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/README.md b/cao_sunyata/static/libs/apexcharts/README.md new file mode 100644 index 0000000..2aee7df --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/README.md @@ -0,0 +1,228 @@ +

+ +

+ License + build + downloads + ver + size + + prettier + jsdelivr + + +

+ +

+ +

+ +

A modern JavaScript charting library that allows you to build interactive data visualizations with simple API and 100+ ready-to-use samples. Packed with the features that you expect, ApexCharts includes over a dozen chart types that deliver beautiful, responsive visualizations in your apps and dashboards. ApexCharts is an MIT licensed open-source project that can be used in commercial and non-commercial projects.

+ +

+ +
+ +## Browsers support + +| [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Edge](http://godban.github.io/browsers-support-badges/)
Edge | [IE](http://godban.github.io/browsers-support-badges/)
IE11 | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 31+ ✔ | 35+ ✔ | 6+ ✔ | Edge ✔ | [(IE11)](#using-it-with-ie11) ✔ | + +## Download and Installation + +##### Installing via npm + +```bash +npm install apexcharts --save +``` + +##### Direct <script> include + +```html + +``` + +## Wrappers for Vue/React/Angular/Stencil + +Integrate easily with 3rd party frameworks + +- [vue-apexcharts](https://github.com/apexcharts/vue-apexcharts) +- [react-apexcharts](https://github.com/apexcharts/react-apexcharts) +- [ng-apexcharts](https://github.com/apexcharts/ng-apexcharts) - Plugin by [Morris Janatzek](https://morrisj.net/) +- [stencil-apexcharts](https://github.com/apexcharts/stencil-apexcharts) + +### Unofficial Wrappers + +Useful links to wrappers other than the popular frameworks mentioned above + +- [apexcharter](https://github.com/dreamRs/apexcharter) - Htmlwidget for ApexCharts +- [apexcharts.rb](https://github.com/styd/apexcharts.rb) - Ruby wrapper for ApexCharts +- [larapex-charts](https://github.com/ArielMejiaDev/larapex-charts) - Laravel wrapper for ApexCharts +- [blazor-apexcharts](https://github.com/apexcharts/Blazor-ApexCharts) - Blazor wrapper for ApexCharts [demo](https://apexcharts.github.io/Blazor-ApexCharts/) +- [svelte-apexcharts](https://github.com/galkatz373/svelte-apexcharts) - Svelte wrapper for ApexCharts + + +## Usage + +```js +import ApexCharts from 'apexcharts' +``` + +To create a basic bar chart with minimal configuration, write as follows: + +```js +var options = { + chart: { + type: 'bar' + }, + series: [ + { + name: 'sales', + data: [30, 40, 35, 50, 49, 60, 70, 91, 125] + } + ], + xaxis: { + categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999] + } +} + +var chart = new ApexCharts(document.querySelector('#chart'), options) +chart.render() +``` + +This will render the following chart + +

+ +### A little more than the basic + +You can create a combination of different charts, sync them and give your desired look with unlimited possibilities. +Below is an example of synchronized charts with github style. + +

+ +## Interactivity + +Zoom, Pan, Scroll through data. Make selections and load other charts using those selections. +An example showing some interactivity + +

interactive chart

+ +## Dynamic Series Update + +Another approach to Drill down charts where one selection updates the data of other charts. +An example of loading dynamic series into charts is shown below + +

dynamic-loading-chart

+ +## Annotations + +Annotations allows you to write custom text on specific values or on axes values. Valuable to expand the visual appeal of your chart and make it more informative. + +

annotations

+ +## Mixed Charts + +You can combine more than one chart type to create a combo/mixed chart. Possible combinations can be line/area/column together in a single chart. Each chart-type can have it's own y-axis. + +

annotations

+ +## Candlestick + +Use a candlestick chart (a common financial chart) to describe price changes of a security, derivative, or currency. Below image show how you can use another chart as a brush/preview-pane which acts as a handle to browse the main candlestick chart. + +

candlestick

+ +## Heatmaps + +Use Heatmaps to represent data through colors and shades. Frequently used with bigger data collections, they are valuable for recognizing patterns and area of focus. + +

heatmap

+ +## Gauges + +The tiny gauges are an important part of a dashboard and are useful in displaying single series data. A demo of these gauges: + +

radialbar-chart

+ +## Sparklines + +Utilize sparklines to indicate trends in data, for example, occasional increments or declines, monetary cycles, or to feature most extreme and least values: + +

sparkline-chart

+ + +## Need Advanced Data Grid for your next project? +We partnered with Infragistics, creators of the fastest data grids on the planet! Ignite UI Grids can handle unlimited rows and columns of data, while providing access to custom templates and real-time data updates. + +

+ +Featuring an intuitive API for easy theming and branding, you can quickly bind to data with minimal hand-on coding. The grid is available in most of your favorite frameworks: + +Angular Data Grid | React Data Grid | Blazor Data Grid | Web Components DataGrid | jQuery Data Grid + +## What's included + +The download bundle includes the following files and directories providing a minified single file in the dist folder. Every asset including icon/css is bundled in the js itself to avoid loading multiple files. + +``` +apexcharts/ +├── dist/ +│ └── apexcharts.min.js +├── src/ +│ ├── assets/ +│ ├── charts/ +│ ├── modules/ +│ ├── utils/ +│ └── apexcharts.js +└── samples/ +``` + +## Using it with IE11 + +If you need to make it work with IE11, you need to include these polyfills before including ApexCharts + +- [promise-polyfill](https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js) +- [classlist.js](https://cdn.jsdelivr.net/npm/eligrey-classlist-js-polyfill) +- [ResizeObserver polyfill](https://cdn.jsdelivr.net/npm/@juggle/resize-observer) +- [findIndex](https://cdn.jsdelivr.net/npm/findindex_polyfill_mdn) - You will need this only if you require timeline/rangebar charts +- [canvg](https://unpkg.com/canvg@3.0.4/lib/umd.js) - You will need this only if you require PNG download of your charts + +## Development + +#### Install dependencies and run project + +```bash +npm install +npm run dev +``` + +This will start the webpack watch and any changes you make to `src` folder will auto-compile and output will be produced in the `dist` folder. + +#### Minifying the src + +```bash +npm run build +``` + +## Where do I go next? + +Head over to the documentation section to read more about how to use different kinds of charts and explore all options. + +## Contacts + +Email: info@apexcharts.com + +Twitter: @apexcharts + +Facebook: fb.com/apexcharts + +## Dependency + +ApexCharts uses SVG.js for drawing shapes, animations, applying svg filters and a lot more under the hood. The library is bundled in the final build file, so you don't need to include it. + +## License + +ApexCharts is released under MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact. diff --git a/cao_sunyata/static/libs/apexcharts/package.json b/cao_sunyata/static/libs/apexcharts/package.json new file mode 100644 index 0000000..bf2c65a --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/package.json @@ -0,0 +1,106 @@ +{ + "name": "apexcharts", + "version": "3.35.2", + "description": "A JavaScript Chart Library", + "repository": { + "type": "git", + "url": "https://github.com/apexcharts/apexcharts.js.git" + }, + "main": "dist/apexcharts.common.js", + "unpkg": "dist/apexcharts.js", + "jsdelivr": "dist/apexcharts.js", + "typings": "types/apexcharts.d.ts", + "files": [ + "src", + "dist/*.js", + "dist/*.css", + "dist/locales/*.json", + "types/*.d.ts" + ], + "scripts": { + "dev": "rollup -w -c build/config.js --environment TARGET:web-umd-dev", + "dev:cjs": "rollup -w -c build/config.js --environment TARGET:web-cjs", + "bundle": "node build/build.js", + "build": "npm run bundle && webpack", + "build:umd": "rollup -w -c build/config.js --environment TARGET:web-umd-dev", + "build:amd": "webpack", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test": "npm run e2e && npm run unit", + "unit": "jest tests/unit/", + "e2e": "node tests/e2e/samples.js test", + "e2e:update": "node tests/e2e/samples.js update", + "build:samples": "node samples/source/index.js generate" + }, + "dependencies": { + "svg.draggable.js": "^2.2.2", + "svg.easing.js": "^2.0.0", + "svg.filter.js": "^2.0.2", + "svg.pathmorphing.js": "^0.1.3", + "svg.resize.js": "^1.4.3", + "svg.select.js": "^3.0.1" + }, + "devDependencies": { + "@babel/core": "^7.8.7", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/preset-env": "^7.8.7", + "@rollup/plugin-babel": "^5.2.1", + "@rollup/plugin-json": "4.0.1", + "@rollup/plugin-node-resolve": "6.0.0", + "@rollup/plugin-replace": "2.3.0", + "@rollup/plugin-strip": "1.3.1", + "babel-eslint": "10.0.3", + "babel-jest": "27.3.1", + "babel-loader": "8.0.6", + "babel-plugin-istanbul": "6.0.0", + "chalk": "3.0.0", + "css-loader": "3.4.1", + "eslint": "8.2.0", + "eslint-config-prettier": "6.9.0", + "eslint-loader": "3.0.3", + "eslint-plugin-import": "2.19.1", + "eslint-plugin-prettier": "3.1.2", + "eslint-plugin-promise": "4.2.1", + "fs-extra": "8.1.0", + "jest": "27.3.1", + "nunjucks": "3.2.1", + "nyc": "15.0.0", + "pixelmatch": "5.1.0", + "pngjs": "3.4.0", + "postcss": "^8.3.11", + "prettier": "1.19.1", + "puppeteer": "2.0.0", + "puppeteer-cluster": "0.18.0", + "rollup": "2.56.0", + "rollup-plugin-babel": "4.4.0", + "rollup-plugin-copy-glob": "0.3.2", + "rollup-plugin-postcss": "4.0.1", + "rollup-plugin-svgo": "1.1.0", + "rollup-plugin-terser": "7.0.2", + "style-loader": "1.1.2", + "svg-inline-loader": "0.8.0", + "terser": "5.3.8", + "tslint": "5.12.1", + "typescript": "3.2.2", + "webpack": "5.3.2", + "webpack-bundle-analyzer": "3.9.0", + "webpack-cli": "4.9.1" + }, + "bugs": { + "url": "https://github.com/apexcharts/apexcharts.js/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/mit-license.php" + } + ], + "homepage": "https://apexcharts.com", + "keywords": [ + "charts", + "graphs", + "visualizations", + "data" + ] +} diff --git a/cao_sunyata/static/libs/apexcharts/src/apexcharts.js b/cao_sunyata/static/libs/apexcharts/src/apexcharts.js new file mode 100644 index 0000000..d44ae14 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/apexcharts.js @@ -0,0 +1,762 @@ +import Annotations from './modules/annotations/Annotations' +import Base from './modules/Base' +import CoreUtils from './modules/CoreUtils' +import DataLabels from './modules/DataLabels' +import Defaults from './modules/settings/Defaults' +import Exports from './modules/Exports' +import Grid from './modules/axes/Grid' +import Markers from './modules/Markers' +import Range from './modules/Range' +import Utils from './utils/Utils' +import XAxis from './modules/axes/XAxis' +import YAxis from './modules/axes/YAxis' +import InitCtxVariables from './modules/helpers/InitCtxVariables' +import Destroy from './modules/helpers/Destroy' +import { addResizeListener, removeResizeListener } from './utils/Resize' +import apexCSS from './assets/apexcharts.css' + +/** + * + * @module ApexCharts + **/ + +export default class ApexCharts { + constructor(el, opts) { + this.opts = opts + this.ctx = this + + // Pass the user supplied options to the Base Class where these options will be extended with defaults. The returned object from Base Class will become the config object in the entire codebase. + this.w = new Base(opts).init() + + this.el = el + + this.w.globals.cuid = Utils.randomId() + this.w.globals.chartID = this.w.config.chart.id + ? Utils.escapeString(this.w.config.chart.id) + : this.w.globals.cuid + + const initCtx = new InitCtxVariables(this) + initCtx.initModules() + + this.create = Utils.bind(this.create, this) + this.windowResizeHandler = this._windowResizeHandler.bind(this) + this.parentResizeHandler = this._parentResizeCallback.bind(this) + } + + /** + * The primary method user will call to render the chart. + */ + render() { + // main method + return new Promise((resolve, reject) => { + // only draw chart, if element found + if (this.el !== null) { + if (typeof Apex._chartInstances === 'undefined') { + Apex._chartInstances = [] + } + if (this.w.config.chart.id) { + Apex._chartInstances.push({ + id: this.w.globals.chartID, + group: this.w.config.chart.group, + chart: this + }) + } + + // set the locale here + this.setLocale(this.w.config.chart.defaultLocale) + const beforeMount = this.w.config.chart.events.beforeMount + if (typeof beforeMount === 'function') { + beforeMount(this, this.w) + } + + this.events.fireEvent('beforeMount', [this, this.w]) + window.addEventListener('resize', this.windowResizeHandler) + addResizeListener(this.el.parentNode, this.parentResizeHandler) + + // Add CSS if not already added + if (!this.css) { + let rootNode = this.el.getRootNode && this.el.getRootNode() + let inShadowRoot = Utils.is('ShadowRoot', rootNode) + let doc = this.el.ownerDocument + let globalCSS = doc.getElementById('apexcharts-css') + + if (inShadowRoot || !globalCSS) { + this.css = document.createElement('style') + this.css.id = 'apexcharts-css' + this.css.textContent = apexCSS + + if (inShadowRoot) { + // We are in Shadow DOM, add to shadow root + rootNode.prepend(this.css) + } else { + // Add to of element's document + doc.head.appendChild(this.css) + } + } + } + + let graphData = this.create(this.w.config.series, {}) + if (!graphData) return resolve(this) + this.mount(graphData) + .then(() => { + if (typeof this.w.config.chart.events.mounted === 'function') { + this.w.config.chart.events.mounted(this, this.w) + } + + this.events.fireEvent('mounted', [this, this.w]) + resolve(graphData) + }) + .catch((e) => { + reject(e) + // handle error in case no data or element not found + }) + } else { + reject(new Error('Element not found')) + } + }) + } + + create(ser, opts) { + let w = this.w + + const initCtx = new InitCtxVariables(this) + initCtx.initModules() + let gl = this.w.globals + + gl.noData = false + gl.animationEnded = false + + this.responsive.checkResponsiveConfig(opts) + + if (w.config.xaxis.convertedCatToNumeric) { + const defaults = new Defaults(w.config) + defaults.convertCatToNumericXaxis(w.config, this.ctx) + } + + if (this.el === null) { + gl.animationEnded = true + return null + } + + this.core.setupElements() + + if (w.config.chart.type === 'treemap') { + w.config.grid.show = false + w.config.yaxis[0].show = false + } + + if (gl.svgWidth === 0) { + // if the element is hidden, skip drawing + gl.animationEnded = true + return null + } + + const combo = CoreUtils.checkComboSeries(ser) + gl.comboCharts = combo.comboCharts + gl.comboBarCount = combo.comboBarCount + + const allSeriesAreEmpty = ser.every((s) => s.data && s.data.length === 0) + + if (ser.length === 0 || allSeriesAreEmpty) { + this.series.handleNoData() + } + + this.events.setupEventHandlers() + + // Handle the data inputted by user and set some of the global variables (for eg, if data is datetime / numeric / category). Don't calculate the range / min / max at this time + this.data.parseData(ser) + + // this is a good time to set theme colors first + this.theme.init() + + // as markers accepts array, we need to setup global markers for easier access + const markers = new Markers(this) + markers.setGlobalMarkerSize() + + // labelFormatters should be called before dimensions as in dimensions we need text labels width + this.formatters.setLabelFormatters() + this.titleSubtitle.draw() + + // legend is calculated here before coreCalculations because it affects the plottable area + // if there is some data to show or user collapsed all series, then proceed drawing legend + if ( + !gl.noData || + gl.collapsedSeries.length === gl.series.length || + w.config.legend.showForSingleSeries + ) { + this.legend.init() + } + + // check whether in multiple series, all series share the same X + this.series.hasAllSeriesEqualX() + + // coreCalculations will give the min/max range and yaxis/axis values. It should be called here to set series variable from config to globals + if (gl.axisCharts) { + this.core.coreCalculations() + if (w.config.xaxis.type !== 'category') { + // as we have minX and maxX values, determine the default DateTimeFormat for time series + this.formatters.setLabelFormatters() + } + this.ctx.toolbar.minX = w.globals.minX + this.ctx.toolbar.maxX = w.globals.maxX + } + + // we need to generate yaxis for heatmap separately as we are not showing numerics there, but seriesNames. There are some tweaks which are required for heatmap to align labels correctly which are done in below function + // Also we need to do this before calculating Dimensions plotCoords() method of Dimensions + this.formatters.heatmapLabelFormatters() + + // get the largest marker size which will be needed in dimensions calc + const coreUtils = new CoreUtils(this) + coreUtils.getLargestMarkerSize() + + // We got plottable area here, next task would be to calculate axis areas + this.dimensions.plotCoords() + + const xyRatios = this.core.xySettings() + + this.grid.createGridMask() + + const elGraph = this.core.plotChartType(ser, xyRatios) + + const dataLabels = new DataLabels(this) + dataLabels.bringForward() + if (w.config.dataLabels.background.enabled) { + dataLabels.dataLabelsBackground() + } + + // after all the drawing calculations, shift the graphical area (actual charts/bars) excluding legends + this.core.shiftGraphPosition() + + const dim = { + plot: { + left: w.globals.translateX, + top: w.globals.translateY, + width: w.globals.gridWidth, + height: w.globals.gridHeight + } + } + + return { + elGraph, + xyRatios, + elInner: w.globals.dom.elGraphical, + dimensions: dim + } + } + + mount(graphData = null) { + let me = this + let w = me.w + + return new Promise((resolve, reject) => { + // no data to display + if (me.el === null) { + return reject( + new Error('Not enough data to display or target element not found') + ) + } else if (graphData === null || w.globals.allSeriesCollapsed) { + me.series.handleNoData() + } + if (w.config.chart.type !== 'treemap') { + me.axes.drawAxis(w.config.chart.type, graphData.xyRatios) + } + + me.grid = new Grid(me) + let elgrid = me.grid.drawGrid() + + me.annotations = new Annotations(me) + me.annotations.drawImageAnnos() + me.annotations.drawTextAnnos() + + if (w.config.grid.position === 'back' && elgrid) { + w.globals.dom.elGraphical.add(elgrid.el) + } + + let xAxis = new XAxis(this.ctx) + let yaxis = new YAxis(this.ctx) + if (elgrid !== null) { + xAxis.xAxisLabelCorrections(elgrid.xAxisTickWidth) + yaxis.setYAxisTextAlignments() + + w.config.yaxis.map((yaxe, index) => { + if (w.globals.ignoreYAxisIndexes.indexOf(index) === -1) { + yaxis.yAxisTitleRotate(index, yaxe.opposite) + } + }) + } + + if (w.config.annotations.position === 'back') { + w.globals.dom.Paper.add(w.globals.dom.elAnnotations) + me.annotations.drawAxesAnnotations() + } + + if (Array.isArray(graphData.elGraph)) { + for (let g = 0; g < graphData.elGraph.length; g++) { + w.globals.dom.elGraphical.add(graphData.elGraph[g]) + } + } else { + w.globals.dom.elGraphical.add(graphData.elGraph) + } + + if (w.config.grid.position === 'front' && elgrid) { + w.globals.dom.elGraphical.add(elgrid.el) + } + + if (w.config.xaxis.crosshairs.position === 'front') { + me.crosshairs.drawXCrosshairs() + } + + if (w.config.yaxis[0].crosshairs.position === 'front') { + me.crosshairs.drawYCrosshairs() + } + + if (w.config.annotations.position === 'front') { + w.globals.dom.Paper.add(w.globals.dom.elAnnotations) + me.annotations.drawAxesAnnotations() + } + + if (!w.globals.noData) { + // draw tooltips at the end + if (w.config.tooltip.enabled && !w.globals.noData) { + me.w.globals.tooltip.drawTooltip(graphData.xyRatios) + } + + if ( + w.globals.axisCharts && + (w.globals.isXNumeric || + w.config.xaxis.convertedCatToNumeric || + w.globals.isRangeBar) + ) { + if ( + w.config.chart.zoom.enabled || + (w.config.chart.selection && w.config.chart.selection.enabled) || + (w.config.chart.pan && w.config.chart.pan.enabled) + ) { + me.zoomPanSelection.init({ + xyRatios: graphData.xyRatios + }) + } + } else { + const tools = w.config.chart.toolbar.tools + let toolsArr = [ + 'zoom', + 'zoomin', + 'zoomout', + 'selection', + 'pan', + 'reset' + ] + toolsArr.forEach((t) => { + tools[t] = false + }) + } + + if (w.config.chart.toolbar.show && !w.globals.allSeriesCollapsed) { + me.toolbar.createToolbar() + } + } + + if (w.globals.memory.methodsToExec.length > 0) { + w.globals.memory.methodsToExec.forEach((fn) => { + fn.method(fn.params, false, fn.context) + }) + } + + if (!w.globals.axisCharts && !w.globals.noData) { + me.core.resizeNonAxisCharts() + } + resolve(me) + }) + } + + /** + * Destroy the chart instance by removing all elements which also clean up event listeners on those elements. + */ + destroy() { + window.removeEventListener('resize', this.windowResizeHandler) + + removeResizeListener(this.el.parentNode, this.parentResizeHandler) + // remove the chart's instance from the global Apex._chartInstances + const chartID = this.w.config.chart.id + if (chartID) { + Apex._chartInstances.forEach((c, i) => { + if (c.id === Utils.escapeString(chartID)) { + Apex._chartInstances.splice(i, 1) + } + }) + } + new Destroy(this.ctx).clear({ isUpdating: false }) + } + + /** + * Allows users to update Options after the chart has rendered. + * + * @param {object} options - A new config object can be passed which will be merged with the existing config object + * @param {boolean} redraw - should redraw from beginning or should use existing paths and redraw from there + * @param {boolean} animate - should animate or not on updating Options + */ + updateOptions( + options, + redraw = false, + animate = true, + updateSyncedCharts = true, + overwriteInitialConfig = true + ) { + const w = this.w + + // when called externally, clear some global variables + // fixes apexcharts.js#1488 + w.globals.selection = undefined + + if (options.series) { + this.series.resetSeries(false, true, false) + if (options.series.length && options.series[0].data) { + options.series = options.series.map((s, i) => { + return this.updateHelpers._extendSeries(s, i) + }) + } + + // user updated the series via updateOptions() function. + // Hence, we need to reset axis min/max to avoid zooming issues + this.updateHelpers.revertDefaultAxisMinMax() + } + // user has set x-axis min/max externally - hence we need to forcefully set the xaxis min/max + if (options.xaxis) { + options = this.updateHelpers.forceXAxisUpdate(options) + } + if (options.yaxis) { + options = this.updateHelpers.forceYAxisUpdate(options) + } + if (w.globals.collapsedSeriesIndices.length > 0) { + this.series.clearPreviousPaths() + } + /* update theme mode#459 */ + if (options.theme) { + options = this.theme.updateThemeOptions(options) + } + return this.updateHelpers._updateOptions( + options, + redraw, + animate, + updateSyncedCharts, + overwriteInitialConfig + ) + } + + /** + * Allows users to update Series after the chart has rendered. + * + * @param {array} series - New series which will override the existing + */ + updateSeries(newSeries = [], animate = true, overwriteInitialSeries = true) { + this.series.resetSeries(false) + this.updateHelpers.revertDefaultAxisMinMax() + return this.updateHelpers._updateSeries( + newSeries, + animate, + overwriteInitialSeries + ) + } + + /** + * Allows users to append a new series after the chart has rendered. + * + * @param {array} newSerie - New serie which will be appended to the existing series + */ + appendSeries(newSerie, animate = true, overwriteInitialSeries = true) { + const newSeries = this.w.config.series.slice() + newSeries.push(newSerie) + this.series.resetSeries(false) + this.updateHelpers.revertDefaultAxisMinMax() + return this.updateHelpers._updateSeries( + newSeries, + animate, + overwriteInitialSeries + ) + } + + /** + * Allows users to append Data to series. + * + * @param {array} newData - New data in the same format as series + */ + appendData(newData, overwriteInitialSeries = true) { + let me = this + + me.w.globals.dataChanged = true + + me.series.getPreviousPaths() + + let newSeries = me.w.config.series.slice() + + for (let i = 0; i < newSeries.length; i++) { + if (newData[i] !== null && typeof newData[i] !== 'undefined') { + for (let j = 0; j < newData[i].data.length; j++) { + newSeries[i].data.push(newData[i].data[j]) + } + } + } + me.w.config.series = newSeries + if (overwriteInitialSeries) { + me.w.globals.initialSeries = Utils.clone(me.w.config.series) + } + + return this.update() + } + + update(options) { + return new Promise((resolve, reject) => { + new Destroy(this.ctx).clear({ isUpdating: true }) + + const graphData = this.create(this.w.config.series, options) + if (!graphData) return resolve(this) + this.mount(graphData) + .then(() => { + if (typeof this.w.config.chart.events.updated === 'function') { + this.w.config.chart.events.updated(this, this.w) + } + this.events.fireEvent('updated', [this, this.w]) + + this.w.globals.isDirty = true + + resolve(this) + }) + .catch((e) => { + reject(e) + }) + }) + } + + /** + * Get all charts in the same "group" (including the instance which is called upon) to sync them when user zooms in/out or pan. + */ + getSyncedCharts() { + const chartGroups = this.getGroupedCharts() + let allCharts = [this] + if (chartGroups.length) { + allCharts = [] + chartGroups.forEach((ch) => { + allCharts.push(ch) + }) + } + + return allCharts + } + + /** + * Get charts in the same "group" (excluding the instance which is called upon) to perform operations on the other charts of the same group (eg., tooltip hovering) + */ + getGroupedCharts() { + return Apex._chartInstances + .filter((ch) => { + if (ch.group) { + return true + } + }) + .map((ch) => (this.w.config.chart.group === ch.group ? ch.chart : this)) + } + + static getChartByID(id) { + const chartId = Utils.escapeString(id) + const c = Apex._chartInstances.filter((ch) => ch.id === chartId)[0] + return c && c.chart + } + + /** + * Allows the user to provide data attrs in the element and the chart will render automatically when this method is called by searching for the elements containing 'data-apexcharts' attribute + */ + static initOnLoad() { + const els = document.querySelectorAll('[data-apexcharts]') + + for (let i = 0; i < els.length; i++) { + const el = els[i] + const options = JSON.parse(els[i].getAttribute('data-options')) + const apexChart = new ApexCharts(el, options) + apexChart.render() + } + } + + /** + * This static method allows users to call chart methods without necessarily from the + * instance of the chart in case user has assigned chartID to the targeted chart. + * The chartID is used for mapping the instance stored in Apex._chartInstances global variable + * + * This is helpful in cases when you don't have reference of the chart instance + * easily and need to call the method from anywhere. + * For eg, in React/Vue applications when you have many parent/child components, + * and need easy reference to other charts for performing dynamic operations + * + * @param {string} chartID - The unique identifier which will be used to call methods + * on that chart instance + * @param {function} fn - The method name to call + * @param {object} opts - The parameters which are accepted in the original method will be passed here in the same order. + */ + static exec(chartID, fn, ...opts) { + const chart = this.getChartByID(chartID) + if (!chart) return + + // turn on the global exec flag to indicate this method was called + chart.w.globals.isExecCalled = true + + let ret = null + if (chart.publicMethods.indexOf(fn) !== -1) { + ret = chart[fn](...opts) + } + return ret + } + + static merge(target, source) { + return Utils.extend(target, source) + } + + toggleSeries(seriesName) { + return this.series.toggleSeries(seriesName) + } + + highlightSeriesOnLegendHover(e, targetElement) { + return this.series.toggleSeriesOnHover(e, targetElement) + } + + showSeries(seriesName) { + this.series.showSeries(seriesName) + } + + hideSeries(seriesName) { + this.series.hideSeries(seriesName) + } + + resetSeries(shouldUpdateChart = true, shouldResetZoom = true) { + this.series.resetSeries(shouldUpdateChart, shouldResetZoom) + } + + // Public method to add event listener on chart context + addEventListener(name, handler) { + this.events.addEventListener(name, handler) + } + + // Public method to remove event listener on chart context + removeEventListener(name, handler) { + this.events.removeEventListener(name, handler) + } + + addXaxisAnnotation(opts, pushToMemory = true, context = undefined) { + let me = this + if (context) { + me = context + } + me.annotations.addXaxisAnnotationExternal(opts, pushToMemory, me) + } + + addYaxisAnnotation(opts, pushToMemory = true, context = undefined) { + let me = this + if (context) { + me = context + } + me.annotations.addYaxisAnnotationExternal(opts, pushToMemory, me) + } + + addPointAnnotation(opts, pushToMemory = true, context = undefined) { + let me = this + if (context) { + me = context + } + me.annotations.addPointAnnotationExternal(opts, pushToMemory, me) + } + + clearAnnotations(context = undefined) { + let me = this + if (context) { + me = context + } + me.annotations.clearAnnotations(me) + } + + removeAnnotation(id, context = undefined) { + let me = this + if (context) { + me = context + } + me.annotations.removeAnnotation(me, id) + } + + getChartArea() { + const el = this.w.globals.dom.baseEl.querySelector('.apexcharts-inner') + + return el + } + + getSeriesTotalXRange(minX, maxX) { + return this.coreUtils.getSeriesTotalsXRange(minX, maxX) + } + + getHighestValueInSeries(seriesIndex = 0) { + const range = new Range(this.ctx) + return range.getMinYMaxY(seriesIndex).highestY + } + + getLowestValueInSeries(seriesIndex = 0) { + const range = new Range(this.ctx) + return range.getMinYMaxY(seriesIndex).lowestY + } + + getSeriesTotal() { + return this.w.globals.seriesTotals + } + + toggleDataPointSelection(seriesIndex, dataPointIndex) { + return this.updateHelpers.toggleDataPointSelection( + seriesIndex, + dataPointIndex + ) + } + + zoomX(min, max) { + this.ctx.toolbar.zoomUpdateOptions(min, max) + } + + setLocale(localeName) { + this.localization.setCurrentLocaleValues(localeName) + } + + dataURI(options) { + const exp = new Exports(this.ctx) + return exp.dataURI(options) + } + + paper() { + return this.w.globals.dom.Paper + } + + _parentResizeCallback() { + if ( + this.w.globals.animationEnded && + this.w.config.chart.redrawOnParentResize + ) { + this._windowResize() + } + } + + /** + * Handle window resize and re-draw the whole chart. + */ + _windowResize() { + clearTimeout(this.w.globals.resizeTimer) + this.w.globals.resizeTimer = window.setTimeout(() => { + this.w.globals.resized = true + this.w.globals.dataChanged = false + + // we need to redraw the whole chart on window resize (with a small delay). + this.ctx.update() + }, 150) + } + + _windowResizeHandler() { + let { redrawOnWindowResize: redraw } = this.w.config.chart + + if (typeof redraw === 'function') { + redraw = redraw() + } + + redraw && this._windowResize() + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/apexcharts.css b/cao_sunyata/static/libs/apexcharts/src/assets/apexcharts.css new file mode 100644 index 0000000..27ada7b --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/apexcharts.css @@ -0,0 +1,688 @@ +.apexcharts-canvas { + position: relative; + user-select: none; + /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */ +} + + +/* scrollbar is not visible by default for legend, hence forcing the visibility */ +.apexcharts-canvas ::-webkit-scrollbar { + -webkit-appearance: none; + width: 6px; +} + +.apexcharts-canvas ::-webkit-scrollbar-thumb { + border-radius: 4px; + background-color: rgba(0, 0, 0, .5); + box-shadow: 0 0 1px rgba(255, 255, 255, .5); + -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5); +} + + +.apexcharts-inner { + position: relative; +} + +.apexcharts-text tspan { + font-family: inherit; +} + +.legend-mouseover-inactive { + transition: 0.15s ease all; + opacity: 0.20; +} + +.apexcharts-series-collapsed { + opacity: 0; +} + +.apexcharts-tooltip { + border-radius: 5px; + box-shadow: 2px 2px 6px -4px #999; + cursor: default; + font-size: 14px; + left: 62px; + opacity: 0; + pointer-events: none; + position: absolute; + top: 20px; + display: flex; + flex-direction: column; + overflow: hidden; + white-space: nowrap; + z-index: 12; + transition: 0.15s ease all; +} + +.apexcharts-tooltip.apexcharts-active { + opacity: 1; + transition: 0.15s ease all; +} + +.apexcharts-tooltip.apexcharts-theme-light { + border: 1px solid #e3e3e3; + background: rgba(255, 255, 255, 0.96); +} + +.apexcharts-tooltip.apexcharts-theme-dark { + color: #fff; + background: rgba(30, 30, 30, 0.8); +} + +.apexcharts-tooltip * { + font-family: inherit; +} + + +.apexcharts-tooltip-title { + padding: 6px; + font-size: 15px; + margin-bottom: 4px; +} + +.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { + background: #ECEFF1; + border-bottom: 1px solid #ddd; +} + +.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { + background: rgba(0, 0, 0, 0.7); + border-bottom: 1px solid #333; +} + +.apexcharts-tooltip-text-y-value, +.apexcharts-tooltip-text-goals-value, +.apexcharts-tooltip-text-z-value { + display: inline-block; + font-weight: 600; + margin-left: 5px; +} + +.apexcharts-tooltip-title:empty, +.apexcharts-tooltip-text-y-label:empty, +.apexcharts-tooltip-text-y-value:empty, +.apexcharts-tooltip-text-goals-label:empty, +.apexcharts-tooltip-text-goals-value:empty, +.apexcharts-tooltip-text-z-value:empty { + display: none; +} + +.apexcharts-tooltip-text-y-value, +.apexcharts-tooltip-text-goals-value, +.apexcharts-tooltip-text-z-value { + font-weight: 600; +} + +.apexcharts-tooltip-text-goals-label, +.apexcharts-tooltip-text-goals-value { + padding: 6px 0 5px; +} + +.apexcharts-tooltip-goals-group, +.apexcharts-tooltip-text-goals-label, +.apexcharts-tooltip-text-goals-value { + display: flex; +} +.apexcharts-tooltip-text-goals-label:not(:empty), +.apexcharts-tooltip-text-goals-value:not(:empty) { + margin-top: -6px; +} + +.apexcharts-tooltip-marker { + width: 12px; + height: 12px; + position: relative; + top: 0px; + margin-right: 10px; + border-radius: 50%; +} + +.apexcharts-tooltip-series-group { + padding: 0 10px; + display: none; + text-align: left; + justify-content: left; + align-items: center; +} + +.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { + opacity: 1; +} + +.apexcharts-tooltip-series-group.apexcharts-active, +.apexcharts-tooltip-series-group:last-child { + padding-bottom: 4px; +} + +.apexcharts-tooltip-series-group-hidden { + opacity: 0; + height: 0; + line-height: 0; + padding: 0 !important; +} + +.apexcharts-tooltip-y-group { + padding: 6px 0 5px; +} + +.apexcharts-tooltip-box, .apexcharts-custom-tooltip { + padding: 4px 8px; +} + +.apexcharts-tooltip-boxPlot { + display: flex; + flex-direction: column-reverse; +} + +.apexcharts-tooltip-box>div { + margin: 4px 0; +} + +.apexcharts-tooltip-box span.value { + font-weight: bold; +} + +.apexcharts-tooltip-rangebar { + padding: 5px 8px; +} + +.apexcharts-tooltip-rangebar .category { + font-weight: 600; + color: #777; +} + +.apexcharts-tooltip-rangebar .series-name { + font-weight: bold; + display: block; + margin-bottom: 5px; +} + +.apexcharts-xaxistooltip { + opacity: 0; + padding: 9px 10px; + pointer-events: none; + color: #373d3f; + font-size: 13px; + text-align: center; + border-radius: 2px; + position: absolute; + z-index: 10; + background: #ECEFF1; + border: 1px solid #90A4AE; + transition: 0.15s ease all; +} + +.apexcharts-xaxistooltip.apexcharts-theme-dark { + background: rgba(0, 0, 0, 0.7); + border: 1px solid rgba(0, 0, 0, 0.5); + color: #fff; +} + +.apexcharts-xaxistooltip:after, +.apexcharts-xaxistooltip:before { + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} + +.apexcharts-xaxistooltip:after { + border-color: rgba(236, 239, 241, 0); + border-width: 6px; + margin-left: -6px; +} + +.apexcharts-xaxistooltip:before { + border-color: rgba(144, 164, 174, 0); + border-width: 7px; + margin-left: -7px; +} + +.apexcharts-xaxistooltip-bottom:after, +.apexcharts-xaxistooltip-bottom:before { + bottom: 100%; +} + +.apexcharts-xaxistooltip-top:after, +.apexcharts-xaxistooltip-top:before { + top: 100%; +} + +.apexcharts-xaxistooltip-bottom:after { + border-bottom-color: #ECEFF1; +} + +.apexcharts-xaxistooltip-bottom:before { + border-bottom-color: #90A4AE; +} + +.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after { + border-bottom-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before { + border-bottom-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-xaxistooltip-top:after { + border-top-color: #ECEFF1 +} + +.apexcharts-xaxistooltip-top:before { + border-top-color: #90A4AE; +} + +.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after { + border-top-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before { + border-top-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-xaxistooltip.apexcharts-active { + opacity: 1; + transition: 0.15s ease all; +} + +.apexcharts-yaxistooltip { + opacity: 0; + padding: 4px 10px; + pointer-events: none; + color: #373d3f; + font-size: 13px; + text-align: center; + border-radius: 2px; + position: absolute; + z-index: 10; + background: #ECEFF1; + border: 1px solid #90A4AE; +} + +.apexcharts-yaxistooltip.apexcharts-theme-dark { + background: rgba(0, 0, 0, 0.7); + border: 1px solid rgba(0, 0, 0, 0.5); + color: #fff; +} + +.apexcharts-yaxistooltip:after, +.apexcharts-yaxistooltip:before { + top: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} + +.apexcharts-yaxistooltip:after { + border-color: rgba(236, 239, 241, 0); + border-width: 6px; + margin-top: -6px; +} + +.apexcharts-yaxistooltip:before { + border-color: rgba(144, 164, 174, 0); + border-width: 7px; + margin-top: -7px; +} + +.apexcharts-yaxistooltip-left:after, +.apexcharts-yaxistooltip-left:before { + left: 100%; +} + +.apexcharts-yaxistooltip-right:after, +.apexcharts-yaxistooltip-right:before { + right: 100%; +} + +.apexcharts-yaxistooltip-left:after { + border-left-color: #ECEFF1; +} + +.apexcharts-yaxistooltip-left:before { + border-left-color: #90A4AE; +} + +.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after { + border-left-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before { + border-left-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-yaxistooltip-right:after { + border-right-color: #ECEFF1; +} + +.apexcharts-yaxistooltip-right:before { + border-right-color: #90A4AE; +} + +.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after { + border-right-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before { + border-right-color: rgba(0, 0, 0, 0.5); +} + +.apexcharts-yaxistooltip.apexcharts-active { + opacity: 1; +} + +.apexcharts-yaxistooltip-hidden { + display: none; +} + +.apexcharts-xcrosshairs, +.apexcharts-ycrosshairs { + pointer-events: none; + opacity: 0; + transition: 0.15s ease all; +} + +.apexcharts-xcrosshairs.apexcharts-active, +.apexcharts-ycrosshairs.apexcharts-active { + opacity: 1; + transition: 0.15s ease all; +} + +.apexcharts-ycrosshairs-hidden { + opacity: 0; +} + +.apexcharts-selection-rect { + cursor: move; +} + +.svg_select_boundingRect, .svg_select_points_rot { + pointer-events: none; + opacity: 0; + visibility: hidden; +} +.apexcharts-selection-rect + g .svg_select_boundingRect, +.apexcharts-selection-rect + g .svg_select_points_rot { + opacity: 0; + visibility: hidden; +} + +.apexcharts-selection-rect + g .svg_select_points_l, +.apexcharts-selection-rect + g .svg_select_points_r { + cursor: ew-resize; + opacity: 1; + visibility: visible; +} + +.svg_select_points { + fill: #efefef; + stroke: #333; + rx: 2; +} + +.apexcharts-svg.apexcharts-zoomable.hovering-zoom { + cursor: crosshair +} + +.apexcharts-svg.apexcharts-zoomable.hovering-pan { + cursor: move +} + +.apexcharts-zoom-icon, +.apexcharts-zoomin-icon, +.apexcharts-zoomout-icon, +.apexcharts-reset-icon, +.apexcharts-pan-icon, +.apexcharts-selection-icon, +.apexcharts-menu-icon, +.apexcharts-toolbar-custom-icon { + cursor: pointer; + width: 20px; + height: 20px; + line-height: 24px; + color: #6E8192; + text-align: center; +} + +.apexcharts-zoom-icon svg, +.apexcharts-zoomin-icon svg, +.apexcharts-zoomout-icon svg, +.apexcharts-reset-icon svg, +.apexcharts-menu-icon svg { + fill: #6E8192; +} + +.apexcharts-selection-icon svg { + fill: #444; + transform: scale(0.76) +} + +.apexcharts-theme-dark .apexcharts-zoom-icon svg, +.apexcharts-theme-dark .apexcharts-zoomin-icon svg, +.apexcharts-theme-dark .apexcharts-zoomout-icon svg, +.apexcharts-theme-dark .apexcharts-reset-icon svg, +.apexcharts-theme-dark .apexcharts-pan-icon svg, +.apexcharts-theme-dark .apexcharts-selection-icon svg, +.apexcharts-theme-dark .apexcharts-menu-icon svg, +.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg { + fill: #f3f4f5; +} + +.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg, +.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg, +.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg { + fill: #008FFB; +} + +.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg, +.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg, +.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg, +.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg, +.apexcharts-theme-light .apexcharts-reset-icon:hover svg, +.apexcharts-theme-light .apexcharts-menu-icon:hover svg { + fill: #333; +} + +.apexcharts-selection-icon, +.apexcharts-menu-icon { + position: relative; +} + +.apexcharts-reset-icon { + margin-left: 5px; +} + +.apexcharts-zoom-icon, +.apexcharts-reset-icon, +.apexcharts-menu-icon { + transform: scale(0.85); +} + +.apexcharts-zoomin-icon, +.apexcharts-zoomout-icon { + transform: scale(0.7) +} + +.apexcharts-zoomout-icon { + margin-right: 3px; +} + +.apexcharts-pan-icon { + transform: scale(0.62); + position: relative; + left: 1px; + top: 0px; +} + +.apexcharts-pan-icon svg { + fill: #fff; + stroke: #6E8192; + stroke-width: 2; +} + +.apexcharts-pan-icon.apexcharts-selected svg { + stroke: #008FFB; +} + +.apexcharts-pan-icon:not(.apexcharts-selected):hover svg { + stroke: #333; +} + +.apexcharts-toolbar { + position: absolute; + z-index: 11; + max-width: 176px; + text-align: right; + border-radius: 3px; + padding: 0px 6px 2px 6px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.apexcharts-menu { + background: #fff; + position: absolute; + top: 100%; + border: 1px solid #ddd; + border-radius: 3px; + padding: 3px; + right: 10px; + opacity: 0; + min-width: 110px; + transition: 0.15s ease all; + pointer-events: none; +} + +.apexcharts-menu.apexcharts-menu-open { + opacity: 1; + pointer-events: all; + transition: 0.15s ease all; +} + +.apexcharts-menu-item { + padding: 6px 7px; + font-size: 12px; + cursor: pointer; +} + +.apexcharts-theme-light .apexcharts-menu-item:hover { + background: #eee; +} + +.apexcharts-theme-dark .apexcharts-menu { + background: rgba(0, 0, 0, 0.7); + color: #fff; +} + +@media screen and (min-width: 768px) { + .apexcharts-canvas:hover .apexcharts-toolbar { + opacity: 1; + } +} + +.apexcharts-datalabel.apexcharts-element-hidden { + opacity: 0; +} + +.apexcharts-pie-label, +.apexcharts-datalabels, +.apexcharts-datalabel, +.apexcharts-datalabel-label, +.apexcharts-datalabel-value { + cursor: default; + pointer-events: none; +} + +.apexcharts-pie-label-delay { + opacity: 0; + animation-name: opaque; + animation-duration: 0.3s; + animation-fill-mode: forwards; + animation-timing-function: ease; +} + +.apexcharts-canvas .apexcharts-element-hidden { + opacity: 0; +} + +.apexcharts-hide .apexcharts-series-points { + opacity: 0; +} + +.apexcharts-gridline, +.apexcharts-annotation-rect, +.apexcharts-tooltip .apexcharts-marker, +.apexcharts-area-series .apexcharts-area, +.apexcharts-line, +.apexcharts-zoom-rect, +.apexcharts-toolbar svg, +.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events, +.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events, +.apexcharts-radar-series path, +.apexcharts-radar-series polygon { + pointer-events: none; +} + + +/* markers */ + +.apexcharts-marker { + transition: 0.15s ease all; +} + +@keyframes opaque { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + + +/* Resize generated styles */ + +@keyframes resizeanim { + from { + opacity: 0; + } + to { + opacity: 0; + } +} + +.resize-triggers { + animation: 1ms resizeanim; + visibility: hidden; + opacity: 0; +} + +.resize-triggers, +.resize-triggers>div, +.contract-trigger:before { + content: " "; + display: block; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + overflow: hidden; +} + +.resize-triggers>div { + background: #eee; + overflow: auto; +} + +.contract-trigger:before { + width: 200%; + height: 200%; +} \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-camera.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-camera.svg new file mode 100644 index 0000000..3f052f2 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-camera.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-home.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-home.svg new file mode 100644 index 0000000..676d2d3 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-home.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-menu.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-menu.svg new file mode 100644 index 0000000..770b192 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-minus-square.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-minus-square.svg new file mode 100644 index 0000000..c4988e8 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-minus-square.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-minus.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-minus.svg new file mode 100644 index 0000000..f0a7ec8 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-minus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-pan-hand.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-pan-hand.svg new file mode 100644 index 0000000..1768e5e --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-pan-hand.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-pan.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-pan.svg new file mode 100644 index 0000000..ae65a94 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-pan.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-plus-square.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-plus-square.svg new file mode 100644 index 0000000..f1b885f --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-plus-square.svg @@ -0,0 +1,4 @@ + + + + diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-plus.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-plus.svg new file mode 100644 index 0000000..b376ab5 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-plus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-refresh.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-refresh.svg new file mode 100644 index 0000000..81c46c6 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-refresh.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-reset.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-reset.svg new file mode 100644 index 0000000..2ee1dc3 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-reset.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-select.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-select.svg new file mode 100644 index 0000000..326ab03 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-select.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-select1.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-select1.svg new file mode 100644 index 0000000..529a226 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-select1.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom-in.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom-in.svg new file mode 100644 index 0000000..3d9355a --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom-in.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom-out.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom-out.svg new file mode 100644 index 0000000..74310b6 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom-out.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom.svg b/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom.svg new file mode 100644 index 0000000..346fdb4 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/assets/ico-zoom.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Bar.js b/cao_sunyata/static/libs/apexcharts/src/charts/Bar.js new file mode 100644 index 0000000..dd56c69 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Bar.js @@ -0,0 +1,492 @@ +import BarDataLabels from './common/bar/DataLabels' +import BarHelpers from './common/bar/Helpers' +import CoreUtils from '../modules/CoreUtils' +import Utils from '../utils/Utils' +import Filters from '../modules/Filters' +import Graphics from '../modules/Graphics' + +/** + * ApexCharts Bar Class responsible for drawing both Columns and Bars. + * + * @module Bar + **/ + +class Bar { + constructor(ctx, xyRatios) { + this.ctx = ctx + this.w = ctx.w + const w = this.w + this.barOptions = w.config.plotOptions.bar + + this.isHorizontal = this.barOptions.horizontal + this.strokeWidth = w.config.stroke.width + this.isNullValue = false + + this.isRangeBar = w.globals.seriesRangeBar.length && this.isHorizontal + + this.xyRatios = xyRatios + + if (this.xyRatios !== null) { + this.xRatio = xyRatios.xRatio + this.initialXRatio = xyRatios.initialXRatio + this.yRatio = xyRatios.yRatio + this.invertedXRatio = xyRatios.invertedXRatio + this.invertedYRatio = xyRatios.invertedYRatio + this.baseLineY = xyRatios.baseLineY + this.baseLineInvertedY = xyRatios.baseLineInvertedY + } + this.yaxisIndex = 0 + this.seriesLen = 0 + + this.barHelpers = new BarHelpers(this) + } + + /** primary draw method which is called on bar object + * @memberof Bar + * @param {array} series - user supplied series values + * @param {int} seriesIndex - the index by which series will be drawn on the svg + * @return {node} element which is supplied to parent chart draw method for appending + **/ + draw(series, seriesIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + + const coreUtils = new CoreUtils(this.ctx, w) + series = coreUtils.getLogSeries(series) + this.series = series + this.yRatio = coreUtils.getLogYRatios(this.yRatio) + + this.barHelpers.initVariables(series) + + let ret = graphics.group({ + class: 'apexcharts-bar-series apexcharts-plot-series' + }) + + if (w.config.dataLabels.enabled) { + if (this.totalItems > this.barOptions.dataLabels.maxItems) { + console.warn( + 'WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.' + ) + } + } + + for (let i = 0, bc = 0; i < series.length; i++, bc++) { + let x, + y, + xDivision, // xDivision is the GRIDWIDTH divided by number of datapoints (columns) + yDivision, // yDivision is the GRIDHEIGHT divided by number of datapoints (bars) + zeroH, // zeroH is the baseline where 0 meets y axis + zeroW // zeroW is the baseline where 0 meets x axis + + let yArrj = [] // hold y values of current iterating series + let xArrj = [] // hold x values of current iterating series + + let realIndex = w.globals.comboCharts ? seriesIndex[i] : i + + // el to which series will be drawn + let elSeries = graphics.group({ + class: `apexcharts-series`, + rel: i + 1, + seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]), + 'data:realIndex': realIndex + }) + + this.ctx.series.addCollapsedClassToSeries(elSeries, realIndex) + + if (series[i].length > 0) { + this.visibleI = this.visibleI + 1 + } + + let barHeight = 0 + let barWidth = 0 + + if (this.yRatio.length > 1) { + this.yaxisIndex = realIndex + } + + this.isReversed = + w.config.yaxis[this.yaxisIndex] && + w.config.yaxis[this.yaxisIndex].reversed + + let initPositions = this.barHelpers.initialPositions() + + y = initPositions.y + barHeight = initPositions.barHeight + yDivision = initPositions.yDivision + zeroW = initPositions.zeroW + + x = initPositions.x + barWidth = initPositions.barWidth + xDivision = initPositions.xDivision + zeroH = initPositions.zeroH + + if (!this.horizontal) { + xArrj.push(x + barWidth / 2) + } + + // eldatalabels + let elDataLabelsWrap = graphics.group({ + class: 'apexcharts-datalabels', + 'data:realIndex': realIndex + }) + + let elGoalsMarkers = graphics.group({ + class: 'apexcharts-bar-goals-markers', + style: `pointer-events: none` + }) + + for (let j = 0; j < w.globals.dataPoints; j++) { + const strokeWidth = this.barHelpers.getStrokeWidth(i, j, realIndex) + + let paths = null + const pathsParams = { + indexes: { + i, + j, + realIndex, + bc + }, + x, + y, + strokeWidth, + elSeries + } + if (this.isHorizontal) { + paths = this.drawBarPaths({ + ...pathsParams, + barHeight, + zeroW, + yDivision + }) + barWidth = this.series[i][j] / this.invertedYRatio + } else { + paths = this.drawColumnPaths({ + ...pathsParams, + xDivision, + barWidth, + zeroH + }) + barHeight = this.series[i][j] / this.yRatio[this.yaxisIndex] + } + + const barGoalLine = this.barHelpers.drawGoalLine({ + barXPosition: paths.barXPosition, + barYPosition: paths.barYPosition, + goalX: paths.goalX, + goalY: paths.goalY, + barHeight, + barWidth + }) + + if (barGoalLine) { + elGoalsMarkers.add(barGoalLine) + } + + y = paths.y + x = paths.x + + // push current X + if (j > 0) { + xArrj.push(x + barWidth / 2) + } + + yArrj.push(y) + + let pathFill = this.barHelpers.getPathFillColor(series, i, j, realIndex) + + this.renderSeries({ + realIndex, + pathFill, + j, + i, + pathFrom: paths.pathFrom, + pathTo: paths.pathTo, + strokeWidth, + elSeries, + x, + y, + series, + barHeight, + barWidth, + elDataLabelsWrap, + elGoalsMarkers, + visibleSeries: this.visibleI, + type: 'bar' + }) + } + + // push all x val arrays into main xArr + w.globals.seriesXvalues[realIndex] = xArrj + w.globals.seriesYvalues[realIndex] = yArrj + + ret.add(elSeries) + } + + return ret + } + + renderSeries({ + realIndex, + pathFill, + lineFill, + j, + i, + pathFrom, + pathTo, + strokeWidth, + elSeries, + x, + y, + y1, + y2, + series, + barHeight, + barWidth, + barYPosition, + elDataLabelsWrap, + elGoalsMarkers, + visibleSeries, + type + }) { + const w = this.w + const graphics = new Graphics(this.ctx) + + if (!lineFill) { + /* fix apexcharts#341 */ + lineFill = this.barOptions.distributed + ? w.globals.stroke.colors[j] + : w.globals.stroke.colors[realIndex] + } + + if (w.config.series[i].data[j] && w.config.series[i].data[j].strokeColor) { + lineFill = w.config.series[i].data[j].strokeColor + } + + if (this.isNullValue) { + pathFill = 'none' + } + + let delay = + ((j / w.config.chart.animations.animateGradually.delay) * + (w.config.chart.animations.speed / w.globals.dataPoints)) / + 2.4 + + let renderedPath = graphics.renderPaths({ + i, + j, + realIndex, + pathFrom, + pathTo, + stroke: lineFill, + strokeWidth, + strokeLineCap: w.config.stroke.lineCap, + fill: pathFill, + animationDelay: delay, + initialSpeed: w.config.chart.animations.speed, + dataChangeSpeed: w.config.chart.animations.dynamicAnimation.speed, + className: `apexcharts-${type}-area` + }) + + renderedPath.attr('clip-path', `url(#gridRectMask${w.globals.cuid})`) + + const forecast = w.config.forecastDataPoints + if (forecast.count > 0) { + if (j >= w.globals.dataPoints - forecast.count) { + renderedPath.node.setAttribute('stroke-dasharray', forecast.dashArray) + renderedPath.node.setAttribute('stroke-width', forecast.strokeWidth) + renderedPath.node.setAttribute('fill-opacity', forecast.fillOpacity) + } + } + + if (typeof y1 !== 'undefined' && typeof y2 !== 'undefined') { + renderedPath.attr('data-range-y1', y1) + renderedPath.attr('data-range-y2', y2) + } + + const filters = new Filters(this.ctx) + filters.setSelectionFilter(renderedPath, realIndex, j) + elSeries.add(renderedPath) + + let barDataLabels = new BarDataLabels(this) + let dataLabels = barDataLabels.handleBarDataLabels({ + x, + y, + y1, + y2, + i, + j, + series, + realIndex, + barHeight, + barWidth, + barYPosition, + renderedPath, + visibleSeries + }) + if (dataLabels !== null) { + elDataLabelsWrap.add(dataLabels) + } + + elSeries.add(elDataLabelsWrap) + + if (elGoalsMarkers) { + elSeries.add(elGoalsMarkers) + } + return elSeries + } + + drawBarPaths({ + indexes, + barHeight, + strokeWidth, + zeroW, + x, + y, + yDivision, + elSeries + }) { + let w = this.w + + let i = indexes.i + let j = indexes.j + + if (w.globals.isXNumeric) { + y = + (w.globals.seriesX[i][j] - w.globals.minX) / this.invertedXRatio - + barHeight + } + + let barYPosition = y + barHeight * this.visibleI + + x = this.barHelpers.getXForValue(this.series[i][j], zeroW) + + const paths = this.barHelpers.getBarpaths({ + barYPosition, + barHeight, + x1: zeroW, + x2: x, + strokeWidth, + series: this.series, + realIndex: indexes.realIndex, + i, + j, + w + }) + + if (!w.globals.isXNumeric) { + y = y + yDivision + } + + this.barHelpers.barBackground({ + j, + i, + y1: barYPosition - barHeight * this.visibleI, + y2: barHeight * this.seriesLen, + elSeries + }) + + return { + pathTo: paths.pathTo, + pathFrom: paths.pathFrom, + x, + y, + goalX: this.barHelpers.getGoalValues('x', zeroW, null, i, j), + barYPosition + } + } + + drawColumnPaths({ + indexes, + x, + y, + xDivision, + barWidth, + zeroH, + strokeWidth, + elSeries + }) { + let w = this.w + + let realIndex = indexes.realIndex + let i = indexes.i + let j = indexes.j + let bc = indexes.bc + + if (w.globals.isXNumeric) { + let sxI = realIndex + if (!w.globals.seriesX[realIndex].length) { + sxI = w.globals.maxValsInArrayIndex + } + + x = + (w.globals.seriesX[sxI][j] - w.globals.minX) / this.xRatio - + (barWidth * this.seriesLen) / 2 + } + + let barXPosition = x + barWidth * this.visibleI + + y = this.barHelpers.getYForValue(this.series[i][j], zeroH) + + const paths = this.barHelpers.getColumnPaths({ + barXPosition, + barWidth, + y1: zeroH, + y2: y, + strokeWidth, + series: this.series, + realIndex: indexes.realIndex, + i, + j, + w + }) + + if (!w.globals.isXNumeric) { + x = x + xDivision + } + + this.barHelpers.barBackground({ + bc, + j, + i, + x1: barXPosition - strokeWidth / 2 - barWidth * this.visibleI, + x2: barWidth * this.seriesLen + strokeWidth / 2, + elSeries + }) + + return { + pathTo: paths.pathTo, + pathFrom: paths.pathFrom, + x, + y, + goalY: this.barHelpers.getGoalValues('y', null, zeroH, i, j), + barXPosition + } + } + + /** getPreviousPath is a common function for bars/columns which is used to get previous paths when data changes. + * @memberof Bar + * @param {int} realIndex - current iterating i + * @param {int} j - current iterating series's j index + * @return {string} pathFrom is the string which will be appended in animations + **/ + getPreviousPath(realIndex, j) { + let w = this.w + let pathFrom + for (let pp = 0; pp < w.globals.previousPaths.length; pp++) { + let gpp = w.globals.previousPaths[pp] + + if ( + gpp.paths && + gpp.paths.length > 0 && + parseInt(gpp.realIndex, 10) === parseInt(realIndex, 10) + ) { + if (typeof w.globals.previousPaths[pp].paths[j] !== 'undefined') { + pathFrom = w.globals.previousPaths[pp].paths[j].d + } + } + } + return pathFrom + } +} + +export default Bar diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/BarStacked.js b/cao_sunyata/static/libs/apexcharts/src/charts/BarStacked.js new file mode 100644 index 0000000..345abde --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/BarStacked.js @@ -0,0 +1,481 @@ +import CoreUtils from '../modules/CoreUtils' +import Bar from './Bar' +import Graphics from '../modules/Graphics' +import Utils from '../utils/Utils' + +/** + * ApexCharts BarStacked Class responsible for drawing both Stacked Columns and Bars. + * + * @module BarStacked + * The whole calculation for stacked bar/column is different from normal bar/column, + * hence it makes sense to derive a new class for it extending most of the props of Parent Bar + **/ + +class BarStacked extends Bar { + draw(series, seriesIndex) { + let w = this.w + this.graphics = new Graphics(this.ctx) + this.bar = new Bar(this.ctx, this.xyRatios) + + const coreUtils = new CoreUtils(this.ctx, w) + series = coreUtils.getLogSeries(series) + this.yRatio = coreUtils.getLogYRatios(this.yRatio) + + this.barHelpers.initVariables(series) + + if (w.config.chart.stackType === '100%') { + series = w.globals.seriesPercent.slice() + } + + this.series = series + + this.totalItems = 0 + + this.prevY = [] // y position on chart + this.prevX = [] // x position on chart + this.prevYF = [] // y position including shapes on chart + this.prevXF = [] // x position including shapes on chart + this.prevYVal = [] // y values (series[i][j]) in columns + this.prevXVal = [] // x values (series[i][j]) in bars + + this.xArrj = [] // xj indicates x position on graph in bars + this.xArrjF = [] // xjF indicates bar's x position + roundedShape's positions in bars + this.xArrjVal = [] // x val means the actual series's y values in horizontal/bars + this.yArrj = [] // yj indicates y position on graph in columns + this.yArrjF = [] // yjF indicates bar's y position + roundedShape's positions in columns + this.yArrjVal = [] // y val means the actual series's y values in columns + + for (let sl = 0; sl < series.length; sl++) { + if (series[sl].length > 0) { + this.totalItems += series[sl].length + } + } + + let ret = this.graphics.group({ + class: 'apexcharts-bar-series apexcharts-plot-series' + }) + + let x = 0 + let y = 0 + + for (let i = 0, bc = 0; i < series.length; i++, bc++) { + let xDivision // xDivision is the GRIDWIDTH divided by number of datapoints (columns) + let yDivision // yDivision is the GRIDHEIGHT divided by number of datapoints (bars) + let zeroH // zeroH is the baseline where 0 meets y axis + let zeroW // zeroW is the baseline where 0 meets x axis + + let xArrValues = [] + let yArrValues = [] + + let realIndex = w.globals.comboCharts ? seriesIndex[i] : i + + if (this.yRatio.length > 1) { + this.yaxisIndex = realIndex + } + + this.isReversed = + w.config.yaxis[this.yaxisIndex] && + w.config.yaxis[this.yaxisIndex].reversed + + // el to which series will be drawn + let elSeries = this.graphics.group({ + class: `apexcharts-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]), + rel: i + 1, + 'data:realIndex': realIndex + }) + this.ctx.series.addCollapsedClassToSeries(elSeries, realIndex) + + // eldatalabels + let elDataLabelsWrap = this.graphics.group({ + class: 'apexcharts-datalabels', + 'data:realIndex': realIndex + }) + + let barHeight = 0 + let barWidth = 0 + + let initPositions = this.initialPositions( + x, + y, + xDivision, + yDivision, + zeroH, + zeroW + ) + y = initPositions.y + barHeight = initPositions.barHeight + yDivision = initPositions.yDivision + zeroW = initPositions.zeroW + + x = initPositions.x + barWidth = initPositions.barWidth + xDivision = initPositions.xDivision + zeroH = initPositions.zeroH + + this.yArrj = [] + this.yArrjF = [] + this.yArrjVal = [] + this.xArrj = [] + this.xArrjF = [] + this.xArrjVal = [] + + // if (!this.horizontal) { + // this.xArrj.push(x + barWidth / 2) + // } + + // fix issue #1215; + // where all stack bar disappear after collapsing the first series + // sol: if only 1 arr in this.prevY(this.prevY.length === 1) and all are NaN + if (this.prevY.length === 1 && this.prevY[0].every((val) => isNaN(val))) { + // make this.prevY[0] all zeroH + this.prevY[0] = this.prevY[0].map((val) => zeroH) + // make this.prevYF[0] all 0 + this.prevYF[0] = this.prevYF[0].map((val) => 0) + } + + for (let j = 0; j < w.globals.dataPoints; j++) { + const strokeWidth = this.barHelpers.getStrokeWidth(i, j, realIndex) + const commonPathOpts = { + indexes: { i, j, realIndex, bc }, + strokeWidth, + x, + y, + elSeries + } + let paths = null + if (this.isHorizontal) { + paths = this.drawStackedBarPaths({ + ...commonPathOpts, + zeroW, + barHeight, + yDivision + }) + barWidth = this.series[i][j] / this.invertedYRatio + } else { + paths = this.drawStackedColumnPaths({ + ...commonPathOpts, + xDivision, + barWidth, + zeroH + }) + barHeight = this.series[i][j] / this.yRatio[this.yaxisIndex] + } + + y = paths.y + x = paths.x + + xArrValues.push(x) + yArrValues.push(y) + + let pathFill = this.barHelpers.getPathFillColor(series, i, j, realIndex) + + elSeries = this.renderSeries({ + realIndex, + pathFill, + j, + i, + pathFrom: paths.pathFrom, + pathTo: paths.pathTo, + strokeWidth, + elSeries, + x, + y, + series, + barHeight, + barWidth, + elDataLabelsWrap, + type: 'bar', + visibleSeries: 0 + }) + } + + // push all x val arrays into main xArr + w.globals.seriesXvalues[realIndex] = xArrValues + w.globals.seriesYvalues[realIndex] = yArrValues + + // push all current y values array to main PrevY Array + this.prevY.push(this.yArrj) + this.prevYF.push(this.yArrjF) + this.prevYVal.push(this.yArrjVal) + this.prevX.push(this.xArrj) + this.prevXF.push(this.xArrjF) + this.prevXVal.push(this.xArrjVal) + + ret.add(elSeries) + } + + return ret + } + + initialPositions(x, y, xDivision, yDivision, zeroH, zeroW) { + let w = this.w + + let barHeight, barWidth + if (this.isHorizontal) { + // height divided into equal parts + yDivision = w.globals.gridHeight / w.globals.dataPoints + barHeight = yDivision + + barHeight = + (barHeight * parseInt(w.config.plotOptions.bar.barHeight, 10)) / 100 + + zeroW = + this.baseLineInvertedY + + w.globals.padHorizontal + + (this.isReversed ? w.globals.gridWidth : 0) - + (this.isReversed ? this.baseLineInvertedY * 2 : 0) + + // initial y position is half of barHeight * half of number of Bars + y = (yDivision - barHeight) / 2 + } else { + // width divided into equal parts + xDivision = w.globals.gridWidth / w.globals.dataPoints + + barWidth = xDivision + + if (w.globals.isXNumeric && w.globals.dataPoints > 1) { + // the check (w.globals.dataPoints > 1) fixes apexcharts.js #1617 + xDivision = w.globals.minXDiff / this.xRatio + barWidth = (xDivision * parseInt(this.barOptions.columnWidth, 10)) / 100 + } else { + barWidth = + (barWidth * parseInt(w.config.plotOptions.bar.columnWidth, 10)) / 100 + } + + zeroH = + this.baseLineY[this.yaxisIndex] + + (this.isReversed ? w.globals.gridHeight : 0) - + (this.isReversed ? this.baseLineY[this.yaxisIndex] * 2 : 0) + + // initial x position is one third of barWidth + x = w.globals.padHorizontal + (xDivision - barWidth) / 2 + } + return { + x, + y, + yDivision, + xDivision, + barHeight, + barWidth, + zeroH, + zeroW + } + } + + drawStackedBarPaths({ + indexes, + barHeight, + strokeWidth, + zeroW, + x, + y, + yDivision, + elSeries + }) { + let w = this.w + let barYPosition = y + let barXPosition + let i = indexes.i + let j = indexes.j + + let prevBarW = 0 + for (let k = 0; k < this.prevXF.length; k++) { + prevBarW = prevBarW + this.prevXF[k][j] + } + + if (i > 0) { + let bXP = zeroW + + if (this.prevXVal[i - 1][j] < 0) { + bXP = + this.series[i][j] >= 0 + ? this.prevX[i - 1][j] + + prevBarW - + (this.isReversed ? prevBarW : 0) * 2 + : this.prevX[i - 1][j] + } else if (this.prevXVal[i - 1][j] >= 0) { + bXP = + this.series[i][j] >= 0 + ? this.prevX[i - 1][j] + : this.prevX[i - 1][j] - + prevBarW + + (this.isReversed ? prevBarW : 0) * 2 + } + + barXPosition = bXP + } else { + // the first series will not have prevX values + barXPosition = zeroW + } + + if (this.series[i][j] === null) { + x = barXPosition + } else { + x = + barXPosition + + this.series[i][j] / this.invertedYRatio - + (this.isReversed ? this.series[i][j] / this.invertedYRatio : 0) * 2 + } + + const paths = this.barHelpers.getBarpaths({ + barYPosition, + barHeight, + x1: barXPosition, + x2: x, + strokeWidth, + series: this.series, + realIndex: indexes.realIndex, + i, + j, + w + }) + + this.barHelpers.barBackground({ + j, + i, + y1: barYPosition, + y2: barHeight, + elSeries + }) + + y = y + yDivision + + return { + pathTo: paths.pathTo, + pathFrom: paths.pathFrom, + x, + y + } + } + + drawStackedColumnPaths({ + indexes, + x, + y, + xDivision, + barWidth, + zeroH, + strokeWidth, + elSeries + }) { + let w = this.w + let i = indexes.i + let j = indexes.j + let bc = indexes.bc + + if (w.globals.isXNumeric) { + let seriesVal = w.globals.seriesX[i][j] + if (!seriesVal) seriesVal = 0 + x = (seriesVal - w.globals.minX) / this.xRatio - barWidth / 2 + } + + let barXPosition = x + let barYPosition + + let prevBarH = 0 + for (let k = 0; k < this.prevYF.length; k++) { + // fix issue #1215 + // in case where this.prevYF[k][j] is NaN, use 0 instead + prevBarH = prevBarH + (!isNaN(this.prevYF[k][j]) ? this.prevYF[k][j] : 0) + } + + if ( + (i > 0 && !w.globals.isXNumeric) || + (i > 0 && + w.globals.isXNumeric && + w.globals.seriesX[i - 1][j] === w.globals.seriesX[i][j]) + ) { + let bYP + let prevYValue + const p = Math.min(this.yRatio.length + 1, i + 1) + if (this.prevY[i - 1] !== undefined) { + for (let ii = 1; ii < p; ii++) { + if (!isNaN(this.prevY[i - ii][j])) { + // find the previous available value to give prevYValue + prevYValue = this.prevY[i - ii][j] + // if found it, break the loop + break + } + } + } + + for (let ii = 1; ii < p; ii++) { + // find the previous available value(non-NaN) to give bYP + if (this.prevYVal[i - ii][j] < 0) { + bYP = + this.series[i][j] >= 0 + ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 + : prevYValue + // found it? break the loop + break + } else if (this.prevYVal[i - ii][j] >= 0) { + bYP = + this.series[i][j] >= 0 + ? prevYValue + : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2 + // found it? break the loop + break + } + } + + if (typeof bYP === 'undefined') bYP = w.globals.gridHeight + + // if this.prevYF[0] is all 0 resulted from line #486 + // AND every arr starting from the second only contains NaN + if ( + this.prevYF[0].every((val) => val === 0) && + this.prevYF.slice(1, i).every((arr) => arr.every((val) => isNaN(val))) + ) { + // Use the same calc way as line #485 + barYPosition = w.globals.gridHeight - zeroH + } else { + // Nothing special + barYPosition = bYP + } + } else { + // the first series will not have prevY values, also if the prev index's series X doesn't matches the current index's series X, then start from zero + barYPosition = w.globals.gridHeight - zeroH + } + + y = + barYPosition - + this.series[i][j] / this.yRatio[this.yaxisIndex] + + (this.isReversed ? this.series[i][j] / this.yRatio[this.yaxisIndex] : 0) * + 2 + + const paths = this.barHelpers.getColumnPaths({ + barXPosition, + barWidth, + y1: barYPosition, + y2: y, + yRatio: this.yRatio[this.yaxisIndex], + strokeWidth: this.strokeWidth, + series: this.series, + realIndex: indexes.realIndex, + i, + j, + w + }) + + this.barHelpers.barBackground({ + bc, + j, + i, + x1: barXPosition, + x2: barWidth, + elSeries + }) + + x = x + xDivision + + return { + pathTo: paths.pathTo, + pathFrom: paths.pathFrom, + x: w.globals.isXNumeric ? x - xDivision : x, + y + } + } +} + +export default BarStacked diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/BoxCandleStick.js b/cao_sunyata/static/libs/apexcharts/src/charts/BoxCandleStick.js new file mode 100644 index 0000000..b2d121a --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/BoxCandleStick.js @@ -0,0 +1,428 @@ +import CoreUtils from '../modules/CoreUtils' +import Bar from './Bar' +import Fill from '../modules/Fill' +import Graphics from '../modules/Graphics' +import Utils from '../utils/Utils' + +/** + * ApexCharts BoxCandleStick Class responsible for drawing both Stacked Columns and Bars. + * + * @module BoxCandleStick + **/ + +class BoxCandleStick extends Bar { + draw(series, seriesIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + let fill = new Fill(this.ctx) + + this.candlestickOptions = this.w.config.plotOptions.candlestick + this.boxOptions = this.w.config.plotOptions.boxPlot + this.isHorizontal = w.config.plotOptions.bar.horizontal + + const coreUtils = new CoreUtils(this.ctx, w) + series = coreUtils.getLogSeries(series) + this.series = series + this.yRatio = coreUtils.getLogYRatios(this.yRatio) + + this.barHelpers.initVariables(series) + + let ret = graphics.group({ + class: `apexcharts-${w.config.chart.type}-series apexcharts-plot-series` + }) + + for (let i = 0; i < series.length; i++) { + this.isBoxPlot = + w.config.chart.type === 'boxPlot' || + w.config.series[i].type === 'boxPlot' + + let x, + y, + xDivision, // xDivision is the GRIDWIDTH divided by number of datapoints (columns) + yDivision, // yDivision is the GRIDHEIGHT divided by number of datapoints (bars) + zeroH, // zeroH is the baseline where 0 meets y axis + zeroW // zeroW is the baseline where 0 meets x axis + + let yArrj = [] // hold y values of current iterating series + let xArrj = [] // hold x values of current iterating series + + let realIndex = w.globals.comboCharts ? seriesIndex[i] : i + + // el to which series will be drawn + let elSeries = graphics.group({ + class: `apexcharts-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]), + rel: i + 1, + 'data:realIndex': realIndex + }) + + this.ctx.series.addCollapsedClassToSeries(elSeries, realIndex) + + if (series[i].length > 0) { + this.visibleI = this.visibleI + 1 + } + + let barHeight = 0 + let barWidth = 0 + + if (this.yRatio.length > 1) { + this.yaxisIndex = realIndex + } + + let initPositions = this.barHelpers.initialPositions() + + y = initPositions.y + barHeight = initPositions.barHeight + yDivision = initPositions.yDivision + zeroW = initPositions.zeroW + + x = initPositions.x + barWidth = initPositions.barWidth + xDivision = initPositions.xDivision + zeroH = initPositions.zeroH + + xArrj.push(x + barWidth / 2) + + // eldatalabels + let elDataLabelsWrap = graphics.group({ + class: 'apexcharts-datalabels', + 'data:realIndex': realIndex + }) + + for (let j = 0; j < w.globals.dataPoints; j++) { + const strokeWidth = this.barHelpers.getStrokeWidth(i, j, realIndex) + + let paths = null + const pathsParams = { + indexes: { + i, + j, + realIndex + }, + x, + y, + strokeWidth, + elSeries + } + + if (this.isHorizontal) { + paths = this.drawHorizontalBoxPaths({ + ...pathsParams, + yDivision, + barHeight, + zeroW + }) + } else { + paths = this.drawVerticalBoxPaths({ + ...pathsParams, + xDivision, + barWidth, + zeroH + }) + } + + y = paths.y + x = paths.x + + // push current X + if (j > 0) { + xArrj.push(x + barWidth / 2) + } + + yArrj.push(y) + + paths.pathTo.forEach((pathTo, pi) => { + let lineFill = + !this.isBoxPlot && this.candlestickOptions.wick.useFillColor + ? paths.color[pi] + : w.globals.stroke.colors[i] + + let pathFill = fill.fillPath({ + seriesNumber: realIndex, + dataPointIndex: j, + color: paths.color[pi], + value: series[i][j] + }) + + this.renderSeries({ + realIndex, + pathFill, + lineFill, + j, + i, + pathFrom: paths.pathFrom, + pathTo, + strokeWidth, + elSeries, + x, + y, + series, + barHeight, + barWidth, + elDataLabelsWrap, + visibleSeries: this.visibleI, + type: w.config.chart.type + }) + }) + } + + // push all x val arrays into main xArr + w.globals.seriesXvalues[realIndex] = xArrj + w.globals.seriesYvalues[realIndex] = yArrj + + ret.add(elSeries) + } + + return ret + } + + drawVerticalBoxPaths({ + indexes, + x, + y, + xDivision, + barWidth, + zeroH, + strokeWidth + }) { + let w = this.w + let graphics = new Graphics(this.ctx) + + let i = indexes.i + let j = indexes.j + + let isPositive = true + let colorPos = w.config.plotOptions.candlestick.colors.upward + let colorNeg = w.config.plotOptions.candlestick.colors.downward + let color = '' + + if (this.isBoxPlot) { + color = [this.boxOptions.colors.lower, this.boxOptions.colors.upper] + } + + const yRatio = this.yRatio[this.yaxisIndex] + let realIndex = indexes.realIndex + + const ohlc = this.getOHLCValue(realIndex, j) + let l1 = zeroH + let l2 = zeroH + + if (ohlc.o > ohlc.c) { + isPositive = false + } + + let y1 = Math.min(ohlc.o, ohlc.c) + let y2 = Math.max(ohlc.o, ohlc.c) + let m = ohlc.m + + if (w.globals.isXNumeric) { + x = + (w.globals.seriesX[realIndex][j] - w.globals.minX) / this.xRatio - + barWidth / 2 + } + + let barXPosition = x + barWidth * this.visibleI + + if ( + typeof this.series[i][j] === 'undefined' || + this.series[i][j] === null + ) { + y1 = zeroH + y2 = zeroH + } else { + y1 = zeroH - y1 / yRatio + y2 = zeroH - y2 / yRatio + l1 = zeroH - ohlc.h / yRatio + l2 = zeroH - ohlc.l / yRatio + m = zeroH - ohlc.m / yRatio + } + + let pathTo = graphics.move(barXPosition, zeroH) + let pathFrom = graphics.move(barXPosition + barWidth / 2, y1) + if (w.globals.previousPaths.length > 0) { + pathFrom = this.getPreviousPath(realIndex, j, true) + } + + if (this.isBoxPlot) { + pathTo = [ + graphics.move(barXPosition, y1) + + graphics.line(barXPosition + barWidth / 2, y1) + + graphics.line(barXPosition + barWidth / 2, l1) + + graphics.line(barXPosition + barWidth / 4, l1) + + graphics.line(barXPosition + barWidth - barWidth / 4, l1) + + graphics.line(barXPosition + barWidth / 2, l1) + + graphics.line(barXPosition + barWidth / 2, y1) + + graphics.line(barXPosition + barWidth, y1) + + graphics.line(barXPosition + barWidth, m) + + graphics.line(barXPosition, m) + + graphics.line(barXPosition, y1 + strokeWidth / 2), + graphics.move(barXPosition, m) + + graphics.line(barXPosition + barWidth, m) + + graphics.line(barXPosition + barWidth, y2) + + graphics.line(barXPosition + barWidth / 2, y2) + + graphics.line(barXPosition + barWidth / 2, l2) + + graphics.line(barXPosition + barWidth - barWidth / 4, l2) + + graphics.line(barXPosition + barWidth / 4, l2) + + graphics.line(barXPosition + barWidth / 2, l2) + + graphics.line(barXPosition + barWidth / 2, y2) + + graphics.line(barXPosition, y2) + + graphics.line(barXPosition, m) + + 'z' + ] + } else { + // candlestick + pathTo = [ + graphics.move(barXPosition, y2) + + graphics.line(barXPosition + barWidth / 2, y2) + + graphics.line(barXPosition + barWidth / 2, l1) + + graphics.line(barXPosition + barWidth / 2, y2) + + graphics.line(barXPosition + barWidth, y2) + + graphics.line(barXPosition + barWidth, y1) + + graphics.line(barXPosition + barWidth / 2, y1) + + graphics.line(barXPosition + barWidth / 2, l2) + + graphics.line(barXPosition + barWidth / 2, y1) + + graphics.line(barXPosition, y1) + + graphics.line(barXPosition, y2 - strokeWidth / 2) + ] + } + + pathFrom = pathFrom + graphics.move(barXPosition, y1) + + if (!w.globals.isXNumeric) { + x = x + xDivision + } + + return { + pathTo, + pathFrom, + x, + y: y2, + barXPosition, + color: this.isBoxPlot ? color : isPositive ? [colorPos] : [colorNeg] + } + } + + drawHorizontalBoxPaths({ + indexes, + x, + y, + yDivision, + barHeight, + zeroW, + strokeWidth + }) { + let w = this.w + let graphics = new Graphics(this.ctx) + + let i = indexes.i + let j = indexes.j + + let color = this.boxOptions.colors.lower + + if (this.isBoxPlot) { + color = [this.boxOptions.colors.lower, this.boxOptions.colors.upper] + } + + const yRatio = this.invertedYRatio + let realIndex = indexes.realIndex + + const ohlc = this.getOHLCValue(realIndex, j) + let l1 = zeroW + let l2 = zeroW + + let x1 = Math.min(ohlc.o, ohlc.c) + let x2 = Math.max(ohlc.o, ohlc.c) + let m = ohlc.m + + if (w.globals.isXNumeric) { + y = + (w.globals.seriesX[realIndex][j] - w.globals.minX) / + this.invertedXRatio - + barHeight / 2 + } + + let barYPosition = y + barHeight * this.visibleI + + if ( + typeof this.series[i][j] === 'undefined' || + this.series[i][j] === null + ) { + x1 = zeroW + x2 = zeroW + } else { + x1 = zeroW + x1 / yRatio + x2 = zeroW + x2 / yRatio + l1 = zeroW + ohlc.h / yRatio + l2 = zeroW + ohlc.l / yRatio + m = zeroW + ohlc.m / yRatio + } + + let pathTo = graphics.move(zeroW, barYPosition) + let pathFrom = graphics.move(x1, barYPosition + barHeight / 2) + if (w.globals.previousPaths.length > 0) { + pathFrom = this.getPreviousPath(realIndex, j, true) + } + + pathTo = [ + graphics.move(x1, barYPosition) + + graphics.line(x1, barYPosition + barHeight / 2) + + graphics.line(l1, barYPosition + barHeight / 2) + + graphics.line(l1, barYPosition + barHeight / 2 - barHeight / 4) + + graphics.line(l1, barYPosition + barHeight / 2 + barHeight / 4) + + graphics.line(l1, barYPosition + barHeight / 2) + + graphics.line(x1, barYPosition + barHeight / 2) + + graphics.line(x1, barYPosition + barHeight) + + graphics.line(m, barYPosition + barHeight) + + graphics.line(m, barYPosition) + + graphics.line(x1 + strokeWidth / 2, barYPosition), + graphics.move(m, barYPosition) + + graphics.line(m, barYPosition + barHeight) + + graphics.line(x2, barYPosition + barHeight) + + graphics.line(x2, barYPosition + barHeight / 2) + + graphics.line(l2, barYPosition + barHeight / 2) + + graphics.line(l2, barYPosition + barHeight - barHeight / 4) + + graphics.line(l2, barYPosition + barHeight / 4) + + graphics.line(l2, barYPosition + barHeight / 2) + + graphics.line(x2, barYPosition + barHeight / 2) + + graphics.line(x2, barYPosition) + + graphics.line(m, barYPosition) + + 'z' + ] + + pathFrom = pathFrom + graphics.move(x1, barYPosition) + + if (!w.globals.isXNumeric) { + y = y + yDivision + } + + return { + pathTo, + pathFrom, + x: x2, + y, + barYPosition, + color + } + } + getOHLCValue(i, j) { + const w = this.w + + return { + o: this.isBoxPlot + ? w.globals.seriesCandleH[i][j] + : w.globals.seriesCandleO[i][j], + h: this.isBoxPlot + ? w.globals.seriesCandleO[i][j] + : w.globals.seriesCandleH[i][j], + m: w.globals.seriesCandleM[i][j], + l: this.isBoxPlot + ? w.globals.seriesCandleC[i][j] + : w.globals.seriesCandleL[i][j], + c: this.isBoxPlot + ? w.globals.seriesCandleL[i][j] + : w.globals.seriesCandleC[i][j] + } + } +} + +export default BoxCandleStick diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/HeatMap.js b/cao_sunyata/static/libs/apexcharts/src/charts/HeatMap.js new file mode 100644 index 0000000..60e3a9b --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/HeatMap.js @@ -0,0 +1,241 @@ +import Animations from '../modules/Animations' +import Graphics from '../modules/Graphics' +import Fill from '../modules/Fill' +import Utils from '../utils/Utils' +import Helpers from './common/treemap/Helpers' +import Filters from '../modules/Filters' + +/** + * ApexCharts HeatMap Class. + * @module HeatMap + **/ + +export default class HeatMap { + constructor(ctx, xyRatios) { + this.ctx = ctx + this.w = ctx.w + + this.xRatio = xyRatios.xRatio + this.yRatio = xyRatios.yRatio + + this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation + + this.helpers = new Helpers(ctx) + this.rectRadius = this.w.config.plotOptions.heatmap.radius + this.strokeWidth = this.w.config.stroke.show + ? this.w.config.stroke.width + : 0 + } + + draw(series) { + let w = this.w + const graphics = new Graphics(this.ctx) + + let ret = graphics.group({ + class: 'apexcharts-heatmap' + }) + + ret.attr('clip-path', `url(#gridRectMask${w.globals.cuid})`) + + // width divided into equal parts + let xDivision = w.globals.gridWidth / w.globals.dataPoints + let yDivision = w.globals.gridHeight / w.globals.series.length + + let y1 = 0 + let rev = false + + this.negRange = this.helpers.checkColorRange() + + let heatSeries = series.slice() + if (w.config.yaxis[0].reversed) { + rev = true + heatSeries.reverse() + } + + for ( + let i = rev ? 0 : heatSeries.length - 1; + rev ? i < heatSeries.length : i >= 0; + rev ? i++ : i-- + ) { + // el to which series will be drawn + let elSeries = graphics.group({ + class: `apexcharts-series apexcharts-heatmap-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[i]), + rel: i + 1, + 'data:realIndex': i + }) + this.ctx.series.addCollapsedClassToSeries(elSeries, i) + + if (w.config.chart.dropShadow.enabled) { + const shadow = w.config.chart.dropShadow + const filters = new Filters(this.ctx) + filters.dropShadow(elSeries, shadow, i) + } + + let x1 = 0 + let shadeIntensity = w.config.plotOptions.heatmap.shadeIntensity + + for (let j = 0; j < heatSeries[i].length; j++) { + let heatColor = this.helpers.getShadeColor( + w.config.chart.type, + i, + j, + this.negRange + ) + let color = heatColor.color + let heatColorProps = heatColor.colorProps + + if (w.config.fill.type === 'image') { + const fill = new Fill(this.ctx) + + color = fill.fillPath({ + seriesNumber: i, + dataPointIndex: j, + opacity: w.globals.hasNegs + ? heatColorProps.percent < 0 + ? 1 - (1 + heatColorProps.percent / 100) + : shadeIntensity + heatColorProps.percent / 100 + : heatColorProps.percent / 100, + patternID: Utils.randomId(), + width: w.config.fill.image.width + ? w.config.fill.image.width + : xDivision, + height: w.config.fill.image.height + ? w.config.fill.image.height + : yDivision + }) + } + + let radius = this.rectRadius + + let rect = graphics.drawRect(x1, y1, xDivision, yDivision, radius) + rect.attr({ + cx: x1, + cy: y1 + }) + + rect.node.classList.add('apexcharts-heatmap-rect') + elSeries.add(rect) + + rect.attr({ + fill: color, + i, + index: i, + j, + val: heatSeries[i][j], + 'stroke-width': this.strokeWidth, + stroke: w.config.plotOptions.heatmap.useFillColorAsStroke + ? color + : w.globals.stroke.colors[0], + color + }) + + this.helpers.addListeners(rect) + + if (w.config.chart.animations.enabled && !w.globals.dataChanged) { + let speed = 1 + if (!w.globals.resized) { + speed = w.config.chart.animations.speed + } + this.animateHeatMap(rect, x1, y1, xDivision, yDivision, speed) + } + + if (w.globals.dataChanged) { + let speed = 1 + if (this.dynamicAnim.enabled && w.globals.shouldAnimate) { + speed = this.dynamicAnim.speed + + let colorFrom = + w.globals.previousPaths[i] && + w.globals.previousPaths[i][j] && + w.globals.previousPaths[i][j].color + + if (!colorFrom) colorFrom = 'rgba(255, 255, 255, 0)' + + this.animateHeatColor( + rect, + Utils.isColorHex(colorFrom) + ? colorFrom + : Utils.rgb2hex(colorFrom), + Utils.isColorHex(color) ? color : Utils.rgb2hex(color), + speed + ) + } + } + + let formatter = w.config.dataLabels.formatter + let formattedText = formatter(w.globals.series[i][j], { + value: w.globals.series[i][j], + seriesIndex: i, + dataPointIndex: j, + w + }) + + let dataLabels = this.helpers.calculateDataLabels({ + text: formattedText, + x: x1 + xDivision / 2, + y: y1 + yDivision / 2, + i, + j, + colorProps: heatColorProps, + series: heatSeries + }) + if (dataLabels !== null) { + elSeries.add(dataLabels) + } + + x1 = x1 + xDivision + } + + y1 = y1 + yDivision + + ret.add(elSeries) + } + + // adjust yaxis labels for heatmap + let yAxisScale = w.globals.yAxisScale[0].result.slice() + if (w.config.yaxis[0].reversed) { + yAxisScale.unshift('') + } else { + yAxisScale.push('') + } + w.globals.yAxisScale[0].result = yAxisScale + let divisor = w.globals.gridHeight / w.globals.series.length + w.config.yaxis[0].labels.offsetY = -(divisor / 2) + + return ret + } + + animateHeatMap(el, x, y, width, height, speed) { + const animations = new Animations(this.ctx) + animations.animateRect( + el, + { + x: x + width / 2, + y: y + height / 2, + width: 0, + height: 0 + }, + { + x, + y, + width, + height + }, + speed, + () => { + animations.animationCompleted(el) + } + ) + } + + animateHeatColor(el, colorFrom, colorTo, speed) { + el.attr({ + fill: colorFrom + }) + .animate(speed) + .attr({ + fill: colorTo + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Line.js b/cao_sunyata/static/libs/apexcharts/src/charts/Line.js new file mode 100644 index 0000000..4b8e0e2 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Line.js @@ -0,0 +1,728 @@ +import CoreUtils from '../modules/CoreUtils' +import Graphics from '../modules/Graphics' +import Fill from '../modules/Fill' +import DataLabels from '../modules/DataLabels' +import Markers from '../modules/Markers' +import Scatter from './Scatter' +import Utils from '../utils/Utils' +import Helpers from './common/line/Helpers' + +/** + * ApexCharts Line Class responsible for drawing Line / Area Charts. + * This class is also responsible for generating values for Bubble/Scatter charts, so need to rename it to Axis Charts to avoid confusions + * @module Line + **/ + +class Line { + constructor(ctx, xyRatios, isPointsChart) { + this.ctx = ctx + this.w = ctx.w + + this.xyRatios = xyRatios + + this.pointsChart = + !( + this.w.config.chart.type !== 'bubble' && + this.w.config.chart.type !== 'scatter' + ) || isPointsChart + + this.scatter = new Scatter(this.ctx) + + this.noNegatives = this.w.globals.minX === Number.MAX_VALUE + + this.lineHelpers = new Helpers(this) + this.markers = new Markers(this.ctx) + + this.prevSeriesY = [] + this.categoryAxisCorrection = 0 + this.yaxisIndex = 0 + } + + draw(series, ptype, seriesIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + let type = w.globals.comboCharts ? ptype : w.config.chart.type + let ret = graphics.group({ + class: `apexcharts-${type}-series apexcharts-plot-series` + }) + + const coreUtils = new CoreUtils(this.ctx, w) + this.yRatio = this.xyRatios.yRatio + this.zRatio = this.xyRatios.zRatio + this.xRatio = this.xyRatios.xRatio + this.baseLineY = this.xyRatios.baseLineY + + series = coreUtils.getLogSeries(series) + this.yRatio = coreUtils.getLogYRatios(this.yRatio) + + // push all series in an array, so we can draw in reverse order (for stacked charts) + let allSeries = [] + + for (let i = 0; i < series.length; i++) { + series = this.lineHelpers.sameValueSeriesFix(i, series) + + let realIndex = w.globals.comboCharts ? seriesIndex[i] : i + + this._initSerieVariables(series, i, realIndex) + + let yArrj = [] // hold y values of current iterating series + let xArrj = [] // hold x values of current iterating series + + let x = w.globals.padHorizontal + this.categoryAxisCorrection + let y = 1 + + let linePaths = [] + let areaPaths = [] + + this.ctx.series.addCollapsedClassToSeries(this.elSeries, realIndex) + + if (w.globals.isXNumeric && w.globals.seriesX.length > 0) { + x = (w.globals.seriesX[realIndex][0] - w.globals.minX) / this.xRatio + } + + xArrj.push(x) + + let pX = x + let pY + let prevX = pX + let prevY = this.zeroY + let lineYPosition = 0 + + // the first value in the current series is not null or undefined + let firstPrevY = this.lineHelpers.determineFirstPrevY({ + i, + series, + prevY, + lineYPosition + }) + prevY = firstPrevY.prevY + + yArrj.push(prevY) + pY = prevY + + let pathsFrom = this._calculatePathsFrom({ + series, + i, + realIndex, + prevX, + prevY + }) + + let paths = this._iterateOverDataPoints({ + series, + realIndex, + i, + x, + y, + pX, + pY, + pathsFrom, + linePaths, + areaPaths, + seriesIndex, + lineYPosition, + xArrj, + yArrj + }) + + this._handlePaths({ type, realIndex, i, paths }) + + this.elSeries.add(this.elPointsMain) + this.elSeries.add(this.elDataLabelsWrap) + + allSeries.push(this.elSeries) + } + + if (w.config.chart.stacked) { + for (let s = allSeries.length; s > 0; s--) { + ret.add(allSeries[s - 1]) + } + } else { + for (let s = 0; s < allSeries.length; s++) { + ret.add(allSeries[s]) + } + } + + return ret + } + + _initSerieVariables(series, i, realIndex) { + const w = this.w + const graphics = new Graphics(this.ctx) + + // width divided into equal parts + this.xDivision = + w.globals.gridWidth / + (w.globals.dataPoints - (w.config.xaxis.tickPlacement === 'on' ? 1 : 0)) + + this.strokeWidth = Array.isArray(w.config.stroke.width) + ? w.config.stroke.width[realIndex] + : w.config.stroke.width + + if (this.yRatio.length > 1) { + this.yaxisIndex = realIndex + } + + this.isReversed = + w.config.yaxis[this.yaxisIndex] && + w.config.yaxis[this.yaxisIndex].reversed + + // zeroY is the 0 value in y series which can be used in negative charts + this.zeroY = + w.globals.gridHeight - + this.baseLineY[this.yaxisIndex] - + (this.isReversed ? w.globals.gridHeight : 0) + + (this.isReversed ? this.baseLineY[this.yaxisIndex] * 2 : 0) + + this.areaBottomY = this.zeroY + if ( + this.zeroY > w.globals.gridHeight || + w.config.plotOptions.area.fillTo === 'end' + ) { + this.areaBottomY = w.globals.gridHeight + } + + this.categoryAxisCorrection = this.xDivision / 2 + + // el to which series will be drawn + this.elSeries = graphics.group({ + class: `apexcharts-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]) + }) + + // points + this.elPointsMain = graphics.group({ + class: 'apexcharts-series-markers-wrap', + 'data:realIndex': realIndex + }) + + // eldatalabels + this.elDataLabelsWrap = graphics.group({ + class: 'apexcharts-datalabels', + 'data:realIndex': realIndex + }) + + let longestSeries = series[i].length === w.globals.dataPoints + this.elSeries.attr({ + 'data:longestSeries': longestSeries, + rel: i + 1, + 'data:realIndex': realIndex + }) + + this.appendPathFrom = true + } + + _calculatePathsFrom({ series, i, realIndex, prevX, prevY }) { + const w = this.w + const graphics = new Graphics(this.ctx) + let linePath, areaPath, pathFromLine, pathFromArea + + if (series[i][0] === null) { + // when the first value itself is null, we need to move the pointer to a location where a null value is not found + for (let s = 0; s < series[i].length; s++) { + if (series[i][s] !== null) { + prevX = this.xDivision * s + prevY = this.zeroY - series[i][s] / this.yRatio[this.yaxisIndex] + linePath = graphics.move(prevX, prevY) + areaPath = graphics.move(prevX, this.areaBottomY) + break + } + } + } else { + linePath = graphics.move(prevX, prevY) + areaPath = + graphics.move(prevX, this.areaBottomY) + graphics.line(prevX, prevY) + } + + pathFromLine = graphics.move(-1, this.zeroY) + graphics.line(-1, this.zeroY) + pathFromArea = graphics.move(-1, this.zeroY) + graphics.line(-1, this.zeroY) + + if (w.globals.previousPaths.length > 0) { + const pathFrom = this.lineHelpers.checkPreviousPaths({ + pathFromLine, + pathFromArea, + realIndex + }) + pathFromLine = pathFrom.pathFromLine + pathFromArea = pathFrom.pathFromArea + } + + return { + prevX, + prevY, + linePath, + areaPath, + pathFromLine, + pathFromArea + } + } + + _handlePaths({ type, realIndex, i, paths }) { + const w = this.w + const graphics = new Graphics(this.ctx) + const fill = new Fill(this.ctx) + + // push all current y values array to main PrevY Array + this.prevSeriesY.push(paths.yArrj) + + // push all x val arrays into main xArr + w.globals.seriesXvalues[realIndex] = paths.xArrj + w.globals.seriesYvalues[realIndex] = paths.yArrj + + const forecast = w.config.forecastDataPoints + if (forecast.count > 0) { + const forecastCutoff = + w.globals.seriesXvalues[realIndex][ + w.globals.seriesXvalues[realIndex].length - forecast.count - 1 + ] + const elForecastMask = graphics.drawRect( + forecastCutoff, + 0, + w.globals.gridWidth, + w.globals.gridHeight, + 0 + ) + w.globals.dom.elForecastMask.appendChild(elForecastMask.node) + + const elNonForecastMask = graphics.drawRect( + 0, + 0, + forecastCutoff, + w.globals.gridHeight, + 0 + ) + w.globals.dom.elNonForecastMask.appendChild(elNonForecastMask.node) + } + + // these elements will be shown after area path animation completes + if (!this.pointsChart) { + w.globals.delayedElements.push({ + el: this.elPointsMain.node, + index: realIndex + }) + } + + const defaultRenderedPathOptions = { + i, + realIndex, + animationDelay: i, + initialSpeed: w.config.chart.animations.speed, + dataChangeSpeed: w.config.chart.animations.dynamicAnimation.speed, + className: `apexcharts-${type}` + } + + if (type === 'area') { + let pathFill = fill.fillPath({ + seriesNumber: realIndex + }) + + for (let p = 0; p < paths.areaPaths.length; p++) { + let renderedPath = graphics.renderPaths({ + ...defaultRenderedPathOptions, + pathFrom: paths.pathFromArea, + pathTo: paths.areaPaths[p], + stroke: 'none', + strokeWidth: 0, + strokeLineCap: null, + fill: pathFill + }) + + this.elSeries.add(renderedPath) + } + } + + if (w.config.stroke.show && !this.pointsChart) { + let lineFill = null + if (type === 'line') { + lineFill = fill.fillPath({ + seriesNumber: realIndex, + i + }) + } else { + if (w.config.stroke.fill.type === 'solid') { + lineFill = w.globals.stroke.colors[realIndex] + } else { + const prevFill = w.config.fill + w.config.fill = w.config.stroke.fill + + lineFill = fill.fillPath({ + seriesNumber: realIndex, + i + }) + w.config.fill = prevFill + } + } + + for (let p = 0; p < paths.linePaths.length; p++) { + const linePathCommonOpts = { + ...defaultRenderedPathOptions, + pathFrom: paths.pathFromLine, + pathTo: paths.linePaths[p], + stroke: lineFill, + strokeWidth: this.strokeWidth, + strokeLineCap: w.config.stroke.lineCap, + fill: 'none' + } + let renderedPath = graphics.renderPaths(linePathCommonOpts) + this.elSeries.add(renderedPath) + + if (forecast.count > 0) { + let renderedForecastPath = graphics.renderPaths(linePathCommonOpts) + + renderedForecastPath.node.setAttribute( + 'stroke-dasharray', + forecast.dashArray + ) + + if (forecast.strokeWidth) { + renderedForecastPath.node.setAttribute( + 'stroke-width', + forecast.strokeWidth + ) + } + + this.elSeries.add(renderedForecastPath) + renderedForecastPath.attr( + 'clip-path', + `url(#forecastMask${w.globals.cuid})` + ) + renderedPath.attr( + 'clip-path', + `url(#nonForecastMask${w.globals.cuid})` + ) + } + } + } + } + + _iterateOverDataPoints({ + series, + realIndex, + i, + x, + y, + pX, + pY, + pathsFrom, + linePaths, + areaPaths, + seriesIndex, + lineYPosition, + xArrj, + yArrj + }) { + const w = this.w + let graphics = new Graphics(this.ctx) + let yRatio = this.yRatio + let { prevY, linePath, areaPath, pathFromLine, pathFromArea } = pathsFrom + + const minY = Utils.isNumber(w.globals.minYArr[realIndex]) + ? w.globals.minYArr[realIndex] + : w.globals.minY + + const iterations = + w.globals.dataPoints > 1 ? w.globals.dataPoints - 1 : w.globals.dataPoints + + for (let j = 0; j < iterations; j++) { + const isNull = + typeof series[i][j + 1] === 'undefined' || series[i][j + 1] === null + + if (w.globals.isXNumeric) { + let sX = w.globals.seriesX[realIndex][j + 1] + if (typeof w.globals.seriesX[realIndex][j + 1] === 'undefined') { + /* fix #374 */ + sX = w.globals.seriesX[realIndex][iterations - 1] + } + x = (sX - w.globals.minX) / this.xRatio + } else { + x = x + this.xDivision + } + + if (w.config.chart.stacked) { + if ( + i > 0 && + w.globals.collapsedSeries.length < w.config.series.length - 1 + ) { + // a collapsed series in a stacked bar chart may provide wrong result for the next series, hence find the prevIndex of prev series which is not collapsed - fixes apexcharts.js#1372 + const prevIndex = (pi) => { + let pii = pi + for (let cpi = 0; cpi < w.globals.series.length; cpi++) { + if (w.globals.collapsedSeriesIndices.indexOf(pi) > -1) { + pii-- + break + } + } + + return pii >= 0 ? pii : 0 + } + lineYPosition = this.prevSeriesY[prevIndex(i - 1)][j + 1] + } else { + // the first series will not have prevY values + lineYPosition = this.zeroY + } + } else { + lineYPosition = this.zeroY + } + + if (isNull) { + y = + lineYPosition - + minY / yRatio[this.yaxisIndex] + + (this.isReversed ? minY / yRatio[this.yaxisIndex] : 0) * 2 + } else { + y = + lineYPosition - + series[i][j + 1] / yRatio[this.yaxisIndex] + + (this.isReversed ? series[i][j + 1] / yRatio[this.yaxisIndex] : 0) * 2 + } + + // push current X + xArrj.push(x) + + // push current Y that will be used as next series's bottom position + yArrj.push(y) + + let pointsPos = this.lineHelpers.calculatePoints({ + series, + x, + y, + realIndex, + i, + j, + prevY + }) + + let calculatedPaths = this._createPaths({ + series, + i, + realIndex, + j, + x, + y, + pX, + pY, + linePath, + areaPath, + linePaths, + areaPaths, + seriesIndex + }) + + areaPaths = calculatedPaths.areaPaths + linePaths = calculatedPaths.linePaths + pX = calculatedPaths.pX + pY = calculatedPaths.pY + areaPath = calculatedPaths.areaPath + linePath = calculatedPaths.linePath + + if (this.appendPathFrom) { + pathFromLine = pathFromLine + graphics.line(x, this.zeroY) + pathFromArea = pathFromArea + graphics.line(x, this.zeroY) + } + + this.handleNullDataPoints(series, pointsPos, i, j, realIndex) + + this._handleMarkersAndLabels({ + pointsPos, + series, + x, + y, + prevY, + i, + j, + realIndex + }) + } + + return { + yArrj, + xArrj, + pathFromArea, + areaPaths, + pathFromLine, + linePaths + } + } + + _handleMarkersAndLabels({ pointsPos, series, x, y, prevY, i, j, realIndex }) { + const w = this.w + let dataLabels = new DataLabels(this.ctx) + + if (!this.pointsChart) { + if (w.globals.series[i].length > 1) { + this.elPointsMain.node.classList.add('apexcharts-element-hidden') + } + + let elPointsWrap = this.markers.plotChartMarkers( + pointsPos, + realIndex, + j + 1 + ) + if (elPointsWrap !== null) { + this.elPointsMain.add(elPointsWrap) + } + } else { + // scatter / bubble chart points creation + this.scatter.draw(this.elSeries, j, { + realIndex, + pointsPos, + zRatio: this.zRatio, + elParent: this.elPointsMain + }) + } + + let drawnLabels = dataLabels.drawDataLabel( + pointsPos, + realIndex, + j + 1, + null + ) + if (drawnLabels !== null) { + this.elDataLabelsWrap.add(drawnLabels) + } + } + + _createPaths({ + series, + i, + realIndex, + j, + x, + y, + pX, + pY, + linePath, + areaPath, + linePaths, + areaPaths, + seriesIndex + }) { + let w = this.w + let graphics = new Graphics(this.ctx) + + let curve = w.config.stroke.curve + const areaBottomY = this.areaBottomY + + if (Array.isArray(w.config.stroke.curve)) { + if (Array.isArray(seriesIndex)) { + curve = w.config.stroke.curve[seriesIndex[i]] + } else { + curve = w.config.stroke.curve[i] + } + } + + // logic of smooth curve derived from chartist + // CREDITS: https://gionkunz.github.io/chartist-js/ + if (curve === 'smooth') { + let length = (x - pX) * 0.35 + if (w.globals.hasNullValues) { + if (series[i][j] !== null) { + if (series[i][j + 1] !== null) { + linePath = + graphics.move(pX, pY) + + graphics.curve(pX + length, pY, x - length, y, x + 1, y) + areaPath = + graphics.move(pX + 1, pY) + + graphics.curve(pX + length, pY, x - length, y, x + 1, y) + + graphics.line(x, areaBottomY) + + graphics.line(pX, areaBottomY) + + 'z' + } else { + linePath = graphics.move(pX, pY) + areaPath = graphics.move(pX, pY) + 'z' + } + } + + linePaths.push(linePath) + areaPaths.push(areaPath) + } else { + linePath = + linePath + graphics.curve(pX + length, pY, x - length, y, x, y) + areaPath = + areaPath + graphics.curve(pX + length, pY, x - length, y, x, y) + } + + pX = x + pY = y + + if (j === series[i].length - 2) { + // last loop, close path + areaPath = + areaPath + + graphics.curve(pX, pY, x, y, x, areaBottomY) + + graphics.move(x, y) + + 'z' + if (!w.globals.hasNullValues) { + linePaths.push(linePath) + areaPaths.push(areaPath) + } + } + } else { + if (series[i][j + 1] === null) { + linePath = linePath + graphics.move(x, y) + + const numericOrCatX = w.globals.isXNumeric + ? (w.globals.seriesX[realIndex][j] - w.globals.minX) / this.xRatio + : x - this.xDivision + areaPath = + areaPath + + graphics.line(numericOrCatX, areaBottomY) + + graphics.move(x, y) + + 'z' + } + if (series[i][j] === null) { + linePath = linePath + graphics.move(x, y) + areaPath = areaPath + graphics.move(x, areaBottomY) + } + + if (curve === 'stepline') { + linePath = + linePath + graphics.line(x, null, 'H') + graphics.line(null, y, 'V') + areaPath = + areaPath + graphics.line(x, null, 'H') + graphics.line(null, y, 'V') + } else if (curve === 'straight') { + linePath = linePath + graphics.line(x, y) + areaPath = areaPath + graphics.line(x, y) + } + + if (j === series[i].length - 2) { + // last loop, close path + areaPath = + areaPath + graphics.line(x, areaBottomY) + graphics.move(x, y) + 'z' + linePaths.push(linePath) + areaPaths.push(areaPath) + } + } + + return { + linePaths, + areaPaths, + pX, + pY, + linePath, + areaPath + } + } + + handleNullDataPoints(series, pointsPos, i, j, realIndex) { + const w = this.w + if ( + (series[i][j] === null && w.config.markers.showNullDataPoints) || + series[i].length === 1 + ) { + // fixes apexcharts.js#1282, #1252 + let elPointsWrap = this.markers.plotChartMarkers( + pointsPos, + realIndex, + j + 1, + this.strokeWidth - w.config.markers.strokeWidth / 2, + true + ) + if (elPointsWrap !== null) { + this.elPointsMain.add(elPointsWrap) + } + } + } +} + +export default Line diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Pie.js b/cao_sunyata/static/libs/apexcharts/src/charts/Pie.js new file mode 100644 index 0000000..8259e7f --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Pie.js @@ -0,0 +1,1057 @@ +import Animations from '../modules/Animations' +import Fill from '../modules/Fill' +import Utils from '../utils/Utils' +import Graphics from '../modules/Graphics' +import Filters from '../modules/Filters' +import Scales from '../modules/Scales' +import Helpers from './common/circle/Helpers' +/** + * ApexCharts Pie Class for drawing Pie / Donut Charts. + * @module Pie + **/ + +class Pie { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + const w = this.w + + this.chartType = this.w.config.chart.type + + this.initialAnim = this.w.config.chart.animations.enabled + this.dynamicAnim = + this.initialAnim && + this.w.config.chart.animations.dynamicAnimation.enabled + + this.animBeginArr = [0] + this.animDur = 0 + + this.donutDataLabels = this.w.config.plotOptions.pie.donut.labels + + this.lineColorArr = + w.globals.stroke.colors !== undefined + ? w.globals.stroke.colors + : w.globals.colors + + this.defaultSize = Math.min(w.globals.gridWidth, w.globals.gridHeight) + + this.centerY = this.defaultSize / 2 + this.centerX = w.globals.gridWidth / 2 + + if (w.config.chart.type === 'radialBar') { + this.fullAngle = 360 + } else { + this.fullAngle = Math.abs( + w.config.plotOptions.pie.endAngle - w.config.plotOptions.pie.startAngle + ) + } + this.initialAngle = w.config.plotOptions.pie.startAngle % this.fullAngle + + w.globals.radialSize = + this.defaultSize / 2.05 - + w.config.stroke.width - + (!w.config.chart.sparkline.enabled ? w.config.chart.dropShadow.blur : 0) + + this.donutSize = + (w.globals.radialSize * + parseInt(w.config.plotOptions.pie.donut.size, 10)) / + 100 + + this.maxY = 0 + this.sliceLabels = [] + this.sliceSizes = [] + + this.prevSectorAngleArr = [] // for dynamic animations + } + + draw(series) { + let self = this + let w = this.w + + const graphics = new Graphics(this.ctx) + + this.ret = graphics.group({ + class: 'apexcharts-pie' + }) + + if (w.globals.noData) return this.ret + + let total = 0 + for (let k = 0; k < series.length; k++) { + // CALCULATE THE TOTAL + total += Utils.negToZero(series[k]) + } + + let sectorAngleArr = [] + + // el to which series will be drawn + let elSeries = graphics.group() + + // prevent division by zero error if there is no data + if (total === 0) { + total = 0.00001 + } + + series.forEach((m) => { + this.maxY = Math.max(this.maxY, m) + }) + + // override maxY if user provided in config + if (w.config.yaxis[0].max) { + this.maxY = w.config.yaxis[0].max + } + + if (w.config.grid.position === 'back' && this.chartType === 'polarArea') { + this.drawPolarElements(this.ret) + } + + for (let i = 0; i < series.length; i++) { + // CALCULATE THE ANGLES + let angle = (this.fullAngle * Utils.negToZero(series[i])) / total + sectorAngleArr.push(angle) + + if (this.chartType === 'polarArea') { + sectorAngleArr[i] = this.fullAngle / series.length + this.sliceSizes.push((w.globals.radialSize * series[i]) / this.maxY) + } else { + this.sliceSizes.push(w.globals.radialSize) + } + } + + if (w.globals.dataChanged) { + let prevTotal = 0 + for (let k = 0; k < w.globals.previousPaths.length; k++) { + // CALCULATE THE PREV TOTAL + prevTotal += Utils.negToZero(w.globals.previousPaths[k]) + } + + let previousAngle + + for (let i = 0; i < w.globals.previousPaths.length; i++) { + // CALCULATE THE PREVIOUS ANGLES + previousAngle = + (this.fullAngle * Utils.negToZero(w.globals.previousPaths[i])) / + prevTotal + this.prevSectorAngleArr.push(previousAngle) + } + } + + // on small chart size after few count of resizes browser window donutSize can be negative + if (this.donutSize < 0) { + this.donutSize = 0 + } + + let scaleSize = w.config.plotOptions.pie.customScale + let halfW = w.globals.gridWidth / 2 + let halfH = w.globals.gridHeight / 2 + let translateX = halfW - (w.globals.gridWidth / 2) * scaleSize + let translateY = halfH - (w.globals.gridHeight / 2) * scaleSize + + if (this.chartType === 'donut') { + // draw the inner circle and add some text to it + const circle = graphics.drawCircle(this.donutSize) + + circle.attr({ + cx: this.centerX, + cy: this.centerY, + fill: w.config.plotOptions.pie.donut.background + ? w.config.plotOptions.pie.donut.background + : 'transparent' + }) + + elSeries.add(circle) + } + + let elG = self.drawArcs(sectorAngleArr, series) + + // add slice dataLabels at the end + this.sliceLabels.forEach((s) => { + elG.add(s) + }) + + elSeries.attr({ + transform: `translate(${translateX}, ${translateY}) scale(${scaleSize})` + }) + + elSeries.add(elG) + + this.ret.add(elSeries) + + if (this.donutDataLabels.show) { + let dataLabels = this.renderInnerDataLabels(this.donutDataLabels, { + hollowSize: this.donutSize, + centerX: this.centerX, + centerY: this.centerY, + opacity: this.donutDataLabels.show, + translateX, + translateY + }) + + this.ret.add(dataLabels) + } + + if (w.config.grid.position === 'front' && this.chartType === 'polarArea') { + this.drawPolarElements(this.ret) + } + + return this.ret + } + + // core function for drawing pie arcs + drawArcs(sectorAngleArr, series) { + let w = this.w + const filters = new Filters(this.ctx) + + let graphics = new Graphics(this.ctx) + let fill = new Fill(this.ctx) + let g = graphics.group({ + class: 'apexcharts-slices' + }) + + let startAngle = this.initialAngle + let prevStartAngle = this.initialAngle + let endAngle = this.initialAngle + let prevEndAngle = this.initialAngle + + this.strokeWidth = w.config.stroke.show ? w.config.stroke.width : 0 + + for (let i = 0; i < sectorAngleArr.length; i++) { + let elPieArc = graphics.group({ + class: `apexcharts-series apexcharts-pie-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[i]), + rel: i + 1, + 'data:realIndex': i + }) + + g.add(elPieArc) + + startAngle = endAngle + prevStartAngle = prevEndAngle + + endAngle = startAngle + sectorAngleArr[i] + prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i] + + const angle = + endAngle < startAngle + ? this.fullAngle + endAngle - startAngle + : endAngle - startAngle + + let pathFill = fill.fillPath({ + seriesNumber: i, + size: this.sliceSizes[i], + value: series[i] + }) // additionally, pass size for gradient drawing in the fillPath function + + let path = this.getChangedPath(prevStartAngle, prevEndAngle) + + let elPath = graphics.drawPath({ + d: path, + stroke: Array.isArray(this.lineColorArr) + ? this.lineColorArr[i] + : this.lineColorArr, + strokeWidth: 0, + fill: pathFill, + fillOpacity: w.config.fill.opacity, + classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i}` + }) + + elPath.attr({ + index: 0, + j: i + }) + + filters.setSelectionFilter(elPath, 0, i) + + if (w.config.chart.dropShadow.enabled) { + const shadow = w.config.chart.dropShadow + filters.dropShadow(elPath, shadow, i) + } + + this.addListeners(elPath, this.donutDataLabels) + + Graphics.setAttrs(elPath.node, { + 'data:angle': angle, + 'data:startAngle': startAngle, + 'data:strokeWidth': this.strokeWidth, + 'data:value': series[i] + }) + + let labelPosition = { + x: 0, + y: 0 + } + + if (this.chartType === 'pie' || this.chartType === 'polarArea') { + labelPosition = Utils.polarToCartesian( + this.centerX, + this.centerY, + w.globals.radialSize / 1.25 + + w.config.plotOptions.pie.dataLabels.offset, + (startAngle + angle / 2) % this.fullAngle + ) + } else if (this.chartType === 'donut') { + labelPosition = Utils.polarToCartesian( + this.centerX, + this.centerY, + (w.globals.radialSize + this.donutSize) / 2 + + w.config.plotOptions.pie.dataLabels.offset, + (startAngle + angle / 2) % this.fullAngle + ) + } + + elPieArc.add(elPath) + + // Animation code starts + let dur = 0 + if (this.initialAnim && !w.globals.resized && !w.globals.dataChanged) { + dur = (angle / this.fullAngle) * w.config.chart.animations.speed + + if (dur === 0) dur = 1 + this.animDur = dur + this.animDur + this.animBeginArr.push(this.animDur) + } else { + this.animBeginArr.push(0) + } + + if (this.dynamicAnim && w.globals.dataChanged) { + this.animatePaths(elPath, { + size: this.sliceSizes[i], + endAngle, + startAngle, + prevStartAngle, + prevEndAngle, + animateStartingPos: true, + i, + animBeginArr: this.animBeginArr, + shouldSetPrevPaths: true, + dur: w.config.chart.animations.dynamicAnimation.speed + }) + } else { + this.animatePaths(elPath, { + size: this.sliceSizes[i], + endAngle, + startAngle, + i, + totalItems: sectorAngleArr.length - 1, + animBeginArr: this.animBeginArr, + dur + }) + } + // animation code ends + + if ( + w.config.plotOptions.pie.expandOnClick && + this.chartType !== 'polarArea' + ) { + elPath.click(this.pieClicked.bind(this, i)) + } + + if ( + typeof w.globals.selectedDataPoints[0] !== 'undefined' && + w.globals.selectedDataPoints[0].indexOf(i) > -1 + ) { + this.pieClicked(i) + } + + if (w.config.dataLabels.enabled) { + let xPos = labelPosition.x + let yPos = labelPosition.y + let text = (100 * angle) / this.fullAngle + '%' + + if ( + angle !== 0 && + w.config.plotOptions.pie.dataLabels.minAngleToShowLabel < + sectorAngleArr[i] + ) { + let formatter = w.config.dataLabels.formatter + if (formatter !== undefined) { + text = formatter(w.globals.seriesPercent[i][0], { + seriesIndex: i, + w + }) + } + let foreColor = w.globals.dataLabels.style.colors[i] + + const elPieLabelWrap = graphics.group({ + class: `apexcharts-datalabels` + }) + let elPieLabel = graphics.drawText({ + x: xPos, + y: yPos, + text, + textAnchor: 'middle', + fontSize: w.config.dataLabels.style.fontSize, + fontFamily: w.config.dataLabels.style.fontFamily, + fontWeight: w.config.dataLabels.style.fontWeight, + foreColor + }) + + elPieLabelWrap.add(elPieLabel) + if (w.config.dataLabels.dropShadow.enabled) { + const textShadow = w.config.dataLabels.dropShadow + filters.dropShadow(elPieLabel, textShadow) + } + + elPieLabel.node.classList.add('apexcharts-pie-label') + if ( + w.config.chart.animations.animate && + w.globals.resized === false + ) { + elPieLabel.node.classList.add('apexcharts-pie-label-delay') + elPieLabel.node.style.animationDelay = + w.config.chart.animations.speed / 940 + 's' + } + + this.sliceLabels.push(elPieLabelWrap) + } + } + } + + return g + } + + addListeners(elPath, dataLabels) { + const graphics = new Graphics(this.ctx) + // append filters on mouseenter and mouseleave + elPath.node.addEventListener( + 'mouseenter', + graphics.pathMouseEnter.bind(this, elPath) + ) + + elPath.node.addEventListener( + 'mouseleave', + graphics.pathMouseLeave.bind(this, elPath) + ) + elPath.node.addEventListener( + 'mouseleave', + this.revertDataLabelsInner.bind(this, elPath.node, dataLabels) + ) + elPath.node.addEventListener( + 'mousedown', + graphics.pathMouseDown.bind(this, elPath) + ) + + if (!this.donutDataLabels.total.showAlways) { + elPath.node.addEventListener( + 'mouseenter', + this.printDataLabelsInner.bind(this, elPath.node, dataLabels) + ) + + elPath.node.addEventListener( + 'mousedown', + this.printDataLabelsInner.bind(this, elPath.node, dataLabels) + ) + } + } + + // This function can be used for other circle charts too + animatePaths(el, opts) { + let w = this.w + let me = this + + let angle = + opts.endAngle < opts.startAngle + ? this.fullAngle + opts.endAngle - opts.startAngle + : opts.endAngle - opts.startAngle + let prevAngle = angle + + let fromStartAngle = opts.startAngle + let toStartAngle = opts.startAngle + + if (opts.prevStartAngle !== undefined && opts.prevEndAngle !== undefined) { + fromStartAngle = opts.prevEndAngle + prevAngle = + opts.prevEndAngle < opts.prevStartAngle + ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle + : opts.prevEndAngle - opts.prevStartAngle + } + if (opts.i === w.config.series.length - 1) { + // some adjustments for the last overlapping paths + if (angle + toStartAngle > this.fullAngle) { + opts.endAngle = opts.endAngle - (angle + toStartAngle) + } else if (angle + toStartAngle < this.fullAngle) { + opts.endAngle = + opts.endAngle + (this.fullAngle - (angle + toStartAngle)) + } + } + + if (angle === this.fullAngle) angle = this.fullAngle - 0.01 + + me.animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) + } + + animateArc(el, fromStartAngle, toStartAngle, angle, prevAngle, opts) { + let me = this + const w = this.w + const animations = new Animations(this.ctx) + + let size = opts.size + + let path + + if (isNaN(fromStartAngle) || isNaN(prevAngle)) { + fromStartAngle = toStartAngle + prevAngle = angle + opts.dur = 0 + } + + let currAngle = angle + let startAngle = toStartAngle + let fromAngle = + fromStartAngle < toStartAngle + ? this.fullAngle + fromStartAngle - toStartAngle + : fromStartAngle - toStartAngle + + if (w.globals.dataChanged && opts.shouldSetPrevPaths) { + // to avoid flicker when updating, set prev path first and then animate from there + if (opts.prevEndAngle) { + path = me.getPiePath({ + me, + startAngle: opts.prevStartAngle, + angle: + opts.prevEndAngle < opts.prevStartAngle + ? this.fullAngle + opts.prevEndAngle - opts.prevStartAngle + : opts.prevEndAngle - opts.prevStartAngle, + size + }) + el.attr({ d: path }) + } + } + + if (opts.dur !== 0) { + el.animate(opts.dur, w.globals.easing, opts.animBeginArr[opts.i]) + .afterAll(function() { + if ( + me.chartType === 'pie' || + me.chartType === 'donut' || + me.chartType === 'polarArea' + ) { + this.animate(w.config.chart.animations.dynamicAnimation.speed).attr( + { + 'stroke-width': me.strokeWidth + } + ) + } + + if (opts.i === w.config.series.length - 1) { + animations.animationCompleted(el) + } + }) + .during((pos) => { + currAngle = fromAngle + (angle - fromAngle) * pos + if (opts.animateStartingPos) { + currAngle = prevAngle + (angle - prevAngle) * pos + startAngle = + fromStartAngle - + prevAngle + + (toStartAngle - (fromStartAngle - prevAngle)) * pos + } + + path = me.getPiePath({ + me, + startAngle, + angle: currAngle, + size + }) + + el.node.setAttribute('data:pathOrig', path) + + el.attr({ + d: path + }) + }) + } else { + path = me.getPiePath({ + me, + startAngle, + angle, + size + }) + + if (!opts.isTrack) { + w.globals.animationEnded = true + } + el.node.setAttribute('data:pathOrig', path) + + el.attr({ + d: path, + 'stroke-width': me.strokeWidth + }) + } + } + + pieClicked(i) { + let w = this.w + let me = this + let path + + let size = + me.sliceSizes[i] + (w.config.plotOptions.pie.expandOnClick ? 4 : 0) + let elPath = w.globals.dom.Paper.select( + `.apexcharts-${me.chartType.toLowerCase()}-slice-${i}` + ).members[0] + + if (elPath.attr('data:pieClicked') === 'true') { + elPath.attr({ + 'data:pieClicked': 'false' + }) + this.revertDataLabelsInner(elPath.node, this.donutDataLabels) + + let origPath = elPath.attr('data:pathOrig') + elPath.attr({ + d: origPath + }) + return + } else { + // reset all elems + let allEls = w.globals.dom.baseEl.getElementsByClassName( + 'apexcharts-pie-area' + ) + Array.prototype.forEach.call(allEls, (pieSlice) => { + pieSlice.setAttribute('data:pieClicked', 'false') + let origPath = pieSlice.getAttribute('data:pathOrig') + pieSlice.setAttribute('d', origPath) + }) + elPath.attr('data:pieClicked', 'true') + } + + let startAngle = parseInt(elPath.attr('data:startAngle'), 10) + let angle = parseInt(elPath.attr('data:angle'), 10) + + path = me.getPiePath({ + me, + startAngle, + angle, + size + }) + + if (angle === 360) return + + elPath.plot(path) + } + + getChangedPath(prevStartAngle, prevEndAngle) { + let path = '' + if (this.dynamicAnim && this.w.globals.dataChanged) { + path = this.getPiePath({ + me: this, + startAngle: prevStartAngle, + angle: prevEndAngle - prevStartAngle, + size: this.size + }) + } + return path + } + + getPiePath({ me, startAngle, angle, size }) { + let path + + let startDeg = startAngle + let startRadians = (Math.PI * (startDeg - 90)) / 180 + + let endDeg = angle + startAngle + // prevent overlap + if ( + Math.ceil(endDeg) >= + this.fullAngle + + (this.w.config.plotOptions.pie.startAngle % this.fullAngle) + ) { + endDeg = + this.fullAngle + + (this.w.config.plotOptions.pie.startAngle % this.fullAngle) - + 0.01 + } + if (Math.ceil(endDeg) > this.fullAngle) endDeg -= this.fullAngle + + let endRadians = (Math.PI * (endDeg - 90)) / 180 + + let x1 = me.centerX + size * Math.cos(startRadians) + let y1 = me.centerY + size * Math.sin(startRadians) + let x2 = me.centerX + size * Math.cos(endRadians) + let y2 = me.centerY + size * Math.sin(endRadians) + + let startInner = Utils.polarToCartesian( + me.centerX, + me.centerY, + me.donutSize, + endDeg + ) + let endInner = Utils.polarToCartesian( + me.centerX, + me.centerY, + me.donutSize, + startDeg + ) + + let largeArc = angle > 180 ? 1 : 0 + + const pathBeginning = ['M', x1, y1, 'A', size, size, 0, largeArc, 1, x2, y2] + + if (me.chartType === 'donut') { + path = [ + ...pathBeginning, + 'L', + startInner.x, + startInner.y, + 'A', + me.donutSize, + me.donutSize, + 0, + largeArc, + 0, + endInner.x, + endInner.y, + 'L', + x1, + y1, + 'z' + ].join(' ') + } else if (me.chartType === 'pie' || me.chartType === 'polarArea') { + path = [...pathBeginning, 'L', me.centerX, me.centerY, 'L', x1, y1].join( + ' ' + ) + } else { + path = [...pathBeginning].join(' ') + } + + return path + } + + drawPolarElements(parent) { + const w = this.w + const scale = new Scales(this.ctx) + const graphics = new Graphics(this.ctx) + const helpers = new Helpers(this.ctx) + + const gCircles = graphics.group() + const gYAxis = graphics.group() + + const yScale = scale.niceScale( + 0, + Math.ceil(this.maxY), + w.config.yaxis[0].tickAmount, + 0, + true + ) + + const yTexts = yScale.result.reverse() + let len = yScale.result.length + + this.maxY = yScale.niceMax + + let circleSize = w.globals.radialSize + let diff = circleSize / (len - 1) + + for (let i = 0; i < len - 1; i++) { + const circle = graphics.drawCircle(circleSize) + + circle.attr({ + cx: this.centerX, + cy: this.centerY, + fill: 'none', + 'stroke-width': w.config.plotOptions.polarArea.rings.strokeWidth, + stroke: w.config.plotOptions.polarArea.rings.strokeColor + }) + + if (w.config.yaxis[0].show) { + const yLabel = helpers.drawYAxisTexts( + this.centerX, + this.centerY - + circleSize + + parseInt(w.config.yaxis[0].labels.style.fontSize, 10) / 2, + i, + yTexts[i] + ) + + gYAxis.add(yLabel) + } + + gCircles.add(circle) + + circleSize = circleSize - diff + } + + this.drawSpokes(parent) + + parent.add(gCircles) + parent.add(gYAxis) + } + + renderInnerDataLabels(dataLabelsConfig, opts) { + let w = this.w + const graphics = new Graphics(this.ctx) + + let g = graphics.group({ + class: 'apexcharts-datalabels-group', + transform: `translate(${opts.translateX ? opts.translateX : 0}, ${ + opts.translateY ? opts.translateY : 0 + }) scale(${w.config.plotOptions.pie.customScale})` + }) + + const showTotal = dataLabelsConfig.total.show + + g.node.style.opacity = opts.opacity + + let x = opts.centerX + let y = opts.centerY + + let labelColor, valueColor + + if (dataLabelsConfig.name.color === undefined) { + labelColor = w.globals.colors[0] + } else { + labelColor = dataLabelsConfig.name.color + } + let labelFontSize = dataLabelsConfig.name.fontSize + let labelFontFamily = dataLabelsConfig.name.fontFamily + let labelFontWeight = dataLabelsConfig.name.fontWeight + + if (dataLabelsConfig.value.color === undefined) { + valueColor = w.config.chart.foreColor + } else { + valueColor = dataLabelsConfig.value.color + } + + let lbFormatter = dataLabelsConfig.value.formatter + let val = '' + let name = '' + + if (showTotal) { + labelColor = dataLabelsConfig.total.color + labelFontSize = dataLabelsConfig.total.fontSize + labelFontFamily = dataLabelsConfig.total.fontFamily + labelFontWeight = dataLabelsConfig.total.fontWeight + name = dataLabelsConfig.total.label + val = dataLabelsConfig.total.formatter(w) + } else { + if (w.globals.series.length === 1) { + val = lbFormatter(w.globals.series[0], w) + name = w.globals.seriesNames[0] + } + } + + if (name) { + name = dataLabelsConfig.name.formatter( + name, + dataLabelsConfig.total.show, + w + ) + } + + if (dataLabelsConfig.name.show) { + let elLabel = graphics.drawText({ + x, + y: y + parseFloat(dataLabelsConfig.name.offsetY), + text: name, + textAnchor: 'middle', + foreColor: labelColor, + fontSize: labelFontSize, + fontWeight: labelFontWeight, + fontFamily: labelFontFamily + }) + elLabel.node.classList.add('apexcharts-datalabel-label') + g.add(elLabel) + } + + if (dataLabelsConfig.value.show) { + let valOffset = dataLabelsConfig.name.show + ? parseFloat(dataLabelsConfig.value.offsetY) + 16 + : dataLabelsConfig.value.offsetY + + let elValue = graphics.drawText({ + x, + y: y + valOffset, + text: val, + textAnchor: 'middle', + foreColor: valueColor, + fontWeight: dataLabelsConfig.value.fontWeight, + fontSize: dataLabelsConfig.value.fontSize, + fontFamily: dataLabelsConfig.value.fontFamily + }) + elValue.node.classList.add('apexcharts-datalabel-value') + g.add(elValue) + } + + // for a multi-series circle chart, we need to show total value instead of first series labels + + return g + } + + /** + * + * @param {string} name - The name of the series + * @param {string} val - The value of that series + * @param {object} el - Optional el (indicates which series was hovered/clicked). If this param is not present, means we need to show total + */ + printInnerLabels(labelsConfig, name, val, el) { + const w = this.w + + let labelColor + + if (el) { + if (labelsConfig.name.color === undefined) { + labelColor = + w.globals.colors[parseInt(el.parentNode.getAttribute('rel'), 10) - 1] + } else { + labelColor = labelsConfig.name.color + } + } else { + if (w.globals.series.length > 1 && labelsConfig.total.show) { + labelColor = labelsConfig.total.color + } + } + + let elLabel = w.globals.dom.baseEl.querySelector( + '.apexcharts-datalabel-label' + ) + let elValue = w.globals.dom.baseEl.querySelector( + '.apexcharts-datalabel-value' + ) + + let lbFormatter = labelsConfig.value.formatter + val = lbFormatter(val, w) + + // we need to show Total Val - so get the formatter of it + if (!el && typeof labelsConfig.total.formatter === 'function') { + val = labelsConfig.total.formatter(w) + } + + const isTotal = name === labelsConfig.total.label + name = labelsConfig.name.formatter(name, isTotal, w) + + if (elLabel !== null) { + elLabel.textContent = name + } + + if (elValue !== null) { + elValue.textContent = val + } + if (elLabel !== null) { + elLabel.style.fill = labelColor + } + } + + printDataLabelsInner(el, dataLabelsConfig) { + let w = this.w + + let val = el.getAttribute('data:value') + let name = + w.globals.seriesNames[parseInt(el.parentNode.getAttribute('rel'), 10) - 1] + + if (w.globals.series.length > 1) { + this.printInnerLabels(dataLabelsConfig, name, val, el) + } + + let dataLabelsGroup = w.globals.dom.baseEl.querySelector( + '.apexcharts-datalabels-group' + ) + if (dataLabelsGroup !== null) { + dataLabelsGroup.style.opacity = 1 + } + } + + drawSpokes(parent) { + const w = this.w + const graphics = new Graphics(this.ctx) + const spokeConfig = w.config.plotOptions.polarArea.spokes + + if (spokeConfig.strokeWidth === 0) return + + let spokes = [] + + let angleDivision = 360 / w.globals.series.length + for (let i = 0; i < w.globals.series.length; i++) { + spokes.push( + Utils.polarToCartesian( + this.centerX, + this.centerY, + w.globals.radialSize, + w.config.plotOptions.pie.startAngle + angleDivision * i + ) + ) + } + + spokes.forEach((p, i) => { + const line = graphics.drawLine( + p.x, + p.y, + this.centerX, + this.centerY, + Array.isArray(spokeConfig.connectorColors) + ? spokeConfig.connectorColors[i] + : spokeConfig.connectorColors + ) + + parent.add(line) + }) + } + + revertDataLabelsInner(elem, dataLabelsConfig, event) { + let w = this.w + let dataLabelsGroup = w.globals.dom.baseEl.querySelector( + '.apexcharts-datalabels-group' + ) + + let sliceOut = false + const slices = w.globals.dom.baseEl.getElementsByClassName( + `apexcharts-pie-area` + ) + + const selectSlice = ({ makeSliceOut, printLabel }) => { + Array.prototype.forEach.call(slices, (s) => { + if (s.getAttribute('data:pieClicked') === 'true') { + if (makeSliceOut) { + sliceOut = true + } + if (printLabel) { + this.printDataLabelsInner(s, dataLabelsConfig) + } + } + }) + } + + selectSlice({ makeSliceOut: true, printLabel: false }) + + if (dataLabelsConfig.total.show && w.globals.series.length > 1) { + if (sliceOut && !dataLabelsConfig.total.showAlways) { + selectSlice({ makeSliceOut: false, printLabel: true }) + } else { + this.printInnerLabels( + dataLabelsConfig, + dataLabelsConfig.total.label, + dataLabelsConfig.total.formatter(w) + ) + } + } else { + selectSlice({ makeSliceOut: false, printLabel: true }) + + if (!sliceOut) { + if ( + w.globals.selectedDataPoints.length && + w.globals.series.length > 1 + ) { + if (w.globals.selectedDataPoints[0].length > 0) { + const index = w.globals.selectedDataPoints[0] + const el = w.globals.dom.baseEl.querySelector( + `.apexcharts-${this.chartType.toLowerCase()}-slice-${index}` + ) + + this.printDataLabelsInner(el, dataLabelsConfig) + } else if ( + dataLabelsGroup && + w.globals.selectedDataPoints.length && + w.globals.selectedDataPoints[0].length === 0 + ) { + dataLabelsGroup.style.opacity = 0 + } + } else { + if (dataLabelsGroup && w.globals.series.length > 1) { + dataLabelsGroup.style.opacity = 0 + } + } + } + } + } +} + +export default Pie diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Radar.js b/cao_sunyata/static/libs/apexcharts/src/charts/Radar.js new file mode 100644 index 0000000..21b93a6 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Radar.js @@ -0,0 +1,524 @@ +import Fill from '../modules/Fill' +import Graphics from '../modules/Graphics' +import Markers from '../modules/Markers' +import DataLabels from '../modules/DataLabels' +import Filters from '../modules/Filters' +import Utils from '../utils/Utils' +import Helpers from './common/circle/Helpers' +import CoreUtils from '../modules/CoreUtils' + +/** + * ApexCharts Radar Class for Spider/Radar Charts. + * @module Radar + **/ + +class Radar { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.chartType = this.w.config.chart.type + + this.initialAnim = this.w.config.chart.animations.enabled + this.dynamicAnim = + this.initialAnim && + this.w.config.chart.animations.dynamicAnimation.enabled + + this.animDur = 0 + + const w = this.w + this.graphics = new Graphics(this.ctx) + + this.lineColorArr = + w.globals.stroke.colors !== undefined + ? w.globals.stroke.colors + : w.globals.colors + + this.defaultSize = + w.globals.svgHeight < w.globals.svgWidth + ? w.globals.gridHeight + w.globals.goldenPadding * 1.5 + : w.globals.gridWidth + + this.isLog = w.config.yaxis[0].logarithmic + + this.coreUtils = new CoreUtils(this.ctx) + this.maxValue = this.isLog + ? this.coreUtils.getLogVal(w.globals.maxY, 0) + : w.globals.maxY + this.minValue = this.isLog + ? this.coreUtils.getLogVal(this.w.globals.minY, 0) + : w.globals.minY + + this.polygons = w.config.plotOptions.radar.polygons + + this.strokeWidth = w.config.stroke.show ? w.config.stroke.width : 0 + + this.size = + this.defaultSize / 2.1 - this.strokeWidth - w.config.chart.dropShadow.blur + + if (w.config.xaxis.labels.show) { + this.size = this.size - w.globals.xAxisLabelsWidth / 1.75 + } + + if (w.config.plotOptions.radar.size !== undefined) { + this.size = w.config.plotOptions.radar.size + } + + this.dataRadiusOfPercent = [] + this.dataRadius = [] + this.angleArr = [] + + this.yaxisLabelsTextsPos = [] + } + + draw(series) { + let w = this.w + const fill = new Fill(this.ctx) + + const allSeries = [] + const dataLabels = new DataLabels(this.ctx) + + if (series.length) { + this.dataPointsLen = series[w.globals.maxValsInArrayIndex].length + } + this.disAngle = (Math.PI * 2) / this.dataPointsLen + + let halfW = w.globals.gridWidth / 2 + let halfH = w.globals.gridHeight / 2 + let translateX = halfW + w.config.plotOptions.radar.offsetX + let translateY = halfH + w.config.plotOptions.radar.offsetY + + let ret = this.graphics.group({ + class: 'apexcharts-radar-series apexcharts-plot-series', + transform: `translate(${translateX || 0}, ${translateY || 0})` + }) + + let dataPointsPos = [] + let elPointsMain = null + let elDataPointsMain = null + + this.yaxisLabels = this.graphics.group({ + class: 'apexcharts-yaxis' + }) + + series.forEach((s, i) => { + let longestSeries = s.length === w.globals.dataPoints + + // el to which series will be drawn + let elSeries = this.graphics.group().attr({ + class: `apexcharts-series`, + 'data:longestSeries': longestSeries, + seriesName: Utils.escapeString(w.globals.seriesNames[i]), + rel: i + 1, + 'data:realIndex': i + }) + + this.dataRadiusOfPercent[i] = [] + this.dataRadius[i] = [] + this.angleArr[i] = [] + + s.forEach((dv, j) => { + const range = Math.abs(this.maxValue - this.minValue) + dv = dv + Math.abs(this.minValue) + + if (this.isLog) { + dv = this.coreUtils.getLogVal(dv, 0) + } + + this.dataRadiusOfPercent[i][j] = dv / range + + this.dataRadius[i][j] = this.dataRadiusOfPercent[i][j] * this.size + this.angleArr[i][j] = j * this.disAngle + }) + + dataPointsPos = this.getDataPointsPos( + this.dataRadius[i], + this.angleArr[i] + ) + const paths = this.createPaths(dataPointsPos, { + x: 0, + y: 0 + }) + + // points + elPointsMain = this.graphics.group({ + class: 'apexcharts-series-markers-wrap apexcharts-element-hidden' + }) + + // datapoints + elDataPointsMain = this.graphics.group({ + class: `apexcharts-datalabels`, + 'data:realIndex': i + }) + + w.globals.delayedElements.push({ + el: elPointsMain.node, + index: i + }) + + const defaultRenderedPathOptions = { + i, + realIndex: i, + animationDelay: i, + initialSpeed: w.config.chart.animations.speed, + dataChangeSpeed: w.config.chart.animations.dynamicAnimation.speed, + className: `apexcharts-radar`, + shouldClipToGrid: false, + bindEventsOnPaths: false, + stroke: w.globals.stroke.colors[i], + strokeLineCap: w.config.stroke.lineCap + } + + let pathFrom = null + + if (w.globals.previousPaths.length > 0) { + pathFrom = this.getPreviousPath(i) + } + + for (let p = 0; p < paths.linePathsTo.length; p++) { + let renderedLinePath = this.graphics.renderPaths({ + ...defaultRenderedPathOptions, + pathFrom: pathFrom === null ? paths.linePathsFrom[p] : pathFrom, + pathTo: paths.linePathsTo[p], + strokeWidth: Array.isArray(this.strokeWidth) + ? this.strokeWidth[i] + : this.strokeWidth, + fill: 'none', + drawShadow: false + }) + + elSeries.add(renderedLinePath) + + let pathFill = fill.fillPath({ + seriesNumber: i + }) + + let renderedAreaPath = this.graphics.renderPaths({ + ...defaultRenderedPathOptions, + pathFrom: pathFrom === null ? paths.areaPathsFrom[p] : pathFrom, + pathTo: paths.areaPathsTo[p], + strokeWidth: 0, + fill: pathFill, + drawShadow: false + }) + + if (w.config.chart.dropShadow.enabled) { + const filters = new Filters(this.ctx) + + const shadow = w.config.chart.dropShadow + filters.dropShadow( + renderedAreaPath, + Object.assign({}, shadow, { noUserSpaceOnUse: true }), + i + ) + } + + elSeries.add(renderedAreaPath) + } + + s.forEach((sj, j) => { + let markers = new Markers(this.ctx) + + let opts = markers.getMarkerConfig({ + cssClass: 'apexcharts-marker', + seriesIndex: i, + dataPointIndex: j + }) + + let point = this.graphics.drawMarker( + dataPointsPos[j].x, + dataPointsPos[j].y, + opts + ) + + point.attr('rel', j) + point.attr('j', j) + point.attr('index', i) + point.node.setAttribute('default-marker-size', opts.pSize) + + let elPointsWrap = this.graphics.group({ + class: 'apexcharts-series-markers' + }) + + if (elPointsWrap) { + elPointsWrap.add(point) + } + + elPointsMain.add(elPointsWrap) + + elSeries.add(elPointsMain) + + const dataLabelsConfig = w.config.dataLabels + + if (dataLabelsConfig.enabled) { + let text = dataLabelsConfig.formatter(w.globals.series[i][j], { + seriesIndex: i, + dataPointIndex: j, + w + }) + + dataLabels.plotDataLabelsText({ + x: dataPointsPos[j].x, + y: dataPointsPos[j].y, + text, + textAnchor: 'middle', + i, + j: i, + parent: elDataPointsMain, + offsetCorrection: false, + dataLabelsConfig: { + ...dataLabelsConfig + } + }) + } + elSeries.add(elDataPointsMain) + }) + + allSeries.push(elSeries) + }) + + this.drawPolygons({ + parent: ret + }) + + if (w.config.xaxis.labels.show) { + const xaxisTexts = this.drawXAxisTexts() + ret.add(xaxisTexts) + } + + allSeries.forEach((elS) => { + ret.add(elS) + }) + + ret.add(this.yaxisLabels) + + return ret + } + + drawPolygons(opts) { + const w = this.w + const { parent } = opts + const helpers = new Helpers(this.ctx) + + const yaxisTexts = w.globals.yAxisScale[0].result.reverse() + const layers = yaxisTexts.length + + let radiusSizes = [] + let layerDis = this.size / (layers - 1) + for (let i = 0; i < layers; i++) { + radiusSizes[i] = layerDis * i + } + radiusSizes.reverse() + + let polygonStrings = [] + let lines = [] + + radiusSizes.forEach((radiusSize, r) => { + const polygon = Utils.getPolygonPos(radiusSize, this.dataPointsLen) + let string = '' + + polygon.forEach((p, i) => { + if (r === 0) { + const line = this.graphics.drawLine( + p.x, + p.y, + 0, + 0, + Array.isArray(this.polygons.connectorColors) + ? this.polygons.connectorColors[i] + : this.polygons.connectorColors + ) + + lines.push(line) + } + + if (i === 0) { + this.yaxisLabelsTextsPos.push({ + x: p.x, + y: p.y + }) + } + + string += p.x + ',' + p.y + ' ' + }) + + polygonStrings.push(string) + }) + + polygonStrings.forEach((p, i) => { + const strokeColors = this.polygons.strokeColors + const strokeWidth = this.polygons.strokeWidth + const polygon = this.graphics.drawPolygon( + p, + Array.isArray(strokeColors) ? strokeColors[i] : strokeColors, + Array.isArray(strokeWidth) ? strokeWidth[i] : strokeWidth, + w.globals.radarPolygons.fill.colors[i] + ) + parent.add(polygon) + }) + + lines.forEach((l) => { + parent.add(l) + }) + + if (w.config.yaxis[0].show) { + this.yaxisLabelsTextsPos.forEach((p, i) => { + const yText = helpers.drawYAxisTexts(p.x, p.y, i, yaxisTexts[i]) + this.yaxisLabels.add(yText) + }) + } + } + + drawXAxisTexts() { + const w = this.w + + const xaxisLabelsConfig = w.config.xaxis.labels + let elXAxisWrap = this.graphics.group({ + class: 'apexcharts-xaxis' + }) + + let polygonPos = Utils.getPolygonPos(this.size, this.dataPointsLen) + + w.globals.labels.forEach((label, i) => { + let formatter = w.config.xaxis.labels.formatter + let dataLabels = new DataLabels(this.ctx) + + if (polygonPos[i]) { + let textPos = this.getTextPos(polygonPos[i], this.size) + + let text = formatter(label, { + seriesIndex: -1, + dataPointIndex: i, + w + }) + + dataLabels.plotDataLabelsText({ + x: textPos.newX, + y: textPos.newY, + text, + textAnchor: textPos.textAnchor, + i, + j: i, + parent: elXAxisWrap, + color: + Array.isArray(xaxisLabelsConfig.style.colors) && + xaxisLabelsConfig.style.colors[i] + ? xaxisLabelsConfig.style.colors[i] + : '#a8a8a8', + dataLabelsConfig: { + textAnchor: textPos.textAnchor, + dropShadow: { enabled: false }, + ...xaxisLabelsConfig + }, + offsetCorrection: false + }) + } + }) + + return elXAxisWrap + } + + createPaths(pos, origin) { + let linePathsTo = [] + let linePathsFrom = [] + let areaPathsTo = [] + let areaPathsFrom = [] + + if (pos.length) { + linePathsFrom = [this.graphics.move(origin.x, origin.y)] + areaPathsFrom = [this.graphics.move(origin.x, origin.y)] + + let linePathTo = this.graphics.move(pos[0].x, pos[0].y) + let areaPathTo = this.graphics.move(pos[0].x, pos[0].y) + + pos.forEach((p, i) => { + linePathTo += this.graphics.line(p.x, p.y) + areaPathTo += this.graphics.line(p.x, p.y) + if (i === pos.length - 1) { + linePathTo += 'Z' + areaPathTo += 'Z' + } + }) + + linePathsTo.push(linePathTo) + areaPathsTo.push(areaPathTo) + } + + return { + linePathsFrom, + linePathsTo, + areaPathsFrom, + areaPathsTo + } + } + + getTextPos(pos, polygonSize) { + let limit = 10 + let textAnchor = 'middle' + + let newX = pos.x + let newY = pos.y + + if (Math.abs(pos.x) >= limit) { + if (pos.x > 0) { + textAnchor = 'start' + newX += 10 + } else if (pos.x < 0) { + textAnchor = 'end' + newX -= 10 + } + } else { + textAnchor = 'middle' + } + if (Math.abs(pos.y) >= polygonSize - limit) { + if (pos.y < 0) { + newY -= 10 + } else if (pos.y > 0) { + newY += 10 + } + } + + return { + textAnchor, + newX, + newY + } + } + + getPreviousPath(realIndex) { + let w = this.w + let pathFrom = null + for (let pp = 0; pp < w.globals.previousPaths.length; pp++) { + let gpp = w.globals.previousPaths[pp] + + if ( + gpp.paths.length > 0 && + parseInt(gpp.realIndex, 10) === parseInt(realIndex, 10) + ) { + if (typeof w.globals.previousPaths[pp].paths[0] !== 'undefined') { + pathFrom = w.globals.previousPaths[pp].paths[0].d + } + } + } + return pathFrom + } + + getDataPointsPos( + dataRadiusArr, + angleArr, + dataPointsLen = this.dataPointsLen + ) { + dataRadiusArr = dataRadiusArr || [] + angleArr = angleArr || [] + let dataPointsPosArray = [] + for (let j = 0; j < dataPointsLen; j++) { + let curPointPos = {} + curPointPos.x = dataRadiusArr[j] * Math.sin(angleArr[j]) + curPointPos.y = -dataRadiusArr[j] * Math.cos(angleArr[j]) + dataPointsPosArray.push(curPointPos) + } + return dataPointsPosArray + } +} + +export default Radar diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Radial.js b/cao_sunyata/static/libs/apexcharts/src/charts/Radial.js new file mode 100644 index 0000000..caed41e --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Radial.js @@ -0,0 +1,469 @@ +import Pie from './Pie' +import Utils from '../utils/Utils' +import Fill from '../modules/Fill' +import Graphics from '../modules/Graphics' +import Filters from '../modules/Filters' + +/** + * ApexCharts Radial Class for drawing Circle / Semi Circle Charts. + * @module Radial + **/ + +class Radial extends Pie { + constructor(ctx) { + super(ctx) + + this.ctx = ctx + this.w = ctx.w + this.animBeginArr = [0] + this.animDur = 0 + + const w = this.w + this.startAngle = w.config.plotOptions.radialBar.startAngle + this.endAngle = w.config.plotOptions.radialBar.endAngle + + this.totalAngle = Math.abs( + w.config.plotOptions.radialBar.endAngle - + w.config.plotOptions.radialBar.startAngle + ) + + this.trackStartAngle = w.config.plotOptions.radialBar.track.startAngle + this.trackEndAngle = w.config.plotOptions.radialBar.track.endAngle + + this.donutDataLabels = this.w.config.plotOptions.radialBar.dataLabels + this.radialDataLabels = this.donutDataLabels // make a copy for easy reference + + if (!this.trackStartAngle) this.trackStartAngle = this.startAngle + if (!this.trackEndAngle) this.trackEndAngle = this.endAngle + + if (this.endAngle === 360) this.endAngle = 359.99 + + this.margin = parseInt(w.config.plotOptions.radialBar.track.margin, 10) + } + + draw(series) { + let w = this.w + const graphics = new Graphics(this.ctx) + + let ret = graphics.group({ + class: 'apexcharts-radialbar' + }) + + if (w.globals.noData) return ret + + let elSeries = graphics.group() + + let centerY = this.defaultSize / 2 + let centerX = w.globals.gridWidth / 2 + + let size = this.defaultSize / 2.05 + if (!w.config.chart.sparkline.enabled) { + size = size - w.config.stroke.width - w.config.chart.dropShadow.blur + } + let colorArr = w.globals.fill.colors + + if (w.config.plotOptions.radialBar.track.show) { + let elTracks = this.drawTracks({ + size, + centerX, + centerY, + colorArr, + series + }) + elSeries.add(elTracks) + } + + let elG = this.drawArcs({ + size, + centerX, + centerY, + colorArr, + series + }) + + let totalAngle = 360 + + if (w.config.plotOptions.radialBar.startAngle < 0) { + totalAngle = this.totalAngle + } + + let angleRatio = (360 - totalAngle) / 360 + w.globals.radialSize = size - size * angleRatio + + if (this.radialDataLabels.value.show) { + let offset = Math.max( + this.radialDataLabels.value.offsetY, + this.radialDataLabels.name.offsetY + ) + w.globals.radialSize += offset * angleRatio + } + + elSeries.add(elG.g) + + if (w.config.plotOptions.radialBar.hollow.position === 'front') { + elG.g.add(elG.elHollow) + if (elG.dataLabels) { + elG.g.add(elG.dataLabels) + } + } + + ret.add(elSeries) + + return ret + } + + drawTracks(opts) { + let w = this.w + const graphics = new Graphics(this.ctx) + + let g = graphics.group({ + class: 'apexcharts-tracks' + }) + + let filters = new Filters(this.ctx) + let fill = new Fill(this.ctx) + + let strokeWidth = this.getStrokeWidth(opts) + + opts.size = opts.size - strokeWidth / 2 + + for (let i = 0; i < opts.series.length; i++) { + let elRadialBarTrack = graphics.group({ + class: 'apexcharts-radialbar-track apexcharts-track' + }) + g.add(elRadialBarTrack) + + elRadialBarTrack.attr({ + rel: i + 1 + }) + + opts.size = opts.size - strokeWidth - this.margin + + const trackConfig = w.config.plotOptions.radialBar.track + let pathFill = fill.fillPath({ + seriesNumber: 0, + size: opts.size, + fillColors: Array.isArray(trackConfig.background) + ? trackConfig.background[i] + : trackConfig.background, + solid: true + }) + + let startAngle = this.trackStartAngle + let endAngle = this.trackEndAngle + + if (Math.abs(endAngle) + Math.abs(startAngle) >= 360) + endAngle = 360 - Math.abs(this.startAngle) - 0.1 + + let elPath = graphics.drawPath({ + d: '', + stroke: pathFill, + strokeWidth: + (strokeWidth * parseInt(trackConfig.strokeWidth, 10)) / 100, + fill: 'none', + strokeOpacity: trackConfig.opacity, + classes: 'apexcharts-radialbar-area' + }) + + if (trackConfig.dropShadow.enabled) { + const shadow = trackConfig.dropShadow + filters.dropShadow(elPath, shadow) + } + + elRadialBarTrack.add(elPath) + + elPath.attr('id', 'apexcharts-radialbarTrack-' + i) + + this.animatePaths(elPath, { + centerX: opts.centerX, + centerY: opts.centerY, + endAngle, + startAngle, + size: opts.size, + i, + totalItems: 2, + animBeginArr: 0, + dur: 0, + isTrack: true, + easing: w.globals.easing + }) + } + + return g + } + + drawArcs(opts) { + let w = this.w + // size, donutSize, centerX, centerY, colorArr, lineColorArr, sectorAngleArr, series + + let graphics = new Graphics(this.ctx) + let fill = new Fill(this.ctx) + let filters = new Filters(this.ctx) + let g = graphics.group() + + let strokeWidth = this.getStrokeWidth(opts) + opts.size = opts.size - strokeWidth / 2 + + let hollowFillID = w.config.plotOptions.radialBar.hollow.background + let hollowSize = + opts.size - + strokeWidth * opts.series.length - + this.margin * opts.series.length - + (strokeWidth * + parseInt(w.config.plotOptions.radialBar.track.strokeWidth, 10)) / + 100 / + 2 + + let hollowRadius = hollowSize - w.config.plotOptions.radialBar.hollow.margin + + if (w.config.plotOptions.radialBar.hollow.image !== undefined) { + hollowFillID = this.drawHollowImage(opts, g, hollowSize, hollowFillID) + } + + let elHollow = this.drawHollow({ + size: hollowRadius, + centerX: opts.centerX, + centerY: opts.centerY, + fill: hollowFillID ? hollowFillID : 'transparent' + }) + + if (w.config.plotOptions.radialBar.hollow.dropShadow.enabled) { + const shadow = w.config.plotOptions.radialBar.hollow.dropShadow + filters.dropShadow(elHollow, shadow) + } + + let shown = 1 + if (!this.radialDataLabels.total.show && w.globals.series.length > 1) { + shown = 0 + } + + let dataLabels = null + + if (this.radialDataLabels.show) { + dataLabels = this.renderInnerDataLabels(this.radialDataLabels, { + hollowSize, + centerX: opts.centerX, + centerY: opts.centerY, + opacity: shown + }) + } + + if (w.config.plotOptions.radialBar.hollow.position === 'back') { + g.add(elHollow) + if (dataLabels) { + g.add(dataLabels) + } + } + + let reverseLoop = false + if (w.config.plotOptions.radialBar.inverseOrder) { + reverseLoop = true + } + + for ( + let i = reverseLoop ? opts.series.length - 1 : 0; + reverseLoop ? i >= 0 : i < opts.series.length; + reverseLoop ? i-- : i++ + ) { + let elRadialBarArc = graphics.group({ + class: `apexcharts-series apexcharts-radial-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[i]) + }) + g.add(elRadialBarArc) + + elRadialBarArc.attr({ + rel: i + 1, + 'data:realIndex': i + }) + + this.ctx.series.addCollapsedClassToSeries(elRadialBarArc, i) + + opts.size = opts.size - strokeWidth - this.margin + + let pathFill = fill.fillPath({ + seriesNumber: i, + size: opts.size, + value: opts.series[i] + }) + + let startAngle = this.startAngle + let prevStartAngle + + // if data exceeds 100, make it 100 + const dataValue = + Utils.negToZero(opts.series[i] > 100 ? 100 : opts.series[i]) / 100 + + let endAngle = Math.round(this.totalAngle * dataValue) + this.startAngle + + let prevEndAngle + if (w.globals.dataChanged) { + prevStartAngle = this.startAngle + prevEndAngle = + Math.round( + (this.totalAngle * Utils.negToZero(w.globals.previousPaths[i])) / + 100 + ) + prevStartAngle + } + + const currFullAngle = Math.abs(endAngle) + Math.abs(startAngle) + if (currFullAngle >= 360) { + endAngle = endAngle - 0.01 + } + + const prevFullAngle = Math.abs(prevEndAngle) + Math.abs(prevStartAngle) + if (prevFullAngle >= 360) { + prevEndAngle = prevEndAngle - 0.01 + } + + let angle = endAngle - startAngle + + const dashArray = Array.isArray(w.config.stroke.dashArray) + ? w.config.stroke.dashArray[i] + : w.config.stroke.dashArray + + let elPath = graphics.drawPath({ + d: '', + stroke: pathFill, + strokeWidth, + fill: 'none', + fillOpacity: w.config.fill.opacity, + classes: 'apexcharts-radialbar-area apexcharts-radialbar-slice-' + i, + strokeDashArray: dashArray + }) + + Graphics.setAttrs(elPath.node, { + 'data:angle': angle, + 'data:value': opts.series[i] + }) + + if (w.config.chart.dropShadow.enabled) { + const shadow = w.config.chart.dropShadow + filters.dropShadow(elPath, shadow, i) + } + filters.setSelectionFilter(elPath, 0, i) + + this.addListeners(elPath, this.radialDataLabels) + + elRadialBarArc.add(elPath) + + elPath.attr({ + index: 0, + j: i + }) + + let dur = 0 + if (this.initialAnim && !w.globals.resized && !w.globals.dataChanged) { + dur = w.config.chart.animations.speed + } + + if (w.globals.dataChanged) { + dur = w.config.chart.animations.dynamicAnimation.speed + } + this.animDur = dur / (opts.series.length * 1.2) + this.animDur + this.animBeginArr.push(this.animDur) + + this.animatePaths(elPath, { + centerX: opts.centerX, + centerY: opts.centerY, + endAngle, + startAngle, + prevEndAngle, + prevStartAngle, + size: opts.size, + i, + totalItems: 2, + animBeginArr: this.animBeginArr, + dur, + shouldSetPrevPaths: true, + easing: w.globals.easing + }) + } + + return { + g, + elHollow, + dataLabels + } + } + + drawHollow(opts) { + const graphics = new Graphics(this.ctx) + + let circle = graphics.drawCircle(opts.size * 2) + + circle.attr({ + class: 'apexcharts-radialbar-hollow', + cx: opts.centerX, + cy: opts.centerY, + r: opts.size, + fill: opts.fill + }) + + return circle + } + + drawHollowImage(opts, g, hollowSize, hollowFillID) { + const w = this.w + let fill = new Fill(this.ctx) + + let randID = Utils.randomId() + let hollowFillImg = w.config.plotOptions.radialBar.hollow.image + + if (w.config.plotOptions.radialBar.hollow.imageClipped) { + fill.clippedImgArea({ + width: hollowSize, + height: hollowSize, + image: hollowFillImg, + patternID: `pattern${w.globals.cuid}${randID}` + }) + hollowFillID = `url(#pattern${w.globals.cuid}${randID})` + } else { + const imgWidth = w.config.plotOptions.radialBar.hollow.imageWidth + const imgHeight = w.config.plotOptions.radialBar.hollow.imageHeight + if (imgWidth === undefined && imgHeight === undefined) { + let image = w.globals.dom.Paper.image(hollowFillImg).loaded(function( + loader + ) { + this.move( + opts.centerX - + loader.width / 2 + + w.config.plotOptions.radialBar.hollow.imageOffsetX, + opts.centerY - + loader.height / 2 + + w.config.plotOptions.radialBar.hollow.imageOffsetY + ) + }) + g.add(image) + } else { + let image = w.globals.dom.Paper.image(hollowFillImg).loaded(function( + loader + ) { + this.move( + opts.centerX - + imgWidth / 2 + + w.config.plotOptions.radialBar.hollow.imageOffsetX, + opts.centerY - + imgHeight / 2 + + w.config.plotOptions.radialBar.hollow.imageOffsetY + ) + this.size(imgWidth, imgHeight) + }) + g.add(image) + } + } + return hollowFillID + } + + getStrokeWidth(opts) { + const w = this.w + return ( + (opts.size * + (100 - parseInt(w.config.plotOptions.radialBar.hollow.size, 10))) / + 100 / + (opts.series.length + 1) - + this.margin + ) + } +} + +export default Radial diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/RangeBar.js b/cao_sunyata/static/libs/apexcharts/src/charts/RangeBar.js new file mode 100644 index 0000000..cdfb6bc --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/RangeBar.js @@ -0,0 +1,454 @@ +import Bar from './Bar' +import Graphics from '../modules/Graphics' +import Utils from '../utils/Utils' +import DateTime from '../utils/DateTime' + +/** + * ApexCharts RangeBar Class responsible for drawing Range/Timeline Bars. + * + * @module RangeBar + **/ + +class RangeBar extends Bar { + draw(series, seriesIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + + this.rangeBarOptions = this.w.config.plotOptions.rangeBar + + this.series = series + this.seriesRangeStart = w.globals.seriesRangeStart + this.seriesRangeEnd = w.globals.seriesRangeEnd + + this.barHelpers.initVariables(series) + + let ret = graphics.group({ + class: 'apexcharts-rangebar-series apexcharts-plot-series' + }) + + for (let i = 0; i < series.length; i++) { + let x, + y, + xDivision, // xDivision is the GRIDWIDTH divided by number of datapoints (columns) + yDivision, // yDivision is the GRIDHEIGHT divided by number of datapoints (bars) + zeroH, // zeroH is the baseline where 0 meets y axis + zeroW // zeroW is the baseline where 0 meets x axis + + let realIndex = w.globals.comboCharts ? seriesIndex[i] : i + + // el to which series will be drawn + let elSeries = graphics.group({ + class: `apexcharts-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]), + rel: i + 1, + 'data:realIndex': realIndex + }) + + this.ctx.series.addCollapsedClassToSeries(elSeries, realIndex) + + if (series[i].length > 0) { + this.visibleI = this.visibleI + 1 + } + + let barHeight = 0 + let barWidth = 0 + + if (this.yRatio.length > 1) { + this.yaxisIndex = realIndex + } + + let initPositions = this.barHelpers.initialPositions() + + y = initPositions.y + zeroW = initPositions.zeroW + + x = initPositions.x + barWidth = initPositions.barWidth + xDivision = initPositions.xDivision + zeroH = initPositions.zeroH + + // eldatalabels + let elDataLabelsWrap = graphics.group({ + class: 'apexcharts-datalabels', + 'data:realIndex': realIndex + }) + + let elGoalsMarkers = graphics.group({ + class: 'apexcharts-rangebar-goals-markers', + style: `pointer-events: none` + }) + + for (let j = 0; j < w.globals.dataPoints; j++) { + const strokeWidth = this.barHelpers.getStrokeWidth(i, j, realIndex) + + const y1 = this.seriesRangeStart[i][j] + const y2 = this.seriesRangeEnd[i][j] + + let paths = null + let barYPosition = null + const params = { x, y, strokeWidth, elSeries } + + yDivision = initPositions.yDivision + barHeight = initPositions.barHeight + + if (this.isHorizontal) { + barYPosition = y + barHeight * this.visibleI + + let seriesLen = this.seriesLen + if (w.config.plotOptions.bar.rangeBarGroupRows) { + seriesLen = 1 + } + + let srty = (yDivision - barHeight * seriesLen) / 2 + + if (typeof w.config.series[i].data[j] === 'undefined') { + // no data exists for further indexes, hence we need to get out the innr loop. + // As we are iterating over total datapoints, there is a possiblity the series might not have data for j index + break + } + + if (w.config.series[i].data[j].x) { + let positions = this.detectOverlappingBars({ + i, + j, + barYPosition, + srty, + barHeight, + yDivision, + initPositions + }) + + barHeight = positions.barHeight + barYPosition = positions.barYPosition + } + + paths = this.drawRangeBarPaths({ + indexes: { i, j, realIndex }, + barHeight, + barYPosition, + zeroW, + yDivision, + y1, + y2, + ...params + }) + + barWidth = paths.barWidth + } else { + paths = this.drawRangeColumnPaths({ + indexes: { i, j, realIndex }, + zeroH, + barWidth, + xDivision, + ...params + }) + + barHeight = paths.barHeight + } + + const barGoalLine = this.barHelpers.drawGoalLine({ + barXPosition: paths.barXPosition, + barYPosition, + goalX: paths.goalX, + goalY: paths.goalY, + barHeight, + barWidth + }) + + if (barGoalLine) { + elGoalsMarkers.add(barGoalLine) + } + + y = paths.y + x = paths.x + + let pathFill = this.barHelpers.getPathFillColor(series, i, j, realIndex) + + let lineFill = w.globals.stroke.colors[realIndex] + + this.renderSeries({ + realIndex, + pathFill, + lineFill, + j, + i, + x, + y, + y1, + y2, + pathFrom: paths.pathFrom, + pathTo: paths.pathTo, + strokeWidth, + elSeries, + series, + barHeight, + barYPosition, + barWidth, + elDataLabelsWrap, + elGoalsMarkers, + visibleSeries: this.visibleI, + type: 'rangebar' + }) + } + + ret.add(elSeries) + } + + return ret + } + + detectOverlappingBars({ + i, + j, + barYPosition, + srty, + barHeight, + yDivision, + initPositions + }) { + const w = this.w + let overlaps = [] + let rangeName = w.config.series[i].data[j].rangeName + + const labelX = w.config.series[i].data[j].x + const rowIndex = w.globals.labels.indexOf(labelX) + const overlappedIndex = w.globals.seriesRangeBar[i].findIndex( + (tx) => tx.x === labelX && tx.overlaps.length > 0 + ) + + if (w.config.plotOptions.bar.rangeBarGroupRows) { + barYPosition = srty + yDivision * rowIndex + } else { + barYPosition = srty + barHeight * this.visibleI + yDivision * rowIndex + } + + if (overlappedIndex > -1 && !w.config.plotOptions.bar.rangeBarOverlap) { + overlaps = w.globals.seriesRangeBar[i][overlappedIndex].overlaps + + if (overlaps.indexOf(rangeName) > -1) { + barHeight = initPositions.barHeight / overlaps.length + + barYPosition = + barHeight * this.visibleI + + (yDivision * (100 - parseInt(this.barOptions.barHeight, 10))) / + 100 / + 2 + + barHeight * (this.visibleI + overlaps.indexOf(rangeName)) + + yDivision * rowIndex + } + } + + return { + barYPosition, + barHeight + } + } + + drawRangeColumnPaths({ + indexes, + x, + strokeWidth, + xDivision, + barWidth, + zeroH + }) { + let w = this.w + + let i = indexes.i + let j = indexes.j + + const yRatio = this.yRatio[this.yaxisIndex] + let realIndex = indexes.realIndex + + const range = this.getRangeValue(realIndex, j) + + let y1 = Math.min(range.start, range.end) + let y2 = Math.max(range.start, range.end) + + if (w.globals.isXNumeric) { + x = + (w.globals.seriesX[i][j] - w.globals.minX) / this.xRatio - barWidth / 2 + } + + let barXPosition = x + barWidth * this.visibleI + + if ( + typeof this.series[i][j] === 'undefined' || + this.series[i][j] === null + ) { + y1 = zeroH + } else { + y1 = zeroH - y1 / yRatio + y2 = zeroH - y2 / yRatio + } + const barHeight = Math.abs(y2 - y1) + + const paths = this.barHelpers.getColumnPaths({ + barXPosition, + barWidth, + y1, + y2, + strokeWidth: this.strokeWidth, + series: this.seriesRangeEnd, + realIndex: indexes.realIndex, + i: realIndex, + j, + w + }) + + if (!w.globals.isXNumeric) { + x = x + xDivision + } + + return { + pathTo: paths.pathTo, + pathFrom: paths.pathFrom, + barHeight, + x, + y: y2, + goalY: this.barHelpers.getGoalValues('y', null, zeroH, i, j), + barXPosition + } + } + + drawRangeBarPaths({ + indexes, + y, + y1, + y2, + yDivision, + barHeight, + barYPosition, + zeroW + }) { + let w = this.w + + const x1 = zeroW + y1 / this.invertedYRatio + const x2 = zeroW + y2 / this.invertedYRatio + + const barWidth = Math.abs(x2 - x1) + + const paths = this.barHelpers.getBarpaths({ + barYPosition, + barHeight, + x1, + x2, + strokeWidth: this.strokeWidth, + series: this.seriesRangeEnd, + i: indexes.realIndex, + realIndex: indexes.realIndex, + j: indexes.j, + w + }) + + if (!w.globals.isXNumeric) { + y = y + yDivision + } + + return { + pathTo: paths.pathTo, + pathFrom: paths.pathFrom, + barWidth, + x: x2, + goalX: this.barHelpers.getGoalValues( + 'x', + zeroW, + null, + indexes.realIndex, + indexes.j + ), + y + } + } + + getRangeValue(i, j) { + const w = this.w + return { + start: w.globals.seriesRangeStart[i][j], + end: w.globals.seriesRangeEnd[i][j] + } + } + + getTooltipValues({ ctx, seriesIndex, dataPointIndex, y1, y2, w }) { + let start = w.globals.seriesRangeStart[seriesIndex][dataPointIndex] + let end = w.globals.seriesRangeEnd[seriesIndex][dataPointIndex] + let ylabel = w.globals.labels[dataPointIndex] + let seriesName = w.config.series[seriesIndex].name + ? w.config.series[seriesIndex].name + : '' + const yLbFormatter = w.config.tooltip.y.formatter + const yLbTitleFormatter = w.config.tooltip.y.title.formatter + + const opts = { + w, + seriesIndex, + dataPointIndex, + start, + end + } + + if (typeof yLbTitleFormatter === 'function') { + seriesName = yLbTitleFormatter(seriesName, opts) + } + + if (Number.isFinite(y1) && Number.isFinite(y2)) { + start = y1 + end = y2 + + if (w.config.series[seriesIndex].data[dataPointIndex].x) { + ylabel = w.config.series[seriesIndex].data[dataPointIndex].x + ':' + } + + if (typeof yLbFormatter === 'function') { + ylabel = yLbFormatter(ylabel, opts) + } + } + + let startVal = '' + let endVal = '' + + const color = w.globals.colors[seriesIndex] + if (w.config.tooltip.x.formatter === undefined) { + if (w.config.xaxis.type === 'datetime') { + let datetimeObj = new DateTime(ctx) + startVal = datetimeObj.formatDate( + datetimeObj.getDate(start), + w.config.tooltip.x.format + ) + endVal = datetimeObj.formatDate( + datetimeObj.getDate(end), + w.config.tooltip.x.format + ) + } else { + startVal = start + endVal = end + } + } else { + startVal = w.config.tooltip.x.formatter(start) + endVal = w.config.tooltip.x.formatter(end) + } + + return { start, end, startVal, endVal, ylabel, color, seriesName } + } + + buildCustomTooltipHTML({ color, seriesName, ylabel, start, end }) { + return ( + '
' + + '
' + + (seriesName ? seriesName : '') + + '
' + + '
' + + ylabel + + ' ' + + start + + ' - ' + + end + + '
' + + '
' + ) + } +} + +export default RangeBar diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Scatter.js b/cao_sunyata/static/libs/apexcharts/src/charts/Scatter.js new file mode 100644 index 0000000..9171da2 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Scatter.js @@ -0,0 +1,267 @@ +import Animations from '../modules/Animations' +import Fill from '../modules/Fill' +import Filters from '../modules/Filters' +import Graphics from '../modules/Graphics' +import Markers from '../modules/Markers' + +/** + * ApexCharts Scatter Class. + * This Class also handles bubbles chart as currently there is no major difference in drawing them, + * @module Scatter + **/ +export default class Scatter { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.initialAnim = this.w.config.chart.animations.enabled + this.dynamicAnim = + this.initialAnim && + this.w.config.chart.animations.dynamicAnimation.enabled + } + + draw(elSeries, j, opts) { + let w = this.w + + let graphics = new Graphics(this.ctx) + + let realIndex = opts.realIndex + let pointsPos = opts.pointsPos + let zRatio = opts.zRatio + let elPointsMain = opts.elParent + + let elPointsWrap = graphics.group({ + class: `apexcharts-series-markers apexcharts-series-${w.config.chart.type}` + }) + + elPointsWrap.attr('clip-path', `url(#gridRectMarkerMask${w.globals.cuid})`) + + if (Array.isArray(pointsPos.x)) { + for (let q = 0; q < pointsPos.x.length; q++) { + let dataPointIndex = j + 1 + let shouldDraw = true + + // a small hack as we have 2 points for the first val to connect it + if (j === 0 && q === 0) dataPointIndex = 0 + if (j === 0 && q === 1) dataPointIndex = 1 + + let radius = 0 + let finishRadius = w.globals.markers.size[realIndex] + + if (zRatio !== Infinity) { + // means we have a bubble + finishRadius = w.globals.seriesZ[realIndex][dataPointIndex] / zRatio + + const bubble = w.config.plotOptions.bubble + if (bubble.minBubbleRadius && finishRadius < bubble.minBubbleRadius) { + finishRadius = bubble.minBubbleRadius + } + + if (bubble.maxBubbleRadius && finishRadius > bubble.maxBubbleRadius) { + finishRadius = bubble.maxBubbleRadius + } + } + + if (!w.config.chart.animations.enabled) { + radius = finishRadius + } + + let x = pointsPos.x[q] + let y = pointsPos.y[q] + + radius = radius || 0 + + if ( + y === null || + typeof w.globals.series[realIndex][dataPointIndex] === 'undefined' + ) { + shouldDraw = false + } + + if (shouldDraw) { + const point = this.drawPoint( + x, + y, + radius, + finishRadius, + realIndex, + dataPointIndex, + j + ) + elPointsWrap.add(point) + } + + elPointsMain.add(elPointsWrap) + } + } + } + + drawPoint(x, y, radius, finishRadius, realIndex, dataPointIndex, j) { + const w = this.w + + let i = realIndex + let anim = new Animations(this.ctx) + let filters = new Filters(this.ctx) + let fill = new Fill(this.ctx) + let markers = new Markers(this.ctx) + const graphics = new Graphics(this.ctx) + + const markerConfig = markers.getMarkerConfig({ + cssClass: 'apexcharts-marker', + seriesIndex: i, + dataPointIndex, + finishRadius: + w.config.chart.type === 'bubble' || + (w.globals.comboCharts && + w.config.series[realIndex] && + w.config.series[realIndex].type === 'bubble') + ? finishRadius + : null + }) + + finishRadius = markerConfig.pSize + + let pathFillCircle = fill.fillPath({ + seriesNumber: realIndex, + dataPointIndex, + color: markerConfig.pointFillColor, + patternUnits: 'objectBoundingBox', + value: w.globals.series[realIndex][j] + }) + + let el + if (markerConfig.shape === 'circle') { + el = graphics.drawCircle(radius) + } else if ( + markerConfig.shape === 'square' || + markerConfig.shape === 'rect' + ) { + el = graphics.drawRect( + 0, + 0, + markerConfig.width - markerConfig.pointStrokeWidth / 2, + markerConfig.height - markerConfig.pointStrokeWidth / 2, + markerConfig.pRadius + ) + } + + if (w.config.series[i].data[dataPointIndex]) { + if (w.config.series[i].data[dataPointIndex].fillColor) { + pathFillCircle = w.config.series[i].data[dataPointIndex].fillColor + } + } + + el.attr({ + x: x - markerConfig.width / 2 - markerConfig.pointStrokeWidth / 2, + y: y - markerConfig.height / 2 - markerConfig.pointStrokeWidth / 2, + cx: x, + cy: y, + fill: pathFillCircle, + 'fill-opacity': markerConfig.pointFillOpacity, + stroke: markerConfig.pointStrokeColor, + r: finishRadius, + 'stroke-width': markerConfig.pointStrokeWidth, + 'stroke-dasharray': markerConfig.pointStrokeDashArray, + 'stroke-opacity': markerConfig.pointStrokeOpacity + }) + + if (w.config.chart.dropShadow.enabled) { + const dropShadow = w.config.chart.dropShadow + filters.dropShadow(el, dropShadow, realIndex) + } + + if (this.initialAnim && !w.globals.dataChanged && !w.globals.resized) { + let speed = w.config.chart.animations.speed + + anim.animateMarker( + el, + 0, + markerConfig.shape === 'circle' + ? finishRadius + : { width: markerConfig.width, height: markerConfig.height }, + speed, + w.globals.easing, + () => { + window.setTimeout(() => { + anim.animationCompleted(el) + }, 100) + } + ) + } else { + w.globals.animationEnded = true + } + + if (w.globals.dataChanged && markerConfig.shape === 'circle') { + if (this.dynamicAnim) { + let speed = w.config.chart.animations.dynamicAnimation.speed + let prevX, prevY, prevR + + let prevPathJ = null + + prevPathJ = + w.globals.previousPaths[realIndex] && + w.globals.previousPaths[realIndex][j] + + if (typeof prevPathJ !== 'undefined' && prevPathJ !== null) { + // series containing less elements will ignore these values and revert to 0 + prevX = prevPathJ.x + prevY = prevPathJ.y + prevR = + typeof prevPathJ.r !== 'undefined' ? prevPathJ.r : finishRadius + } + + for (let cs = 0; cs < w.globals.collapsedSeries.length; cs++) { + if (w.globals.collapsedSeries[cs].index === realIndex) { + speed = 1 + finishRadius = 0 + } + } + + if (x === 0 && y === 0) finishRadius = 0 + + anim.animateCircle( + el, + { + cx: prevX, + cy: prevY, + r: prevR + }, + { + cx: x, + cy: y, + r: finishRadius + }, + speed, + w.globals.easing + ) + } else { + el.attr({ + r: finishRadius + }) + } + } + + el.attr({ + rel: dataPointIndex, + j: dataPointIndex, + index: realIndex, + 'default-marker-size': finishRadius + }) + + filters.setSelectionFilter(el, realIndex, dataPointIndex) + markers.addEvents(el) + + el.node.classList.add('apexcharts-marker') + + return el + } + + centerTextInBubble(y) { + let w = this.w + y = y + parseInt(w.config.dataLabels.style.fontSize, 10) / 4 + + return { + y + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/Treemap.js b/cao_sunyata/static/libs/apexcharts/src/charts/Treemap.js new file mode 100644 index 0000000..dede195 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/Treemap.js @@ -0,0 +1,302 @@ +import '../libs/Treemap-squared' +import Graphics from '../modules/Graphics' +import Animations from '../modules/Animations' +import Fill from '../modules/Fill' +import Helpers from './common/treemap/Helpers' +import Filters from '../modules/Filters' + +import Utils from '../utils/Utils' + +/** + * ApexCharts TreemapChart Class. + * @module TreemapChart + **/ + +export default class TreemapChart { + constructor(ctx, xyRatios) { + this.ctx = ctx + this.w = ctx.w + + this.strokeWidth = this.w.config.stroke.width + this.helpers = new Helpers(ctx) + this.dynamicAnim = this.w.config.chart.animations.dynamicAnimation + + this.labels = [] + } + + draw(series) { + let w = this.w + const graphics = new Graphics(this.ctx) + const fill = new Fill(this.ctx) + + let ret = graphics.group({ + class: 'apexcharts-treemap' + }) + + if (w.globals.noData) return ret + + let ser = [] + series.forEach((s) => { + let d = s.map((v) => { + return Math.abs(v) + }) + ser.push(d) + }) + + this.negRange = this.helpers.checkColorRange() + + w.config.series.forEach((s, i) => { + s.data.forEach((l) => { + if (!Array.isArray(this.labels[i])) this.labels[i] = [] + this.labels[i].push(l.x) + }) + }) + + const nodes = window.TreemapSquared.generate( + ser, + w.globals.gridWidth, + w.globals.gridHeight + ) + + nodes.forEach((node, i) => { + let elSeries = graphics.group({ + class: `apexcharts-series apexcharts-treemap-series`, + seriesName: Utils.escapeString(w.globals.seriesNames[i]), + rel: i + 1, + 'data:realIndex': i + }) + + if (w.config.chart.dropShadow.enabled) { + const shadow = w.config.chart.dropShadow + const filters = new Filters(this.ctx) + filters.dropShadow(ret, shadow, i) + } + + let elDataLabelWrap = graphics.group({ + class: 'apexcharts-data-labels' + }) + + node.forEach((r, j) => { + const x1 = r[0] + const y1 = r[1] + const x2 = r[2] + const y2 = r[3] + let elRect = graphics.drawRect( + x1, + y1, + x2 - x1, + y2 - y1, + 0, + '#fff', + 1, + this.strokeWidth, + w.config.plotOptions.treemap.useFillColorAsStroke + ? color + : w.globals.stroke.colors[i] + ) + elRect.attr({ + cx: x1, + cy: y1, + index: i, + i, + j, + width: x2 - x1, + height: y2 - y1 + }) + + let colorProps = this.helpers.getShadeColor( + w.config.chart.type, + i, + j, + this.negRange + ) + let color = colorProps.color + + if ( + typeof w.config.series[i].data[j] !== 'undefined' && + w.config.series[i].data[j].fillColor + ) { + color = w.config.series[i].data[j].fillColor + } + let pathFill = fill.fillPath({ + color, + seriesNumber: i, + dataPointIndex: j + }) + + elRect.node.classList.add('apexcharts-treemap-rect') + + elRect.attr({ + fill: pathFill + }) + + this.helpers.addListeners(elRect) + + let fromRect = { + x: x1 + (x2 - x1) / 2, + y: y1 + (y2 - y1) / 2, + width: 0, + height: 0 + } + let toRect = { + x: x1, + y: y1, + width: x2 - x1, + height: y2 - y1 + } + + if (w.config.chart.animations.enabled && !w.globals.dataChanged) { + let speed = 1 + if (!w.globals.resized) { + speed = w.config.chart.animations.speed + } + this.animateTreemap(elRect, fromRect, toRect, speed) + } + if (w.globals.dataChanged) { + let speed = 1 + if (this.dynamicAnim.enabled && w.globals.shouldAnimate) { + speed = this.dynamicAnim.speed + + if ( + w.globals.previousPaths[i] && + w.globals.previousPaths[i][j] && + w.globals.previousPaths[i][j].rect + ) { + fromRect = w.globals.previousPaths[i][j].rect + } + + this.animateTreemap(elRect, fromRect, toRect, speed) + } + } + + const fontSize = this.getFontSize(r) + + let formattedText = w.config.dataLabels.formatter(this.labels[i][j], { + value: w.globals.series[i][j], + seriesIndex: i, + dataPointIndex: j, + w + }) + let dataLabels = this.helpers.calculateDataLabels({ + text: formattedText, + x: (x1 + x2) / 2, + y: (y1 + y2) / 2 + this.strokeWidth / 2 + fontSize / 3, + i, + j, + colorProps, + fontSize, + series + }) + if (w.config.dataLabels.enabled && dataLabels) { + this.rotateToFitLabel(dataLabels, formattedText, x1, y1, x2, y2) + } + elSeries.add(elRect) + + if (dataLabels !== null) { + elSeries.add(dataLabels) + } + }) + elSeries.add(elDataLabelWrap) + + ret.add(elSeries) + }) + + return ret + } + + // This calculates a font-size based upon + // average label length and the size of the box the label is + // going into. The maximum font size is set in chart config. + getFontSize(coordinates) { + const w = this.w + + // total length of labels (i.e [["Italy"],["Spain", "Greece"]] -> 16) + function totalLabelLength(arr) { + let i, + total = 0 + if (Array.isArray(arr[0])) { + for (i = 0; i < arr.length; i++) { + total += totalLabelLength(arr[i]) + } + } else { + for (i = 0; i < arr.length; i++) { + total += arr[i].length + } + } + return total + } + + // count of labels (i.e [["Italy"],["Spain", "Greece"]] -> 3) + function countLabels(arr) { + let i, + total = 0 + if (Array.isArray(arr[0])) { + for (i = 0; i < arr.length; i++) { + total += countLabels(arr[i]) + } + } else { + for (i = 0; i < arr.length; i++) { + total += 1 + } + } + return total + } + let averagelabelsize = + totalLabelLength(this.labels) / countLabels(this.labels) + + function fontSize(width, height) { + // the font size should be proportional to the size of the box (and the value) + // otherwise you can end up creating a visual distortion where two boxes of identical + // size have different sized labels, and thus make it look as if the two boxes + // represent different sizes + let area = width * height + let arearoot = Math.pow(area, 0.5) + return Math.min( + arearoot / averagelabelsize, + parseInt(w.config.dataLabels.style.fontSize, 10) + ) + } + + return fontSize( + coordinates[2] - coordinates[0], + coordinates[3] - coordinates[1] + ) + } + + rotateToFitLabel(elText, text, x1, y1, x2, y2) { + const graphics = new Graphics(this.ctx) + const textRect = graphics.getTextRects(text) + //if the label fits better sideways then rotate it + if (textRect.width + 5 > x2 - x1 && textRect.width <= y2 - y1) { + let labelRotatingCenter = graphics.rotateAroundCenter(elText.node) + + elText.node.setAttribute( + 'transform', + `rotate(-90 ${labelRotatingCenter.x} ${labelRotatingCenter.y})` + ) + } + } + + animateTreemap(el, fromRect, toRect, speed) { + const animations = new Animations(this.ctx) + animations.animateRect( + el, + { + x: fromRect.x, + y: fromRect.y, + width: fromRect.width, + height: fromRect.height + }, + { + x: toRect.x, + y: toRect.y, + width: toRect.width, + height: toRect.height + }, + speed, + () => { + animations.animationCompleted(el) + } + ) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/common/bar/DataLabels.js b/cao_sunyata/static/libs/apexcharts/src/charts/common/bar/DataLabels.js new file mode 100644 index 0000000..833245c --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/common/bar/DataLabels.js @@ -0,0 +1,442 @@ +import Graphics from '../../../modules/Graphics' +import DataLabels from '../../../modules/DataLabels' + +export default class BarDataLabels { + constructor(barCtx) { + this.w = barCtx.w + this.barCtx = barCtx + } + /** handleBarDataLabels is used to calculate the positions for the data-labels + * It also sets the element's data attr for bars and calls drawCalculatedBarDataLabels() + * After calculating, it also calls the function to draw data labels + * @memberof Bar + * @param {object} {barProps} most of the bar properties used throughout the bar + * drawing function + * @return {object} dataLabels node-element which you can append later + **/ + handleBarDataLabels(opts) { + let { + x, + y, + y1, + y2, + i, + j, + realIndex, + series, + barHeight, + barWidth, + barYPosition, + visibleSeries, + renderedPath + } = opts + let w = this.w + let graphics = new Graphics(this.barCtx.ctx) + + let strokeWidth = Array.isArray(this.barCtx.strokeWidth) + ? this.barCtx.strokeWidth[realIndex] + : this.barCtx.strokeWidth + + let bcx = x + parseFloat(barWidth * visibleSeries) + let bcy = y + parseFloat(barHeight * visibleSeries) + + if (w.globals.isXNumeric && !w.globals.isBarHorizontal) { + bcx = x + parseFloat(barWidth * (visibleSeries + 1)) + bcy = y + parseFloat(barHeight * (visibleSeries + 1)) - strokeWidth + } + + let dataLabels = null + let dataLabelsX = x + let dataLabelsY = y + let dataLabelsPos = {} + let dataLabelsConfig = w.config.dataLabels + let barDataLabelsConfig = this.barCtx.barOptions.dataLabels + + if (typeof barYPosition !== 'undefined' && this.barCtx.isRangeBar) { + bcy = barYPosition + dataLabelsY = barYPosition + } + + const offX = dataLabelsConfig.offsetX + const offY = dataLabelsConfig.offsetY + + let textRects = { + width: 0, + height: 0 + } + if (w.config.dataLabels.enabled) { + const yLabel = this.barCtx.series[i][j] + + textRects = graphics.getTextRects( + w.globals.yLabelFormatters[0](yLabel), + parseFloat(dataLabelsConfig.style.fontSize) + ) + } + + const params = { + x, + y, + i, + j, + renderedPath, + bcx, + bcy, + barHeight, + barWidth, + textRects, + strokeWidth, + dataLabelsX, + dataLabelsY, + barDataLabelsConfig, + offX, + offY + } + + if (this.barCtx.isHorizontal) { + dataLabelsPos = this.calculateBarsDataLabelsPosition(params) + } else { + dataLabelsPos = this.calculateColumnsDataLabelsPosition(params) + } + + renderedPath.attr({ + cy: dataLabelsPos.bcy, + cx: dataLabelsPos.bcx, + j, + val: series[i][j], + barHeight, + barWidth + }) + + dataLabels = this.drawCalculatedDataLabels({ + x: dataLabelsPos.dataLabelsX, + y: dataLabelsPos.dataLabelsY, + val: this.barCtx.isRangeBar ? [y1, y2] : series[i][j], + i: realIndex, + j, + barWidth, + barHeight, + textRects, + dataLabelsConfig + }) + + return dataLabels + } + + calculateColumnsDataLabelsPosition(opts) { + const w = this.w + let { + i, + j, + y, + bcx, + barWidth, + barHeight, + textRects, + dataLabelsY, + barDataLabelsConfig, + strokeWidth, + offX, + offY + } = opts + + let dataLabelsX + barHeight = Math.abs(barHeight) + + let vertical = + w.config.plotOptions.bar.dataLabels.orientation === 'vertical' + + bcx = bcx - strokeWidth / 2 + + let dataPointsDividedWidth = w.globals.gridWidth / w.globals.dataPoints + if (w.globals.isXNumeric) { + dataLabelsX = bcx - barWidth / 2 + offX + } else { + dataLabelsX = bcx - dataPointsDividedWidth + barWidth / 2 + offX + } + + if (vertical) { + const offsetDLX = 2 + dataLabelsX = + dataLabelsX + textRects.height / 2 - strokeWidth / 2 - offsetDLX + } + + let valIsNegative = this.barCtx.series[i][j] < 0 + + let newY = y + if (this.barCtx.isReversed) { + newY = y - barHeight + (valIsNegative ? barHeight * 2 : 0) + y = y - barHeight + } + + switch (barDataLabelsConfig.position) { + case 'center': + if (vertical) { + if (valIsNegative) { + dataLabelsY = newY + barHeight / 2 + offY + } else { + dataLabelsY = newY + barHeight / 2 - offY + } + } else { + if (valIsNegative) { + dataLabelsY = newY - barHeight / 2 + textRects.height / 2 + offY + } else { + dataLabelsY = newY + barHeight / 2 + textRects.height / 2 - offY + } + } + break + case 'bottom': + if (vertical) { + if (valIsNegative) { + dataLabelsY = newY + barHeight + offY + } else { + dataLabelsY = newY + barHeight - offY + } + } else { + if (valIsNegative) { + dataLabelsY = + newY - barHeight + textRects.height + strokeWidth + offY + } else { + dataLabelsY = + newY + barHeight - textRects.height / 2 + strokeWidth - offY + } + } + break + case 'top': + if (vertical) { + if (valIsNegative) { + dataLabelsY = newY + offY + } else { + dataLabelsY = newY - offY + } + } else { + if (valIsNegative) { + dataLabelsY = newY - textRects.height / 2 - offY + } else { + dataLabelsY = newY + textRects.height + offY + } + } + break + } + + if (!w.config.chart.stacked) { + if (dataLabelsY < 0) { + dataLabelsY = 0 + strokeWidth + } else if (dataLabelsY + textRects.height / 3 > w.globals.gridHeight) { + dataLabelsY = w.globals.gridHeight - strokeWidth + } + } + + return { + bcx, + bcy: y, + dataLabelsX, + dataLabelsY + } + } + + calculateBarsDataLabelsPosition(opts) { + const w = this.w + let { + x, + i, + j, + bcy, + barHeight, + barWidth, + textRects, + dataLabelsX, + strokeWidth, + barDataLabelsConfig, + offX, + offY + } = opts + + let dataPointsDividedHeight = w.globals.gridHeight / w.globals.dataPoints + + barWidth = Math.abs(barWidth) + + let dataLabelsY = + bcy - + (this.barCtx.isRangeBar ? 0 : dataPointsDividedHeight) + + barHeight / 2 + + textRects.height / 2 + + offY - + 3 + + let valIsNegative = this.barCtx.series[i][j] < 0 + + let newX = x + if (this.barCtx.isReversed) { + newX = x + barWidth - (valIsNegative ? barWidth * 2 : 0) + x = w.globals.gridWidth - barWidth + } + + switch (barDataLabelsConfig.position) { + case 'center': + if (valIsNegative) { + dataLabelsX = newX + barWidth / 2 - offX + } else { + dataLabelsX = + Math.max(textRects.width / 2, newX - barWidth / 2) + offX + } + break + case 'bottom': + if (valIsNegative) { + dataLabelsX = + newX + + barWidth - + strokeWidth - + Math.round(textRects.width / 2) - + offX + } else { + dataLabelsX = + newX - + barWidth + + strokeWidth + + Math.round(textRects.width / 2) + + offX + } + break + case 'top': + if (valIsNegative) { + dataLabelsX = + newX - strokeWidth + Math.round(textRects.width / 2) - offX + } else { + dataLabelsX = + newX - strokeWidth - Math.round(textRects.width / 2) + offX + } + break + } + + if (!w.config.chart.stacked) { + if (dataLabelsX < 0) { + dataLabelsX = dataLabelsX + textRects.width + strokeWidth + } else if (dataLabelsX + textRects.width / 2 > w.globals.gridWidth) { + dataLabelsX = w.globals.gridWidth - textRects.width - strokeWidth + } + } + + return { + bcx: x, + bcy, + dataLabelsX, + dataLabelsY + } + } + + drawCalculatedDataLabels({ + x, + y, + val, + i, + j, + textRects, + barHeight, + barWidth, + dataLabelsConfig + }) { + const w = this.w + let rotate = 'rotate(0)' + if (w.config.plotOptions.bar.dataLabels.orientation === 'vertical') + rotate = `rotate(-90, ${x}, ${y})` + + const dataLabels = new DataLabels(this.barCtx.ctx) + const graphics = new Graphics(this.barCtx.ctx) + const formatter = dataLabelsConfig.formatter + + let elDataLabelsWrap = null + + const isSeriesNotCollapsed = + w.globals.collapsedSeriesIndices.indexOf(i) > -1 + + if (dataLabelsConfig.enabled && !isSeriesNotCollapsed) { + elDataLabelsWrap = graphics.group({ + class: 'apexcharts-data-labels', + transform: rotate + }) + + let text = '' + if (typeof val !== 'undefined') { + text = formatter(val, { + seriesIndex: i, + dataPointIndex: j, + w + }) + } + + let valIsNegative = w.globals.series[i][j] < 0 + let position = w.config.plotOptions.bar.dataLabels.position + if (w.config.plotOptions.bar.dataLabels.orientation === 'vertical') { + if (position === 'top') { + if (valIsNegative) dataLabelsConfig.textAnchor = 'end' + else dataLabelsConfig.textAnchor = 'start' + } + if (position === 'center') { + dataLabelsConfig.textAnchor = 'middle' + } + if (position === 'bottom') { + if (valIsNegative) dataLabelsConfig.textAnchor = 'end' + else dataLabelsConfig.textAnchor = 'start' + } + } + + if ( + this.barCtx.isRangeBar && + this.barCtx.barOptions.dataLabels.hideOverflowingLabels + ) { + // hide the datalabel if it cannot fit into the rect + const txRect = graphics.getTextRects( + text, + parseFloat(dataLabelsConfig.style.fontSize) + ) + if (barWidth < txRect.width) { + text = '' + } + } + + if ( + w.config.chart.stacked && + this.barCtx.barOptions.dataLabels.hideOverflowingLabels + ) { + // if there is not enough space to draw the label in the bar/column rect, check hideOverflowingLabels property to prevent overflowing on wrong rect + // Note: This issue is only seen in stacked charts + if (this.barCtx.isHorizontal) { + if (textRects.width / 1.6 > Math.abs(barWidth)) { + text = '' + } + } else { + if (textRects.height / 1.6 > Math.abs(barHeight)) { + text = '' + } + } + } + + let modifiedDataLabelsConfig = { + ...dataLabelsConfig + } + if (this.barCtx.isHorizontal) { + if (val < 0) { + if (dataLabelsConfig.textAnchor === 'start') { + modifiedDataLabelsConfig.textAnchor = 'end' + } else if (dataLabelsConfig.textAnchor === 'end') { + modifiedDataLabelsConfig.textAnchor = 'start' + } + } + } + + dataLabels.plotDataLabelsText({ + x, + y, + text, + i, + j, + parent: elDataLabelsWrap, + dataLabelsConfig: modifiedDataLabelsConfig, + alwaysDrawDataLabel: true, + offsetCorrection: true + }) + } + + return elDataLabelsWrap + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/common/bar/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/charts/common/bar/Helpers.js new file mode 100644 index 0000000..7ab8010 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/common/bar/Helpers.js @@ -0,0 +1,638 @@ +import Fill from '../../../modules/Fill' +import Graphics from '../../../modules/Graphics' +import Series from '../../../modules/Series' + +export default class Helpers { + constructor(barCtx) { + this.w = barCtx.w + this.barCtx = barCtx + } + + initVariables(series) { + const w = this.w + this.barCtx.series = series + this.barCtx.totalItems = 0 + this.barCtx.seriesLen = 0 + this.barCtx.visibleI = -1 // visible Series + this.barCtx.visibleItems = 1 // number of visible bars after user zoomed in/out + + for (let sl = 0; sl < series.length; sl++) { + if (series[sl].length > 0) { + this.barCtx.seriesLen = this.barCtx.seriesLen + 1 + this.barCtx.totalItems += series[sl].length + } + if (w.globals.isXNumeric) { + // get max visible items + for (let j = 0; j < series[sl].length; j++) { + if ( + w.globals.seriesX[sl][j] > w.globals.minX && + w.globals.seriesX[sl][j] < w.globals.maxX + ) { + this.barCtx.visibleItems++ + } + } + } else { + this.barCtx.visibleItems = w.globals.dataPoints + } + } + + if (this.barCtx.seriesLen === 0) { + // A small adjustment when combo charts are used + this.barCtx.seriesLen = 1 + } + this.barCtx.zeroSerieses = [] + this.barCtx.radiusOnSeriesNumber = series.length - 1 // which series to draw ending shape on + + if (!w.globals.comboCharts) { + this.checkZeroSeries({ series }) + } + } + + initialPositions() { + let w = this.w + let x, y, yDivision, xDivision, barHeight, barWidth, zeroH, zeroW + + let dataPoints = w.globals.dataPoints + if (this.barCtx.isRangeBar) { + // timeline rangebar chart + dataPoints = w.globals.labels.length + } + + let seriesLen = this.barCtx.seriesLen + if (w.config.plotOptions.bar.rangeBarGroupRows) { + seriesLen = 1 + } + + if (this.barCtx.isHorizontal) { + // height divided into equal parts + yDivision = w.globals.gridHeight / dataPoints + barHeight = yDivision / seriesLen + + if (w.globals.isXNumeric) { + yDivision = w.globals.gridHeight / this.barCtx.totalItems + barHeight = yDivision / this.barCtx.seriesLen + } + + barHeight = + (barHeight * parseInt(this.barCtx.barOptions.barHeight, 10)) / 100 + + zeroW = + this.barCtx.baseLineInvertedY + + w.globals.padHorizontal + + (this.barCtx.isReversed ? w.globals.gridWidth : 0) - + (this.barCtx.isReversed ? this.barCtx.baseLineInvertedY * 2 : 0) + + y = (yDivision - barHeight * this.barCtx.seriesLen) / 2 + } else { + // width divided into equal parts + xDivision = w.globals.gridWidth / this.barCtx.visibleItems + if (w.config.xaxis.convertedCatToNumeric) { + xDivision = w.globals.gridWidth / w.globals.dataPoints + } + barWidth = + ((xDivision / this.barCtx.seriesLen) * + parseInt(this.barCtx.barOptions.columnWidth, 10)) / + 100 + + if (w.globals.isXNumeric) { + // max barwidth should be equal to minXDiff to avoid overlap + let xRatio = this.barCtx.xRatio + if (w.config.xaxis.convertedCatToNumeric) { + xRatio = this.barCtx.initialXRatio + } + if ( + w.globals.minXDiff && + w.globals.minXDiff !== 0.5 && + w.globals.minXDiff / xRatio > 0 + ) { + xDivision = w.globals.minXDiff / xRatio + } + + barWidth = + ((xDivision / this.barCtx.seriesLen) * + parseInt(this.barCtx.barOptions.columnWidth, 10)) / + 100 + + if (barWidth < 1) { + barWidth = 1 + } + } + + zeroH = + w.globals.gridHeight - + this.barCtx.baseLineY[this.barCtx.yaxisIndex] - + (this.barCtx.isReversed ? w.globals.gridHeight : 0) + + (this.barCtx.isReversed + ? this.barCtx.baseLineY[this.barCtx.yaxisIndex] * 2 + : 0) + + x = + w.globals.padHorizontal + + (xDivision - barWidth * this.barCtx.seriesLen) / 2 + } + + return { + x, + y, + yDivision, + xDivision, + barHeight, + barWidth, + zeroH, + zeroW + } + } + + getPathFillColor(series, i, j, realIndex) { + const w = this.w + let fill = new Fill(this.barCtx.ctx) + + let fillColor = null + let seriesNumber = this.barCtx.barOptions.distributed ? j : i + + if (this.barCtx.barOptions.colors.ranges.length > 0) { + const colorRange = this.barCtx.barOptions.colors.ranges + colorRange.map((range) => { + if (series[i][j] >= range.from && series[i][j] <= range.to) { + fillColor = range.color + } + }) + } + + if (w.config.series[i].data[j] && w.config.series[i].data[j].fillColor) { + fillColor = w.config.series[i].data[j].fillColor + } + + let pathFill = fill.fillPath({ + seriesNumber: this.barCtx.barOptions.distributed + ? seriesNumber + : realIndex, + dataPointIndex: j, + color: fillColor, + value: series[i][j] + }) + + return pathFill + } + + getStrokeWidth(i, j, realIndex) { + let strokeWidth = 0 + const w = this.w + + if ( + typeof this.barCtx.series[i][j] === 'undefined' || + this.barCtx.series[i][j] === null + ) { + this.barCtx.isNullValue = true + } else { + this.barCtx.isNullValue = false + } + if (w.config.stroke.show) { + if (!this.barCtx.isNullValue) { + strokeWidth = Array.isArray(this.barCtx.strokeWidth) + ? this.barCtx.strokeWidth[realIndex] + : this.barCtx.strokeWidth + } + } + return strokeWidth + } + + barBackground({ j, i, x1, x2, y1, y2, elSeries }) { + const w = this.w + const graphics = new Graphics(this.barCtx.ctx) + + const sr = new Series(this.barCtx.ctx) + let activeSeriesIndex = sr.getActiveConfigSeriesIndex() + + if ( + this.barCtx.barOptions.colors.backgroundBarColors.length > 0 && + activeSeriesIndex === i + ) { + if (j >= this.barCtx.barOptions.colors.backgroundBarColors.length) { + j %= this.barCtx.barOptions.colors.backgroundBarColors.length + } + + let bcolor = this.barCtx.barOptions.colors.backgroundBarColors[j] + let rect = graphics.drawRect( + typeof x1 !== 'undefined' ? x1 : 0, + typeof y1 !== 'undefined' ? y1 : 0, + typeof x2 !== 'undefined' ? x2 : w.globals.gridWidth, + typeof y2 !== 'undefined' ? y2 : w.globals.gridHeight, + this.barCtx.barOptions.colors.backgroundBarRadius, + bcolor, + this.barCtx.barOptions.colors.backgroundBarOpacity + ) + elSeries.add(rect) + rect.node.classList.add('apexcharts-backgroundBar') + } + } + + getColumnPaths({ + barWidth, + barXPosition, + yRatio, + y1, + y2, + strokeWidth, + series, + realIndex, + i, + j, + w + }) { + const graphics = new Graphics(this.barCtx.ctx) + strokeWidth = Array.isArray(strokeWidth) + ? strokeWidth[realIndex] + : strokeWidth + if (!strokeWidth) strokeWidth = 0 + + let shapeOpts = { + barWidth, + strokeWidth, + yRatio, + barXPosition, + y1, + y2 + } + let newPath = this.getRoundedBars(w, shapeOpts, series, i, j) + + const x1 = barXPosition + const x2 = barXPosition + barWidth + + let pathTo = graphics.move(x1, y1) + let pathFrom = graphics.move(x1, y1) + + const sl = graphics.line(x2 - strokeWidth, y1) + if (w.globals.previousPaths.length > 0) { + pathFrom = this.barCtx.getPreviousPath(realIndex, j, false) + } + + pathTo = + pathTo + + graphics.line(x1, newPath.y2) + + newPath.pathWithRadius + + graphics.line(x2 - strokeWidth, newPath.y2) + + sl + + sl + + 'z' + + // the lines in pathFrom are repeated to equal it to the points of pathTo + // this is to avoid weird animation (bug in svg.js) + pathFrom = + pathFrom + + graphics.line(x1, y1) + + sl + + sl + + sl + + sl + + sl + + graphics.line(x1, y1) + + if (w.config.chart.stacked) { + this.barCtx.yArrj.push(newPath.y2) + this.barCtx.yArrjF.push(Math.abs(y1 - newPath.y2)) + this.barCtx.yArrjVal.push(this.barCtx.series[i][j]) + } + + return { + pathTo, + pathFrom + } + } + + getBarpaths({ + barYPosition, + barHeight, + x1, + x2, + strokeWidth, + series, + realIndex, + i, + j, + w + }) { + const graphics = new Graphics(this.barCtx.ctx) + strokeWidth = Array.isArray(strokeWidth) + ? strokeWidth[realIndex] + : strokeWidth + if (!strokeWidth) strokeWidth = 0 + + let shapeOpts = { + barHeight, + strokeWidth, + barYPosition, + x2, + x1 + } + + let newPath = this.getRoundedBars(w, shapeOpts, series, i, j) + + let pathTo = graphics.move(x1, barYPosition) + let pathFrom = graphics.move(x1, barYPosition) + + if (w.globals.previousPaths.length > 0) { + pathFrom = this.barCtx.getPreviousPath(realIndex, j, false) + } + + const y1 = barYPosition + const y2 = barYPosition + barHeight + + const sl = graphics.line(x1, y2 - strokeWidth) + pathTo = + pathTo + + graphics.line(newPath.x2, y1) + + newPath.pathWithRadius + + graphics.line(newPath.x2, y2 - strokeWidth) + + sl + + sl + + 'z' + + pathFrom = + pathFrom + + graphics.line(x1, y1) + + sl + + sl + + sl + + sl + + sl + + graphics.line(x1, y1) + + if (w.config.chart.stacked) { + this.barCtx.xArrj.push(newPath.x2) + this.barCtx.xArrjF.push(Math.abs(x1 - newPath.x2)) + this.barCtx.xArrjVal.push(this.barCtx.series[i][j]) + } + return { + pathTo, + pathFrom + } + } + + /** getRoundedBars draws border radius for bars/columns + * @memberof Bar + * @param {object} w - chart context + * @param {object} opts - consists several properties like barHeight/barWidth + * @param {array} series - global primary series + * @param {int} i - current iterating series's index + * @param {int} j - series's j of i + * @return {object} pathWithRadius - ending shape path string + * newY/newX - which is calculated from existing x/y based on rounded border + **/ + getRoundedBars(w, opts, series, i, j) { + let graphics = new Graphics(this.barCtx.ctx) + let radius = 0 + + const borderRadius = w.config.plotOptions.bar.borderRadius + const borderRadiusIsArray = Array.isArray(borderRadius) + if (borderRadiusIsArray) { + const radiusIndex = + i > borderRadius.length - 1 ? borderRadius.length - 1 : i + radius = borderRadius[radiusIndex] + } else { + radius = borderRadius + } + + if ( + w.config.chart.stacked && + series.length > 1 && + i !== this.barCtx.radiusOnSeriesNumber && + !borderRadiusIsArray + ) { + radius = 0 + } + + if (this.barCtx.isHorizontal) { + let pathWithRadius = '' + let x2 = opts.x2 + + if (Math.abs(opts.x1 - opts.x2) < radius) { + radius = Math.abs(opts.x1 - opts.x2) + } + + if (typeof series[i][j] !== 'undefined' || series[i][j] !== null) { + let inverse = this.barCtx.isReversed + ? series[i][j] > 0 + : series[i][j] < 0 + + if (inverse) radius = radius * -1 + + x2 = x2 - radius + + pathWithRadius = + graphics.quadraticCurve( + x2 + radius, + opts.barYPosition, + x2 + radius, + opts.barYPosition + (!inverse ? radius : radius * -1) + ) + + graphics.line( + x2 + radius, + opts.barYPosition + + opts.barHeight - + opts.strokeWidth - + (!inverse ? radius : radius * -1) + ) + + graphics.quadraticCurve( + x2 + radius, + opts.barYPosition + opts.barHeight - opts.strokeWidth, + x2, + opts.barYPosition + opts.barHeight - opts.strokeWidth + ) + } + + return { + pathWithRadius, + x2 + } + } else { + let pathWithRadius = '' + let y2 = opts.y2 + + if (Math.abs(opts.y1 - opts.y2) < radius) { + radius = Math.abs(opts.y1 - opts.y2) + } + + if (typeof series[i][j] !== 'undefined' || series[i][j] !== null) { + let inverse = series[i][j] < 0 + + if (inverse) radius = radius * -1 + + y2 = y2 + radius + + pathWithRadius = + graphics.quadraticCurve( + opts.barXPosition, + y2 - radius, + opts.barXPosition + (!inverse ? radius : radius * -1), + y2 - radius + ) + + graphics.line( + opts.barXPosition + + opts.barWidth - + opts.strokeWidth - + (!inverse ? radius : radius * -1), + y2 - radius + ) + + graphics.quadraticCurve( + opts.barXPosition + opts.barWidth - opts.strokeWidth, + y2 - radius, + opts.barXPosition + opts.barWidth - opts.strokeWidth, + y2 + ) + } + + return { + pathWithRadius, + y2 + } + } + } + + checkZeroSeries({ series }) { + let w = this.w + for (let zs = 0; zs < series.length; zs++) { + let total = 0 + for ( + let zsj = 0; + zsj < series[w.globals.maxValsInArrayIndex].length; + zsj++ + ) { + total += series[zs][zsj] + } + if (total === 0) { + this.barCtx.zeroSerieses.push(zs) + } + } + + // After getting all zeroserieses, we need to ensure whether radiusOnSeriesNumber is not in that zeroseries array + for (let s = series.length - 1; s >= 0; s--) { + if ( + this.barCtx.zeroSerieses.indexOf(s) > -1 && + s === this.radiusOnSeriesNumber + ) { + this.barCtx.radiusOnSeriesNumber -= 1 + } + } + + for (let s = series.length - 1; s >= 0; s--) { + if ( + w.globals.collapsedSeriesIndices.indexOf( + this.barCtx.radiusOnSeriesNumber + ) > -1 + ) { + this.barCtx.radiusOnSeriesNumber -= 1 + } + } + } + + getXForValue(value, zeroW, zeroPositionForNull = true) { + let xForVal = zeroPositionForNull ? zeroW : null + if (typeof value !== 'undefined' && value !== null) { + xForVal = + zeroW + + value / this.barCtx.invertedYRatio - + (this.barCtx.isReversed ? value / this.barCtx.invertedYRatio : 0) * 2 + } + return xForVal + } + + getYForValue(value, zeroH, zeroPositionForNull = true) { + let yForVal = zeroPositionForNull ? zeroH : null + if (typeof value !== 'undefined' && value !== null) { + yForVal = + zeroH - + value / this.barCtx.yRatio[this.barCtx.yaxisIndex] + + (this.barCtx.isReversed + ? value / this.barCtx.yRatio[this.barCtx.yaxisIndex] + : 0) * + 2 + } + return yForVal + } + + getGoalValues(type, zeroW, zeroH, i, j) { + const w = this.w + + let goals = [] + if ( + w.globals.seriesGoals[i] && + w.globals.seriesGoals[i][j] && + Array.isArray(w.globals.seriesGoals[i][j]) + ) { + w.globals.seriesGoals[i][j].forEach((goal) => { + goals.push({ + [type]: + type === 'x' + ? this.getXForValue(goal.value, zeroW, false) + : this.getYForValue(goal.value, zeroH, false), + attrs: goal + }) + }) + } + return goals + } + + drawGoalLine({ + barXPosition, + barYPosition, + goalX, + goalY, + barWidth, + barHeight + }) { + let graphics = new Graphics(this.barCtx.ctx) + const lineGroup = graphics.group({ + className: 'apexcharts-bar-goals-groups' + }) + + let line = null + if (this.barCtx.isHorizontal) { + if (Array.isArray(goalX)) { + goalX.forEach((goal) => { + let sHeight = + typeof goal.attrs.strokeHeight !== 'undefined' + ? goal.attrs.strokeHeight + : barHeight / 2 + let y = barYPosition + sHeight + barHeight / 2 + + line = graphics.drawLine( + goal.x, + y - sHeight * 2, + goal.x, + y, + goal.attrs.strokeColor ? goal.attrs.strokeColor : undefined, + goal.attrs.strokeDashArray, + goal.attrs.strokeWidth ? goal.attrs.strokeWidth : 2, + goal.attrs.strokeLineCap + ) + lineGroup.add(line) + }) + } + } else { + if (Array.isArray(goalY)) { + goalY.forEach((goal) => { + let sWidth = + typeof goal.attrs.strokeWidth !== 'undefined' + ? goal.attrs.strokeWidth + : barWidth / 2 + let x = barXPosition + sWidth + barWidth / 2 + + line = graphics.drawLine( + x - sWidth * 2, + goal.y, + x, + goal.y, + goal.attrs.strokeColor ? goal.attrs.strokeColor : undefined, + goal.attrs.strokeDashArray, + goal.attrs.strokeHeight ? goal.attrs.strokeHeight : 2, + goal.attrs.strokeLineCap + ) + lineGroup.add(line) + }) + } + } + + return lineGroup + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/common/circle/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/charts/common/circle/Helpers.js new file mode 100644 index 0000000..522a353 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/common/circle/Helpers.js @@ -0,0 +1,30 @@ +import Graphics from '../../../modules/Graphics' + +export default class CircularChartsHelpers { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + drawYAxisTexts(x, y, i, text) { + const w = this.w + + const yaxisConfig = w.config.yaxis[0] + const formatter = w.globals.yLabelFormatters[0] + + const graphics = new Graphics(this.ctx) + const yaxisLabel = graphics.drawText({ + x: x + yaxisConfig.labels.offsetX, + y: y + yaxisConfig.labels.offsetY, + text: formatter(text, i), + textAnchor: 'middle', + fontSize: yaxisConfig.labels.style.fontSize, + fontFamily: yaxisConfig.labels.style.fontFamily, + foreColor: Array.isArray(yaxisConfig.labels.style.colors) + ? yaxisConfig.labels.style.colors[i] + : yaxisConfig.labels.style.colors + }) + + return yaxisLabel + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/common/line/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/charts/common/line/Helpers.js new file mode 100644 index 0000000..4aec0af --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/common/line/Helpers.js @@ -0,0 +1,149 @@ +import CoreUtils from '../../../modules/CoreUtils' +import Utils from '../../../utils/Utils' + +export default class Helpers { + constructor(lineCtx) { + this.w = lineCtx.w + this.lineCtx = lineCtx + } + + sameValueSeriesFix(i, series) { + const w = this.w + + if ( + w.config.chart.type === 'line' && + (w.config.fill.type === 'gradient' || + w.config.fill.type[i] === 'gradient') + ) { + const coreUtils = new CoreUtils(this.lineCtx.ctx, w) + + // a small adjustment to allow gradient line to draw correctly for all same values + /* #fix https://github.com/apexcharts/apexcharts.js/issues/358 */ + if (coreUtils.seriesHaveSameValues(i)) { + let gSeries = series[i].slice() + gSeries[gSeries.length - 1] = gSeries[gSeries.length - 1] + 0.000001 + series[i] = gSeries + } + } + return series + } + + calculatePoints({ series, realIndex, x, y, i, j, prevY }) { + let w = this.w + + let ptX = [] + let ptY = [] + + if (j === 0) { + let xPT1st = + this.lineCtx.categoryAxisCorrection + w.config.markers.offsetX + // the first point for line series + // we need to check whether it's not a time series, because a time series may + // start from the middle of the x axis + if (w.globals.isXNumeric) { + xPT1st = + (w.globals.seriesX[realIndex][0] - w.globals.minX) / + this.lineCtx.xRatio + + w.config.markers.offsetX + } + + // push 2 points for the first data values + ptX.push(xPT1st) + ptY.push( + Utils.isNumber(series[i][0]) ? prevY + w.config.markers.offsetY : null + ) + ptX.push(x + w.config.markers.offsetX) + ptY.push( + Utils.isNumber(series[i][j + 1]) ? y + w.config.markers.offsetY : null + ) + } else { + ptX.push(x + w.config.markers.offsetX) + ptY.push( + Utils.isNumber(series[i][j + 1]) ? y + w.config.markers.offsetY : null + ) + } + + let pointsPos = { + x: ptX, + y: ptY + } + + return pointsPos + } + + checkPreviousPaths({ pathFromLine, pathFromArea, realIndex }) { + let w = this.w + + for (let pp = 0; pp < w.globals.previousPaths.length; pp++) { + let gpp = w.globals.previousPaths[pp] + + if ( + (gpp.type === 'line' || gpp.type === 'area') && + gpp.paths.length > 0 && + parseInt(gpp.realIndex, 10) === parseInt(realIndex, 10) + ) { + if (gpp.type === 'line') { + this.lineCtx.appendPathFrom = false + pathFromLine = w.globals.previousPaths[pp].paths[0].d + } else if (gpp.type === 'area') { + this.lineCtx.appendPathFrom = false + pathFromArea = w.globals.previousPaths[pp].paths[0].d + + if (w.config.stroke.show && w.globals.previousPaths[pp].paths[1]) { + pathFromLine = w.globals.previousPaths[pp].paths[1].d + } + } + } + } + + return { + pathFromLine, + pathFromArea + } + } + + determineFirstPrevY({ i, series, prevY, lineYPosition }) { + let w = this.w + if (typeof series[i][0] !== 'undefined') { + if (w.config.chart.stacked) { + if (i > 0) { + // 1st y value of previous series + lineYPosition = this.lineCtx.prevSeriesY[i - 1][0] + } else { + // the first series will not have prevY values + lineYPosition = this.lineCtx.zeroY + } + } else { + lineYPosition = this.lineCtx.zeroY + } + prevY = + lineYPosition - + series[i][0] / this.lineCtx.yRatio[this.lineCtx.yaxisIndex] + + (this.lineCtx.isReversed + ? series[i][0] / this.lineCtx.yRatio[this.lineCtx.yaxisIndex] + : 0) * + 2 + } else { + // the first value in the current series is null + if ( + w.config.chart.stacked && + i > 0 && + typeof series[i][0] === 'undefined' + ) { + // check for undefined value (undefined value will occur when we clear the series while user clicks on legend to hide serieses) + for (let s = i - 1; s >= 0; s--) { + // for loop to get to 1st previous value until we get it + if (series[s][0] !== null && typeof series[s][0] !== 'undefined') { + lineYPosition = this.lineCtx.prevSeriesY[s][0] + prevY = lineYPosition + break + } + } + } + } + return { + prevY, + lineYPosition + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/charts/common/treemap/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/charts/common/treemap/Helpers.js new file mode 100644 index 0000000..c518cc7 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/charts/common/treemap/Helpers.js @@ -0,0 +1,192 @@ +import Utils from '../../../utils/Utils' +import Graphics from '../../../modules/Graphics' +import DataLabels from '../../../modules/DataLabels' + +export default class TreemapHelpers { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + checkColorRange() { + const w = this.w + + let negRange = false + let chartOpts = w.config.plotOptions[w.config.chart.type] + + if (chartOpts.colorScale.ranges.length > 0) { + chartOpts.colorScale.ranges.map((range, index) => { + if (range.from <= 0) { + negRange = true + } + }) + } + return negRange + } + + getShadeColor(chartType, i, j, negRange) { + const w = this.w + + let colorShadePercent = 1 + let shadeIntensity = w.config.plotOptions[chartType].shadeIntensity + + const colorProps = this.determineColor(chartType, i, j) + + if (w.globals.hasNegs || negRange) { + if (w.config.plotOptions[chartType].reverseNegativeShade) { + if (colorProps.percent < 0) { + colorShadePercent = + (colorProps.percent / 100) * (shadeIntensity * 1.25) + } else { + colorShadePercent = + (1 - colorProps.percent / 100) * (shadeIntensity * 1.25) + } + } else { + if (colorProps.percent <= 0) { + colorShadePercent = + 1 - (1 + colorProps.percent / 100) * shadeIntensity + } else { + colorShadePercent = (1 - colorProps.percent / 100) * shadeIntensity + } + } + } else { + colorShadePercent = 1 - colorProps.percent / 100 + if (chartType === 'treemap') { + colorShadePercent = + (1 - colorProps.percent / 100) * (shadeIntensity * 1.25) + } + } + + let color = colorProps.color + let utils = new Utils() + + if (w.config.plotOptions[chartType].enableShades) { + if (this.w.config.theme.mode === 'dark') { + color = Utils.hexToRgba( + utils.shadeColor(colorShadePercent * -1, colorProps.color), + w.config.fill.opacity + ) + } else { + color = Utils.hexToRgba( + utils.shadeColor(colorShadePercent, colorProps.color), + w.config.fill.opacity + ) + } + } + + return { color, colorProps } + } + + determineColor(chartType, i, j) { + const w = this.w + + let val = w.globals.series[i][j] + + let chartOpts = w.config.plotOptions[chartType] + + let seriesNumber = chartOpts.colorScale.inverse ? j : i + + if (chartOpts.distributed && w.config.chart.type === 'treemap') { + seriesNumber = j + } + + let color = w.globals.colors[seriesNumber] + let foreColor = null + let min = Math.min(...w.globals.series[i]) + let max = Math.max(...w.globals.series[i]) + + if (!chartOpts.distributed && chartType === 'heatmap') { + min = w.globals.minY + max = w.globals.maxY + } + + if (typeof chartOpts.colorScale.min !== 'undefined') { + min = + chartOpts.colorScale.min < w.globals.minY + ? chartOpts.colorScale.min + : w.globals.minY + max = + chartOpts.colorScale.max > w.globals.maxY + ? chartOpts.colorScale.max + : w.globals.maxY + } + + let total = Math.abs(max) + Math.abs(min) + + let percent = (100 * val) / (total === 0 ? total - 0.000001 : total) + + if (chartOpts.colorScale.ranges.length > 0) { + const colorRange = chartOpts.colorScale.ranges + colorRange.map((range, index) => { + if (val >= range.from && val <= range.to) { + color = range.color + foreColor = range.foreColor ? range.foreColor : null + min = range.from + max = range.to + let rTotal = Math.abs(max) + Math.abs(min) + percent = (100 * val) / (rTotal === 0 ? rTotal - 0.000001 : rTotal) + } + }) + } + + return { + color, + foreColor, + percent + } + } + + calculateDataLabels({ text, x, y, i, j, colorProps, fontSize }) { + let w = this.w + let dataLabelsConfig = w.config.dataLabels + + const graphics = new Graphics(this.ctx) + + let dataLabels = new DataLabels(this.ctx) + + let elDataLabelsWrap = null + + if (dataLabelsConfig.enabled) { + elDataLabelsWrap = graphics.group({ + class: 'apexcharts-data-labels' + }) + + const offX = dataLabelsConfig.offsetX + const offY = dataLabelsConfig.offsetY + + let dataLabelsX = x + offX + let dataLabelsY = + y + parseFloat(dataLabelsConfig.style.fontSize) / 3 + offY + + dataLabels.plotDataLabelsText({ + x: dataLabelsX, + y: dataLabelsY, + text, + i, + j, + color: colorProps.foreColor, + parent: elDataLabelsWrap, + fontSize, + dataLabelsConfig + }) + } + + return elDataLabelsWrap + } + + addListeners(elRect) { + const graphics = new Graphics(this.ctx) + elRect.node.addEventListener( + 'mouseenter', + graphics.pathMouseEnter.bind(this, elRect) + ) + elRect.node.addEventListener( + 'mouseleave', + graphics.pathMouseLeave.bind(this, elRect) + ) + elRect.node.addEventListener( + 'mousedown', + graphics.pathMouseDown.bind(this, elRect) + ) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/libs/Treemap-squared.js b/cao_sunyata/static/libs/apexcharts/src/libs/Treemap-squared.js new file mode 100644 index 0000000..a9ae841 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/libs/Treemap-squared.js @@ -0,0 +1,290 @@ +/* + * treemap-squarify.js - open source implementation of squarified treemaps + * + * Treemap Squared 0.5 - Treemap Charting library + * + * https://github.com/imranghory/treemap-squared/ + * + * Copyright (c) 2012 Imran Ghory (imranghory@gmail.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + * + * + * Implementation of the squarify treemap algorithm described in: + * + * Bruls, Mark; Huizing, Kees; van Wijk, Jarke J. (2000), "Squarified treemaps" + * in de Leeuw, W.; van Liere, R., Data Visualization 2000: + * Proc. Joint Eurographics and IEEE TCVG Symp. on Visualization, Springer-Verlag, pp. 33–42. + * + * Paper is available online at: http://www.win.tue.nl/~vanwijk/stm.pdf + * + * The code in this file is completeley decoupled from the drawing code so it should be trivial + * to port it to any other vector drawing library. Given an array of datapoints this library returns + * an array of cartesian coordinates that represent the rectangles that make up the treemap. + * + * The library also supports multidimensional data (nested treemaps) and performs normalization on the data. + * + * See the README file for more details. + */ + +window.TreemapSquared = {} +;(function() { + 'use strict' + window.TreemapSquared.generate = (function() { + function Container(xoffset, yoffset, width, height) { + this.xoffset = xoffset // offset from the the top left hand corner + this.yoffset = yoffset // ditto + this.height = height + this.width = width + + this.shortestEdge = function() { + return Math.min(this.height, this.width) + } + + // getCoordinates - for a row of boxes which we've placed + // return an array of their cartesian coordinates + this.getCoordinates = function(row) { + let coordinates = [] + let subxoffset = this.xoffset, + subyoffset = this.yoffset //our offset within the container + let areawidth = sumArray(row) / this.height + let areaheight = sumArray(row) / this.width + let i + + if (this.width >= this.height) { + for (i = 0; i < row.length; i++) { + coordinates.push([ + subxoffset, + subyoffset, + subxoffset + areawidth, + subyoffset + row[i] / areawidth + ]) + subyoffset = subyoffset + row[i] / areawidth + } + } else { + for (i = 0; i < row.length; i++) { + coordinates.push([ + subxoffset, + subyoffset, + subxoffset + row[i] / areaheight, + subyoffset + areaheight + ]) + subxoffset = subxoffset + row[i] / areaheight + } + } + return coordinates + } + + // cutArea - once we've placed some boxes into an row we then need to identify the remaining area, + // this function takes the area of the boxes we've placed and calculates the location and + // dimensions of the remaining space and returns a container box defined by the remaining area + this.cutArea = function(area) { + let newcontainer + + if (this.width >= this.height) { + let areawidth = area / this.height + let newwidth = this.width - areawidth + newcontainer = new Container( + this.xoffset + areawidth, + this.yoffset, + newwidth, + this.height + ) + } else { + let areaheight = area / this.width + let newheight = this.height - areaheight + newcontainer = new Container( + this.xoffset, + this.yoffset + areaheight, + this.width, + newheight + ) + } + return newcontainer + } + } + + // normalize - the Bruls algorithm assumes we're passing in areas that nicely fit into our + // container box, this method takes our raw data and normalizes the data values into + // area values so that this assumption is valid. + function normalize(data, area) { + let normalizeddata = [] + let sum = sumArray(data) + let multiplier = area / sum + let i + + for (i = 0; i < data.length; i++) { + normalizeddata[i] = data[i] * multiplier + } + return normalizeddata + } + + // treemapMultidimensional - takes multidimensional data (aka [[23,11],[11,32]] - nested array) + // and recursively calls itself using treemapSingledimensional + // to create a patchwork of treemaps and merge them + function treemapMultidimensional(data, width, height, xoffset, yoffset) { + xoffset = typeof xoffset === 'undefined' ? 0 : xoffset + yoffset = typeof yoffset === 'undefined' ? 0 : yoffset + + let mergeddata = [] + let mergedtreemap + let results = [] + let i + + if (isArray(data[0])) { + // if we've got more dimensions of depth + for (i = 0; i < data.length; i++) { + mergeddata[i] = sumMultidimensionalArray(data[i]) + } + mergedtreemap = treemapSingledimensional( + mergeddata, + width, + height, + xoffset, + yoffset + ) + + for (i = 0; i < data.length; i++) { + results.push( + treemapMultidimensional( + data[i], + mergedtreemap[i][2] - mergedtreemap[i][0], + mergedtreemap[i][3] - mergedtreemap[i][1], + mergedtreemap[i][0], + mergedtreemap[i][1] + ) + ) + } + } else { + results = treemapSingledimensional( + data, + width, + height, + xoffset, + yoffset + ) + } + return results + } + + // treemapSingledimensional - simple wrapper around squarify + function treemapSingledimensional(data, width, height, xoffset, yoffset) { + xoffset = typeof xoffset === 'undefined' ? 0 : xoffset + yoffset = typeof yoffset === 'undefined' ? 0 : yoffset + + let rawtreemap = squarify( + normalize(data, width * height), + [], + new Container(xoffset, yoffset, width, height), + [] + ) + return flattenTreemap(rawtreemap) + } + + // flattenTreemap - squarify implementation returns an array of arrays of coordinates + // because we have a new array everytime we switch to building a new row + // this converts it into an array of coordinates. + function flattenTreemap(rawtreemap) { + let flattreemap = [] + let i, j + + for (i = 0; i < rawtreemap.length; i++) { + for (j = 0; j < rawtreemap[i].length; j++) { + flattreemap.push(rawtreemap[i][j]) + } + } + return flattreemap + } + + // squarify - as per the Bruls paper + // plus coordinates stack and containers so we get + // usable data out of it + function squarify(data, currentrow, container, stack) { + let length + let nextdatapoint + let newcontainer + + if (data.length === 0) { + stack.push(container.getCoordinates(currentrow)) + return + } + + length = container.shortestEdge() + nextdatapoint = data[0] + + if (improvesRatio(currentrow, nextdatapoint, length)) { + currentrow.push(nextdatapoint) + squarify(data.slice(1), currentrow, container, stack) + } else { + newcontainer = container.cutArea(sumArray(currentrow), stack) + stack.push(container.getCoordinates(currentrow)) + squarify(data, [], newcontainer, stack) + } + return stack + } + + // improveRatio - implements the worse calculation and comparision as given in Bruls + // (note the error in the original paper; fixed here) + function improvesRatio(currentrow, nextnode, length) { + let newrow + + if (currentrow.length === 0) { + return true + } + + newrow = currentrow.slice() + newrow.push(nextnode) + + let currentratio = calculateRatio(currentrow, length) + let newratio = calculateRatio(newrow, length) + + // the pseudocode in the Bruls paper has the direction of the comparison + // wrong, this is the correct one. + return currentratio >= newratio + } + + // calculateRatio - calculates the maximum width to height ratio of the + // boxes in this row + function calculateRatio(row, length) { + let min = Math.min.apply(Math, row) + let max = Math.max.apply(Math, row) + let sum = sumArray(row) + return Math.max( + (Math.pow(length, 2) * max) / Math.pow(sum, 2), + Math.pow(sum, 2) / (Math.pow(length, 2) * min) + ) + } + + // isArray - checks if arr is an array + function isArray(arr) { + return arr && arr.constructor === Array + } + + // sumArray - sums a single dimensional array + function sumArray(arr) { + let sum = 0 + let i + + for (i = 0; i < arr.length; i++) { + sum += arr[i] + } + return sum + } + + // sumMultidimensionalArray - sums the values in a nested array (aka [[0,1],[[2,3]]]) + function sumMultidimensionalArray(arr) { + let i, + total = 0 + + if (isArray(arr[0])) { + for (i = 0; i < arr.length; i++) { + total += sumMultidimensionalArray(arr[i]) + } + } else { + total = sumArray(arr) + } + return total + } + + return treemapMultidimensional + })() +})() diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ar.json b/cao_sunyata/static/libs/apexcharts/src/locales/ar.json new file mode 100644 index 0000000..f13eab3 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ar.json @@ -0,0 +1,63 @@ +{ +"name": "ar", +"options": { +"months": [ +"يناير", +"فبراير", +"مارس", +"أبريل", +"مايو", +"يونيو", +"يوليو", +"أغسطس", +"سبتمبر", +"أكتوبر", +"نوفمبر", +"ديسمبر" +], +"shortMonths": [ +"يناير", +"فبراير", +"مارس", +"أبريل", +"مايو", +"يونيو", +"يوليو", +"أغسطس", +"سبتمبر", +"أكتوبر", +"نوفمبر", +"ديسمبر" +], +"days": [ +"الأحد", +"الإثنين", +"الثلاثاء", +"الأربعاء", +"الخميس", +"الجمعة", +"السبت" +], +"shortDays": [ +"أحد", +"إثنين", +"ثلاثاء", +"أربعاء", +"خميس", +"جمعة", +"سبت" +], +"toolbar": { +"exportToSVG": "تحميل بصيغة SVG", +"exportToPNG": "تحميل بصيغة PNG", +"exportToCSV": "تحميل بصيغة CSV", +"menu": "القائمة", +"selection": "تحديد", +"selectionZoom": "تكبير التحديد", +"zoomIn": "تكبير", +"zoomOut": "تصغير", +"pan": "تحريك", +"reset": "إعادة التعيين" +} +} +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ca.json b/cao_sunyata/static/libs/apexcharts/src/locales/ca.json new file mode 100644 index 0000000..cef7d1a --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ca.json @@ -0,0 +1,55 @@ +{ + "name": "ca", + "options": { + "months": [ + "Gener", + "Febrer", + "Març", + "Abril", + "Maig", + "Juny", + "Juliol", + "Agost", + "Setembre", + "Octubre", + "Novembre", + "Desembre" + ], + "shortMonths": [ + "Gen.", + "Febr.", + "Març", + "Abr.", + "Maig", + "Juny", + "Jul.", + "Ag.", + "Set.", + "Oct.", + "Nov.", + "Des." + ], + "days": [ + "Diumenge", + "Dilluns", + "Dimarts", + "Dimecres", + "Dijous", + "Divendres", + "Dissabte" + ], + "shortDays": ["Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"], + "toolbar": { + "exportToSVG": "Descarregar SVG", + "exportToPNG": "Descarregar PNG", + "exportToCSV": "Descarregar CSV", + "menu": "Menú", + "selection": "Seleccionar", + "selectionZoom": "Seleccionar Zoom", + "zoomIn": "Augmentar", + "zoomOut": "Disminuir", + "pan": "Navegació", + "reset": "Reiniciar Zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/cs.json b/cao_sunyata/static/libs/apexcharts/src/locales/cs.json new file mode 100644 index 0000000..b8d9d40 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/cs.json @@ -0,0 +1,55 @@ +{ + "name": "cs", + "options": { + "months": [ + "Leden", + "Únor", + "Březen", + "Duben", + "Květen", + "Červen", + "Červenec", + "Srpen", + "Září", + "Říjen", + "Listopad", + "Prosinec" + ], + "shortMonths": [ + "Led", + "Úno", + "Bře", + "Dub", + "Kvě", + "Čvn", + "Čvc", + "Srp", + "Zář", + "Říj", + "Lis", + "Pro" + ], + "days": [ + "Neděle", + "Pondělí", + "Úterý", + "Středa", + "Čtvrtek", + "Pátek", + "Sobota" + ], + "shortDays": ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"], + "toolbar": { + "exportToSVG": "Stáhnout SVG", + "exportToPNG": "Stáhnout PNG", + "exportToCSV": "Stáhnout CSV", + "menu": "Menu", + "selection": "Vybrat", + "selectionZoom": "Zoom: Vybrat", + "zoomIn": "Zoom: Přiblížit", + "zoomOut": "Zoom: Oddálit", + "pan": "Přesouvat", + "reset": "Resetovat" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/de.json b/cao_sunyata/static/libs/apexcharts/src/locales/de.json new file mode 100644 index 0000000..af625e3 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/de.json @@ -0,0 +1,55 @@ +{ + "name": "de", + "options": { + "months": [ + "Januar", + "Februar", + "März", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mär", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez" + ], + "days": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], + "toolbar": { + "exportToSVG": "SVG speichern", + "exportToPNG": "PNG speichern", + "exportToCSV": "CSV speichern", + "menu": "Menü", + "selection": "Auswahl", + "selectionZoom": "Auswahl vergrößern", + "zoomIn": "Vergrößern", + "zoomOut": "Verkleinern", + "pan": "Verschieben", + "reset": "Zoom zurücksetzen" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/el.json b/cao_sunyata/static/libs/apexcharts/src/locales/el.json new file mode 100644 index 0000000..e547e54 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/el.json @@ -0,0 +1,55 @@ +{ + "name": "el", + "options": { + "months": [ + "Ιανουάριος", + "Φεβρουάριος", + "Μάρτιος", + "Απρίλιος", + "Μάιος", + "Ιούνιος", + "Ιούλιος", + "Αύγουστος", + "Σεπτέμβριος", + "Οκτώβριος", + "Νοέμβριος", + "Δεκέμβριος" + ], + "shortMonths": [ + "Ιαν", + "Φευ", + "Μαρ", + "Απρ", + "Μάι", + "Ιουν", + "Ιουλ", + "Αυγ", + "Σεπ", + "Οκτ", + "Νοε", + "Δεκ" + ], + "days": [ + "Κυριακή", + "Δευτέρα", + "Τρίτη", + "Τετάρτη", + "Πέμπτη", + "Παρασκευή", + "Σάββατο" + ], + "shortDays": ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"], + "toolbar": { + "exportToSVG": "Λήψη SVG", + "exportToPNG": "Λήψη PNG", + "exportToCSV": "Λήψη CSV", + "menu": "Menu", + "selection": "Επιλογή", + "selectionZoom": "Μεγένθυση βάση επιλογής", + "zoomIn": "Μεγένθυνση", + "zoomOut": "Σμίκρυνση", + "pan": "Μετατόπιση", + "reset": "Επαναφορά μεγένθυνσης" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/en.json b/cao_sunyata/static/libs/apexcharts/src/locales/en.json new file mode 100644 index 0000000..7b12481 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/en.json @@ -0,0 +1,55 @@ +{ + "name": "en", + "options": { + "months": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "days": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + "toolbar": { + "exportToSVG": "Download SVG", + "exportToPNG": "Download PNG", + "exportToCSV": "Download CSV", + "menu": "Menu", + "selection": "Selection", + "selectionZoom": "Selection Zoom", + "zoomIn": "Zoom In", + "zoomOut": "Zoom Out", + "pan": "Panning", + "reset": "Reset Zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/es.json b/cao_sunyata/static/libs/apexcharts/src/locales/es.json new file mode 100644 index 0000000..8c465f6 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/es.json @@ -0,0 +1,55 @@ +{ + "name": "es", + "options": { + "months": [ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre" + ], + "shortMonths": [ + "Ene", + "Feb", + "Mar", + "Abr", + "May", + "Jun", + "Jul", + "Ago", + "Sep", + "Oct", + "Nov", + "Dic" + ], + "days": [ + "Domingo", + "Lunes", + "Martes", + "Miércoles", + "Jueves", + "Viernes", + "Sábado" + ], + "shortDays": ["Dom", "Lun", "Mar", "Mie", "Jue", "Vie", "Sab"], + "toolbar": { + "exportToSVG": "Descargar SVG", + "exportToPNG": "Descargar PNG", + "exportToCSV": "Descargar CSV", + "menu": "Menu", + "selection": "Seleccionar", + "selectionZoom": "Seleccionar Zoom", + "zoomIn": "Aumentar", + "zoomOut": "Disminuir", + "pan": "Navegación", + "reset": "Reiniciar Zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/et.json b/cao_sunyata/static/libs/apexcharts/src/locales/et.json new file mode 100644 index 0000000..5aa5248 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/et.json @@ -0,0 +1,63 @@ +{ + "name": "et", + "options": { + "months": [ + "jaanuar", + "veebruar", + "märts", + "aprill", + "mai", + "juuni", + "juuli", + "august", + "september", + "oktoober", + "november", + "detsember" + ], + "shortMonths": [ + "jaan", + "veebr", + "märts", + "apr", + "mai", + "juuni", + "juuli", + "aug", + "sept", + "okt", + "nov", + "dets" + ], + "days": [ + "pühapäev", + "esmaspäev", + "teisipäev", + "kolmapäev", + "neljapäev", + "reede", + "laupäev" + ], + "shortDays": [ + "P", + "E", + "T", + "K", + "N", + "R", + "L" + ], + "toolbar": { + "exportToSVG": "Lae alla SVG", + "exportToPNG": "Lae alla PNG", + "exportToCSV": "Lae alla CSV", + "menu": "Menüü", + "selection": "Valik", + "selectionZoom": "Valiku suum", + "zoomIn": "Suurenda", + "zoomOut": "Vähenda", + "pan": "Panoraamimine", + "reset": "Lähtesta suum" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/fa.json b/cao_sunyata/static/libs/apexcharts/src/locales/fa.json new file mode 100644 index 0000000..a4c38f7 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/fa.json @@ -0,0 +1,55 @@ +{ + "name": "fa", + "options": { + "months": [ + "فروردین", + "اردیبهشت", + "خرداد", + "تیر", + "مرداد", + "شهریور", + "مهر", + "آبان", + "آذر", + "دی", + "بهمن", + "اسفند" + ], + "shortMonths": [ + "فرو", + "ارد", + "خرد", + "تیر", + "مرد", + "شهر", + "مهر", + "آبا", + "آذر", + "دی", + "بهمـ", + "اسفـ" + ], + "days": [ + "یکشنبه", + "دوشنبه", + "سه شنبه", + "چهارشنبه", + "پنجشنبه", + "جمعه", + "شنبه" + ], + "shortDays": ["ی", "د", "س", "چ", "پ", "ج", "ش"], + "toolbar": { + "exportToSVG": "دانلود SVG", + "exportToPNG": "دانلود PNG", + "exportToCSV": "دانلود CSV", + "menu": "منو", + "selection": "انتخاب", + "selectionZoom": "بزرگنمایی انتخابی", + "zoomIn": "بزرگنمایی", + "zoomOut": "کوچکنمایی", + "pan": "پیمایش", + "reset": "بازنشانی بزرگنمایی" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/fi.json b/cao_sunyata/static/libs/apexcharts/src/locales/fi.json new file mode 100644 index 0000000..73df095 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/fi.json @@ -0,0 +1,55 @@ +{ + "name": "fi", + "options": { + "months": [ + "Tammikuu", + "Helmikuu", + "Maaliskuu", + "Huhtikuu", + "Toukokuu", + "Kesäkuu", + "Heinäkuu", + "Elokuu", + "Syyskuu", + "Lokakuu", + "Marraskuu", + "Joulukuu" + ], + "shortMonths": [ + "Tammi", + "Helmi", + "Maalis", + "Huhti", + "Touko", + "Kesä", + "Heinä", + "Elo", + "Syys", + "Loka", + "Marras", + "Joulu" + ], + "days": [ + "Sunnuntai", + "Maanantai", + "Tiistai", + "Keskiviikko", + "Torstai", + "Perjantai", + "Lauantai" + ], + "shortDays": ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"], + "toolbar": { + "exportToSVG": "Lataa SVG", + "exportToPNG": "Lataa PNG", + "exportToCSV": "Lataa CSV", + "menu": "Valikko", + "selection": "Valinta", + "selectionZoom": "Valinnan zoomaus", + "zoomIn": "Lähennä", + "zoomOut": "Loitonna", + "pan": "Panoroi", + "reset": "Nollaa zoomaus" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/fr.json b/cao_sunyata/static/libs/apexcharts/src/locales/fr.json new file mode 100644 index 0000000..959ce0b --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/fr.json @@ -0,0 +1,55 @@ +{ + "name": "fr", + "options": { + "months": [ + "janvier", + "février", + "mars", + "avril", + "mai", + "juin", + "juillet", + "août", + "septembre", + "octobre", + "novembre", + "décembre" + ], + "shortMonths": [ + "janv.", + "févr.", + "mars", + "avr.", + "mai", + "juin", + "juill.", + "août", + "sept.", + "oct.", + "nov.", + "déc." + ], + "days": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "shortDays": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], + "toolbar": { + "exportToSVG": "Télécharger au format SVG", + "exportToPNG": "Télécharger au format PNG", + "exportToCSV": "Télécharger au format CSV", + "menu": "Menu", + "selection": "Sélection", + "selectionZoom": "Sélection et zoom", + "zoomIn": "Zoomer", + "zoomOut": "Dézoomer", + "pan": "Navigation", + "reset": "Réinitialiser le zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/he.json b/cao_sunyata/static/libs/apexcharts/src/locales/he.json new file mode 100644 index 0000000..bafff3e --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/he.json @@ -0,0 +1,55 @@ +{ + "name": "he", + "options": { + "months": [ + "ינואר", + "פברואר", + "מרץ", + "אפריל", + "מאי", + "יוני", + "יולי", + "אוגוסט", + "ספטמבר", + "אוקטובר", + "נובמבר", + "דצמבר" + ], + "shortMonths": [ + "ינו׳", + "פבר׳", + "מרץ", + "אפר׳", + "מאי", + "יוני", + "יולי", + "אוג׳", + "ספט׳", + "אוק׳", + "נוב׳", + "דצמ׳" + ], + "days": [ + "ראשון", + "שני", + "שלישי", + "רביעי", + "חמישי", + "שישי", + "שבת" + ], + "shortDays": ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"], + "toolbar": { + "exportToSVG": "הורד SVG", + "exportToPNG": "הורד PNG", + "exportToCSV": "הורד CSV", + "menu": "תפריט", + "selection": "בחירה", + "selectionZoom": "זום בחירה", + "zoomIn": "הגדלה", + "zoomOut": "הקטנה", + "pan": "הזזה", + "reset": "איפוס תצוגה" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/hi.json b/cao_sunyata/static/libs/apexcharts/src/locales/hi.json new file mode 100644 index 0000000..2191342 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/hi.json @@ -0,0 +1,55 @@ +{ + "name": "hi", + "options": { + "months": [ + "जनवरी", + "फ़रवरी", + "मार्च", + "अप्रैल", + "मई", + "जून", + "जुलाई", + "अगस्त", + "सितंबर", + "अक्टूबर", + "नवंबर", + "दिसंबर" + ], + "shortMonths": [ + "जनवरी", + "फ़रवरी", + "मार्च", + "अप्रैल", + "मई", + "जून", + "जुलाई", + "अगस्त", + "सितंबर", + "अक्टूबर", + "नवंबर", + "दिसंबर" + ], + "days": [ + "रविवार", + "सोमवार", + "मंगलवार", + "बुधवार", + "गुरुवार", + "शुक्रवार", + "शनिवार" + ], + "shortDays": ["रवि", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"], + "toolbar": { + "exportToSVG": "निर्यात SVG", + "exportToPNG": "निर्यात PNG", + "exportToCSV": "निर्यात CSV", + "menu": "सूची", + "selection": "चयन", + "selectionZoom": "ज़ूम करना", + "zoomIn": "ज़ूम इन", + "zoomOut": "ज़ूम आउट", + "pan": "पैनिंग", + "reset": "फिर से कायम करना" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/hr.json b/cao_sunyata/static/libs/apexcharts/src/locales/hr.json new file mode 100644 index 0000000..52ab2fc --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/hr.json @@ -0,0 +1,55 @@ +{ + "name": "hr", + "options": { + "months": [ + "Siječanj", + "Veljača", + "Ožujak", + "Travanj", + "Svibanj", + "Lipanj", + "Srpanj", + "Kolovoz", + "Rujan", + "Listopad", + "Studeni", + "Prosinac" + ], + "shortMonths": [ + "Sij", + "Velj", + "Ožu", + "Tra", + "Svi", + "Lip", + "Srp", + "Kol", + "Ruj", + "Lis", + "Stu", + "Pro" + ], + "days": [ + "Nedjelja", + "Ponedjeljak", + "Utorak", + "Srijeda", + "Četvrtak", + "Petak", + "Subota" + ], + "shortDays": ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], + "toolbar": { + "exportToSVG": "Preuzmi SVG", + "exportToPNG": "Preuzmi PNG", + "exportToCSV": "Preuzmi CSV", + "menu": "Izbornik", + "selection": "Odabir", + "selectionZoom": "Odabirno povećanje", + "zoomIn": "Uvećajte prikaz", + "zoomOut": "Umanjite prikaz", + "pan": "Pomicanje", + "reset": "Povratak na zadani prikaz" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/hu.json b/cao_sunyata/static/libs/apexcharts/src/locales/hu.json new file mode 100644 index 0000000..04142a0 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/hu.json @@ -0,0 +1,64 @@ +{ + "name": "hu", + "options": { + "months": [ + "január", + "február", + "március", + "április", + "május", + "június", + "július", + "augusztus", + "szeptember", + "október", + "november", + "december" + ], + "shortMonths": [ + "jan", + "feb", + "mar", + "ápr", + "máj", + "jún", + "júl", + "aug", + "szept", + "okt", + "nov", + "dec" + ], + "days": [ + "hétfő", + "kedd", + "szerda", + "csütörtök", + "péntek", + "szombat", + "vasárnap" + ], + "shortDays": [ + "H", + "K", + "Sze", + "Cs", + "P", + "Szo", + "V" + ], + "toolbar": { + "exportToSVG": "Exportálás SVG-be", + "exportToPNG": "Exportálás PNG-be", + "exportToCSV": "Exportálás CSV-be", + "menu": "Fő ajánlat", + "download": "SVG letöltése", + "selection": "Kiválasztás", + "selectionZoom": "Nagyító kiválasztása", + "zoomIn": "Nagyítás", + "zoomOut": "Kicsinyítés", + "pan": "Képcsúsztatás", + "reset": "Nagyító visszaállítása" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/hy.json b/cao_sunyata/static/libs/apexcharts/src/locales/hy.json new file mode 100644 index 0000000..cdbe469 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/hy.json @@ -0,0 +1,55 @@ +{ + "name": "hy", + "options": { + "months": [ + "Հունվար", + "Փետրվար", + "Մարտ", + "Ապրիլ", + "Մայիս", + "Հունիս", + "Հուլիս", + "Օգոստոս", + "Սեպտեմբեր", + "Հոկտեմբեր", + "Նոյեմբեր", + "Դեկտեմբեր" + ], + "shortMonths": [ + "Հնվ", + "Փտվ", + "Մրտ", + "Ապր", + "Մյս", + "Հնս", + "Հլիս", + "Օգս", + "Սեպ", + "Հոկ", + "Նոյ", + "Դեկ" + ], + "days": [ + "Կիրակի", + "Երկուշաբթի", + "Երեքշաբթի", + "Չորեքշաբթի", + "Հինգշաբթի", + "Ուրբաթ", + "Շաբաթ" + ], + "shortDays": ["Կիր", "Երկ", "Երք", "Չրք", "Հնգ", "Ուրբ", "Շբթ"], + "toolbar": { + "exportToSVG": "Բեռնել SVG", + "exportToPNG": "Բեռնել PNG", + "exportToCSV": "Բեռնել CSV", + "menu": "Մենյու", + "selection": "Ընտրված", + "selectionZoom": "Ընտրված հատվածի խոշորացում", + "zoomIn": "Խոշորացնել", + "zoomOut": "Մանրացնել", + "pan": "Տեղափոխում", + "reset": "Բերել սկզբնական վիճակի" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/id.json b/cao_sunyata/static/libs/apexcharts/src/locales/id.json new file mode 100644 index 0000000..52a34b6 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/id.json @@ -0,0 +1,47 @@ +{ + "name": "id", + "options": { + "months": [ + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Agu", + "Sep", + "Okt", + "Nov", + "Des" + ], + "days": ["Minggu", "Senin", "Selasa", "Rabu", "kamis", "Jumat", "Sabtu"], + "shortDays": ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"], + "toolbar": { + "exportToSVG": "Unduh SVG", + "exportToPNG": "Unduh PNG", + "exportToCSV": "Unduh CSV", + "menu": "Menu", + "selection": "Pilihan", + "selectionZoom": "Perbesar Pilihan", + "zoomIn": "Perbesar", + "zoomOut": "Perkecil", + "pan": "Geser", + "reset": "Atur Ulang Zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/it.json b/cao_sunyata/static/libs/apexcharts/src/locales/it.json new file mode 100644 index 0000000..7facfea --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/it.json @@ -0,0 +1,55 @@ +{ + "name": "it", + "options": { + "months": [ + "Gennaio", + "Febbraio", + "Marzo", + "Aprile", + "Maggio", + "Giugno", + "Luglio", + "Agosto", + "Settembre", + "Ottobre", + "Novembre", + "Dicembre" + ], + "shortMonths": [ + "Gen", + "Feb", + "Mar", + "Apr", + "Mag", + "Giu", + "Lug", + "Ago", + "Set", + "Ott", + "Nov", + "Dic" + ], + "days": [ + "Domenica", + "Lunedì", + "Martedì", + "Mercoledì", + "Giovedì", + "Venerdì", + "Sabato" + ], + "shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + "toolbar": { + "exportToSVG": "Scarica SVG", + "exportToPNG": "Scarica PNG", + "exportToCSV": "Scarica CSV", + "menu": "Menu", + "selection": "Selezione", + "selectionZoom": "Seleziona Zoom", + "zoomIn": "Zoom In", + "zoomOut": "Zoom Out", + "pan": "Sposta", + "reset": "Reimposta Zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ja.json b/cao_sunyata/static/libs/apexcharts/src/locales/ja.json new file mode 100644 index 0000000..2b3af52 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ja.json @@ -0,0 +1,55 @@ +{ + "name": "ja", + "options": { + "months": [ + "1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月" + ], + "shortMonths": [ + "1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月" + ], + "days": [ + "日曜日", + "月曜日", + "火曜日", + "水曜日", + "木曜日", + "金曜日", + "土曜日" + ], + "shortDays": ["日", "月", "火", "水", "木", "金", "土"], + "toolbar": { + "exportToSVG": "SVGダウンロード", + "exportToPNG": "PNGダウンロード", + "exportToCSV": "CSVダウンロード", + "menu": "メニュー", + "selection": "選択", + "selectionZoom": "選択ズーム", + "zoomIn": "拡大", + "zoomOut": "縮小", + "pan": "パン", + "reset": "ズームリセット" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ka.json b/cao_sunyata/static/libs/apexcharts/src/locales/ka.json new file mode 100644 index 0000000..b3c8a0f --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ka.json @@ -0,0 +1,55 @@ +{ + "name": "ka", + "options": { + "months": [ + "იანვარი", + "თებერვალი", + "მარტი", + "აპრილი", + "მაისი", + "ივნისი", + "ივლისი", + "აგვისტო", + "სექტემბერი", + "ოქტომბერი", + "ნოემბერი", + "დეკემბერი" + ], + "shortMonths": [ + "იან", + "თებ", + "მარ", + "აპრ", + "მაი", + "ივნ", + "ივლ", + "აგვ", + "სექ", + "ოქტ", + "ნოე", + "დეკ" + ], + "days": [ + "კვირა", + "ორშაბათი", + "სამშაბათი", + "ოთხშაბათი", + "ხუთშაბათი", + "პარასკევი", + "შაბათი" + ], + "shortDays": ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"], + "toolbar": { + "exportToSVG": "გადმოქაჩე SVG", + "exportToPNG": "გადმოქაჩე PNG", + "exportToCSV": "გადმოქაჩე CSV", + "menu": "მენიუ", + "selection": "არჩევა", + "selectionZoom": "არჩეულის გადიდება", + "zoomIn": "გადიდება", + "zoomOut": "დაპატარაება", + "pan": "გადაჩოჩება", + "reset": "გადიდების გაუქმება" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ko.json b/cao_sunyata/static/libs/apexcharts/src/locales/ko.json new file mode 100644 index 0000000..181196d --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ko.json @@ -0,0 +1,55 @@ +{ + "name": "ko", + "options": { + "months": [ + "1월", + "2월", + "3월", + "4월", + "5월", + "6월", + "7월", + "8월", + "9월", + "10월", + "11월", + "12월" + ], + "shortMonths": [ + "1월", + "2월", + "3월", + "4월", + "5월", + "6월", + "7월", + "8월", + "9월", + "10월", + "11월", + "12월" + ], + "days": [ + "일요일", + "월요일", + "화요일", + "수요일", + "목요일", + "금요일", + "토요일" + ], + "shortDays": ["일", "월", "화", "수", "목", "금", "토"], + "toolbar": { + "exportToSVG": "SVG 다운로드", + "exportToPNG": "PNG 다운로드", + "exportToCSV": "CSV 다운로드", + "menu": "메뉴", + "selection": "선택", + "selectionZoom": "선택영역 확대", + "zoomIn": "확대", + "zoomOut": "축소", + "pan": "패닝", + "reset": "원래대로" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/lt.json b/cao_sunyata/static/libs/apexcharts/src/locales/lt.json new file mode 100644 index 0000000..4ed1520 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/lt.json @@ -0,0 +1,55 @@ +{ + "name": "lt", + "options": { + "months": [ + "Sausis", + "Vasaris", + "Kovas", + "Balandis", + "Gegužė", + "Birželis", + "Liepa", + "Rugpjūtis", + "Rugsėjis", + "Spalis", + "Lapkritis", + "Gruodis" + ], + "shortMonths": [ + "Sau", + "Vas", + "Kov", + "Bal", + "Geg", + "Bir", + "Lie", + "Rgp", + "Rgs", + "Spl", + "Lap", + "Grd" + ], + "days": [ + "Sekmadienis", + "Pirmadienis", + "Antradienis", + "Trečiadienis", + "Ketvirtadienis", + "Penktadienis", + "Šeštadienis" + ], + "shortDays": ["Sk", "Per", "An", "Tr", "Kt", "Pn", "Št"], + "toolbar": { + "exportToSVG": "Atsisiųsti SVG", + "exportToPNG": "Atsisiųsti PNG", + "exportToCSV": "Atsisiųsti CSV", + "menu": "Menu", + "selection": "Pasirinkimas", + "selectionZoom": "Zoom: Pasirinkimas", + "zoomIn": "Zoom: Priartinti", + "zoomOut": "Zoom: Atitolinti", + "pan": "Perkėlimas", + "reset": "Atstatyti" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/lv.json b/cao_sunyata/static/libs/apexcharts/src/locales/lv.json new file mode 100644 index 0000000..8a845dd --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/lv.json @@ -0,0 +1,64 @@ +{ + "name": "lv", + "options": { + "months": [ + "janvāris", + "februāris", + "marts", + "aprīlis", + "maijs", + "jūnijs", + "jūlijs", + "augusts", + "septembris", + "oktobris", + "novembris", + "decembris" + ], + "shortMonths": [ + "janv", + "febr", + "marts", + "apr", + "maijs", + "jūn", + "jūl", + "aug", + "sept", + "okt", + "nov", + "dec" + ], + "days": [ + "svētdiena", + "pirmdiena", + "otrdiena", + "trešdiena", + "ceturtdiena", + "piektdiena", + "sestdiena" + ], + "shortDays": [ + "Sv", + "P", + "O", + "T", + "C", + "P", + "S" + ], + "toolbar": { + "exportToSVG": "Lejuplādēt SVG", + "exportToPNG": "Lejuplādēt PNG", + "exportToCSV": "Lejuplādēt CSV", + "menu": "Izvēlne", + "selection": "Atlase", + "selectionZoom": "Pietuvināt atlasi", + "zoomIn": "Pietuvināt", + "zoomOut": "Attālināt", + "pan": "Pārvietoties diagrammā", + "reset": "Atiestatīt pietuvinājumu" + } + } +} + diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/nb.json b/cao_sunyata/static/libs/apexcharts/src/locales/nb.json new file mode 100644 index 0000000..3339d2c --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/nb.json @@ -0,0 +1,55 @@ +{ + "name": "nb", + "options": { + "months": [ + "Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Des" + ], + "days": [ + "Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag" + ], + "shortDays": ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø"], + "toolbar": { + "exportToSVG": "Last ned SVG", + "exportToPNG": "Last ned PNG", + "exportToCSV": "Last ned CSV", + "menu": "Menu", + "selection": "Velg", + "selectionZoom": "Zoom: Velg", + "zoomIn": "Zoome inn", + "zoomOut": "Zoome ut", + "pan": "Skyving", + "reset": "Start på nytt" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/nl.json b/cao_sunyata/static/libs/apexcharts/src/locales/nl.json new file mode 100644 index 0000000..0c2126a --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/nl.json @@ -0,0 +1,55 @@ +{ + "name": "nl", + "options": { + "months": [ + "Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mrt", + "Apr", + "Mei", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "days": [ + "Zondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag" + ], + "shortDays": ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"], + "toolbar": { + "exportToSVG": "Download SVG", + "exportToPNG": "Download PNG", + "exportToCSV": "Download CSV", + "menu": "Menu", + "selection": "Selectie", + "selectionZoom": "Zoom selectie", + "zoomIn": "Zoom in", + "zoomOut": "Zoom out", + "pan": "Verplaatsen", + "reset": "Standaardwaarden" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/pl.json b/cao_sunyata/static/libs/apexcharts/src/locales/pl.json new file mode 100644 index 0000000..3df3c16 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/pl.json @@ -0,0 +1,55 @@ +{ + "name": "pl", + "options": { + "months": [ + "Styczeń", + "Luty", + "Marzec", + "Kwiecień", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpień", + "Wrzesień", + "Październik", + "Listopad", + "Grudzień" + ], + "shortMonths": [ + "Sty", + "Lut", + "Mar", + "Kwi", + "Maj", + "Cze", + "Lip", + "Sie", + "Wrz", + "Paź", + "Lis", + "Gru" + ], + "days": [ + "Niedziela", + "Poniedziałek", + "Wtorek", + "Środa", + "Czwartek", + "Piątek", + "Sobota" + ], + "shortDays": ["Nd", "Pn", "Wt", "Śr", "Cz", "Pt", "Sb"], + "toolbar": { + "exportToSVG": "Pobierz SVG", + "exportToPNG": "Pobierz PNG", + "exportToCSV": "Pobierz CSV", + "menu": "Menu", + "selection": "Wybieranie", + "selectionZoom": "Zoom: Wybieranie", + "zoomIn": "Zoom: Przybliż", + "zoomOut": "Zoom: Oddal", + "pan": "Przesuwanie", + "reset": "Resetuj" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/pt-br.json b/cao_sunyata/static/libs/apexcharts/src/locales/pt-br.json new file mode 100644 index 0000000..a2932fc --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/pt-br.json @@ -0,0 +1,55 @@ +{ + "name": "pt-br", + "options": { + "months": [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + "shortMonths": [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + "days": [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + "shortDays": ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"], + "toolbar": { + "exportToSVG": "Baixar SVG", + "exportToPNG": "Baixar PNG", + "exportToCSV": "Baixar CSV", + "menu": "Menu", + "selection": "Selecionar", + "selectionZoom": "Selecionar Zoom", + "zoomIn": "Aumentar", + "zoomOut": "Diminuir", + "pan": "Navegação", + "reset": "Reiniciar Zoom" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/pt.json b/cao_sunyata/static/libs/apexcharts/src/locales/pt.json new file mode 100644 index 0000000..3f93db3 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/pt.json @@ -0,0 +1,55 @@ +{ + "name": "pt", + "options": { + "months": [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + "shortMonths": [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ag", + "Set", + "Out", + "Nov", + "Dez" + ], + "days": [ + "Domingo", + "Segunda-feira", + "Terça-feira", + "Quarta-feira", + "Quinta-feira", + "Sexta-feira", + "Sábado" + ], + "shortDays": ["Do", "Se", "Te", "Qa", "Qi", "Sx", "Sa"], + "toolbar": { + "exportToSVG": "Baixar SVG", + "exportToPNG": "Baixar PNG", + "exportToCSV": "Baixar CSV", + "menu": "Menu", + "selection": "Selecionar", + "selectionZoom": "Zoom: Selecionar", + "zoomIn": "Zoom: Aumentar", + "zoomOut": "Zoom: Diminuir", + "pan": "Deslocamento", + "reset": "Redefinir" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/rs.json b/cao_sunyata/static/libs/apexcharts/src/locales/rs.json new file mode 100644 index 0000000..c4fff61 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/rs.json @@ -0,0 +1,55 @@ +{ + "name": "rs", + "options": { + "months": [ + "Januar", + "Februar", + "Mart", + "April", + "Maj", + "Jun", + "Jul", + "Avgust", + "Septembar", + "Oktobar", + "Novembar", + "Decembar" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Maj", + "Jun", + "Jul", + "Avg", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "days": [ + "Nedelja", + "Ponedeljak", + "Utorak", + "Sreda", + "Četvrtak", + "Petak", + "Subota" + ], + "shortDays": ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], + "toolbar": { + "exportToSVG": "Preuzmi SVG", + "exportToPNG": "Preuzmi PNG", + "exportToCSV": "Preuzmi CSV", + "menu": "Meni", + "selection": "Odabir", + "selectionZoom": "Odabirno povećanje", + "zoomIn": "Uvećajte prikaz", + "zoomOut": "Umanjite prikaz", + "pan": "Pomeranje", + "reset": "Resetuj prikaz" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ru.json b/cao_sunyata/static/libs/apexcharts/src/locales/ru.json new file mode 100644 index 0000000..55f3a0c --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ru.json @@ -0,0 +1,55 @@ +{ + "name": "ru", + "options": { + "months": [ + "Январь", + "Февраль", + "Март", + "Апрель", + "Май", + "Июнь", + "Июль", + "Август", + "Сентябрь", + "Октябрь", + "Ноябрь", + "Декабрь" + ], + "shortMonths": [ + "Янв", + "Фев", + "Мар", + "Апр", + "Май", + "Июн", + "Июл", + "Авг", + "Сен", + "Окт", + "Ноя", + "Дек" + ], + "days": [ + "Воскресенье", + "Понедельник", + "Вторник", + "Среда", + "Четверг", + "Пятница", + "Суббота" + ], + "shortDays": ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], + "toolbar": { + "exportToSVG": "Сохранить SVG", + "exportToPNG": "Сохранить PNG", + "exportToCSV": "Сохранить CSV", + "menu": "Меню", + "selection": "Выбор", + "selectionZoom": "Выбор с увеличением", + "zoomIn": "Увеличить", + "zoomOut": "Уменьшить", + "pan": "Перемещение", + "reset": "Сбросить увеличение" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/se.json b/cao_sunyata/static/libs/apexcharts/src/locales/se.json new file mode 100644 index 0000000..e9409e5 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/se.json @@ -0,0 +1,55 @@ +{ + "name": "se", + "options": { + "months": [ + "Januari", + "Februari", + "Mars", + "April", + "Maj", + "Juni", + "Juli", + "Augusti", + "September", + "Oktober", + "November", + "December" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Maj", + "Juni", + "Juli", + "Aug", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "days": [ + "Söndag", + "Måndag", + "Tisdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lördag" + ], + "shortDays": ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"], + "toolbar": { + "exportToSVG": "Ladda SVG", + "exportToPNG": "Ladda PNG", + "exportToCSV": "Ladda CSV", + "menu": "Meny", + "selection": "Selektion", + "selectionZoom": "Val av zoom", + "zoomIn": "Zooma in", + "zoomOut": "Zooma ut", + "pan": "Panorering", + "reset": "Återställ zoomning" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/sk.json b/cao_sunyata/static/libs/apexcharts/src/locales/sk.json new file mode 100644 index 0000000..03e69aa --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/sk.json @@ -0,0 +1,55 @@ +{ + "name": "sk", + "options": { + "months": [ + "Január", + "Február", + "Marec", + "Apríl", + "Máj", + "Jún", + "Júl", + "August", + "September", + "Október", + "November", + "December" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Máj", + "Jún", + "Júl", + "Aug", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "days": [ + "Nedeľa", + "Pondelok", + "Utorok", + "Streda", + "Štvrtok", + "Piatok", + "Sobota" + ], + "shortDays": ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"], + "toolbar": { + "exportToSVG": "Stiahnuť SVG", + "exportToPNG": "Stiahnuť PNG", + "exportToCSV": "Stiahnuť CSV", + "menu": "Menu", + "selection": "Vyberanie", + "selectionZoom": "Zoom: Vyberanie", + "zoomIn": "Zoom: Priblížiť", + "zoomOut": "Zoom: Vzdialiť", + "pan": "Presúvanie", + "reset": "Resetovať" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/sl.json b/cao_sunyata/static/libs/apexcharts/src/locales/sl.json new file mode 100644 index 0000000..793ff56 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/sl.json @@ -0,0 +1,55 @@ +{ + "name": "sl", + "options": { + "months": [ + "Januar", + "Februar", + "Marec", + "April", + "Maj", + "Junij", + "Julij", + "Avgust", + "Septemer", + "Oktober", + "November", + "December" + ], + "shortMonths": [ + "Jan", + "Feb", + "Mar", + "Apr", + "Maj", + "Jun", + "Jul", + "Avg", + "Sep", + "Okt", + "Nov", + "Dec" + ], + "days": [ + "Nedelja", + "Ponedeljek", + "Torek", + "Sreda", + "Četrtek", + "Petek", + "Sobota" + ], + "shortDays": ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"], + "toolbar": { + "exportToSVG": "Prenesi SVG", + "exportToPNG": "Prenesi PNG", + "exportToCSV": "Prenesi CSV", + "menu": "Menu", + "selection": "Izbiranje", + "selectionZoom": "Zoom: Izbira", + "zoomIn": "Zoom: Približaj", + "zoomOut": "Zoom: Oddalji", + "pan": "Pomikanje", + "reset": "Resetiraj" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/sq.json b/cao_sunyata/static/libs/apexcharts/src/locales/sq.json new file mode 100644 index 0000000..a478591 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/sq.json @@ -0,0 +1,55 @@ +{ + "name": "sq", + "options": { + "months": [ + "Janar", + "Shkurt", + "Mars", + "Prill", + "Maj", + "Qershor", + "Korrik", + "Gusht", + "Shtator", + "Tetor", + "Nëntor", + "Dhjetor" + ], + "shortMonths": [ + "Jan", + "Shk", + "Mar", + "Pr", + "Maj", + "Qer", + "Korr", + "Gush", + "Sht", + "Tet", + "Nën", + "Dhj" + ], + "days": [ + "e Dielë", + "e Hënë", + "e Martë", + "e Mërkurë", + "e Enjte", + "e Premte", + "e Shtunë" + ], + "shortDays": ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"], + "toolbar": { + "exportToSVG": "Shkarko SVG", + "exportToPNG": "Shkarko PNG", + "exportToCSV": "Shkarko CSV", + "menu": "Menu", + "selection": "Seleksiono", + "selectionZoom": "Seleksiono Zmadhim", + "zoomIn": "Zmadho", + "zoomOut": "Zvogëlo", + "pan": "Spostoje", + "reset": "Rikthe dimensionin" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/th.json b/cao_sunyata/static/libs/apexcharts/src/locales/th.json new file mode 100644 index 0000000..2b3b109 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/th.json @@ -0,0 +1,55 @@ +{ + "name": "th", + "options": { + "months": [ + "มกราคม", + "กุมภาพันธ์", + "มีนาคม", + "เมษายน", + "พฤษภาคม", + "มิถุนายน", + "กรกฎาคม", + "สิงหาคม", + "กันยายน", + "ตุลาคม", + "พฤศจิกายน", + "ธันวาคม" + ], + "shortMonths": [ + "ม.ค.", + "ก.พ.", + "มี.ค.", + "เม.ย.", + "พ.ค.", + "มิ.ย.", + "ก.ค.", + "ส.ค.", + "ก.ย.", + "ต.ค.", + "พ.ย.", + "ธ.ค." + ], + "days": [ + "อาทิตย์", + "จันทร์", + "อังคาร", + "พุธ", + "พฤหัสบดี", + "ศุกร์", + "เสาร์" + ], + "shortDays": ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"], + "toolbar": { + "exportToSVG": "ดาวน์โหลด SVG", + "exportToPNG": "ดาวน์โหลด PNG", + "exportToCSV": "ดาวน์โหลด CSV", + "menu": "เมนู", + "selection": "เลือก", + "selectionZoom": "เลือกจุดที่จะซูม", + "zoomIn": "ซูมเข้า", + "zoomOut": "ซูมออก", + "pan": "ปรากฎว่า", + "reset": "รีเซ็ตการซูม" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/tr.json b/cao_sunyata/static/libs/apexcharts/src/locales/tr.json new file mode 100644 index 0000000..dda01e8 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/tr.json @@ -0,0 +1,55 @@ +{ + "name": "tr", + "options": { + "months": [ + "Ocak", + "Şubat", + "Mart", + "Nisan", + "Mayıs", + "Haziran", + "Temmuz", + "Ağustos", + "Eylül", + "Ekim", + "Kasım", + "Aralık" + ], + "shortMonths": [ + "Oca", + "Şub", + "Mar", + "Nis", + "May", + "Haz", + "Tem", + "Ağu", + "Eyl", + "Eki", + "Kas", + "Ara" + ], + "days": [ + "Pazar", + "Pazartesi", + "Salı", + "Çarşamba", + "Perşembe", + "Cuma", + "Cumartesi" + ], + "shortDays": ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"], + "toolbar": { + "exportToSVG": "SVG İndir", + "exportToPNG": "PNG İndir", + "exportToCSV": "CSV İndir", + "menu": "Menü", + "selection": "Seçim", + "selectionZoom": "Seçim Yakınlaştır", + "zoomIn": "Yakınlaştır", + "zoomOut": "Uzaklaştır", + "pan": "Kaydır", + "reset": "Yakınlaştırmayı Sıfırla" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/ua.json b/cao_sunyata/static/libs/apexcharts/src/locales/ua.json new file mode 100644 index 0000000..d6f81de --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/ua.json @@ -0,0 +1,55 @@ +{ + "name": "ua", + "options": { + "months": [ + "Січень", + "Лютий", + "Березень", + "Квітень", + "Травень", + "Червень", + "Липень", + "Серпень", + "Вересень", + "Жовтень", + "Листопад", + "Грудень" + ], + "shortMonths": [ + "Січ", + "Лют", + "Бер", + "Кві", + "Тра", + "Чер", + "Лип", + "Сер", + "Вер", + "Жов", + "Лис", + "Гру" + ], + "days": [ + "Неділя", + "Понеділок", + "Вівторок", + "Середа", + "Четвер", + "П'ятниця", + "Субота" + ], + "shortDays": ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], + "toolbar": { + "exportToSVG": "Зберегти SVG", + "exportToPNG": "Зберегти PNG", + "exportToCSV": "Зберегти CSV", + "menu": "Меню", + "selection": "Вибір", + "selectionZoom": "Вибір із збільшенням", + "zoomIn": "Збільшити", + "zoomOut": "Зменшити", + "pan": "Переміщення", + "reset": "Скинути збільшення" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/zh-cn.json b/cao_sunyata/static/libs/apexcharts/src/locales/zh-cn.json new file mode 100644 index 0000000..8944659 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/zh-cn.json @@ -0,0 +1,55 @@ +{ + "name": "zh-cn", + "options": { + "months": [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" + ], + "shortMonths": [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" + ], + "days": [ + "星期天", + "星期一", + "星期二", + "星期三", + "星期四", + "星期五", + "星期六" + ], + "shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], + "toolbar": { + "exportToSVG": "下载 SVG", + "exportToPNG": "下载 PNG", + "exportToCSV": "下载 CSV", + "menu": "菜单", + "selection": "选择", + "selectionZoom": "选择缩放", + "zoomIn": "放大", + "zoomOut": "缩小", + "pan": "平移", + "reset": "重置缩放" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/locales/zh-tw.json b/cao_sunyata/static/libs/apexcharts/src/locales/zh-tw.json new file mode 100644 index 0000000..8e3bd1e --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/locales/zh-tw.json @@ -0,0 +1,55 @@ +{ + "name": "zh-tw", + "options": { + "months": [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" + ], + "shortMonths": [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" + ], + "days": [ + "星期日", + "星期一", + "星期二", + "星期三", + "星期四", + "星期五", + "星期六" + ], + "shortDays": ["週日", "週一", "週二", "週三", "週四", "週五", "週六"], + "toolbar": { + "exportToSVG": "下載 SVG", + "exportToPNG": "下載 PNG", + "exportToCSV": "下載 CSV", + "menu": "菜單", + "selection": "選擇", + "selectionZoom": "選擇縮放", + "zoomIn": "放大", + "zoomOut": "縮小", + "pan": "平移", + "reset": "重置縮放" + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Animations.js b/cao_sunyata/static/libs/apexcharts/src/modules/Animations.js new file mode 100644 index 0000000..6f28d63 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Animations.js @@ -0,0 +1,261 @@ +import Utils from '../utils/Utils' + +/** + * ApexCharts Animation Class. + * + * @module Animations + **/ + +export default class Animations { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.setEasingFunctions() + } + + setEasingFunctions() { + let easing + + if (this.w.globals.easing) return + + const userDefinedEasing = this.w.config.chart.animations.easing + + switch (userDefinedEasing) { + case 'linear': { + easing = '-' + break + } + case 'easein': { + easing = '<' + break + } + case 'easeout': { + easing = '>' + break + } + case 'easeinout': { + easing = '<>' + break + } + case 'swing': { + easing = (pos) => { + let s = 1.70158 + let ret = (pos -= 1) * pos * ((s + 1) * pos + s) + 1 + return ret + } + break + } + case 'bounce': { + easing = (pos) => { + let ret = '' + if (pos < 1 / 2.75) { + ret = 7.5625 * pos * pos + } else if (pos < 2 / 2.75) { + ret = 7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75 + } else if (pos < 2.5 / 2.75) { + ret = 7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375 + } else { + ret = 7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375 + } + return ret + } + break + } + case 'elastic': { + easing = (pos) => { + if (pos === !!pos) return pos + return ( + Math.pow(2, -10 * pos) * + Math.sin(((pos - 0.075) * (2 * Math.PI)) / 0.3) + + 1 + ) + } + break + } + + default: { + easing = '<>' + } + } + + this.w.globals.easing = easing + } + + animateLine(el, from, to, speed) { + el.attr(from) + .animate(speed) + .attr(to) + } + + /* + ** Animate radius of a circle element + */ + animateMarker(el, from, to, speed, easing, cb) { + if (!from) from = 0 + + el.attr({ + r: from, + width: from, + height: from + }) + .animate(speed, easing) + .attr({ + r: to, + width: to.width, + height: to.height + }) + .afterAll(() => { + cb() + }) + } + + /* + ** Animate radius and position of a circle element + */ + animateCircle(el, from, to, speed, easing) { + el.attr({ + r: from.r, + cx: from.cx, + cy: from.cy + }) + .animate(speed, easing) + .attr({ + r: to.r, + cx: to.cx, + cy: to.cy + }) + } + + /* + ** Animate rect properties + */ + animateRect(el, from, to, speed, fn) { + el.attr(from) + .animate(speed) + .attr(to) + .afterAll(() => fn()) + } + + animatePathsGradually(params) { + let { el, realIndex, j, fill, pathFrom, pathTo, speed, delay } = params + + let me = this + let w = this.w + + let delayFactor = 0 + + if (w.config.chart.animations.animateGradually.enabled) { + delayFactor = w.config.chart.animations.animateGradually.delay + } + + if ( + w.config.chart.animations.dynamicAnimation.enabled && + w.globals.dataChanged && + w.config.chart.type !== 'bar' + ) { + // disabled due to this bug - https://github.com/apexcharts/vue-apexcharts/issues/75 + delayFactor = 0 + } + me.morphSVG( + el, + realIndex, + j, + w.config.chart.type === 'line' && !w.globals.comboCharts + ? 'stroke' + : fill, + pathFrom, + pathTo, + speed, + delay * delayFactor + ) + } + + showDelayedElements() { + this.w.globals.delayedElements.forEach((d) => { + const ele = d.el + ele.classList.remove('apexcharts-element-hidden') + }) + } + + animationCompleted(el) { + const w = this.w + if (w.globals.animationEnded) return + + w.globals.animationEnded = true + this.showDelayedElements() + + if (typeof w.config.chart.events.animationEnd === 'function') { + w.config.chart.events.animationEnd(this.ctx, { el, w }) + } + } + + // SVG.js animation for morphing one path to another + morphSVG(el, realIndex, j, fill, pathFrom, pathTo, speed, delay) { + let w = this.w + + if (!pathFrom) { + pathFrom = el.attr('pathFrom') + } + + if (!pathTo) { + pathTo = el.attr('pathTo') + } + + const disableAnimationForCorrupPath = (path) => { + if (w.config.chart.type === 'radar') { + // radar chart drops the path to bottom and hence a corrup path looks ugly + // therefore, disable animation for such a case + speed = 1 + } + return `M 0 ${w.globals.gridHeight}` + } + + if ( + !pathFrom || + pathFrom.indexOf('undefined') > -1 || + pathFrom.indexOf('NaN') > -1 + ) { + pathFrom = disableAnimationForCorrupPath() + } + + if ( + !pathTo || + pathTo.indexOf('undefined') > -1 || + pathTo.indexOf('NaN') > -1 + ) { + pathTo = disableAnimationForCorrupPath() + } + if (!w.globals.shouldAnimate) { + speed = 1 + } + + el.plot(pathFrom) + .animate(1, w.globals.easing, delay) + .plot(pathFrom) + .animate(speed, w.globals.easing, delay) + .plot(pathTo) + .afterAll(() => { + // a flag to indicate that the original mount function can return true now as animation finished here + + if (Utils.isNumber(j)) { + if ( + j === w.globals.series[w.globals.maxValsInArrayIndex].length - 2 && + w.globals.shouldAnimate + ) { + this.animationCompleted(el) + } + } else if (fill !== 'none' && w.globals.shouldAnimate) { + if ( + (!w.globals.comboCharts && + realIndex === w.globals.series.length - 1) || + w.globals.comboCharts + ) { + this.animationCompleted(el) + } + } + + this.showDelayedElements() + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Base.js b/cao_sunyata/static/libs/apexcharts/src/modules/Base.js new file mode 100644 index 0000000..87cdfb1 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Base.js @@ -0,0 +1,25 @@ +import Config from './settings/Config' +import Globals from './settings/Globals' + +/** + * ApexCharts Base Class for extending user options with pre-defined ApexCharts config. + * + * @module Base + **/ +export default class Base { + constructor(opts) { + this.opts = opts + } + + init() { + const config = new Config(this.opts).init({ responsiveOverride: false }) + const globals = new Globals().init(config) + + const w = { + config, + globals + } + + return w + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Core.js b/cao_sunyata/static/libs/apexcharts/src/modules/Core.js new file mode 100644 index 0000000..0845739 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Core.js @@ -0,0 +1,614 @@ +import Bar from '../charts/Bar' +import BarStacked from '../charts/BarStacked' +import BoxCandleStick from '../charts/BoxCandleStick' +import CoreUtils from './CoreUtils' +import Crosshairs from './Crosshairs' +import HeatMap from '../charts/HeatMap' +import Globals from '../modules/settings/Globals' +import Pie from '../charts/Pie' +import Radar from '../charts/Radar' +import Radial from '../charts/Radial' +import RangeBar from '../charts/RangeBar' +import Legend from './legend/Legend' +import Line from '../charts/Line' +import Treemap from '../charts/Treemap' +import Graphics from './Graphics' +import Range from './Range' +import Utils from '../utils/Utils' +import Scales from './Scales' +import TimeScale from './TimeScale' + +/** + * ApexCharts Core Class responsible for major calculations and creating elements. + * + * @module Core + **/ + +export default class Core { + constructor(el, ctx) { + this.ctx = ctx + this.w = ctx.w + this.el = el + } + + // get data and store into appropriate vars + + setupElements() { + let gl = this.w.globals + let cnf = this.w.config + + // const graphics = new Graphics(this.ctx) + + let ct = cnf.chart.type + let axisChartsArrTypes = [ + 'line', + 'area', + 'bar', + 'rangeBar', + 'candlestick', + 'boxPlot', + 'scatter', + 'bubble', + 'radar', + 'heatmap', + 'treemap' + ] + + let xyChartsArrTypes = [ + 'line', + 'area', + 'bar', + 'rangeBar', + 'candlestick', + 'boxPlot', + 'scatter', + 'bubble' + ] + + gl.axisCharts = axisChartsArrTypes.indexOf(ct) > -1 + + gl.xyCharts = xyChartsArrTypes.indexOf(ct) > -1 + + gl.isBarHorizontal = + (cnf.chart.type === 'bar' || + cnf.chart.type === 'rangeBar' || + cnf.chart.type === 'boxPlot') && + cnf.plotOptions.bar.horizontal + + gl.chartClass = '.apexcharts' + gl.chartID + + gl.dom.baseEl = this.el + + gl.dom.elWrap = document.createElement('div') + Graphics.setAttrs(gl.dom.elWrap, { + id: gl.chartClass.substring(1), + class: 'apexcharts-canvas ' + gl.chartClass.substring(1) + }) + this.el.appendChild(gl.dom.elWrap) + + gl.dom.Paper = new window.SVG.Doc(gl.dom.elWrap) + gl.dom.Paper.attr({ + class: 'apexcharts-svg', + 'xmlns:data': 'ApexChartsNS', + transform: `translate(${cnf.chart.offsetX}, ${cnf.chart.offsetY})` + }) + + gl.dom.Paper.node.style.background = cnf.chart.background + + this.setSVGDimensions() + + gl.dom.elGraphical = gl.dom.Paper.group().attr({ + class: 'apexcharts-inner apexcharts-graphical' + }) + + gl.dom.elAnnotations = gl.dom.Paper.group().attr({ + class: 'apexcharts-annotations' + }) + + gl.dom.elDefs = gl.dom.Paper.defs() + + gl.dom.elLegendWrap = document.createElement('div') + gl.dom.elLegendWrap.classList.add('apexcharts-legend') + gl.dom.elWrap.appendChild(gl.dom.elLegendWrap) + gl.dom.Paper.add(gl.dom.elGraphical) + gl.dom.elGraphical.add(gl.dom.elDefs) + } + + plotChartType(ser, xyRatios) { + const w = this.w + const cnf = w.config + const gl = w.globals + + let lineSeries = { + series: [], + i: [] + } + let areaSeries = { + series: [], + i: [] + } + let scatterSeries = { + series: [], + i: [] + } + + let bubbleSeries = { + series: [], + i: [] + } + + let columnSeries = { + series: [], + i: [] + } + + let candlestickSeries = { + series: [], + i: [] + } + + let boxplotSeries = { + series: [], + i: [] + } + + gl.series.map((series, st) => { + let comboCount = 0 + // if user has specified a particular type for particular series + if (typeof ser[st].type !== 'undefined') { + if (ser[st].type === 'column' || ser[st].type === 'bar') { + if (gl.series.length > 1 && cnf.plotOptions.bar.horizontal) { + // horizontal bars not supported in mixed charts, hence show a warning + console.warn( + 'Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`' + ) + } + columnSeries.series.push(series) + columnSeries.i.push(st) + comboCount++ + w.globals.columnSeries = columnSeries.series + } else if (ser[st].type === 'area') { + areaSeries.series.push(series) + areaSeries.i.push(st) + comboCount++ + } else if (ser[st].type === 'line') { + lineSeries.series.push(series) + lineSeries.i.push(st) + comboCount++ + } else if (ser[st].type === 'scatter') { + scatterSeries.series.push(series) + scatterSeries.i.push(st) + } else if (ser[st].type === 'bubble') { + bubbleSeries.series.push(series) + bubbleSeries.i.push(st) + comboCount++ + } else if (ser[st].type === 'candlestick') { + candlestickSeries.series.push(series) + candlestickSeries.i.push(st) + comboCount++ + } else if (ser[st].type === 'boxPlot') { + boxplotSeries.series.push(series) + boxplotSeries.i.push(st) + comboCount++ + } else { + // user has specified type, but it is not valid (other than line/area/column) + console.warn( + 'You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble' + ) + } + if (comboCount > 1) { + gl.comboCharts = true + } + } else { + lineSeries.series.push(series) + lineSeries.i.push(st) + } + }) + + let line = new Line(this.ctx, xyRatios) + let boxCandlestick = new BoxCandleStick(this.ctx, xyRatios) + this.ctx.pie = new Pie(this.ctx) + let radialBar = new Radial(this.ctx) + this.ctx.rangeBar = new RangeBar(this.ctx, xyRatios) + let radar = new Radar(this.ctx) + let elGraph = [] + + if (gl.comboCharts) { + if (areaSeries.series.length > 0) { + elGraph.push(line.draw(areaSeries.series, 'area', areaSeries.i)) + } + if (columnSeries.series.length > 0) { + if (w.config.chart.stacked) { + let barStacked = new BarStacked(this.ctx, xyRatios) + elGraph.push(barStacked.draw(columnSeries.series, columnSeries.i)) + } else { + this.ctx.bar = new Bar(this.ctx, xyRatios) + elGraph.push(this.ctx.bar.draw(columnSeries.series, columnSeries.i)) + } + } + if (lineSeries.series.length > 0) { + elGraph.push(line.draw(lineSeries.series, 'line', lineSeries.i)) + } + if (candlestickSeries.series.length > 0) { + elGraph.push( + boxCandlestick.draw(candlestickSeries.series, candlestickSeries.i) + ) + } + if (boxplotSeries.series.length > 0) { + elGraph.push(boxCandlestick.draw(boxplotSeries.series, boxplotSeries.i)) + } + if (scatterSeries.series.length > 0) { + const scatterLine = new Line(this.ctx, xyRatios, true) + elGraph.push( + scatterLine.draw(scatterSeries.series, 'scatter', scatterSeries.i) + ) + } + if (bubbleSeries.series.length > 0) { + const bubbleLine = new Line(this.ctx, xyRatios, true) + elGraph.push( + bubbleLine.draw(bubbleSeries.series, 'bubble', bubbleSeries.i) + ) + } + } else { + switch (cnf.chart.type) { + case 'line': + elGraph = line.draw(gl.series, 'line') + break + case 'area': + elGraph = line.draw(gl.series, 'area') + break + case 'bar': + if (cnf.chart.stacked) { + let barStacked = new BarStacked(this.ctx, xyRatios) + elGraph = barStacked.draw(gl.series) + } else { + this.ctx.bar = new Bar(this.ctx, xyRatios) + elGraph = this.ctx.bar.draw(gl.series) + } + break + case 'candlestick': + let candleStick = new BoxCandleStick(this.ctx, xyRatios) + elGraph = candleStick.draw(gl.series) + break + case 'boxPlot': + let boxPlot = new BoxCandleStick(this.ctx, xyRatios) + elGraph = boxPlot.draw(gl.series) + break + case 'rangeBar': + elGraph = this.ctx.rangeBar.draw(gl.series) + break + case 'heatmap': + let heatmap = new HeatMap(this.ctx, xyRatios) + elGraph = heatmap.draw(gl.series) + break + case 'treemap': + let treemap = new Treemap(this.ctx, xyRatios) + elGraph = treemap.draw(gl.series) + break + case 'pie': + case 'donut': + case 'polarArea': + elGraph = this.ctx.pie.draw(gl.series) + break + case 'radialBar': + elGraph = radialBar.draw(gl.series) + break + case 'radar': + elGraph = radar.draw(gl.series) + break + default: + elGraph = line.draw(gl.series) + } + } + + return elGraph + } + + setSVGDimensions() { + let gl = this.w.globals + let cnf = this.w.config + + gl.svgWidth = cnf.chart.width + gl.svgHeight = cnf.chart.height + + let elDim = Utils.getDimensions(this.el) + + let widthUnit = cnf.chart.width + .toString() + .split(/[0-9]+/g) + .pop() + + if (widthUnit === '%') { + if (Utils.isNumber(elDim[0])) { + if (elDim[0].width === 0) { + elDim = Utils.getDimensions(this.el.parentNode) + } + + gl.svgWidth = (elDim[0] * parseInt(cnf.chart.width, 10)) / 100 + } + } else if (widthUnit === 'px' || widthUnit === '') { + gl.svgWidth = parseInt(cnf.chart.width, 10) + } + + let heightUnit = cnf.chart.height + .toString() + .split(/[0-9]+/g) + .pop() + if (gl.svgHeight !== 'auto' && gl.svgHeight !== '') { + if (heightUnit === '%') { + let elParentDim = Utils.getDimensions(this.el.parentNode) + gl.svgHeight = (elParentDim[1] * parseInt(cnf.chart.height, 10)) / 100 + } else { + gl.svgHeight = parseInt(cnf.chart.height, 10) + } + } else { + if (gl.axisCharts) { + gl.svgHeight = gl.svgWidth / 1.61 + } else { + gl.svgHeight = gl.svgWidth / 1.2 + } + } + + if (gl.svgWidth < 0) gl.svgWidth = 0 + if (gl.svgHeight < 0) gl.svgHeight = 0 + + Graphics.setAttrs(gl.dom.Paper.node, { + width: gl.svgWidth, + height: gl.svgHeight + }) + + if (heightUnit !== '%') { + // fixes https://github.com/apexcharts/apexcharts.js/issues/2059 + let offsetY = cnf.chart.sparkline.enabled + ? 0 + : gl.axisCharts + ? cnf.chart.parentHeightOffset + : 0 + + gl.dom.Paper.node.parentNode.parentNode.style.minHeight = + gl.svgHeight + offsetY + 'px' + } + + gl.dom.elWrap.style.width = gl.svgWidth + 'px' + gl.dom.elWrap.style.height = gl.svgHeight + 'px' + } + + shiftGraphPosition() { + let gl = this.w.globals + + let tY = gl.translateY + let tX = gl.translateX + + let scalingAttrs = { + transform: 'translate(' + tX + ', ' + tY + ')' + } + Graphics.setAttrs(gl.dom.elGraphical.node, scalingAttrs) + } + + // To prevent extra spacings in the bottom of the chart, we need to recalculate the height for pie/donut/radialbar charts + resizeNonAxisCharts() { + const w = this.w + + const gl = w.globals + + let legendHeight = 0 + let offY = w.config.chart.sparkline.enabled ? 1 : 15 + offY = offY + w.config.grid.padding.bottom + + if ( + (w.config.legend.position === 'top' || + w.config.legend.position === 'bottom') && + w.config.legend.show && + !w.config.legend.floating + ) { + legendHeight = + new Legend(this.ctx).legendHelpers.getLegendBBox().clwh + 10 + } + + let el = w.globals.dom.baseEl.querySelector( + '.apexcharts-radialbar, .apexcharts-pie' + ) + + let chartInnerDimensions = w.globals.radialSize * 2.05 + + if ( + el && + !w.config.chart.sparkline.enabled && + w.config.plotOptions.radialBar.startAngle !== 0 + ) { + let elRadialRect = Utils.getBoundingClientRect(el) + chartInnerDimensions = elRadialRect.bottom + + let maxHeight = elRadialRect.bottom - elRadialRect.top + + chartInnerDimensions = Math.max(w.globals.radialSize * 2.05, maxHeight) + } + + let newHeight = chartInnerDimensions + gl.translateY + legendHeight + offY + + if (gl.dom.elLegendForeign) { + gl.dom.elLegendForeign.setAttribute('height', newHeight) + } + + // fix apexcharts/apexcharts.js/issues/3105 (when % is provided in height, it keeps increasing) + if (w.config.chart.height && String(w.config.chart.height).indexOf('%') > 0) + return + + gl.dom.elWrap.style.height = newHeight + 'px' + + Graphics.setAttrs(gl.dom.Paper.node, { + height: newHeight + }) + + gl.dom.Paper.node.parentNode.parentNode.style.minHeight = newHeight + 'px' + } + + /* + ** All the calculations for setting range in charts will be done here + */ + coreCalculations() { + const range = new Range(this.ctx) + range.init() + } + + resetGlobals() { + const resetxyValues = () => { + return this.w.config.series.map((s) => []) + } + const globalObj = new Globals() + + let gl = this.w.globals + globalObj.initGlobalVars(gl) + gl.seriesXvalues = resetxyValues() + gl.seriesYvalues = resetxyValues() + } + + isMultipleY() { + // user has supplied an array in yaxis property. So, turn on multipleYAxis flag + if ( + this.w.config.yaxis.constructor === Array && + this.w.config.yaxis.length > 1 + ) { + this.w.globals.isMultipleYAxis = true + return true + } + } + + xySettings() { + let xyRatios = null + const w = this.w + + if (w.globals.axisCharts) { + if (w.config.xaxis.crosshairs.position === 'back') { + const crosshairs = new Crosshairs(this.ctx) + crosshairs.drawXCrosshairs() + } + if (w.config.yaxis[0].crosshairs.position === 'back') { + const crosshairs = new Crosshairs(this.ctx) + crosshairs.drawYCrosshairs() + } + + if ( + w.config.xaxis.type === 'datetime' && + w.config.xaxis.labels.formatter === undefined + ) { + this.ctx.timeScale = new TimeScale(this.ctx) + let formattedTimeScale = [] + if ( + isFinite(w.globals.minX) && + isFinite(w.globals.maxX) && + !w.globals.isBarHorizontal + ) { + formattedTimeScale = this.ctx.timeScale.calculateTimeScaleTicks( + w.globals.minX, + w.globals.maxX + ) + } else if (w.globals.isBarHorizontal) { + formattedTimeScale = this.ctx.timeScale.calculateTimeScaleTicks( + w.globals.minY, + w.globals.maxY + ) + } + this.ctx.timeScale.recalcDimensionsBasedOnFormat(formattedTimeScale) + } + + const coreUtils = new CoreUtils(this.ctx) + xyRatios = coreUtils.getCalculatedRatios() + } + return xyRatios + } + + updateSourceChart(targetChart) { + this.ctx.w.globals.selection = undefined + this.ctx.updateHelpers._updateOptions( + { + chart: { + selection: { + xaxis: { + min: targetChart.w.globals.minX, + max: targetChart.w.globals.maxX + } + } + } + }, + false, + false + ) + } + + setupBrushHandler() { + const w = this.w + + // only for brush charts + if (!w.config.chart.brush.enabled) { + return + } + + // if user has not defined a custom function for selection - we handle the brush chart + // otherwise we leave it to the user to define the functionality for selection + if (typeof w.config.chart.events.selection !== 'function') { + let targets = w.config.chart.brush.targets || [ + w.config.chart.brush.target + ] + // retro compatibility with single target option + targets.forEach((target) => { + let targetChart = ApexCharts.getChartByID(target) + targetChart.w.globals.brushSource = this.ctx + + if (typeof targetChart.w.config.chart.events.zoomed !== 'function') { + targetChart.w.config.chart.events.zoomed = () => { + this.updateSourceChart(targetChart) + } + } + if (typeof targetChart.w.config.chart.events.scrolled !== 'function') { + targetChart.w.config.chart.events.scrolled = () => { + this.updateSourceChart(targetChart) + } + } + }) + + w.config.chart.events.selection = (chart, e) => { + targets.forEach((target) => { + let targetChart = ApexCharts.getChartByID(target) + let yaxis = Utils.clone(w.config.yaxis) + + if ( + w.config.chart.brush.autoScaleYaxis && + targetChart.w.globals.series.length === 1 + ) { + const scale = new Scales(targetChart) + yaxis = scale.autoScaleY(targetChart, yaxis, e) + } + + const multipleYaxis = targetChart.w.config.yaxis.reduce( + (acc, curr, index) => { + return [ + ...acc, + { + ...targetChart.w.config.yaxis[index], + min: yaxis[0].min, + max: yaxis[0].max + } + ] + }, + [] + ) + + targetChart.ctx.updateHelpers._updateOptions( + { + xaxis: { + min: e.xaxis.min, + max: e.xaxis.max + }, + yaxis: multipleYaxis + }, + false, + false, + false, + false + ) + }) + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/CoreUtils.js b/cao_sunyata/static/libs/apexcharts/src/modules/CoreUtils.js new file mode 100644 index 0000000..bffc3eb --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/CoreUtils.js @@ -0,0 +1,386 @@ +/* + ** Util functions which are dependent on ApexCharts instance + */ + +class CoreUtils { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + static checkComboSeries(series) { + let comboCharts = false + let comboBarCount = 0 + let comboCount = 0 + + // if user specified a type in series too, turn on comboCharts flag + if (series.length && typeof series[0].type !== 'undefined') { + series.forEach((s) => { + if ( + s.type === 'bar' || + s.type === 'column' || + s.type === 'candlestick' || + s.type === 'boxPlot' + ) { + comboBarCount++ + } + if (typeof s.type !== 'undefined') { + comboCount++ + } + }) + } + if (comboCount > 0) { + comboCharts = true + } + + return { + comboBarCount, + comboCharts + } + } + + /** + * @memberof CoreUtils + * returns the sum of all individual values in a multiple stacked series + * Eg. w.globals.series = [[32,33,43,12], [2,3,5,1]] + * @return [34,36,48,13] + **/ + getStackedSeriesTotals() { + const w = this.w + let total = [] + + if (w.globals.series.length === 0) return total + + for ( + let i = 0; + i < w.globals.series[w.globals.maxValsInArrayIndex].length; + i++ + ) { + let t = 0 + for (let j = 0; j < w.globals.series.length; j++) { + if (typeof w.globals.series[j][i] !== 'undefined') { + t += w.globals.series[j][i] + } + } + total.push(t) + } + w.globals.stackedSeriesTotals = total + return total + } + + // get total of the all values inside all series + getSeriesTotalByIndex(index = null) { + if (index === null) { + // non-plot chart types - pie / donut / circle + return this.w.config.series.reduce((acc, cur) => acc + cur, 0) + } else { + // axis charts - supporting multiple series + return this.w.globals.series[index].reduce((acc, cur) => acc + cur, 0) + } + } + + isSeriesNull(index = null) { + let r = [] + if (index === null) { + // non-plot chart types - pie / donut / circle + r = this.w.config.series.filter((d) => d !== null) + } else { + // axis charts - supporting multiple series + r = this.w.config.series[index].data.filter((d) => d !== null) + } + + return r.length === 0 + } + + seriesHaveSameValues(index) { + return this.w.globals.series[index].every((val, i, arr) => val === arr[0]) + } + + getCategoryLabels(labels) { + const w = this.w + let catLabels = labels.slice() + if (w.config.xaxis.convertedCatToNumeric) { + catLabels = labels.map((i, li) => { + return w.config.xaxis.labels.formatter(i - w.globals.minX + 1) + }) + } + return catLabels + } + // maxValsInArrayIndex is the index of series[] which has the largest number of items + getLargestSeries() { + const w = this.w + w.globals.maxValsInArrayIndex = w.globals.series + .map((a) => a.length) + .indexOf( + Math.max.apply( + Math, + w.globals.series.map((a) => a.length) + ) + ) + } + + getLargestMarkerSize() { + const w = this.w + let size = 0 + + w.globals.markers.size.forEach((m) => { + size = Math.max(size, m) + }) + + if (w.config.markers.discrete && w.config.markers.discrete.length) { + w.config.markers.discrete.forEach((m) => { + size = Math.max(size, m.size) + }) + } + + if (size > 0) { + size += w.config.markers.hover.sizeOffset + 1 + } + + w.globals.markers.largestSize = size + + return size + } + + /** + * @memberof Core + * returns the sum of all values in a series + * Eg. w.globals.series = [[32,33,43,12], [2,3,5,1]] + * @return [120, 11] + **/ + getSeriesTotals() { + const w = this.w + + w.globals.seriesTotals = w.globals.series.map((ser, index) => { + let total = 0 + + if (Array.isArray(ser)) { + for (let j = 0; j < ser.length; j++) { + total += ser[j] + } + } else { + // for pie/donuts/gauges + total += ser + } + + return total + }) + } + + getSeriesTotalsXRange(minX, maxX) { + const w = this.w + + const seriesTotalsXRange = w.globals.series.map((ser, index) => { + let total = 0 + + for (let j = 0; j < ser.length; j++) { + if ( + w.globals.seriesX[index][j] > minX && + w.globals.seriesX[index][j] < maxX + ) { + total += ser[j] + } + } + + return total + }) + + return seriesTotalsXRange + } + + /** + * @memberof CoreUtils + * returns the percentage value of all individual values which can be used in a 100% stacked series + * Eg. w.globals.series = [[32, 33, 43, 12], [2, 3, 5, 1]] + * @return [[94.11, 91.66, 89.58, 92.30], [5.88, 8.33, 10.41, 7.7]] + **/ + getPercentSeries() { + const w = this.w + + w.globals.seriesPercent = w.globals.series.map((ser, index) => { + let seriesPercent = [] + if (Array.isArray(ser)) { + for (let j = 0; j < ser.length; j++) { + let total = w.globals.stackedSeriesTotals[j] + let percent = 0 + if (total) { + percent = (100 * ser[j]) / total + } + seriesPercent.push(percent) + } + } else { + const total = w.globals.seriesTotals.reduce((acc, val) => acc + val, 0) + let percent = (100 * ser) / total + seriesPercent.push(percent) + } + + return seriesPercent + }) + } + + getCalculatedRatios() { + let gl = this.w.globals + + let yRatio = [] + let invertedYRatio = 0 + let xRatio = 0 + let initialXRatio = 0 + let invertedXRatio = 0 + let zRatio = 0 + let baseLineY = [] + let baseLineInvertedY = 0.1 + let baseLineX = 0 + + gl.yRange = [] + if (gl.isMultipleYAxis) { + for (let i = 0; i < gl.minYArr.length; i++) { + gl.yRange.push(Math.abs(gl.minYArr[i] - gl.maxYArr[i])) + baseLineY.push(0) + } + } else { + gl.yRange.push(Math.abs(gl.minY - gl.maxY)) + } + gl.xRange = Math.abs(gl.maxX - gl.minX) + gl.zRange = Math.abs(gl.maxZ - gl.minZ) + + // multiple y axis + for (let i = 0; i < gl.yRange.length; i++) { + yRatio.push(gl.yRange[i] / gl.gridHeight) + } + + xRatio = gl.xRange / gl.gridWidth + + initialXRatio = Math.abs(gl.initialMaxX - gl.initialMinX) / gl.gridWidth + + invertedYRatio = gl.yRange / gl.gridWidth + invertedXRatio = gl.xRange / gl.gridHeight + zRatio = (gl.zRange / gl.gridHeight) * 16 + + if (!zRatio) { + zRatio = 1 + } + + if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) { + // Negative numbers present in series + gl.hasNegs = true + } + + if (gl.isMultipleYAxis) { + baseLineY = [] + + // baseline variables is the 0 of the yaxis which will be needed when there are negatives + for (let i = 0; i < yRatio.length; i++) { + baseLineY.push(-gl.minYArr[i] / yRatio[i]) + } + } else { + baseLineY.push(-gl.minY / yRatio[0]) + + if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) { + baseLineInvertedY = -gl.minY / invertedYRatio // this is for bar chart + baseLineX = gl.minX / xRatio + } + } + + return { + yRatio, + invertedYRatio, + zRatio, + xRatio, + initialXRatio, + invertedXRatio, + baseLineInvertedY, + baseLineY, + baseLineX + } + } + + getLogSeries(series) { + const w = this.w + + w.globals.seriesLog = series.map((s, i) => { + if (w.config.yaxis[i] && w.config.yaxis[i].logarithmic) { + return s.map((d) => { + if (d === null) return null + return this.getLogVal(w.config.yaxis[i].logBase, d, i) + }) + } else { + return s + } + }) + + return w.globals.invalidLogScale ? series : w.globals.seriesLog + } + getBaseLog(base, value) { + return Math.log(value) / Math.log(base) + } + getLogVal(b, d, yIndex) { + if (d === 0) { + return 0 + } + const w = this.w + const min_log_val = + w.globals.minYArr[yIndex] === 0 + ? -1 // make sure we dont calculate log of 0 + : this.getBaseLog(b, w.globals.minYArr[yIndex]) + const max_log_val = + w.globals.maxYArr[yIndex] === 0 + ? 0 // make sure we dont calculate log of 0 + : this.getBaseLog(b, w.globals.maxYArr[yIndex]) + const number_of_height_levels = max_log_val - min_log_val + if (d < 1) return d / number_of_height_levels + const log_height_value = this.getBaseLog(b, d) - min_log_val + return log_height_value / number_of_height_levels + } + + getLogYRatios(yRatio) { + const w = this.w + const gl = this.w.globals + + gl.yLogRatio = yRatio.slice() + + gl.logYRange = gl.yRange.map((yRange, i) => { + if (w.config.yaxis[i] && this.w.config.yaxis[i].logarithmic) { + let maxY = -Number.MAX_VALUE + let minY = Number.MIN_VALUE + let range = 1 + gl.seriesLog.forEach((s, si) => { + s.forEach((v) => { + if (w.config.yaxis[si] && w.config.yaxis[si].logarithmic) { + maxY = Math.max(v, maxY) + minY = Math.min(v, minY) + } + }) + }) + + range = Math.pow(gl.yRange[i], Math.abs(minY - maxY) / gl.yRange[i]) + + gl.yLogRatio[i] = range / gl.gridHeight + return range + } + }) + + return gl.invalidLogScale ? yRatio.slice() : gl.yLogRatio + } + + // Some config objects can be array - and we need to extend them correctly + static extendArrayProps(configInstance, options, w) { + if (options.yaxis) { + options = configInstance.extendYAxis(options, w) + } + if (options.annotations) { + if (options.annotations.yaxis) { + options = configInstance.extendYAxisAnnotations(options) + } + if (options.annotations.xaxis) { + options = configInstance.extendXAxisAnnotations(options) + } + if (options.annotations.points) { + options = configInstance.extendPointAnnotations(options) + } + } + + return options + } +} + +export default CoreUtils diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Crosshairs.js b/cao_sunyata/static/libs/apexcharts/src/modules/Crosshairs.js new file mode 100644 index 0000000..3f77823 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Crosshairs.js @@ -0,0 +1,138 @@ +import Graphics from './Graphics' +import Filters from './Filters' +import Utils from '../utils/Utils' + +class Crosshairs { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + drawXCrosshairs() { + const w = this.w + + let graphics = new Graphics(this.ctx) + let filters = new Filters(this.ctx) + + let crosshairGradient = w.config.xaxis.crosshairs.fill.gradient + let crosshairShadow = w.config.xaxis.crosshairs.dropShadow + + let fillType = w.config.xaxis.crosshairs.fill.type + let gradientFrom = crosshairGradient.colorFrom + let gradientTo = crosshairGradient.colorTo + let opacityFrom = crosshairGradient.opacityFrom + let opacityTo = crosshairGradient.opacityTo + let stops = crosshairGradient.stops + + let shadow = 'none' + let dropShadow = crosshairShadow.enabled + let shadowLeft = crosshairShadow.left + let shadowTop = crosshairShadow.top + let shadowBlur = crosshairShadow.blur + let shadowColor = crosshairShadow.color + let shadowOpacity = crosshairShadow.opacity + + let xcrosshairsFill = w.config.xaxis.crosshairs.fill.color + + if (w.config.xaxis.crosshairs.show) { + if (fillType === 'gradient') { + xcrosshairsFill = graphics.drawGradient( + 'vertical', + gradientFrom, + gradientTo, + opacityFrom, + opacityTo, + null, + stops, + null + ) + } + + let xcrosshairs = graphics.drawRect() + if (w.config.xaxis.crosshairs.width === 1) { + // to prevent drawing 2 lines, convert rect to line + xcrosshairs = graphics.drawLine() + } + + let gridHeight = w.globals.gridHeight + if (!Utils.isNumber(gridHeight) || gridHeight < 0) { + gridHeight = 0 + } + let crosshairsWidth = w.config.xaxis.crosshairs.width + if (!Utils.isNumber(crosshairsWidth) || crosshairsWidth < 0) { + crosshairsWidth = 0 + } + + xcrosshairs.attr({ + class: 'apexcharts-xcrosshairs', + x: 0, + y: 0, + y2: gridHeight, + width: crosshairsWidth, + height: gridHeight, + fill: xcrosshairsFill, + filter: shadow, + 'fill-opacity': w.config.xaxis.crosshairs.opacity, + stroke: w.config.xaxis.crosshairs.stroke.color, + 'stroke-width': w.config.xaxis.crosshairs.stroke.width, + 'stroke-dasharray': w.config.xaxis.crosshairs.stroke.dashArray + }) + + if (dropShadow) { + xcrosshairs = filters.dropShadow(xcrosshairs, { + left: shadowLeft, + top: shadowTop, + blur: shadowBlur, + color: shadowColor, + opacity: shadowOpacity + }) + } + + w.globals.dom.elGraphical.add(xcrosshairs) + } + } + + drawYCrosshairs() { + const w = this.w + + let graphics = new Graphics(this.ctx) + + let crosshair = w.config.yaxis[0].crosshairs + const offX = w.globals.barPadForNumericAxis + + if (w.config.yaxis[0].crosshairs.show) { + let ycrosshairs = graphics.drawLine( + -offX, + 0, + w.globals.gridWidth + offX, + 0, + crosshair.stroke.color, + crosshair.stroke.dashArray, + crosshair.stroke.width + ) + ycrosshairs.attr({ + class: 'apexcharts-ycrosshairs' + }) + + w.globals.dom.elGraphical.add(ycrosshairs) + } + + // draw an invisible crosshair to help in positioning the yaxis tooltip + let ycrosshairsHidden = graphics.drawLine( + -offX, + 0, + w.globals.gridWidth + offX, + 0, + crosshair.stroke.color, + 0, + 0 + ) + ycrosshairsHidden.attr({ + class: 'apexcharts-ycrosshairs-hidden' + }) + + w.globals.dom.elGraphical.add(ycrosshairsHidden) + } +} + +export default Crosshairs diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Data.js b/cao_sunyata/static/libs/apexcharts/src/modules/Data.js new file mode 100644 index 0000000..98906fc --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Data.js @@ -0,0 +1,705 @@ +import CoreUtils from './CoreUtils' +import DateTime from './../utils/DateTime' +import Series from './Series' +import Utils from '../utils/Utils' +import Defaults from './settings/Defaults' + +export default class Data { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.twoDSeries = [] + this.threeDSeries = [] + this.twoDSeriesX = [] + this.seriesGoals = [] + this.coreUtils = new CoreUtils(this.ctx) + } + + isMultiFormat() { + return this.isFormatXY() || this.isFormat2DArray() + } + + // given format is [{x, y}, {x, y}] + isFormatXY() { + const series = this.w.config.series.slice() + + const sr = new Series(this.ctx) + this.activeSeriesIndex = sr.getActiveConfigSeriesIndex() + + if ( + typeof series[this.activeSeriesIndex].data !== 'undefined' && + series[this.activeSeriesIndex].data.length > 0 && + series[this.activeSeriesIndex].data[0] !== null && + typeof series[this.activeSeriesIndex].data[0].x !== 'undefined' && + series[this.activeSeriesIndex].data[0] !== null + ) { + return true + } + } + + // given format is [[x, y], [x, y]] + isFormat2DArray() { + const series = this.w.config.series.slice() + + const sr = new Series(this.ctx) + this.activeSeriesIndex = sr.getActiveConfigSeriesIndex() + + if ( + typeof series[this.activeSeriesIndex].data !== 'undefined' && + series[this.activeSeriesIndex].data.length > 0 && + typeof series[this.activeSeriesIndex].data[0] !== 'undefined' && + series[this.activeSeriesIndex].data[0] !== null && + series[this.activeSeriesIndex].data[0].constructor === Array + ) { + return true + } + } + + handleFormat2DArray(ser, i) { + const cnf = this.w.config + const gl = this.w.globals + + const isBoxPlot = + cnf.chart.type === 'boxPlot' || cnf.series[i].type === 'boxPlot' + + for (let j = 0; j < ser[i].data.length; j++) { + if (typeof ser[i].data[j][1] !== 'undefined') { + if ( + Array.isArray(ser[i].data[j][1]) && + ser[i].data[j][1].length === 4 && + !isBoxPlot + ) { + // candlestick nested ohlc format + this.twoDSeries.push(Utils.parseNumber(ser[i].data[j][1][3])) + } else if (ser[i].data[j].length >= 5) { + // candlestick non-nested ohlc format + this.twoDSeries.push(Utils.parseNumber(ser[i].data[j][4])) + } else { + this.twoDSeries.push(Utils.parseNumber(ser[i].data[j][1])) + } + gl.dataFormatXNumeric = true + } + if (cnf.xaxis.type === 'datetime') { + // if timestamps are provided and xaxis type is datetime, + + let ts = new Date(ser[i].data[j][0]) + ts = new Date(ts).getTime() + this.twoDSeriesX.push(ts) + } else { + this.twoDSeriesX.push(ser[i].data[j][0]) + } + } + + for (let j = 0; j < ser[i].data.length; j++) { + if (typeof ser[i].data[j][2] !== 'undefined') { + this.threeDSeries.push(ser[i].data[j][2]) + gl.isDataXYZ = true + } + } + } + + handleFormatXY(ser, i) { + const cnf = this.w.config + const gl = this.w.globals + + const dt = new DateTime(this.ctx) + + let activeI = i + if (gl.collapsedSeriesIndices.indexOf(i) > -1) { + // fix #368 + activeI = this.activeSeriesIndex + } + + // get series + for (let j = 0; j < ser[i].data.length; j++) { + if (typeof ser[i].data[j].y !== 'undefined') { + if (Array.isArray(ser[i].data[j].y)) { + this.twoDSeries.push( + Utils.parseNumber(ser[i].data[j].y[ser[i].data[j].y.length - 1]) + ) + } else { + this.twoDSeries.push(Utils.parseNumber(ser[i].data[j].y)) + } + } + + if ( + typeof ser[i].data[j].goals !== 'undefined' && + Array.isArray(ser[i].data[j].goals) + ) { + if (typeof this.seriesGoals[i] === 'undefined') { + this.seriesGoals[i] = [] + } + this.seriesGoals[i].push(ser[i].data[j].goals) + } else { + if (typeof this.seriesGoals[i] === 'undefined') { + this.seriesGoals[i] = [] + } + this.seriesGoals[i].push(null) + } + } + + // get seriesX + for (let j = 0; j < ser[activeI].data.length; j++) { + const isXString = typeof ser[activeI].data[j].x === 'string' + const isXArr = Array.isArray(ser[activeI].data[j].x) + const isXDate = + !isXArr && !!dt.isValidDate(ser[activeI].data[j].x.toString()) + + if (isXString || isXDate) { + // user supplied '01/01/2017' or a date string (a JS date object is not supported) + if (isXString || cnf.xaxis.convertedCatToNumeric) { + const isRangeColumn = gl.isBarHorizontal && gl.isRangeData + + if (cnf.xaxis.type === 'datetime' && !isRangeColumn) { + this.twoDSeriesX.push(dt.parseDate(ser[activeI].data[j].x)) + } else { + // a category and not a numeric x value + this.fallbackToCategory = true + this.twoDSeriesX.push(ser[activeI].data[j].x) + } + } else { + if (cnf.xaxis.type === 'datetime') { + this.twoDSeriesX.push( + dt.parseDate(ser[activeI].data[j].x.toString()) + ) + } else { + gl.dataFormatXNumeric = true + gl.isXNumeric = true + this.twoDSeriesX.push(parseFloat(ser[activeI].data[j].x)) + } + } + } else if (isXArr) { + // a multiline label described in array format + this.fallbackToCategory = true + this.twoDSeriesX.push(ser[activeI].data[j].x) + } else { + // a numeric value in x property + gl.isXNumeric = true + gl.dataFormatXNumeric = true + this.twoDSeriesX.push(ser[activeI].data[j].x) + } + } + + if (ser[i].data[0] && typeof ser[i].data[0].z !== 'undefined') { + for (let t = 0; t < ser[i].data.length; t++) { + this.threeDSeries.push(ser[i].data[t].z) + } + gl.isDataXYZ = true + } + } + + handleRangeData(ser, i) { + const gl = this.w.globals + + let range = {} + if (this.isFormat2DArray()) { + range = this.handleRangeDataFormat('array', ser, i) + } else if (this.isFormatXY()) { + range = this.handleRangeDataFormat('xy', ser, i) + } + + gl.seriesRangeStart.push(range.start) + gl.seriesRangeEnd.push(range.end) + + gl.seriesRangeBar.push(range.rangeUniques) + + // check for overlaps to avoid clashes in a timeline chart + gl.seriesRangeBar.forEach((sr, si) => { + if (sr) { + sr.forEach((sarr, sarri) => { + sarr.y.forEach((arr, arri) => { + for (let sri = 0; sri < sarr.y.length; sri++) { + if (arri !== sri) { + const range1y1 = arr.y1 + const range1y2 = arr.y2 + const range2y1 = sarr.y[sri].y1 + const range2y2 = sarr.y[sri].y2 + if (range1y1 <= range2y2 && range2y1 <= range1y2) { + if (sarr.overlaps.indexOf(arr.rangeName) < 0) { + sarr.overlaps.push(arr.rangeName) + } + if (sarr.overlaps.indexOf(sarr.y[sri].rangeName) < 0) { + sarr.overlaps.push(sarr.y[sri].rangeName) + } + } + } + } + }) + }) + } + }) + + return range + } + + handleCandleStickBoxData(ser, i) { + const gl = this.w.globals + + let ohlc = {} + if (this.isFormat2DArray()) { + ohlc = this.handleCandleStickBoxDataFormat('array', ser, i) + } else if (this.isFormatXY()) { + ohlc = this.handleCandleStickBoxDataFormat('xy', ser, i) + } + + gl.seriesCandleO[i] = ohlc.o + gl.seriesCandleH[i] = ohlc.h + gl.seriesCandleM[i] = ohlc.m + gl.seriesCandleL[i] = ohlc.l + gl.seriesCandleC[i] = ohlc.c + + return ohlc + } + + handleRangeDataFormat(format, ser, i) { + const rangeStart = [] + const rangeEnd = [] + + const uniqueKeys = ser[i].data + .filter( + (thing, index, self) => index === self.findIndex((t) => t.x === thing.x) + ) + .map((r, index) => { + return { + x: r.x, + overlaps: [], + y: [] + } + }) + + const err = + 'Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts' + + const serObj = new Series(this.ctx) + const activeIndex = serObj.getActiveConfigSeriesIndex() + if (format === 'array') { + if (ser[activeIndex].data[0][1].length !== 2) { + throw new Error(err) + } + for (let j = 0; j < ser[i].data.length; j++) { + rangeStart.push(ser[i].data[j][1][0]) + rangeEnd.push(ser[i].data[j][1][1]) + } + } else if (format === 'xy') { + if (ser[activeIndex].data[0].y.length !== 2) { + throw new Error(err) + } + for (let j = 0; j < ser[i].data.length; j++) { + const id = Utils.randomId() + const x = ser[i].data[j].x + const y = { + y1: ser[i].data[j].y[0], + y2: ser[i].data[j].y[1], + rangeName: id + } + + // mutating config object by adding a new property + // TODO: As this is specifically for timeline rangebar charts, update the docs mentioning the series only supports xy format + ser[i].data[j].rangeName = id + + const uI = uniqueKeys.findIndex((t) => t.x === x) + uniqueKeys[uI].y.push(y) + + rangeStart.push(y.y1) + rangeEnd.push(y.y2) + } + } + + return { + start: rangeStart, + end: rangeEnd, + rangeUniques: uniqueKeys + } + } + + handleCandleStickBoxDataFormat(format, ser, i) { + const w = this.w + const isBoxPlot = + w.config.chart.type === 'boxPlot' || w.config.series[i].type === 'boxPlot' + + const serO = [] + const serH = [] + const serM = [] + const serL = [] + const serC = [] + + if (format === 'array') { + if ( + (isBoxPlot && ser[i].data[0].length === 6) || + (!isBoxPlot && ser[i].data[0].length === 5) + ) { + for (let j = 0; j < ser[i].data.length; j++) { + serO.push(ser[i].data[j][1]) + serH.push(ser[i].data[j][2]) + + if (isBoxPlot) { + serM.push(ser[i].data[j][3]) + serL.push(ser[i].data[j][4]) + serC.push(ser[i].data[j][5]) + } else { + serL.push(ser[i].data[j][3]) + serC.push(ser[i].data[j][4]) + } + } + } else { + for (let j = 0; j < ser[i].data.length; j++) { + if (Array.isArray(ser[i].data[j][1])) { + serO.push(ser[i].data[j][1][0]) + serH.push(ser[i].data[j][1][1]) + if (isBoxPlot) { + serM.push(ser[i].data[j][1][2]) + serL.push(ser[i].data[j][1][3]) + serC.push(ser[i].data[j][1][4]) + } else { + serL.push(ser[i].data[j][1][2]) + serC.push(ser[i].data[j][1][3]) + } + } + } + } + } else if (format === 'xy') { + for (let j = 0; j < ser[i].data.length; j++) { + if (Array.isArray(ser[i].data[j].y)) { + serO.push(ser[i].data[j].y[0]) + serH.push(ser[i].data[j].y[1]) + if (isBoxPlot) { + serM.push(ser[i].data[j].y[2]) + serL.push(ser[i].data[j].y[3]) + serC.push(ser[i].data[j].y[4]) + } else { + serL.push(ser[i].data[j].y[2]) + serC.push(ser[i].data[j].y[3]) + } + } + } + } + + return { + o: serO, + h: serH, + m: serM, + l: serL, + c: serC + } + } + + parseDataAxisCharts(ser, ctx = this.ctx) { + const cnf = this.w.config + const gl = this.w.globals + + const dt = new DateTime(ctx) + + const xlabels = + cnf.labels.length > 0 ? cnf.labels.slice() : cnf.xaxis.categories.slice() + + gl.isRangeBar = cnf.chart.type === 'rangeBar' && gl.isBarHorizontal + + gl.hasGroups = + cnf.xaxis.type === 'category' && cnf.xaxis.group.groups.length > 0 + if (gl.hasGroups) { + gl.groups = cnf.xaxis.group.groups + } + + const handleDates = () => { + for (let j = 0; j < xlabels.length; j++) { + if (typeof xlabels[j] === 'string') { + // user provided date strings + let isDate = dt.isValidDate(xlabels[j]) + if (isDate) { + this.twoDSeriesX.push(dt.parseDate(xlabels[j])) + } else { + throw new Error( + 'You have provided invalid Date format. Please provide a valid JavaScript Date' + ) + } + } else { + // user provided timestamps + this.twoDSeriesX.push(xlabels[j]) + } + } + } + + for (let i = 0; i < ser.length; i++) { + this.twoDSeries = [] + this.twoDSeriesX = [] + this.threeDSeries = [] + + if (typeof ser[i].data === 'undefined') { + console.error( + "It is a possibility that you may have not included 'data' property in series." + ) + return + } + + if ( + cnf.chart.type === 'rangeBar' || + cnf.chart.type === 'rangeArea' || + ser[i].type === 'rangeBar' || + ser[i].type === 'rangeArea' + ) { + gl.isRangeData = true + this.handleRangeData(ser, i) + } + + if (this.isMultiFormat()) { + if (this.isFormat2DArray()) { + this.handleFormat2DArray(ser, i) + } else if (this.isFormatXY()) { + this.handleFormatXY(ser, i) + } + + if ( + cnf.chart.type === 'candlestick' || + ser[i].type === 'candlestick' || + cnf.chart.type === 'boxPlot' || + ser[i].type === 'boxPlot' + ) { + this.handleCandleStickBoxData(ser, i) + } + + gl.series.push(this.twoDSeries) + gl.labels.push(this.twoDSeriesX) + gl.seriesX.push(this.twoDSeriesX) + gl.seriesGoals = this.seriesGoals + + if (i === this.activeSeriesIndex && !this.fallbackToCategory) { + gl.isXNumeric = true + } + } else { + if (cnf.xaxis.type === 'datetime') { + // user didn't supplied [{x,y}] or [[x,y]], but single array in data. + // Also labels/categories were supplied differently + gl.isXNumeric = true + + handleDates() + + gl.seriesX.push(this.twoDSeriesX) + } else if (cnf.xaxis.type === 'numeric') { + gl.isXNumeric = true + + if (xlabels.length > 0) { + this.twoDSeriesX = xlabels + gl.seriesX.push(this.twoDSeriesX) + } + } + gl.labels.push(this.twoDSeriesX) + const singleArray = ser[i].data.map((d) => Utils.parseNumber(d)) + gl.series.push(singleArray) + } + + gl.seriesZ.push(this.threeDSeries) + + if (ser[i].name !== undefined) { + gl.seriesNames.push(ser[i].name) + } else { + gl.seriesNames.push('series-' + parseInt(i + 1, 10)) + } + + // overrided default color if user inputs color with series data + if (ser[i].color !== undefined) { + gl.seriesColors.push(ser[i].color) + } else { + gl.seriesColors.push(undefined) + } + } + + return this.w + } + + parseDataNonAxisCharts(ser) { + const gl = this.w.globals + const cnf = this.w.config + + gl.series = ser.slice() + gl.seriesNames = cnf.labels.slice() + for (let i = 0; i < gl.series.length; i++) { + if (gl.seriesNames[i] === undefined) { + gl.seriesNames.push('series-' + (i + 1)) + } + } + + return this.w + } + + /** User possibly set string categories in xaxis.categories or labels prop + * Or didn't set xaxis labels at all - in which case we manually do it. + * If user passed series data as [[3, 2], [4, 5]] or [{ x: 3, y: 55 }], + * this shouldn't be called + * @param {array} ser - the series which user passed to the config + */ + handleExternalLabelsData(ser) { + const cnf = this.w.config + const gl = this.w.globals + + if (cnf.xaxis.categories.length > 0) { + // user provided labels in xaxis.category prop + gl.labels = cnf.xaxis.categories + } else if (cnf.labels.length > 0) { + // user provided labels in labels props + gl.labels = cnf.labels.slice() + } else if (this.fallbackToCategory) { + // user provided labels in x prop in [{ x: 3, y: 55 }] data, and those labels are already stored in gl.labels[0], so just re-arrange the gl.labels array + gl.labels = gl.labels[0] + + if (gl.seriesRangeBar.length) { + gl.seriesRangeBar.map((srt) => { + srt.forEach((sr) => { + if (gl.labels.indexOf(sr.x) < 0 && sr.x) { + gl.labels.push(sr.x) + } + }) + }) + gl.labels = gl.labels.filter( + (elem, pos, arr) => arr.indexOf(elem) === pos + ) + } + + if (cnf.xaxis.convertedCatToNumeric) { + const defaults = new Defaults(cnf) + defaults.convertCatToNumericXaxis(cnf, this.ctx, gl.seriesX[0]) + this._generateExternalLabels(ser) + } + } else { + this._generateExternalLabels(ser) + } + } + + _generateExternalLabels(ser) { + const gl = this.w.globals + const cnf = this.w.config + // user didn't provided any labels, fallback to 1-2-3-4-5 + let labelArr = [] + + if (gl.axisCharts) { + if (gl.series.length > 0) { + if (this.isFormatXY()) { + // in case there is a combo chart (boxplot/scatter) + // and there are duplicated x values, we need to eliminate duplicates + const seriesDataFiltered = cnf.series.map((serie, s) => { + return serie.data.filter( + (v, i, a) => a.findIndex((t) => t.x === v.x) === i + ) + }) + + const len = seriesDataFiltered.reduce( + (p, c, i, a) => (a[p].length > c.length ? p : i), + 0 + ) + + for (let i = 0; i < seriesDataFiltered[len].length; i++) { + labelArr.push(i + 1) + } + } else { + for (let i = 0; i < gl.series[gl.maxValsInArrayIndex].length; i++) { + labelArr.push(i + 1) + } + } + } + + gl.seriesX = [] + // create gl.seriesX as it will be used in calculations of x positions + for (let i = 0; i < ser.length; i++) { + gl.seriesX.push(labelArr) + } + + // turn on the isXNumeric flag to allow minX and maxX to function properly + gl.isXNumeric = true + } + + // no series to pull labels from, put a 0-10 series + // possibly, user collapsed all series. Hence we can't work with above calc + if (labelArr.length === 0) { + labelArr = gl.axisCharts + ? [] + : gl.series.map((gls, glsi) => { + return glsi + 1 + }) + for (let i = 0; i < ser.length; i++) { + gl.seriesX.push(labelArr) + } + } + + // Finally, pass the labelArr in gl.labels which will be printed on x-axis + gl.labels = labelArr + + if (cnf.xaxis.convertedCatToNumeric) { + gl.categoryLabels = labelArr.map((l) => { + return cnf.xaxis.labels.formatter(l) + }) + } + + // Turn on this global flag to indicate no labels were provided by user + gl.noLabelsProvided = true + } + + // Segregate user provided data into appropriate vars + parseData(ser) { + let w = this.w + let cnf = w.config + let gl = w.globals + this.excludeCollapsedSeriesInYAxis() + + // If we detected string in X prop of series, we fallback to category x-axis + this.fallbackToCategory = false + + this.ctx.core.resetGlobals() + this.ctx.core.isMultipleY() + + if (gl.axisCharts) { + // axisCharts includes line / area / column / scatter + this.parseDataAxisCharts(ser) + } else { + // non-axis charts are pie / donut + this.parseDataNonAxisCharts(ser) + } + + this.coreUtils.getLargestSeries() + + // set Null values to 0 in all series when user hides/shows some series + if (cnf.chart.type === 'bar' && cnf.chart.stacked) { + const series = new Series(this.ctx) + gl.series = series.setNullSeriesToZeroValues(gl.series) + } + + this.coreUtils.getSeriesTotals() + if (gl.axisCharts) { + this.coreUtils.getStackedSeriesTotals() + } + + this.coreUtils.getPercentSeries() + + if ( + !gl.dataFormatXNumeric && + (!gl.isXNumeric || + (cnf.xaxis.type === 'numeric' && + cnf.labels.length === 0 && + cnf.xaxis.categories.length === 0)) + ) { + // x-axis labels couldn't be detected; hence try searching every option in config + this.handleExternalLabelsData(ser) + } + + // check for multiline xaxis + const catLabels = this.coreUtils.getCategoryLabels(gl.labels) + for (let l = 0; l < catLabels.length; l++) { + if (Array.isArray(catLabels[l])) { + gl.isMultiLineX = true + break + } + } + } + + excludeCollapsedSeriesInYAxis() { + const w = this.w + w.globals.ignoreYAxisIndexes = w.globals.collapsedSeries.map( + (collapsed, i) => { + // fix issue #1215 + // if stacked, not returning collapsed.index to preserve yaxis + if (this.w.globals.isMultipleYAxis && !w.config.chart.stacked) { + return collapsed.index + } + } + ) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/DataLabels.js b/cao_sunyata/static/libs/apexcharts/src/modules/DataLabels.js new file mode 100644 index 0000000..c0f140f --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/DataLabels.js @@ -0,0 +1,373 @@ +import Scatter from './../charts/Scatter' +import Graphics from './Graphics' +import Filters from './Filters' + +/** + * ApexCharts DataLabels Class for drawing dataLabels on Axes based Charts. + * + * @module DataLabels + **/ + +class DataLabels { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + // When there are many datalabels to be printed, and some of them overlaps each other in the same series, this method will take care of that + // Also, when datalabels exceeds the drawable area and get clipped off, we need to adjust and move some pixels to make them visible again + dataLabelsCorrection( + x, + y, + val, + i, + dataPointIndex, + alwaysDrawDataLabel, + fontSize + ) { + let w = this.w + let graphics = new Graphics(this.ctx) + let drawnextLabel = false // + + let textRects = graphics.getTextRects(val, fontSize) + let width = textRects.width + let height = textRects.height + + if (y < 0) y = 0 + if (y > w.globals.gridHeight + height) y = w.globals.gridHeight + height / 2 + + // first value in series, so push an empty array + if (typeof w.globals.dataLabelsRects[i] === 'undefined') + w.globals.dataLabelsRects[i] = [] + + // then start pushing actual rects in that sub-array + w.globals.dataLabelsRects[i].push({ x, y, width, height }) + + let len = w.globals.dataLabelsRects[i].length - 2 + let lastDrawnIndex = + typeof w.globals.lastDrawnDataLabelsIndexes[i] !== 'undefined' + ? w.globals.lastDrawnDataLabelsIndexes[i][ + w.globals.lastDrawnDataLabelsIndexes[i].length - 1 + ] + : 0 + + if (typeof w.globals.dataLabelsRects[i][len] !== 'undefined') { + let lastDataLabelRect = w.globals.dataLabelsRects[i][lastDrawnIndex] + if ( + // next label forward and x not intersecting + x > lastDataLabelRect.x + lastDataLabelRect.width + 2 || + y > lastDataLabelRect.y + lastDataLabelRect.height + 2 || + x + width < lastDataLabelRect.x // next label is going to be drawn backwards + ) { + // the 2 indexes don't override, so OK to draw next label + drawnextLabel = true + } + } + + if (dataPointIndex === 0 || alwaysDrawDataLabel) { + drawnextLabel = true + } + + return { + x, + y, + textRects, + drawnextLabel + } + } + + drawDataLabel(pos, i, j, z = null, strokeWidth = 2) { + // this method handles line, area, bubble, scatter charts as those charts contains markers/points which have pre-defined x/y positions + // all other charts like radar / bars / heatmaps will define their own drawDataLabel routine + let w = this.w + const graphics = new Graphics(this.ctx) + + let dataLabelsConfig = w.config.dataLabels + + let x = 0 + let y = 0 + + let dataPointIndex = j + + let elDataLabelsWrap = null + + if (!dataLabelsConfig.enabled || !Array.isArray(pos.x)) { + return elDataLabelsWrap + } + + elDataLabelsWrap = graphics.group({ + class: 'apexcharts-data-labels' + }) + + for (let q = 0; q < pos.x.length; q++) { + x = pos.x[q] + dataLabelsConfig.offsetX + y = pos.y[q] + dataLabelsConfig.offsetY + strokeWidth + + if (!isNaN(x)) { + // a small hack as we have 2 points for the first val to connect it + if (j === 1 && q === 0) dataPointIndex = 0 + if (j === 1 && q === 1) dataPointIndex = 1 + + let val = w.globals.series[i][dataPointIndex] + + let text = '' + + const getText = (v) => { + return w.config.dataLabels.formatter(v, { + ctx: this.ctx, + seriesIndex: i, + dataPointIndex, + w + }) + } + + if (w.config.chart.type === 'bubble') { + val = w.globals.seriesZ[i][dataPointIndex] + text = getText(val) + + y = pos.y[q] + const scatter = new Scatter(this.ctx) + let centerTextInBubbleCoords = scatter.centerTextInBubble( + y, + i, + dataPointIndex + ) + y = centerTextInBubbleCoords.y + } else { + if (typeof val !== 'undefined') { + text = getText(val) + } + } + + this.plotDataLabelsText({ + x, + y, + text, + i, + j: dataPointIndex, + parent: elDataLabelsWrap, + offsetCorrection: true, + dataLabelsConfig: w.config.dataLabels + }) + } + } + + return elDataLabelsWrap + } + + plotDataLabelsText(opts) { + let w = this.w + let graphics = new Graphics(this.ctx) + let { + x, + y, + i, + j, + text, + textAnchor, + fontSize, + parent, + dataLabelsConfig, + color, + alwaysDrawDataLabel, + offsetCorrection + } = opts + + if (Array.isArray(w.config.dataLabels.enabledOnSeries)) { + if (w.config.dataLabels.enabledOnSeries.indexOf(i) < 0) { + return + } + } + + let correctedLabels = { + x, + y, + drawnextLabel: true, + textRects: null + } + + if (offsetCorrection) { + correctedLabels = this.dataLabelsCorrection( + x, + y, + text, + i, + j, + alwaysDrawDataLabel, + parseInt(dataLabelsConfig.style.fontSize, 10) + ) + } + + // when zoomed, we don't need to correct labels offsets, + // but if normally, labels get cropped, correct them + if (!w.globals.zoomed) { + x = correctedLabels.x + y = correctedLabels.y + } + + if (correctedLabels.textRects) { + // fixes #2264 + if ( + x < -10 - correctedLabels.textRects.width || + x > w.globals.gridWidth + correctedLabels.textRects.width + 10 + ) { + // datalabels fall outside drawing area, so draw a blank label + text = '' + } + } + + let dataLabelColor = w.globals.dataLabels.style.colors[i] + if ( + ((w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') && + w.config.plotOptions.bar.distributed) || + w.config.dataLabels.distributed + ) { + dataLabelColor = w.globals.dataLabels.style.colors[j] + } + if (typeof dataLabelColor === 'function') { + dataLabelColor = dataLabelColor({ + series: w.globals.series, + seriesIndex: i, + dataPointIndex: j, + w + }) + } + if (color) { + dataLabelColor = color + } + + let offX = dataLabelsConfig.offsetX + let offY = dataLabelsConfig.offsetY + + if (w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') { + // for certain chart types, we handle offsets while calculating datalabels pos + // why? because bars/column may have negative values and based on that + // offsets becomes reversed + offX = 0 + offY = 0 + } + + if (correctedLabels.drawnextLabel) { + let dataLabelText = graphics.drawText({ + width: 100, + height: parseInt(dataLabelsConfig.style.fontSize, 10), + x: x + offX, + y: y + offY, + foreColor: dataLabelColor, + textAnchor: textAnchor || dataLabelsConfig.textAnchor, + text, + fontSize: fontSize || dataLabelsConfig.style.fontSize, + fontFamily: dataLabelsConfig.style.fontFamily, + fontWeight: dataLabelsConfig.style.fontWeight || 'normal' + }) + + dataLabelText.attr({ + class: 'apexcharts-datalabel', + cx: x, + cy: y + }) + + if (dataLabelsConfig.dropShadow.enabled) { + const textShadow = dataLabelsConfig.dropShadow + const filters = new Filters(this.ctx) + filters.dropShadow(dataLabelText, textShadow) + } + + parent.add(dataLabelText) + + if (typeof w.globals.lastDrawnDataLabelsIndexes[i] === 'undefined') { + w.globals.lastDrawnDataLabelsIndexes[i] = [] + } + + w.globals.lastDrawnDataLabelsIndexes[i].push(j) + } + } + + addBackgroundToDataLabel(el, coords) { + const w = this.w + + const bCnf = w.config.dataLabels.background + + const paddingH = bCnf.padding + const paddingV = bCnf.padding / 2 + + const width = coords.width + const height = coords.height + const graphics = new Graphics(this.ctx) + const elRect = graphics.drawRect( + coords.x - paddingH, + coords.y - paddingV / 2, + width + paddingH * 2, + height + paddingV, + bCnf.borderRadius, + w.config.chart.background === 'transparent' + ? '#fff' + : w.config.chart.background, + bCnf.opacity, + bCnf.borderWidth, + bCnf.borderColor + ) + + if (bCnf.dropShadow.enabled) { + const filters = new Filters(this.ctx) + filters.dropShadow(elRect, bCnf.dropShadow) + } + + return elRect + } + + dataLabelsBackground() { + const w = this.w + + if (w.config.chart.type === 'bubble') return + + const elDataLabels = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-datalabels text' + ) + + for (let i = 0; i < elDataLabels.length; i++) { + const el = elDataLabels[i] + const coords = el.getBBox() + let elRect = null + + if (coords.width && coords.height) { + elRect = this.addBackgroundToDataLabel(el, coords) + } + if (elRect) { + el.parentNode.insertBefore(elRect.node, el) + const background = el.getAttribute('fill') + + const shouldAnim = + w.config.chart.animations.enabled && + !w.globals.resized && + !w.globals.dataChanged + + if (shouldAnim) { + elRect.animate().attr({ fill: background }) + } else { + elRect.attr({ fill: background }) + } + el.setAttribute('fill', w.config.dataLabels.background.foreColor) + } + } + } + + bringForward() { + const w = this.w + const elDataLabelsNodes = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-datalabels' + ) + + const elSeries = w.globals.dom.baseEl.querySelector( + '.apexcharts-plot-series:last-child' + ) + + for (let i = 0; i < elDataLabelsNodes.length; i++) { + if (elSeries) { + elSeries.insertBefore(elDataLabelsNodes[i], elSeries.nextSibling) + } + } + } +} + +export default DataLabels diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Events.js b/cao_sunyata/static/libs/apexcharts/src/modules/Events.js new file mode 100644 index 0000000..9a6b95c --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Events.js @@ -0,0 +1,118 @@ +import Utils from '../utils/Utils' + +export default class Events { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.documentEvent = Utils.bind(this.documentEvent, this) + } + + addEventListener(name, handler) { + const w = this.w + + if (w.globals.events.hasOwnProperty(name)) { + w.globals.events[name].push(handler) + } else { + w.globals.events[name] = [handler] + } + } + + removeEventListener(name, handler) { + const w = this.w + if (!w.globals.events.hasOwnProperty(name)) { + return + } + + let index = w.globals.events[name].indexOf(handler) + if (index !== -1) { + w.globals.events[name].splice(index, 1) + } + } + + fireEvent(name, args) { + const w = this.w + + if (!w.globals.events.hasOwnProperty(name)) { + return + } + + if (!args || !args.length) { + args = [] + } + + let evs = w.globals.events[name] + let l = evs.length + + for (let i = 0; i < l; i++) { + evs[i].apply(null, args) + } + } + + setupEventHandlers() { + const w = this.w + const me = this.ctx + + let clickableArea = w.globals.dom.baseEl.querySelector(w.globals.chartClass) + + this.ctx.eventList.forEach((event) => { + clickableArea.addEventListener( + event, + (e) => { + const opts = Object.assign({}, w, { + seriesIndex: w.globals.capturedSeriesIndex, + dataPointIndex: w.globals.capturedDataPointIndex + }) + + if (e.type === 'mousemove' || e.type === 'touchmove') { + if (typeof w.config.chart.events.mouseMove === 'function') { + w.config.chart.events.mouseMove(e, me, opts) + } + } else if (e.type === 'mouseleave' || e.type === 'touchleave') { + if (typeof w.config.chart.events.mouseLeave === 'function') { + w.config.chart.events.mouseLeave(e, me, opts) + } + } else if ( + (e.type === 'mouseup' && e.which === 1) || + e.type === 'touchend' + ) { + if (typeof w.config.chart.events.click === 'function') { + w.config.chart.events.click(e, me, opts) + } + me.ctx.events.fireEvent('click', [e, me, opts]) + } + }, + { capture: false, passive: true } + ) + }) + + this.ctx.eventList.forEach((event) => { + w.globals.dom.baseEl.addEventListener(event, this.documentEvent, { + passive: true + }) + }) + + this.ctx.core.setupBrushHandler() + } + + documentEvent(e) { + const w = this.w + const target = e.target.className + + if (e.type === 'click') { + let elMenu = w.globals.dom.baseEl.querySelector('.apexcharts-menu') + if ( + elMenu && + elMenu.classList.contains('apexcharts-menu-open') && + target !== 'apexcharts-menu-icon' + ) { + elMenu.classList.remove('apexcharts-menu-open') + } + } + + w.globals.clientX = + e.type === 'touchmove' ? e.touches[0].clientX : e.clientX + w.globals.clientY = + e.type === 'touchmove' ? e.touches[0].clientY : e.clientY + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Exports.js b/cao_sunyata/static/libs/apexcharts/src/modules/Exports.js new file mode 100644 index 0000000..c38ce7f --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Exports.js @@ -0,0 +1,364 @@ +import Data from '../modules/Data' +import AxesUtils from '../modules/axes/AxesUtils' +import Series from '../modules/Series' +import Utils from '../utils/Utils' + +class Exports { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + scaleSvgNode(svg, scale) { + // get current both width and height of the svg + let svgWidth = parseFloat(svg.getAttributeNS(null, 'width')) + let svgHeight = parseFloat(svg.getAttributeNS(null, 'height')) + // set new width and height based on the scale + svg.setAttributeNS(null, 'width', svgWidth * scale) + svg.setAttributeNS(null, 'height', svgHeight * scale) + svg.setAttributeNS(null, 'viewBox', '0 0 ' + svgWidth + ' ' + svgHeight) + } + + fixSvgStringForIe11(svgData) { + // IE11 generates broken SVG that we have to fix by using regex + if (!Utils.isIE11()) { + // not IE11 - noop + return svgData.replace(/ /g, ' ') + } + + // replace second occurrence of "xmlns" attribute with "xmlns:xlink" with correct url + add xmlns:svgjs + let nXmlnsSeen = 0 + let result = svgData.replace( + /xmlns="http:\/\/www.w3.org\/2000\/svg"/g, + (match) => { + nXmlnsSeen++ + return nXmlnsSeen === 2 + ? 'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"' + : match + } + ) + + // remove the invalid empty namespace declarations + result = result.replace(/xmlns:NS\d+=""/g, '') + // remove these broken namespaces from attributes + result = result.replace(/NS\d+:(\w+:\w+=")/g, '$1') + + return result + } + + getSvgString(scale) { + let svgString = this.w.globals.dom.Paper.svg() + // in case the scale is different than 1, the svg needs to be rescaled + if (scale !== 1) { + // clone the svg node so it remains intact in the UI + const svgNode = this.w.globals.dom.Paper.node.cloneNode(true) + // scale the image + this.scaleSvgNode(svgNode, scale) + // get the string representation of the svgNode + svgString = new XMLSerializer().serializeToString(svgNode) + } + return this.fixSvgStringForIe11(svgString) + } + + cleanup() { + const w = this.w + + // hide some elements to avoid printing them on exported svg + const xcrosshairs = w.globals.dom.baseEl.getElementsByClassName( + 'apexcharts-xcrosshairs' + ) + const ycrosshairs = w.globals.dom.baseEl.getElementsByClassName( + 'apexcharts-ycrosshairs' + ) + const zoomSelectionRects = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-zoom-rect, .apexcharts-selection-rect' + ) + Array.prototype.forEach.call(zoomSelectionRects, (z) => { + z.setAttribute('width', 0) + }) + if (xcrosshairs && xcrosshairs[0]) { + xcrosshairs[0].setAttribute('x', -500) + xcrosshairs[0].setAttribute('x1', -500) + xcrosshairs[0].setAttribute('x2', -500) + } + if (ycrosshairs && ycrosshairs[0]) { + ycrosshairs[0].setAttribute('y', -100) + ycrosshairs[0].setAttribute('y1', -100) + ycrosshairs[0].setAttribute('y2', -100) + } + } + + svgUrl() { + this.cleanup() + + const svgData = this.getSvgString() + const svgBlob = new Blob([svgData], { type: 'image/svg+xml;charset=utf-8' }) + return URL.createObjectURL(svgBlob) + } + + dataURI(options) { + return new Promise((resolve) => { + const w = this.w + + const scale = options + ? options.scale || options.width / w.globals.svgWidth + : 1 + + this.cleanup() + const canvas = document.createElement('canvas') + canvas.width = w.globals.svgWidth * scale + canvas.height = parseInt(w.globals.dom.elWrap.style.height, 10) * scale // because of resizeNonAxisCharts + + const canvasBg = + w.config.chart.background === 'transparent' + ? '#fff' + : w.config.chart.background + + let ctx = canvas.getContext('2d') + ctx.fillStyle = canvasBg + ctx.fillRect(0, 0, canvas.width * scale, canvas.height * scale) + + const svgData = this.getSvgString(scale) + + if (window.canvg && Utils.isIE11()) { + // use canvg as a polyfill to workaround ie11 considering a canvas with loaded svg 'unsafe' + // without ignoreClear we lose our background color; without ignoreDimensions some grid lines become invisible + let v = window.canvg.Canvg.fromString(ctx, svgData, { + ignoreClear: true, + ignoreDimensions: true + }) + // render the svg to canvas + v.start() + + let blob = canvas.msToBlob() + // dispose - missing this will cause a memory leak + v.stop() + + resolve({ blob }) + } else { + const svgUrl = 'data:image/svg+xml,' + encodeURIComponent(svgData) + let img = new Image() + img.crossOrigin = 'anonymous' + + img.onload = () => { + ctx.drawImage(img, 0, 0) + + if (canvas.msToBlob) { + // IE and Edge can't navigate to data urls, so we return the blob instead + let blob = canvas.msToBlob() + resolve({ blob }) + } else { + let imgURI = canvas.toDataURL('image/png') + resolve({ imgURI }) + } + } + + img.src = svgUrl + } + }) + } + + exportToSVG() { + this.triggerDownload( + this.svgUrl(), + this.w.config.chart.toolbar.export.svg.filename, + '.svg' + ) + } + + exportToPng() { + this.dataURI().then(({ imgURI, blob }) => { + if (blob) { + navigator.msSaveOrOpenBlob(blob, this.w.globals.chartID + '.png') + } else { + this.triggerDownload( + imgURI, + this.w.config.chart.toolbar.export.png.filename, + '.png' + ) + } + }) + } + + exportToCSV({ series, columnDelimiter, lineDelimiter = '\n' }) { + const w = this.w + + let columns = [] + let rows = [] + let result = '' + let universalBOM = '\uFEFF' + + const isTimeStamp = (num) => { + return w.config.xaxis.type === 'datetime' && String(num).length >= 10 + } + const dataFormat = new Data(this.ctx) + + const axesUtils = new AxesUtils(this.ctx) + const getCat = (i) => { + let cat = '' + + // pie / donut/ radial + if (!w.globals.axisCharts) { + cat = w.config.labels[i] + } else { + // xy charts + + // non datetime + if ( + w.config.xaxis.type === 'category' || + w.config.xaxis.convertedCatToNumeric + ) { + if (w.globals.isBarHorizontal) { + let lbFormatter = w.globals.yLabelFormatters[0] + let sr = new Series(this.ctx) + let activeSeries = sr.getActiveConfigSeriesIndex() + + cat = lbFormatter(w.globals.labels[i], { + seriesIndex: activeSeries, + dataPointIndex: i, + w + }) + } else { + cat = axesUtils.getLabel( + w.globals.labels, + w.globals.timescaleLabels, + 0, + i + ).text + } + } + + // datetime, but labels specified in categories or labels + if (w.config.xaxis.type === 'datetime') { + if (w.config.xaxis.categories.length) { + cat = w.config.xaxis.categories[i] + } else if (w.config.labels.length) { + cat = w.config.labels[i] + } + } + } + + if (Array.isArray(cat)) { + cat = cat.join(' ') + } + + return Utils.isNumber(cat) ? cat : cat.split(columnDelimiter).join('') + } + + const handleAxisRowsColumns = (s, sI) => { + if (columns.length && sI === 0) { + rows.push(columns.join(columnDelimiter)) + } + + if (s.data && s.data.length) { + for (let i = 0; i < s.data.length; i++) { + columns = [] + + let cat = getCat(i) + if (!cat) { + if (dataFormat.isFormatXY()) { + cat = series[sI].data[i].x + } else if (dataFormat.isFormat2DArray()) { + cat = series[sI].data[i] ? series[sI].data[i][0] : '' + } + } + + if (sI === 0) { + columns.push( + isTimeStamp(cat) + ? w.config.chart.toolbar.export.csv.dateFormatter(cat) + : Utils.isNumber(cat) + ? cat + : cat.split(columnDelimiter).join('') + ) + + for (let ci = 0; ci < w.globals.series.length; ci++) { + columns.push(w.globals.series[ci][i]) + } + } + + if ( + w.config.chart.type === 'candlestick' || + (s.type && s.type === 'candlestick') + ) { + columns.pop() + columns.push(w.globals.seriesCandleO[sI][i]) + columns.push(w.globals.seriesCandleH[sI][i]) + columns.push(w.globals.seriesCandleL[sI][i]) + columns.push(w.globals.seriesCandleC[sI][i]) + } + + if ( + w.config.chart.type === 'boxPlot' || + (s.type && s.type === 'boxPlot') + ) { + columns.pop() + columns.push(w.globals.seriesCandleO[sI][i]) + columns.push(w.globals.seriesCandleH[sI][i]) + columns.push(w.globals.seriesCandleM[sI][i]) + columns.push(w.globals.seriesCandleL[sI][i]) + columns.push(w.globals.seriesCandleC[sI][i]) + } + + if (w.config.chart.type === 'rangeBar') { + columns.pop() + columns.push(w.globals.seriesRangeStart[sI][i]) + columns.push(w.globals.seriesRangeEnd[sI][i]) + } + + if (columns.length) { + rows.push(columns.join(columnDelimiter)) + } + } + } + } + + columns.push(w.config.chart.toolbar.export.csv.headerCategory) + series.map((s, sI) => { + const sname = s.name ? s.name : `series-${sI}` + if (w.globals.axisCharts) { + columns.push( + sname.split(columnDelimiter).join('') + ? sname.split(columnDelimiter).join('') + : `series-${sI}` + ) + } + }) + + if (!w.globals.axisCharts) { + columns.push(w.config.chart.toolbar.export.csv.headerValue) + rows.push(columns.join(columnDelimiter)) + } + series.map((s, sI) => { + if (w.globals.axisCharts) { + handleAxisRowsColumns(s, sI) + } else { + columns = [] + + columns.push(w.globals.labels[sI].split(columnDelimiter).join('')) + columns.push(w.globals.series[sI]) + rows.push(columns.join(columnDelimiter)) + } + }) + + result += rows.join(lineDelimiter) + + this.triggerDownload( + 'data:text/csv; charset=utf-8,' + + encodeURIComponent(universalBOM + result), + w.config.chart.toolbar.export.csv.filename, + '.csv' + ) + } + + triggerDownload(href, filename, ext) { + const downloadLink = document.createElement('a') + downloadLink.href = href + downloadLink.download = (filename ? filename : this.w.globals.chartID) + ext + document.body.appendChild(downloadLink) + downloadLink.click() + document.body.removeChild(downloadLink) + } +} + +export default Exports diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Fill.js b/cao_sunyata/static/libs/apexcharts/src/modules/Fill.js new file mode 100644 index 0000000..ce8d51b --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Fill.js @@ -0,0 +1,381 @@ +import Graphics from './Graphics' +import Utils from '../utils/Utils' + +/** + * ApexCharts Fill Class for setting fill options of the paths. + * + * @module Fill + **/ + +class Fill { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.opts = null + this.seriesIndex = 0 + } + + clippedImgArea(params) { + let w = this.w + let cnf = w.config + + let svgW = parseInt(w.globals.gridWidth, 10) + let svgH = parseInt(w.globals.gridHeight, 10) + + let size = svgW > svgH ? svgW : svgH + + let fillImg = params.image + + let imgWidth = 0 + let imgHeight = 0 + if ( + typeof params.width === 'undefined' && + typeof params.height === 'undefined' + ) { + if ( + cnf.fill.image.width !== undefined && + cnf.fill.image.height !== undefined + ) { + imgWidth = cnf.fill.image.width + 1 + imgHeight = cnf.fill.image.height + } else { + imgWidth = size + 1 + imgHeight = size + } + } else { + imgWidth = params.width + imgHeight = params.height + } + + let elPattern = document.createElementNS(w.globals.SVGNS, 'pattern') + + Graphics.setAttrs(elPattern, { + id: params.patternID, + patternUnits: params.patternUnits + ? params.patternUnits + : 'userSpaceOnUse', + width: imgWidth + 'px', + height: imgHeight + 'px' + }) + + let elImage = document.createElementNS(w.globals.SVGNS, 'image') + elPattern.appendChild(elImage) + + elImage.setAttributeNS(window.SVG.xlink, 'href', fillImg) + + Graphics.setAttrs(elImage, { + x: 0, + y: 0, + preserveAspectRatio: 'none', + width: imgWidth + 'px', + height: imgHeight + 'px' + }) + + elImage.style.opacity = params.opacity + + w.globals.dom.elDefs.node.appendChild(elPattern) + } + + getSeriesIndex(opts) { + const w = this.w + + if ( + ((w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') && + w.config.plotOptions.bar.distributed) || + w.config.chart.type === 'heatmap' || + w.config.chart.type === 'treemap' + ) { + this.seriesIndex = opts.seriesNumber + } else { + this.seriesIndex = opts.seriesNumber % w.globals.series.length + } + + return this.seriesIndex + } + + fillPath(opts) { + let w = this.w + this.opts = opts + + let cnf = this.w.config + let pathFill + + let patternFill, gradientFill + + this.seriesIndex = this.getSeriesIndex(opts) + + let fillColors = this.getFillColors() + let fillColor = fillColors[this.seriesIndex] + + //override fillcolor if user inputted color with data + if (w.globals.seriesColors[this.seriesIndex] !== undefined) { + fillColor = w.globals.seriesColors[this.seriesIndex] + } + + if (typeof fillColor === 'function') { + fillColor = fillColor({ + seriesIndex: this.seriesIndex, + dataPointIndex: opts.dataPointIndex, + value: opts.value, + w + }) + } + let fillType = this.getFillType(this.seriesIndex) + let fillOpacity = Array.isArray(cnf.fill.opacity) + ? cnf.fill.opacity[this.seriesIndex] + : cnf.fill.opacity + + if (opts.color) { + fillColor = opts.color + } + + let defaultColor = fillColor + + if (fillColor.indexOf('rgb') === -1) { + if (fillColor.length < 9) { + // if the hex contains alpha and is of 9 digit, skip the opacity + defaultColor = Utils.hexToRgba(fillColor, fillOpacity) + } + } else { + if (fillColor.indexOf('rgba') > -1) { + fillOpacity = Utils.getOpacityFromRGBA(fillColor) + } + } + if (opts.opacity) fillOpacity = opts.opacity + + if (fillType === 'pattern') { + patternFill = this.handlePatternFill( + patternFill, + fillColor, + fillOpacity, + defaultColor + ) + } + + if (fillType === 'gradient') { + gradientFill = this.handleGradientFill( + fillColor, + fillOpacity, + this.seriesIndex + ) + } + + if (fillType === 'image') { + let imgSrc = cnf.fill.image.src + + let patternID = opts.patternID ? opts.patternID : '' + this.clippedImgArea({ + opacity: fillOpacity, + image: Array.isArray(imgSrc) + ? opts.seriesNumber < imgSrc.length + ? imgSrc[opts.seriesNumber] + : imgSrc[0] + : imgSrc, + width: opts.width ? opts.width : undefined, + height: opts.height ? opts.height : undefined, + patternUnits: opts.patternUnits, + patternID: `pattern${w.globals.cuid}${opts.seriesNumber + + 1}${patternID}` + }) + pathFill = `url(#pattern${w.globals.cuid}${opts.seriesNumber + + 1}${patternID})` + } else if (fillType === 'gradient') { + pathFill = gradientFill + } else if (fillType === 'pattern') { + pathFill = patternFill + } else { + pathFill = defaultColor + } + + // override pattern/gradient if opts.solid is true + if (opts.solid) { + pathFill = defaultColor + } + + return pathFill + } + + getFillType(seriesIndex) { + const w = this.w + + if (Array.isArray(w.config.fill.type)) { + return w.config.fill.type[seriesIndex] + } else { + return w.config.fill.type + } + } + + getFillColors() { + const w = this.w + const cnf = w.config + const opts = this.opts + + let fillColors = [] + + if (w.globals.comboCharts) { + if (w.config.series[this.seriesIndex].type === 'line') { + if (Array.isArray(w.globals.stroke.colors)) { + fillColors = w.globals.stroke.colors + } else { + fillColors.push(w.globals.stroke.colors) + } + } else { + if (Array.isArray(w.globals.fill.colors)) { + fillColors = w.globals.fill.colors + } else { + fillColors.push(w.globals.fill.colors) + } + } + } else { + if (cnf.chart.type === 'line') { + if (Array.isArray(w.globals.stroke.colors)) { + fillColors = w.globals.stroke.colors + } else { + fillColors.push(w.globals.stroke.colors) + } + } else { + if (Array.isArray(w.globals.fill.colors)) { + fillColors = w.globals.fill.colors + } else { + fillColors.push(w.globals.fill.colors) + } + } + } + + // colors passed in arguments + if (typeof opts.fillColors !== 'undefined') { + fillColors = [] + if (Array.isArray(opts.fillColors)) { + fillColors = opts.fillColors.slice() + } else { + fillColors.push(opts.fillColors) + } + } + + return fillColors + } + + handlePatternFill(patternFill, fillColor, fillOpacity, defaultColor) { + const cnf = this.w.config + const opts = this.opts + let graphics = new Graphics(this.ctx) + + let patternStrokeWidth = + cnf.fill.pattern.strokeWidth === undefined + ? Array.isArray(cnf.stroke.width) + ? cnf.stroke.width[this.seriesIndex] + : cnf.stroke.width + : Array.isArray(cnf.fill.pattern.strokeWidth) + ? cnf.fill.pattern.strokeWidth[this.seriesIndex] + : cnf.fill.pattern.strokeWidth + let patternLineColor = fillColor + + if (Array.isArray(cnf.fill.pattern.style)) { + if (typeof cnf.fill.pattern.style[opts.seriesNumber] !== 'undefined') { + let pf = graphics.drawPattern( + cnf.fill.pattern.style[opts.seriesNumber], + cnf.fill.pattern.width, + cnf.fill.pattern.height, + patternLineColor, + patternStrokeWidth, + fillOpacity + ) + patternFill = pf + } else { + patternFill = defaultColor + } + } else { + patternFill = graphics.drawPattern( + cnf.fill.pattern.style, + cnf.fill.pattern.width, + cnf.fill.pattern.height, + patternLineColor, + patternStrokeWidth, + fillOpacity + ) + } + return patternFill + } + + handleGradientFill(fillColor, fillOpacity, i) { + const cnf = this.w.config + const opts = this.opts + let graphics = new Graphics(this.ctx) + let utils = new Utils() + + let type = cnf.fill.gradient.type + let gradientFrom = fillColor + let gradientTo + let opacityFrom = + cnf.fill.gradient.opacityFrom === undefined + ? fillOpacity + : Array.isArray(cnf.fill.gradient.opacityFrom) + ? cnf.fill.gradient.opacityFrom[i] + : cnf.fill.gradient.opacityFrom + + if (gradientFrom.indexOf('rgba') > -1) { + opacityFrom = Utils.getOpacityFromRGBA(gradientFrom) + } + let opacityTo = + cnf.fill.gradient.opacityTo === undefined + ? fillOpacity + : Array.isArray(cnf.fill.gradient.opacityTo) + ? cnf.fill.gradient.opacityTo[i] + : cnf.fill.gradient.opacityTo + + if ( + cnf.fill.gradient.gradientToColors === undefined || + cnf.fill.gradient.gradientToColors.length === 0 + ) { + if (cnf.fill.gradient.shade === 'dark') { + gradientTo = utils.shadeColor( + parseFloat(cnf.fill.gradient.shadeIntensity) * -1, + fillColor.indexOf('rgb') > -1 ? Utils.rgb2hex(fillColor) : fillColor + ) + } else { + gradientTo = utils.shadeColor( + parseFloat(cnf.fill.gradient.shadeIntensity), + fillColor.indexOf('rgb') > -1 ? Utils.rgb2hex(fillColor) : fillColor + ) + } + } else { + if (cnf.fill.gradient.gradientToColors[opts.seriesNumber]) { + const gToColor = cnf.fill.gradient.gradientToColors[opts.seriesNumber] + gradientTo = gToColor + if (gToColor.indexOf('rgba') > -1) { + opacityTo = Utils.getOpacityFromRGBA(gToColor) + } + } else { + gradientTo = fillColor + } + } + + if (cnf.fill.gradient.inverseColors) { + let t = gradientFrom + gradientFrom = gradientTo + gradientTo = t + } + + if (gradientFrom.indexOf('rgb') > -1) { + gradientFrom = Utils.rgb2hex(gradientFrom) + } + if (gradientTo.indexOf('rgb') > -1) { + gradientTo = Utils.rgb2hex(gradientTo) + } + + return graphics.drawGradient( + type, + gradientFrom, + gradientTo, + opacityFrom, + opacityTo, + opts.size, + cnf.fill.gradient.stops, + cnf.fill.gradient.colorStops, + i + ) + } +} + +export default Fill diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Filters.js b/cao_sunyata/static/libs/apexcharts/src/modules/Filters.js new file mode 100644 index 0000000..1aef073 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Filters.js @@ -0,0 +1,212 @@ +import Utils from './../utils/Utils' + +/** + * ApexCharts Filters Class for setting hover/active states on the paths. + * + * @module Formatters + **/ +class Filters { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + // create a re-usable filter which can be appended other filter effects and applied to multiple elements + getDefaultFilter(el, i) { + const w = this.w + el.unfilter(true) + + let filter = new window.SVG.Filter() + filter.size('120%', '180%', '-5%', '-40%') + + if (w.config.states.normal.filter !== 'none') { + this.applyFilter( + el, + i, + w.config.states.normal.filter.type, + w.config.states.normal.filter.value + ) + } else { + if (w.config.chart.dropShadow.enabled) { + this.dropShadow(el, w.config.chart.dropShadow, i) + } + } + } + + addNormalFilter(el, i) { + const w = this.w + + // revert shadow if it was there + // but, ignore marker as marker don't have dropshadow yet + if ( + w.config.chart.dropShadow.enabled && + !el.node.classList.contains('apexcharts-marker') + ) { + this.dropShadow(el, w.config.chart.dropShadow, i) + } + } + + // appends dropShadow to the filter object which can be chained with other filter effects + addLightenFilter(el, i, attrs) { + const w = this.w + const { intensity } = attrs + + el.unfilter(true) + + let filter = new window.SVG.Filter() + + el.filter((add) => { + const shadowAttr = w.config.chart.dropShadow + if (shadowAttr.enabled) { + filter = this.addShadow(add, i, shadowAttr) + } else { + filter = add + } + filter.componentTransfer({ + rgb: { type: 'linear', slope: 1.5, intercept: intensity } + }) + }) + el.filterer.node.setAttribute('filterUnits', 'userSpaceOnUse') + + this._scaleFilterSize(el.filterer.node) + } + + // appends dropShadow to the filter object which can be chained with other filter effects + addDarkenFilter(el, i, attrs) { + const w = this.w + const { intensity } = attrs + + el.unfilter(true) + + let filter = new window.SVG.Filter() + + el.filter((add) => { + const shadowAttr = w.config.chart.dropShadow + if (shadowAttr.enabled) { + filter = this.addShadow(add, i, shadowAttr) + } else { + filter = add + } + filter.componentTransfer({ + rgb: { type: 'linear', slope: intensity } + }) + }) + el.filterer.node.setAttribute('filterUnits', 'userSpaceOnUse') + this._scaleFilterSize(el.filterer.node) + } + + applyFilter(el, i, filter, intensity = 0.5) { + switch (filter) { + case 'none': { + this.addNormalFilter(el, i) + break + } + case 'lighten': { + this.addLightenFilter(el, i, { + intensity + }) + break + } + case 'darken': { + this.addDarkenFilter(el, i, { + intensity + }) + break + } + default: + // do nothing + break + } + } + + // appends dropShadow to the filter object which can be chained with other filter effects + addShadow(add, i, attrs) { + const { blur, top, left, color, opacity } = attrs + + let shadowBlur = add + .flood(Array.isArray(color) ? color[i] : color, opacity) + .composite(add.sourceAlpha, 'in') + .offset(left, top) + .gaussianBlur(blur) + .merge(add.source) + return add.blend(add.source, shadowBlur) + } + + // directly adds dropShadow to the element and returns the same element. + // the only way it is different from the addShadow() function is that addShadow is chainable to other filters, while this function discards all filters and add dropShadow + dropShadow(el, attrs, i = 0) { + let { top, left, blur, color, opacity, noUserSpaceOnUse } = attrs + const w = this.w + + el.unfilter(true) + + if (Utils.isIE() && w.config.chart.type === 'radialBar') { + // in radialbar charts, dropshadow is clipping actual drawing in IE + return el + } + + color = Array.isArray(color) ? color[i] : color + + el.filter((add) => { + let shadowBlur = null + if (Utils.isSafari() || Utils.isFirefox() || Utils.isIE()) { + // safari/firefox/IE have some alternative way to use this filter + shadowBlur = add + .flood(color, opacity) + .composite(add.sourceAlpha, 'in') + .offset(left, top) + .gaussianBlur(blur) + } else { + shadowBlur = add + .flood(color, opacity) + .composite(add.sourceAlpha, 'in') + .offset(left, top) + .gaussianBlur(blur) + .merge(add.source) + } + + add.blend(add.source, shadowBlur) + }) + + if (!noUserSpaceOnUse) { + el.filterer.node.setAttribute('filterUnits', 'userSpaceOnUse') + } + + this._scaleFilterSize(el.filterer.node) + + return el + } + + setSelectionFilter(el, realIndex, dataPointIndex) { + const w = this.w + if (typeof w.globals.selectedDataPoints[realIndex] !== 'undefined') { + if ( + w.globals.selectedDataPoints[realIndex].indexOf(dataPointIndex) > -1 + ) { + el.node.setAttribute('selected', true) + let activeFilter = w.config.states.active.filter + if (activeFilter !== 'none') { + this.applyFilter(el, realIndex, activeFilter.type, activeFilter.value) + } + } + } + } + + _scaleFilterSize(el) { + const setAttributes = (attrs) => { + for (let key in attrs) { + if (attrs.hasOwnProperty(key)) { + el.setAttribute(key, attrs[key]) + } + } + } + setAttributes({ + width: '200%', + height: '200%', + x: '-50%', + y: '-50%' + }) + } +} + +export default Filters diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Formatters.js b/cao_sunyata/static/libs/apexcharts/src/modules/Formatters.js new file mode 100644 index 0000000..70d26e9 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Formatters.js @@ -0,0 +1,182 @@ +import DateTime from '../utils/DateTime' +import Utils from '../utils/Utils' + +/** + * ApexCharts Formatter Class for setting value formatters for axes as well as tooltips. + * + * @module Formatters + **/ + +class Formatters { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + this.tooltipKeyFormat = 'dd MMM' + } + + xLabelFormat(fn, val, timestamp, opts) { + let w = this.w + + if (w.config.xaxis.type === 'datetime') { + if (w.config.xaxis.labels.formatter === undefined) { + // if user has not specified a custom formatter, use the default tooltip.x.format + if (w.config.tooltip.x.formatter === undefined) { + let datetimeObj = new DateTime(this.ctx) + return datetimeObj.formatDate( + datetimeObj.getDate(val), + w.config.tooltip.x.format + ) + } + } + } + + return fn(val, timestamp, opts) + } + + defaultGeneralFormatter(val) { + if (Array.isArray(val)) { + return val.map((v) => { + return v + }) + } else { + return val + } + } + + defaultYFormatter(v, yaxe, i) { + let w = this.w + + if (Utils.isNumber(v)) { + if (w.globals.yValueDecimal !== 0) { + v = v.toFixed( + yaxe.decimalsInFloat !== undefined + ? yaxe.decimalsInFloat + : w.globals.yValueDecimal + ) + } else if (w.globals.maxYArr[i] - w.globals.minYArr[i] < 5) { + v = v.toFixed(1) + } else { + v = v.toFixed(0) + } + } + return v + } + + setLabelFormatters() { + let w = this.w + + w.globals.xaxisTooltipFormatter = (val) => { + return this.defaultGeneralFormatter(val) + } + + w.globals.ttKeyFormatter = (val) => { + return this.defaultGeneralFormatter(val) + } + + w.globals.ttZFormatter = (val) => { + return val + } + + w.globals.legendFormatter = (val) => { + return this.defaultGeneralFormatter(val) + } + + // formatter function will always overwrite format property + if (w.config.xaxis.labels.formatter !== undefined) { + w.globals.xLabelFormatter = w.config.xaxis.labels.formatter + } else { + w.globals.xLabelFormatter = (val) => { + if (Utils.isNumber(val)) { + if ( + !w.config.xaxis.convertedCatToNumeric && + w.config.xaxis.type === 'numeric' + ) { + if (Utils.isNumber(w.config.xaxis.decimalsInFloat)) { + return val.toFixed(w.config.xaxis.decimalsInFloat) + } else { + const diff = w.globals.maxX - w.globals.minX + if (diff > 0 && diff < 100) { + return val.toFixed(1) + } + return val.toFixed(0) + } + } + + if (w.globals.isBarHorizontal) { + const range = w.globals.maxY - w.globals.minYArr + if (range < 4) { + return val.toFixed(1) + } + } + return val.toFixed(0) + } + return val + } + } + + if (typeof w.config.tooltip.x.formatter === 'function') { + w.globals.ttKeyFormatter = w.config.tooltip.x.formatter + } else { + w.globals.ttKeyFormatter = w.globals.xLabelFormatter + } + + if (typeof w.config.xaxis.tooltip.formatter === 'function') { + w.globals.xaxisTooltipFormatter = w.config.xaxis.tooltip.formatter + } + + if (Array.isArray(w.config.tooltip.y)) { + w.globals.ttVal = w.config.tooltip.y + } else { + if (w.config.tooltip.y.formatter !== undefined) { + w.globals.ttVal = w.config.tooltip.y + } + } + + if (w.config.tooltip.z.formatter !== undefined) { + w.globals.ttZFormatter = w.config.tooltip.z.formatter + } + + // legend formatter - if user wants to append any global values of series to legend text + if (w.config.legend.formatter !== undefined) { + w.globals.legendFormatter = w.config.legend.formatter + } + + // formatter function will always overwrite format property + w.config.yaxis.forEach((yaxe, i) => { + if (yaxe.labels.formatter !== undefined) { + w.globals.yLabelFormatters[i] = yaxe.labels.formatter + } else { + w.globals.yLabelFormatters[i] = (val) => { + if (!w.globals.xyCharts) return val + + if (Array.isArray(val)) { + return val.map((v) => { + return this.defaultYFormatter(v, yaxe, i) + }) + } else { + return this.defaultYFormatter(val, yaxe, i) + } + } + } + }) + + return w.globals + } + + heatmapLabelFormatters() { + const w = this.w + if (w.config.chart.type === 'heatmap') { + w.globals.yAxisScale[0].result = w.globals.seriesNames.slice() + + // get the longest string from the labels array and also apply label formatter to it + let longest = w.globals.seriesNames.reduce( + (a, b) => (a.length > b.length ? a : b), + 0 + ) + w.globals.yAxisScale[0].niceMax = longest + w.globals.yAxisScale[0].niceMin = longest + } + } +} + +export default Formatters diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Graphics.js b/cao_sunyata/static/libs/apexcharts/src/modules/Graphics.js new file mode 100644 index 0000000..cc70d37 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Graphics.js @@ -0,0 +1,842 @@ +import Animations from './Animations' +import Filters from './Filters' +import Utils from '../utils/Utils' + +/** + * ApexCharts Graphics Class for all drawing operations. + * + * @module Graphics + **/ + +class Graphics { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + drawLine( + x1, + y1, + x2, + y2, + lineColor = '#a8a8a8', + dashArray = 0, + strokeWidth = null, + strokeLineCap = 'butt' + ) { + let w = this.w + let line = w.globals.dom.Paper.line().attr({ + x1, + y1, + x2, + y2, + stroke: lineColor, + 'stroke-dasharray': dashArray, + 'stroke-width': strokeWidth, + 'stroke-linecap': strokeLineCap + }) + + return line + } + + drawRect( + x1 = 0, + y1 = 0, + x2 = 0, + y2 = 0, + radius = 0, + color = '#fefefe', + opacity = 1, + strokeWidth = null, + strokeColor = null, + strokeDashArray = 0 + ) { + let w = this.w + let rect = w.globals.dom.Paper.rect() + + rect.attr({ + x: x1, + y: y1, + width: x2 > 0 ? x2 : 0, + height: y2 > 0 ? y2 : 0, + rx: radius, + ry: radius, + opacity, + 'stroke-width': strokeWidth !== null ? strokeWidth : 0, + stroke: strokeColor !== null ? strokeColor : 'none', + 'stroke-dasharray': strokeDashArray + }) + + // fix apexcharts.js#1410 + rect.node.setAttribute('fill', color) + + return rect + } + + drawPolygon( + polygonString, + stroke = '#e1e1e1', + strokeWidth = 1, + fill = 'none' + ) { + const w = this.w + const polygon = w.globals.dom.Paper.polygon(polygonString).attr({ + fill, + stroke, + 'stroke-width': strokeWidth + }) + + return polygon + } + + drawCircle(radius, attrs = null) { + const w = this.w + + if (radius < 0) radius = 0 + const c = w.globals.dom.Paper.circle(radius * 2) + if (attrs !== null) { + c.attr(attrs) + } + return c + } + + drawPath({ + d = '', + stroke = '#a8a8a8', + strokeWidth = 1, + fill, + fillOpacity = 1, + strokeOpacity = 1, + classes, + strokeLinecap = null, + strokeDashArray = 0 + }) { + let w = this.w + + if (strokeLinecap === null) { + strokeLinecap = w.config.stroke.lineCap + } + + if (d.indexOf('undefined') > -1 || d.indexOf('NaN') > -1) { + d = `M 0 ${w.globals.gridHeight}` + } + let p = w.globals.dom.Paper.path(d).attr({ + fill, + 'fill-opacity': fillOpacity, + stroke, + 'stroke-opacity': strokeOpacity, + 'stroke-linecap': strokeLinecap, + 'stroke-width': strokeWidth, + 'stroke-dasharray': strokeDashArray, + class: classes + }) + + return p + } + + group(attrs = null) { + const w = this.w + const g = w.globals.dom.Paper.group() + + if (attrs !== null) { + g.attr(attrs) + } + return g + } + + move(x, y) { + let move = ['M', x, y].join(' ') + return move + } + + line(x, y, hORv = null) { + let line = null + if (hORv === null) { + line = ['L', x, y].join(' ') + } else if (hORv === 'H') { + line = ['H', x].join(' ') + } else if (hORv === 'V') { + line = ['V', y].join(' ') + } + return line + } + + curve(x1, y1, x2, y2, x, y) { + let curve = ['C', x1, y1, x2, y2, x, y].join(' ') + return curve + } + + quadraticCurve(x1, y1, x, y) { + let curve = ['Q', x1, y1, x, y].join(' ') + return curve + } + + arc(rx, ry, axisRotation, largeArcFlag, sweepFlag, x, y, relative = false) { + let coord = 'A' + if (relative) coord = 'a' + + let arc = [coord, rx, ry, axisRotation, largeArcFlag, sweepFlag, x, y].join( + ' ' + ) + return arc + } + + /** + * @memberof Graphics + * @param {object} + * i = series's index + * realIndex = realIndex is series's actual index when it was drawn time. After several redraws, the iterating "i" may change in loops, but realIndex doesn't + * pathFrom = existing pathFrom to animateTo + * pathTo = new Path to which d attr will be animated from pathFrom to pathTo + * stroke = line Color + * strokeWidth = width of path Line + * fill = it can be gradient, single color, pattern or image + * animationDelay = how much to delay when starting animation (in milliseconds) + * dataChangeSpeed = for dynamic animations, when data changes + * className = class attribute to add + * @return {object} svg.js path object + **/ + renderPaths({ + j, + realIndex, + pathFrom, + pathTo, + stroke, + strokeWidth, + strokeLinecap, + fill, + animationDelay, + initialSpeed, + dataChangeSpeed, + className, + shouldClipToGrid = true, + bindEventsOnPaths = true, + drawShadow = true + }) { + let w = this.w + const filters = new Filters(this.ctx) + const anim = new Animations(this.ctx) + + let initialAnim = this.w.config.chart.animations.enabled + let dynamicAnim = + initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled + + let d + let shouldAnimate = !!( + (initialAnim && !w.globals.resized) || + (dynamicAnim && w.globals.dataChanged && w.globals.shouldAnimate) + ) + + if (shouldAnimate) { + d = pathFrom + } else { + d = pathTo + w.globals.animationEnded = true + } + + let strokeDashArrayOpt = w.config.stroke.dashArray + let strokeDashArray = 0 + if (Array.isArray(strokeDashArrayOpt)) { + strokeDashArray = strokeDashArrayOpt[realIndex] + } else { + strokeDashArray = w.config.stroke.dashArray + } + + let el = this.drawPath({ + d, + stroke, + strokeWidth, + fill, + fillOpacity: 1, + classes: className, + strokeLinecap, + strokeDashArray + }) + + el.attr('index', realIndex) + + if (shouldClipToGrid) { + el.attr({ + 'clip-path': `url(#gridRectMask${w.globals.cuid})` + }) + } + + // const defaultFilter = el.filterer + + if (w.config.states.normal.filter.type !== 'none') { + filters.getDefaultFilter(el, realIndex) + } else { + if (w.config.chart.dropShadow.enabled && drawShadow) { + if ( + !w.config.chart.dropShadow.enabledOnSeries || + (w.config.chart.dropShadow.enabledOnSeries && + w.config.chart.dropShadow.enabledOnSeries.indexOf(realIndex) !== -1) + ) { + const shadow = w.config.chart.dropShadow + filters.dropShadow(el, shadow, realIndex) + } + } + } + + if (bindEventsOnPaths) { + el.node.addEventListener('mouseenter', this.pathMouseEnter.bind(this, el)) + el.node.addEventListener('mouseleave', this.pathMouseLeave.bind(this, el)) + el.node.addEventListener('mousedown', this.pathMouseDown.bind(this, el)) + } + + el.attr({ + pathTo, + pathFrom + }) + + const defaultAnimateOpts = { + el, + j, + realIndex, + pathFrom, + pathTo, + fill, + strokeWidth, + delay: animationDelay + } + + if (initialAnim && !w.globals.resized && !w.globals.dataChanged) { + anim.animatePathsGradually({ + ...defaultAnimateOpts, + speed: initialSpeed + }) + } else { + if (w.globals.resized || !w.globals.dataChanged) { + anim.showDelayedElements() + } + } + + if (w.globals.dataChanged && dynamicAnim && shouldAnimate) { + anim.animatePathsGradually({ + ...defaultAnimateOpts, + speed: dataChangeSpeed + }) + } + + return el + } + + drawPattern( + style, + width, + height, + stroke = '#a8a8a8', + strokeWidth = 0, + opacity = 1 + ) { + let w = this.w + + let p = w.globals.dom.Paper.pattern(width, height, (add) => { + if (style === 'horizontalLines') { + add + .line(0, 0, height, 0) + .stroke({ color: stroke, width: strokeWidth + 1 }) + } else if (style === 'verticalLines') { + add + .line(0, 0, 0, width) + .stroke({ color: stroke, width: strokeWidth + 1 }) + } else if (style === 'slantedLines') { + add + .line(0, 0, width, height) + .stroke({ color: stroke, width: strokeWidth }) + } else if (style === 'squares') { + add + .rect(width, height) + .fill('none') + .stroke({ color: stroke, width: strokeWidth }) + } else if (style === 'circles') { + add + .circle(width) + .fill('none') + .stroke({ color: stroke, width: strokeWidth }) + } + }) + + return p + } + + drawGradient( + style, + gfrom, + gto, + opacityFrom, + opacityTo, + size = null, + stops = null, + colorStops = null, + i = 0 + ) { + let w = this.w + let g + + if (gfrom.length < 9 && gfrom.indexOf('#') === 0) { + // if the hex contains alpha and is of 9 digit, skip the opacity + gfrom = Utils.hexToRgba(gfrom, opacityFrom) + } + if (gto.length < 9 && gto.indexOf('#') === 0) { + gto = Utils.hexToRgba(gto, opacityTo) + } + + let stop1 = 0 + let stop2 = 1 + let stop3 = 1 + let stop4 = null + + if (stops !== null) { + stop1 = typeof stops[0] !== 'undefined' ? stops[0] / 100 : 0 + stop2 = typeof stops[1] !== 'undefined' ? stops[1] / 100 : 1 + stop3 = typeof stops[2] !== 'undefined' ? stops[2] / 100 : 1 + stop4 = typeof stops[3] !== 'undefined' ? stops[3] / 100 : null + } + + let radial = !!( + w.config.chart.type === 'donut' || + w.config.chart.type === 'pie' || + w.config.chart.type === 'polarArea' || + w.config.chart.type === 'bubble' + ) + + if (colorStops === null || colorStops.length === 0) { + g = w.globals.dom.Paper.gradient(radial ? 'radial' : 'linear', (stop) => { + stop.at(stop1, gfrom, opacityFrom) + stop.at(stop2, gto, opacityTo) + stop.at(stop3, gto, opacityTo) + if (stop4 !== null) { + stop.at(stop4, gfrom, opacityFrom) + } + }) + } else { + g = w.globals.dom.Paper.gradient(radial ? 'radial' : 'linear', (stop) => { + let gradientStops = Array.isArray(colorStops[i]) + ? colorStops[i] + : colorStops + gradientStops.forEach((s) => { + stop.at(s.offset / 100, s.color, s.opacity) + }) + }) + } + + if (!radial) { + if (style === 'vertical') { + g.from(0, 0).to(0, 1) + } else if (style === 'diagonal') { + g.from(0, 0).to(1, 1) + } else if (style === 'horizontal') { + g.from(0, 1).to(1, 1) + } else if (style === 'diagonal2') { + g.from(1, 0).to(0, 1) + } + } else { + let offx = w.globals.gridWidth / 2 + let offy = w.globals.gridHeight / 2 + + if (w.config.chart.type !== 'bubble') { + g.attr({ + gradientUnits: 'userSpaceOnUse', + cx: offx, + cy: offy, + r: size + }) + } else { + g.attr({ + cx: 0.5, + cy: 0.5, + r: 0.8, + fx: 0.2, + fy: 0.2 + }) + } + } + + return g + } + + getTextBasedOnMaxWidth({ text, maxWidth, fontSize, fontFamily }) { + const tRects = this.getTextRects(text, fontSize, fontFamily) + const wordWidth = tRects.width / text.length + const wordsBasedOnWidth = Math.floor(maxWidth / wordWidth) + if (maxWidth < tRects.width) { + return text.slice(0, wordsBasedOnWidth - 3) + '...' + } + return text + } + + drawText({ + x, + y, + text, + textAnchor, + fontSize, + fontFamily, + fontWeight, + foreColor, + opacity, + maxWidth, + cssClass = '', + isPlainText = true + }) { + let w = this.w + + if (typeof text === 'undefined') text = '' + + let truncatedText = text + if (!textAnchor) { + textAnchor = 'start' + } + + if (!foreColor || !foreColor.length) { + foreColor = w.config.chart.foreColor + } + fontFamily = fontFamily || w.config.chart.fontFamily + fontSize = fontSize || '11px' + fontWeight = fontWeight || 'regular' + + const commonProps = { + maxWidth, + fontSize, + fontFamily + } + let elText + if (Array.isArray(text)) { + elText = w.globals.dom.Paper.text((add) => { + for (let i = 0; i < text.length; i++) { + if (maxWidth) { + truncatedText = this.getTextBasedOnMaxWidth({ + text: text[i], + ...commonProps + }) + } + i === 0 + ? add.tspan(truncatedText) + : add.tspan(truncatedText).newLine() + } + }) + } else { + if (maxWidth) { + truncatedText = this.getTextBasedOnMaxWidth({ + text, + ...commonProps + }) + } + elText = isPlainText + ? w.globals.dom.Paper.plain(text) + : w.globals.dom.Paper.text((add) => add.tspan(truncatedText)) + } + + elText.attr({ + x, + y, + 'text-anchor': textAnchor, + 'dominant-baseline': 'auto', + 'font-size': fontSize, + 'font-family': fontFamily, + 'font-weight': fontWeight, + fill: foreColor, + class: 'apexcharts-text ' + cssClass + }) + + elText.node.style.fontFamily = fontFamily + elText.node.style.opacity = opacity + + return elText + } + + drawMarker(x, y, opts) { + x = x || 0 + let size = opts.pSize || 0 + + let elPoint = null + + if (opts.shape === 'square' || opts.shape === 'rect') { + let radius = opts.pRadius === undefined ? size / 2 : opts.pRadius + + if (y === null || !size) { + size = 0 + radius = 0 + } + + let nSize = size * 1.2 + radius + + let p = this.drawRect(nSize, nSize, nSize, nSize, radius) + + p.attr({ + x: x - nSize / 2, + y: y - nSize / 2, + cx: x, + cy: y, + class: opts.class ? opts.class : '', + fill: opts.pointFillColor, + 'fill-opacity': opts.pointFillOpacity ? opts.pointFillOpacity : 1, + stroke: opts.pointStrokeColor, + 'stroke-width': opts.pointStrokeWidth ? opts.pointStrokeWidth : 0, + 'stroke-opacity': opts.pointStrokeOpacity ? opts.pointStrokeOpacity : 1 + }) + + elPoint = p + } else if (opts.shape === 'circle' || !opts.shape) { + if (!Utils.isNumber(y)) { + size = 0 + y = 0 + } + + // let nSize = size - opts.pRadius / 2 < 0 ? 0 : size - opts.pRadius / 2 + + elPoint = this.drawCircle(size, { + cx: x, + cy: y, + class: opts.class ? opts.class : '', + stroke: opts.pointStrokeColor, + fill: opts.pointFillColor, + 'fill-opacity': opts.pointFillOpacity ? opts.pointFillOpacity : 1, + 'stroke-width': opts.pointStrokeWidth ? opts.pointStrokeWidth : 0, + 'stroke-opacity': opts.pointStrokeOpacity ? opts.pointStrokeOpacity : 1 + }) + } + + return elPoint + } + + pathMouseEnter(path, e) { + let w = this.w + const filters = new Filters(this.ctx) + + const i = parseInt(path.node.getAttribute('index'), 10) + const j = parseInt(path.node.getAttribute('j'), 10) + + if (typeof w.config.chart.events.dataPointMouseEnter === 'function') { + w.config.chart.events.dataPointMouseEnter(e, this.ctx, { + seriesIndex: i, + dataPointIndex: j, + w + }) + } + this.ctx.events.fireEvent('dataPointMouseEnter', [ + e, + this.ctx, + { seriesIndex: i, dataPointIndex: j, w } + ]) + + if (w.config.states.active.filter.type !== 'none') { + if (path.node.getAttribute('selected') === 'true') { + return + } + } + + if (w.config.states.hover.filter.type !== 'none') { + if (!w.globals.isTouchDevice) { + let hoverFilter = w.config.states.hover.filter + filters.applyFilter(path, i, hoverFilter.type, hoverFilter.value) + } + } + } + + pathMouseLeave(path, e) { + let w = this.w + const filters = new Filters(this.ctx) + + const i = parseInt(path.node.getAttribute('index'), 10) + const j = parseInt(path.node.getAttribute('j'), 10) + + if (typeof w.config.chart.events.dataPointMouseLeave === 'function') { + w.config.chart.events.dataPointMouseLeave(e, this.ctx, { + seriesIndex: i, + dataPointIndex: j, + w + }) + } + this.ctx.events.fireEvent('dataPointMouseLeave', [ + e, + this.ctx, + { seriesIndex: i, dataPointIndex: j, w } + ]) + + if (w.config.states.active.filter.type !== 'none') { + if (path.node.getAttribute('selected') === 'true') { + return + } + } + + if (w.config.states.hover.filter.type !== 'none') { + filters.getDefaultFilter(path, i) + } + } + + pathMouseDown(path, e) { + let w = this.w + const filters = new Filters(this.ctx) + + const i = parseInt(path.node.getAttribute('index'), 10) + const j = parseInt(path.node.getAttribute('j'), 10) + + let selected = 'false' + if (path.node.getAttribute('selected') === 'true') { + path.node.setAttribute('selected', 'false') + + if (w.globals.selectedDataPoints[i].indexOf(j) > -1) { + let index = w.globals.selectedDataPoints[i].indexOf(j) + w.globals.selectedDataPoints[i].splice(index, 1) + } + } else { + if ( + !w.config.states.active.allowMultipleDataPointsSelection && + w.globals.selectedDataPoints.length > 0 + ) { + w.globals.selectedDataPoints = [] + const elPaths = w.globals.dom.Paper.select('.apexcharts-series path') + .members + const elCircles = w.globals.dom.Paper.select( + '.apexcharts-series circle, .apexcharts-series rect' + ).members + + const deSelect = (els) => { + Array.prototype.forEach.call(els, (el) => { + el.node.setAttribute('selected', 'false') + filters.getDefaultFilter(el, i) + }) + } + deSelect(elPaths) + deSelect(elCircles) + } + + path.node.setAttribute('selected', 'true') + selected = 'true' + + if (typeof w.globals.selectedDataPoints[i] === 'undefined') { + w.globals.selectedDataPoints[i] = [] + } + w.globals.selectedDataPoints[i].push(j) + } + + if (selected === 'true') { + let activeFilter = w.config.states.active.filter + if (activeFilter !== 'none') { + filters.applyFilter(path, i, activeFilter.type, activeFilter.value) + } else { + // Reapply the hover filter in case it was removed by `deselect`when there is no active filter and it is not a touch device + if (w.config.states.hover.filter !== 'none') { + if (!w.globals.isTouchDevice) { + var hoverFilter = w.config.states.hover.filter + filters.applyFilter(path, i, hoverFilter.type, hoverFilter.value) + } + } + } + } else { + // If the item was deselected, apply hover state filter if it is not a touch device + if (w.config.states.active.filter.type !== 'none') { + if ( + w.config.states.hover.filter.type !== 'none' && + !w.globals.isTouchDevice + ) { + var hoverFilter = w.config.states.hover.filter + filters.applyFilter(path, i, hoverFilter.type, hoverFilter.value) + } else { + filters.getDefaultFilter(path, i) + } + } + } + + if (typeof w.config.chart.events.dataPointSelection === 'function') { + w.config.chart.events.dataPointSelection(e, this.ctx, { + selectedDataPoints: w.globals.selectedDataPoints, + seriesIndex: i, + dataPointIndex: j, + w + }) + } + + if (e) { + this.ctx.events.fireEvent('dataPointSelection', [ + e, + this.ctx, + { + selectedDataPoints: w.globals.selectedDataPoints, + seriesIndex: i, + dataPointIndex: j, + w + } + ]) + } + } + + rotateAroundCenter(el) { + let coord = {} + if (el && typeof el.getBBox === 'function') { + coord = el.getBBox() + } + let x = coord.x + coord.width / 2 + let y = coord.y + coord.height / 2 + + return { + x, + y + } + } + + static setAttrs(el, attrs) { + for (let key in attrs) { + if (attrs.hasOwnProperty(key)) { + el.setAttribute(key, attrs[key]) + } + } + } + + getTextRects(text, fontSize, fontFamily, transform, useBBox = true) { + let w = this.w + let virtualText = this.drawText({ + x: -200, + y: -200, + text, + textAnchor: 'start', + fontSize, + fontFamily, + foreColor: '#fff', + opacity: 0 + }) + + if (transform) { + virtualText.attr('transform', transform) + } + w.globals.dom.Paper.add(virtualText) + + let rect = virtualText.bbox() + if (!useBBox) { + rect = virtualText.node.getBoundingClientRect() + } + + virtualText.remove() + + return { + width: rect.width, + height: rect.height + } + } + + /** + * append ... to long text + * http://stackoverflow.com/questions/9241315/trimming-text-to-a-given-pixel-width-in-svg + * @memberof Graphics + **/ + placeTextWithEllipsis(textObj, textString, width) { + if (typeof textObj.getComputedTextLength !== 'function') return + textObj.textContent = textString + if (textString.length > 0) { + // ellipsis is needed + if (textObj.getComputedTextLength() >= width / 1.1) { + for (let x = textString.length - 3; x > 0; x -= 3) { + if (textObj.getSubStringLength(0, x) <= width / 1.1) { + textObj.textContent = textString.substring(0, x) + '...' + return + } + } + textObj.textContent = '.' // can't place at all + } + } + } +} + +export default Graphics diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Markers.js b/cao_sunyata/static/libs/apexcharts/src/modules/Markers.js new file mode 100644 index 0000000..0a098a1 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Markers.js @@ -0,0 +1,245 @@ +import Filters from './Filters' +import Graphics from './Graphics' +import Utils from '../utils/Utils' + +/** + * ApexCharts Markers Class for drawing points on y values in axes charts. + * + * @module Markers + **/ + +export default class Markers { + constructor(ctx, opts) { + this.ctx = ctx + this.w = ctx.w + } + + setGlobalMarkerSize() { + const w = this.w + + w.globals.markers.size = Array.isArray(w.config.markers.size) + ? w.config.markers.size + : [w.config.markers.size] + + if (w.globals.markers.size.length > 0) { + if (w.globals.markers.size.length < w.globals.series.length + 1) { + for (let i = 0; i <= w.globals.series.length; i++) { + if (typeof w.globals.markers.size[i] === 'undefined') { + w.globals.markers.size.push(w.globals.markers.size[0]) + } + } + } + } else { + w.globals.markers.size = w.config.series.map((s) => w.config.markers.size) + } + } + + plotChartMarkers(pointsPos, seriesIndex, j, pSize, alwaysDrawMarker = false) { + let w = this.w + + let i = seriesIndex + let p = pointsPos + let elPointsWrap = null + + let graphics = new Graphics(this.ctx) + + let point + + const hasDiscreteMarkers = + w.config.markers.discrete && w.config.markers.discrete.length + + if ( + w.globals.markers.size[seriesIndex] > 0 || + alwaysDrawMarker || + hasDiscreteMarkers + ) { + elPointsWrap = graphics.group({ + class: + alwaysDrawMarker || hasDiscreteMarkers + ? '' + : 'apexcharts-series-markers' + }) + + elPointsWrap.attr( + 'clip-path', + `url(#gridRectMarkerMask${w.globals.cuid})` + ) + } + + if (Array.isArray(p.x)) { + for (let q = 0; q < p.x.length; q++) { + let dataPointIndex = j + + // a small hack as we have 2 points for the first val to connect it + if (j === 1 && q === 0) dataPointIndex = 0 + if (j === 1 && q === 1) dataPointIndex = 1 + + let PointClasses = 'apexcharts-marker' + if ( + (w.config.chart.type === 'line' || w.config.chart.type === 'area') && + !w.globals.comboCharts && + !w.config.tooltip.intersect + ) { + PointClasses += ' no-pointer-events' + } + + const shouldMarkerDraw = Array.isArray(w.config.markers.size) + ? w.globals.markers.size[seriesIndex] > 0 + : w.config.markers.size > 0 + + if (shouldMarkerDraw || alwaysDrawMarker || hasDiscreteMarkers) { + if (Utils.isNumber(p.y[q])) { + PointClasses += ` w${Utils.randomId()}` + } else { + PointClasses = 'apexcharts-nullpoint' + } + + let opts = this.getMarkerConfig({ + cssClass: PointClasses, + seriesIndex, + dataPointIndex + }) + + if (w.config.series[i].data[dataPointIndex]) { + if (w.config.series[i].data[dataPointIndex].fillColor) { + opts.pointFillColor = + w.config.series[i].data[dataPointIndex].fillColor + } + + if (w.config.series[i].data[dataPointIndex].strokeColor) { + opts.pointStrokeColor = + w.config.series[i].data[dataPointIndex].strokeColor + } + } + + if (pSize) { + opts.pSize = pSize + } + point = graphics.drawMarker(p.x[q], p.y[q], opts) + + point.attr('rel', dataPointIndex) + point.attr('j', dataPointIndex) + point.attr('index', seriesIndex) + point.node.setAttribute('default-marker-size', opts.pSize) + + const filters = new Filters(this.ctx) + filters.setSelectionFilter(point, seriesIndex, dataPointIndex) + this.addEvents(point) + + if (elPointsWrap) { + elPointsWrap.add(point) + } + } else { + // dynamic array creation - multidimensional + if (typeof w.globals.pointsArray[seriesIndex] === 'undefined') + w.globals.pointsArray[seriesIndex] = [] + + w.globals.pointsArray[seriesIndex].push([p.x[q], p.y[q]]) + } + } + } + + return elPointsWrap + } + + getMarkerConfig({ + cssClass, + seriesIndex, + dataPointIndex = null, + finishRadius = null + }) { + const w = this.w + let pStyle = this.getMarkerStyle(seriesIndex) + let pSize = w.globals.markers.size[seriesIndex] + + const m = w.config.markers + + // discrete markers is an option where user can specify a particular marker with different shape, size and color + + if (dataPointIndex !== null && m.discrete.length) { + m.discrete.map((marker) => { + if ( + marker.seriesIndex === seriesIndex && + marker.dataPointIndex === dataPointIndex + ) { + pStyle.pointStrokeColor = marker.strokeColor + pStyle.pointFillColor = marker.fillColor + pSize = marker.size + pStyle.pointShape = marker.shape + } + }) + } + + return { + pSize: finishRadius === null ? pSize : finishRadius, + pRadius: m.radius, + width: Array.isArray(m.width) ? m.width[seriesIndex] : m.width, + height: Array.isArray(m.height) ? m.height[seriesIndex] : m.height, + pointStrokeWidth: Array.isArray(m.strokeWidth) + ? m.strokeWidth[seriesIndex] + : m.strokeWidth, + pointStrokeColor: pStyle.pointStrokeColor, + pointFillColor: pStyle.pointFillColor, + shape: + pStyle.pointShape || + (Array.isArray(m.shape) ? m.shape[seriesIndex] : m.shape), + class: cssClass, + pointStrokeOpacity: Array.isArray(m.strokeOpacity) + ? m.strokeOpacity[seriesIndex] + : m.strokeOpacity, + pointStrokeDashArray: Array.isArray(m.strokeDashArray) + ? m.strokeDashArray[seriesIndex] + : m.strokeDashArray, + pointFillOpacity: Array.isArray(m.fillOpacity) + ? m.fillOpacity[seriesIndex] + : m.fillOpacity, + seriesIndex + } + } + + addEvents(circle) { + const w = this.w + + const graphics = new Graphics(this.ctx) + circle.node.addEventListener( + 'mouseenter', + graphics.pathMouseEnter.bind(this.ctx, circle) + ) + circle.node.addEventListener( + 'mouseleave', + graphics.pathMouseLeave.bind(this.ctx, circle) + ) + + circle.node.addEventListener( + 'mousedown', + graphics.pathMouseDown.bind(this.ctx, circle) + ) + + circle.node.addEventListener('click', w.config.markers.onClick) + circle.node.addEventListener('dblclick', w.config.markers.onDblClick) + + circle.node.addEventListener( + 'touchstart', + graphics.pathMouseDown.bind(this.ctx, circle), + { passive: true } + ) + } + + getMarkerStyle(seriesIndex) { + let w = this.w + + let colors = w.globals.markers.colors + let strokeColors = + w.config.markers.strokeColor || w.config.markers.strokeColors + + let pointStrokeColor = Array.isArray(strokeColors) + ? strokeColors[seriesIndex] + : strokeColors + let pointFillColor = Array.isArray(colors) ? colors[seriesIndex] : colors + + return { + pointStrokeColor, + pointFillColor + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Range.js b/cao_sunyata/static/libs/apexcharts/src/modules/Range.js new file mode 100644 index 0000000..f0a0b97 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Range.js @@ -0,0 +1,548 @@ +import Utils from '../utils/Utils' +import DateTime from '../utils/DateTime' +import Scales from './Scales' + +/** + * Range is used to generates values between min and max. + * + * @module Range + **/ + +class Range { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.scales = new Scales(ctx) + } + + init() { + this.setYRange() + this.setXRange() + this.setZRange() + } + + getMinYMaxY( + startingIndex, + lowestY = Number.MAX_VALUE, + highestY = -Number.MAX_VALUE, + len = null + ) { + const cnf = this.w.config + const gl = this.w.globals + let maxY = -Number.MAX_VALUE + let minY = Number.MIN_VALUE + + if (len === null) { + len = startingIndex + 1 + } + const series = gl.series + let seriesMin = series + let seriesMax = series + + if (cnf.chart.type === 'candlestick') { + seriesMin = gl.seriesCandleL + seriesMax = gl.seriesCandleH + } else if (cnf.chart.type === 'boxPlot') { + seriesMin = gl.seriesCandleO + seriesMax = gl.seriesCandleC + } else if (gl.isRangeData) { + seriesMin = gl.seriesRangeStart + seriesMax = gl.seriesRangeEnd + } + + for (let i = startingIndex; i < len; i++) { + gl.dataPoints = Math.max(gl.dataPoints, series[i].length) + + if (gl.categoryLabels.length) { + gl.dataPoints = gl.categoryLabels.filter( + (label) => typeof label !== 'undefined' + ).length + } + for (let j = 0; j < gl.series[i].length; j++) { + let val = series[i][j] + if (val !== null && Utils.isNumber(val)) { + if (typeof seriesMax[i][j] !== 'undefined') { + maxY = Math.max(maxY, seriesMax[i][j]) + lowestY = Math.min(lowestY, seriesMax[i][j]) + } + if (typeof seriesMin[i][j] !== 'undefined') { + lowestY = Math.min(lowestY, seriesMin[i][j]) + highestY = Math.max(highestY, seriesMin[i][j]) + } + + if ( + this.w.config.chart.type === 'candlestick' || + this.w.config.chart.type === 'boxPlot' + ) { + if (typeof gl.seriesCandleC[i][j] !== 'undefined') { + maxY = Math.max(maxY, gl.seriesCandleO[i][j]) + maxY = Math.max(maxY, gl.seriesCandleH[i][j]) + maxY = Math.max(maxY, gl.seriesCandleL[i][j]) + maxY = Math.max(maxY, gl.seriesCandleC[i][j]) + if (this.w.config.chart.type === 'boxPlot') { + maxY = Math.max(maxY, gl.seriesCandleM[i][j]) + } + } + + // there is a combo chart and the specified series in not either candlestick or boxplot, find the max there + if ( + cnf.series[i].type && + (cnf.series[i].type !== 'candlestick' || + cnf.series[i].type !== 'boxPlot') + ) { + maxY = Math.max(maxY, gl.series[i][j]) + lowestY = Math.min(lowestY, gl.series[i][j]) + } + + highestY = maxY + } + + if ( + gl.seriesGoals[i] && + gl.seriesGoals[i][j] && + Array.isArray(gl.seriesGoals[i][j]) + ) { + gl.seriesGoals[i][j].forEach((g) => { + if (minY !== Number.MIN_VALUE) { + minY = Math.min(minY, g.value) + lowestY = minY + } + maxY = Math.max(maxY, g.value) + highestY = maxY + }) + } + + if (Utils.isFloat(val)) { + val = Utils.noExponents(val) + gl.yValueDecimal = Math.max( + gl.yValueDecimal, + val.toString().split('.')[1].length + ) + } + if (minY > seriesMin[i][j] && seriesMin[i][j] < 0) { + minY = seriesMin[i][j] + } + } else { + gl.hasNullValues = true + } + } + } + + if ( + cnf.chart.type === 'rangeBar' && + gl.seriesRangeStart.length && + gl.isBarHorizontal + ) { + minY = lowestY + } + + if (cnf.chart.type === 'bar') { + if (minY < 0 && maxY < 0) { + // all negative values in a bar chart, hence make the max to 0 + maxY = 0 + } + if (minY === Number.MIN_VALUE) { + minY = 0 + } + } + + return { + minY, + maxY, + lowestY, + highestY + } + } + + setYRange() { + let gl = this.w.globals + let cnf = this.w.config + gl.maxY = -Number.MAX_VALUE + gl.minY = Number.MIN_VALUE + + let lowestYInAllSeries = Number.MAX_VALUE + + if (gl.isMultipleYAxis) { + // we need to get minY and maxY for multiple y axis + for (let i = 0; i < gl.series.length; i++) { + const minYMaxYArr = this.getMinYMaxY(i, lowestYInAllSeries, null, i + 1) + gl.minYArr.push(minYMaxYArr.minY) + gl.maxYArr.push(minYMaxYArr.maxY) + lowestYInAllSeries = minYMaxYArr.lowestY + } + } + + // and then, get the minY and maxY from all series + const minYMaxY = this.getMinYMaxY( + 0, + lowestYInAllSeries, + null, + gl.series.length + ) + gl.minY = minYMaxY.minY + gl.maxY = minYMaxY.maxY + lowestYInAllSeries = minYMaxY.lowestY + + if (cnf.chart.stacked) { + this._setStackedMinMax() + } + + // if the numbers are too big, reduce the range + // for eg, if number is between 100000-110000, putting 0 as the lowest value is not so good idea. So change the gl.minY for line/area/candlesticks/boxPlot + if ( + cnf.chart.type === 'line' || + cnf.chart.type === 'area' || + cnf.chart.type === 'candlestick' || + cnf.chart.type === 'boxPlot' || + (cnf.chart.type === 'rangeBar' && !gl.isBarHorizontal) + ) { + if ( + gl.minY === Number.MIN_VALUE && + lowestYInAllSeries !== -Number.MAX_VALUE && + lowestYInAllSeries !== gl.maxY // single value possibility + ) { + let diff = gl.maxY - lowestYInAllSeries + if ( + (lowestYInAllSeries >= 0 && lowestYInAllSeries <= 10) || + cnf.yaxis[0].min !== undefined || + cnf.yaxis[0].max !== undefined + ) { + // if minY is already 0/low value, we don't want to go negatives here - so this check is essential. + diff = 0 + } + + gl.minY = lowestYInAllSeries - (diff * 5) / 100 + + /* fix https://github.com/apexcharts/apexcharts.js/issues/614 */ + /* fix https://github.com/apexcharts/apexcharts.js/issues/968 */ + if (lowestYInAllSeries > 0 && gl.minY < 0) { + gl.minY = 0 + } + + /* fix https://github.com/apexcharts/apexcharts.js/issues/426 */ + gl.maxY = gl.maxY + (diff * 5) / 100 + } + } + + cnf.yaxis.forEach((yaxe, index) => { + // override all min/max values by user defined values (y axis) + if (yaxe.max !== undefined) { + if (typeof yaxe.max === 'number') { + gl.maxYArr[index] = yaxe.max + } else if (typeof yaxe.max === 'function') { + // fixes apexcharts.js/issues/2098 + gl.maxYArr[index] = yaxe.max( + gl.isMultipleYAxis ? gl.maxYArr[index] : gl.maxY + ) + } + + // gl.maxY is for single y-axis chart, it will be ignored in multi-yaxis + gl.maxY = gl.maxYArr[index] + } + if (yaxe.min !== undefined) { + if (typeof yaxe.min === 'number') { + gl.minYArr[index] = yaxe.min + } else if (typeof yaxe.min === 'function') { + // fixes apexcharts.js/issues/2098 + gl.minYArr[index] = yaxe.min( + gl.isMultipleYAxis + ? gl.minYArr[index] === Number.MIN_VALUE + ? 0 + : gl.minYArr[index] + : gl.minY + ) + } + // gl.minY is for single y-axis chart, it will be ignored in multi-yaxis + gl.minY = gl.minYArr[index] + } + }) + + // for horizontal bar charts, we need to check xaxis min/max as user may have specified there + if (gl.isBarHorizontal) { + const minmax = ['min', 'max'] + minmax.forEach((m) => { + if (cnf.xaxis[m] !== undefined && typeof cnf.xaxis[m] === 'number') { + m === 'min' ? (gl.minY = cnf.xaxis[m]) : (gl.maxY = cnf.xaxis[m]) + } + }) + } + + // for multi y-axis we need different scales for each + if (gl.isMultipleYAxis) { + this.scales.setMultipleYScales() + gl.minY = lowestYInAllSeries + gl.yAxisScale.forEach((scale, i) => { + gl.minYArr[i] = scale.niceMin + gl.maxYArr[i] = scale.niceMax + }) + } else { + this.scales.setYScaleForIndex(0, gl.minY, gl.maxY) + gl.minY = gl.yAxisScale[0].niceMin + gl.maxY = gl.yAxisScale[0].niceMax + gl.minYArr[0] = gl.yAxisScale[0].niceMin + gl.maxYArr[0] = gl.yAxisScale[0].niceMax + } + + return { + minY: gl.minY, + maxY: gl.maxY, + minYArr: gl.minYArr, + maxYArr: gl.maxYArr, + yAxisScale: gl.yAxisScale + } + } + + setXRange() { + let gl = this.w.globals + let cnf = this.w.config + + const isXNumeric = + cnf.xaxis.type === 'numeric' || + cnf.xaxis.type === 'datetime' || + (cnf.xaxis.type === 'category' && !gl.noLabelsProvided) || + gl.noLabelsProvided || + gl.isXNumeric + + const getInitialMinXMaxX = () => { + for (let i = 0; i < gl.series.length; i++) { + if (gl.labels[i]) { + for (let j = 0; j < gl.labels[i].length; j++) { + if (gl.labels[i][j] !== null && Utils.isNumber(gl.labels[i][j])) { + gl.maxX = Math.max(gl.maxX, gl.labels[i][j]) + gl.initialMaxX = Math.max(gl.maxX, gl.labels[i][j]) + gl.minX = Math.min(gl.minX, gl.labels[i][j]) + gl.initialMinX = Math.min(gl.minX, gl.labels[i][j]) + } + } + } + } + } + // minX maxX starts here + if (gl.isXNumeric) { + getInitialMinXMaxX() + } + + if (gl.noLabelsProvided) { + if (cnf.xaxis.categories.length === 0) { + gl.maxX = gl.labels[gl.labels.length - 1] + gl.initialMaxX = gl.labels[gl.labels.length - 1] + gl.minX = 1 + gl.initialMinX = 1 + } + } + + if (gl.isXNumeric || gl.noLabelsProvided || gl.dataFormatXNumeric) { + let ticks + + if (cnf.xaxis.tickAmount === undefined) { + ticks = Math.round(gl.svgWidth / 150) + + // no labels provided and total number of dataPoints is less than 30 + if (cnf.xaxis.type === 'numeric' && gl.dataPoints < 30) { + ticks = gl.dataPoints - 1 + } + + // this check is for when ticks exceeds total datapoints and that would result in duplicate labels + if (ticks > gl.dataPoints && gl.dataPoints !== 0) { + ticks = gl.dataPoints - 1 + } + } else if (cnf.xaxis.tickAmount === 'dataPoints') { + if (gl.series.length > 1) { + ticks = gl.series[gl.maxValsInArrayIndex].length - 1 + } + if (gl.isXNumeric) { + ticks = gl.maxX - gl.minX - 1 + } + } else { + ticks = cnf.xaxis.tickAmount + } + gl.xTickAmount = ticks + + // override all min/max values by user defined values (x axis) + if (cnf.xaxis.max !== undefined && typeof cnf.xaxis.max === 'number') { + gl.maxX = cnf.xaxis.max + } + if (cnf.xaxis.min !== undefined && typeof cnf.xaxis.min === 'number') { + gl.minX = cnf.xaxis.min + } + + // if range is provided, adjust the new minX + if (cnf.xaxis.range !== undefined) { + gl.minX = gl.maxX - cnf.xaxis.range + } + + if (gl.minX !== Number.MAX_VALUE && gl.maxX !== -Number.MAX_VALUE) { + if (cnf.xaxis.convertedCatToNumeric && !gl.dataFormatXNumeric) { + let catScale = [] + for (let i = gl.minX - 1; i < gl.maxX; i++) { + catScale.push(i + 1) + } + gl.xAxisScale = { + result: catScale, + niceMin: catScale[0], + niceMax: catScale[catScale.length - 1] + } + } else { + gl.xAxisScale = this.scales.setXScale(gl.minX, gl.maxX) + } + } else { + gl.xAxisScale = this.scales.linearScale(1, ticks, ticks) + if (gl.noLabelsProvided && gl.labels.length > 0) { + gl.xAxisScale = this.scales.linearScale( + 1, + gl.labels.length, + ticks - 1 + ) + + // this is the only place seriesX is again mutated + gl.seriesX = gl.labels.slice() + } + } + // we will still store these labels as the count for this will be different (to draw grid and labels placement) + if (isXNumeric) { + gl.labels = gl.xAxisScale.result.slice() + } + } + + if (gl.isBarHorizontal && gl.labels.length) { + gl.xTickAmount = gl.labels.length + } + + // single dataPoint + this._handleSingleDataPoint() + + // minimum x difference to calculate bar width in numeric bars + this._getMinXDiff() + + return { + minX: gl.minX, + maxX: gl.maxX + } + } + + setZRange() { + // minZ, maxZ starts here + let gl = this.w.globals + + if (!gl.isDataXYZ) return + for (let i = 0; i < gl.series.length; i++) { + if (typeof gl.seriesZ[i] !== 'undefined') { + for (let j = 0; j < gl.seriesZ[i].length; j++) { + if (gl.seriesZ[i][j] !== null && Utils.isNumber(gl.seriesZ[i][j])) { + gl.maxZ = Math.max(gl.maxZ, gl.seriesZ[i][j]) + gl.minZ = Math.min(gl.minZ, gl.seriesZ[i][j]) + } + } + } + } + } + + _handleSingleDataPoint() { + const gl = this.w.globals + const cnf = this.w.config + + if (gl.minX === gl.maxX) { + let datetimeObj = new DateTime(this.ctx) + + if (cnf.xaxis.type === 'datetime') { + const newMinX = datetimeObj.getDate(gl.minX) + if (cnf.xaxis.labels.datetimeUTC) { + newMinX.setUTCDate(newMinX.getUTCDate() - 2) + } else { + newMinX.setDate(newMinX.getDate() - 2) + } + + gl.minX = new Date(newMinX).getTime() + + const newMaxX = datetimeObj.getDate(gl.maxX) + if (cnf.xaxis.labels.datetimeUTC) { + newMaxX.setUTCDate(newMaxX.getUTCDate() + 2) + } else { + newMaxX.setDate(newMaxX.getDate() + 2) + } + gl.maxX = new Date(newMaxX).getTime() + } else if ( + cnf.xaxis.type === 'numeric' || + (cnf.xaxis.type === 'category' && !gl.noLabelsProvided) + ) { + gl.minX = gl.minX - 2 + gl.initialMinX = gl.minX + gl.maxX = gl.maxX + 2 + gl.initialMaxX = gl.maxX + } + } + } + + _getMinXDiff() { + const gl = this.w.globals + + if (gl.isXNumeric) { + // get the least x diff if numeric x axis is present + gl.seriesX.forEach((sX, i) => { + if (sX.length === 1) { + // a small hack to prevent overlapping multiple bars when there is just 1 datapoint in bar series. + // fix #811 + sX.push( + gl.seriesX[gl.maxValsInArrayIndex][ + gl.seriesX[gl.maxValsInArrayIndex].length - 1 + ] + ) + } + + // fix #983 (clone the array to avoid side effects) + const seriesX = sX.slice() + seriesX.sort((a, b) => a - b) + + seriesX.forEach((s, j) => { + if (j > 0) { + let xDiff = s - seriesX[j - 1] + if (xDiff > 0) { + gl.minXDiff = Math.min(xDiff, gl.minXDiff) + } + } + }) + if (gl.dataPoints === 1 || gl.minXDiff === Number.MAX_VALUE) { + // fixes apexcharts.js #1221 + gl.minXDiff = 0.5 + } + }) + } + } + + _setStackedMinMax() { + const gl = this.w.globals + // for stacked charts, we calculate each series's parallel values. i.e, series[0][j] + series[1][j] .... [series[i.length][j]] and get the max out of it + let stackedPoss = [] + let stackedNegs = [] + + if (gl.series.length) { + for (let j = 0; j < gl.series[gl.maxValsInArrayIndex].length; j++) { + let poss = 0 + let negs = 0 + for (let i = 0; i < gl.series.length; i++) { + if (gl.series[i][j] !== null && Utils.isNumber(gl.series[i][j])) { + // 0.0001 fixes #185 when values are very small + gl.series[i][j] > 0 + ? (poss = poss + parseFloat(gl.series[i][j]) + 0.0001) + : (negs = negs + parseFloat(gl.series[i][j])) + } + + if (i === gl.series.length - 1) { + // push all the totals to the array for future use + stackedPoss.push(poss) + stackedNegs.push(negs) + } + } + } + } + + // get the max/min out of the added parallel values + for (let z = 0; z < stackedPoss.length; z++) { + gl.maxY = Math.max(gl.maxY, stackedPoss[z]) + gl.minY = Math.min(gl.minY, stackedNegs[z]) + } + } +} + +export default Range diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Responsive.js b/cao_sunyata/static/libs/apexcharts/src/modules/Responsive.js new file mode 100644 index 0000000..2081a02 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Responsive.js @@ -0,0 +1,73 @@ +import Config from './settings/Config' +import Utils from '../utils/Utils' +import CoreUtils from './CoreUtils' + +/** + * ApexCharts Responsive Class to override options for different screen sizes. + * + * @module Responsive + **/ + +export default class Responsive { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + // the opts parameter if not null has to be set overriding everything + // as the opts is set by user externally + checkResponsiveConfig(opts) { + const w = this.w + const cnf = w.config + + // check if responsive config exists + if (cnf.responsive.length === 0) return + + let res = cnf.responsive.slice() + res + .sort((a, b) => + a.breakpoint > b.breakpoint ? 1 : b.breakpoint > a.breakpoint ? -1 : 0 + ) + .reverse() + + let config = new Config({}) + + const iterateResponsiveOptions = (newOptions = {}) => { + let largestBreakpoint = res[0].breakpoint + const width = window.innerWidth > 0 ? window.innerWidth : screen.width + + if (width > largestBreakpoint) { + let options = CoreUtils.extendArrayProps( + config, + w.globals.initialConfig, + w + ) + newOptions = Utils.extend(options, newOptions) + newOptions = Utils.extend(w.config, newOptions) + this.overrideResponsiveOptions(newOptions) + } else { + for (let i = 0; i < res.length; i++) { + if (width < res[i].breakpoint) { + newOptions = CoreUtils.extendArrayProps(config, res[i].options, w) + newOptions = Utils.extend(w.config, newOptions) + this.overrideResponsiveOptions(newOptions) + } + } + } + } + + if (opts) { + let options = CoreUtils.extendArrayProps(config, opts, w) + options = Utils.extend(w.config, options) + options = Utils.extend(options, opts) + iterateResponsiveOptions(options) + } else { + iterateResponsiveOptions({}) + } + } + + overrideResponsiveOptions(newOptions) { + let newConfig = new Config(newOptions).init({ responsiveOverride: true }) + this.w.config = newConfig + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Scales.js b/cao_sunyata/static/libs/apexcharts/src/modules/Scales.js new file mode 100644 index 0000000..617424d --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Scales.js @@ -0,0 +1,586 @@ +import Utils from '../utils/Utils' + +export default class Range { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + // http://stackoverflow.com/questions/326679/choosing-an-attractive-linear-scale-for-a-graphs-y-axiss + // This routine creates the Y axis values for a graph. + niceScale(yMin, yMax, ticks = 10, index = 0, NO_MIN_MAX_PROVIDED) { + const w = this.w + // Determine Range + let range = Math.abs(yMax - yMin) + + ticks = this._adjustTicksForSmallRange(ticks, index, range) + + if (ticks === 'dataPoints') { + ticks = w.globals.dataPoints - 1 + } + + if ( + (yMin === Number.MIN_VALUE && yMax === 0) || + (!Utils.isNumber(yMin) && !Utils.isNumber(yMax)) || + (yMin === Number.MIN_VALUE && yMax === -Number.MAX_VALUE) + ) { + // when all values are 0 + yMin = 0 + yMax = ticks + let linearScale = this.linearScale(yMin, yMax, ticks) + return linearScale + } + + if (yMin > yMax) { + // if somehow due to some wrong config, user sent max less than min, + // adjust the min/max again + console.warn('axis.min cannot be greater than axis.max') + yMax = yMin + 0.1 + } else if (yMin === yMax) { + // If yMin and yMax are identical, then + // adjust the yMin and yMax values to actually + // make a graph. Also avoids division by zero errors. + yMin = yMin === 0 ? 0 : yMin - 0.5 // some small value + yMax = yMax === 0 ? 2 : yMax + 0.5 // some small value + } + + // Calculate Min amd Max graphical labels and graph + // increments. The number of ticks defaults to + // 10 which is the SUGGESTED value. Any tick value + // entered is used as a suggested value which is + // adjusted to be a 'pretty' value. + // + // Output will be an array of the Y axis values that + // encompass the Y values. + let result = [] + + if ( + range < 1 && + NO_MIN_MAX_PROVIDED && + (w.config.chart.type === 'candlestick' || + w.config.series[index].type === 'candlestick' || + w.config.chart.type === 'boxPlot' || + w.config.series[index].type === 'boxPlot' || + w.globals.isRangeData) + ) { + /* fix https://github.com/apexcharts/apexcharts.js/issues/430 */ + yMax = yMax * 1.01 + } + + let tiks = ticks + 1 + // Adjust ticks if needed + if (tiks < 2) { + tiks = 2 + } else if (tiks > 2) { + tiks -= 2 + } + + // Get raw step value + let tempStep = range / tiks + // Calculate pretty step value + + let mag = Math.floor(Utils.log10(tempStep)) + let magPow = Math.pow(10, mag) + let magMsd = Math.round(tempStep / magPow) + if (magMsd < 1) { + magMsd = 1 + } + let stepSize = magMsd * magPow + + // build Y label array. + // Lower and upper bounds calculations + let lb = stepSize * Math.floor(yMin / stepSize) + let ub = stepSize * Math.ceil(yMax / stepSize) + // Build array + let val = lb + + if (NO_MIN_MAX_PROVIDED && range > 2) { + while (1) { + result.push(val) + val += stepSize + if (val > ub) { + break + } + } + + return { + result, + niceMin: result[0], + niceMax: result[result.length - 1] + } + } else { + result = [] + let v = yMin + result.push(v) + let valuesDivider = Math.abs(yMax - yMin) / ticks + for (let i = 0; i <= ticks; i++) { + v = v + valuesDivider + result.push(v) + } + + if (result[result.length - 2] >= yMax) { + result.pop() + } + + return { + result, + niceMin: result[0], + niceMax: result[result.length - 1] + } + } + } + + linearScale(yMin, yMax, ticks = 10, index) { + let range = Math.abs(yMax - yMin) + + ticks = this._adjustTicksForSmallRange(ticks, index, range) + + if (ticks === 'dataPoints') { + ticks = this.w.globals.dataPoints - 1 + } + + let step = range / ticks + if (ticks === Number.MAX_VALUE) { + ticks = 10 + step = 1 + } + + let result = [] + let v = yMin + + while (ticks >= 0) { + result.push(v) + v = v + step + ticks -= 1 + } + + return { + result, + niceMin: result[0], + niceMax: result[result.length - 1] + } + } + + logarithmicScaleNice(yMin, yMax, base) { + // Basic validation to avoid for loop starting at -inf. + if (yMax <= 0) yMax = Math.max(yMin, base) + if (yMin <= 0) yMin = Math.min(yMax, base) + + const logs = [] + + const logMax = Math.ceil(Math.log(yMax) / Math.log(base) + 1) // Get powers of base for our max and min + const logMin = Math.floor(Math.log(yMin) / Math.log(base)) + + for (let i = logMin; i < logMax; i++) { + logs.push(Math.pow(base, i)) + } + + return { + result: logs, + niceMin: logs[0], + niceMax: logs[logs.length - 1] + } + } + + logarithmicScale(yMin, yMax, base) { + // Basic validation to avoid for loop starting at -inf. + if (yMax <= 0) yMax = Math.max(yMin, base) + if (yMin <= 0) yMin = Math.min(yMax, base) + + const logs = [] + + // Get the logarithmic range. + const logMax = Math.log(yMax) / Math.log(base) + const logMin = Math.log(yMin) / Math.log(base) + + // Get the exact logarithmic range. + // (This is the exact number of multiples of the base there are between yMin and yMax). + const logRange = logMax - logMin + + // Round the logarithmic range to get the number of ticks we will create. + // If the chosen min/max values are multiples of each other WRT the base, this will be neat. + // If the chosen min/max aren't, we will at least still provide USEFUL ticks. + const ticks = Math.round(logRange) + + // Get the logarithmic spacing between ticks. + const logTickSpacing = logRange / ticks + + // Create as many ticks as there is range in the logs. + for (let i = 0, logTick = logMin; i < ticks; i++, logTick += logTickSpacing) { + logs.push(Math.pow(base, logTick)) + } + + // Add a final tick at the yMax. + logs.push(Math.pow(base, logMax)) + + return { + result: logs, + niceMin: yMin, + niceMax: yMax + } + } + + _adjustTicksForSmallRange(ticks, index, range) { + let newTicks = ticks + if ( + typeof index !== 'undefined' && + this.w.config.yaxis[index].labels.formatter && + this.w.config.yaxis[index].tickAmount === undefined + ) { + const formattedVal = this.w.config.yaxis[index].labels.formatter(1) + if ( + Utils.isNumber(Number(formattedVal)) && + !Utils.isFloat(formattedVal) + ) { + newTicks = Math.ceil(range) + } + } + return newTicks < ticks ? newTicks : ticks + } + + setYScaleForIndex(index, minY, maxY) { + const gl = this.w.globals + const cnf = this.w.config + + let y = gl.isBarHorizontal ? cnf.xaxis : cnf.yaxis[index] + + if (typeof gl.yAxisScale[index] === 'undefined') { + gl.yAxisScale[index] = [] + } + + let diff = Math.abs(maxY - minY) + + if (y.logarithmic && diff <= 5) { + gl.invalidLogScale = true + } + + if (y.logarithmic && diff > 5) { + gl.allSeriesCollapsed = false + gl.yAxisScale[index] = this.logarithmicScale(minY, maxY, y.logBase) + gl.yAxisScale[index] = y.forceNiceScale + ? this.logarithmicScaleNice(minY, maxY, y.logBase) + : this.logarithmicScale(minY, maxY, y.logBase) + } else { + if (maxY === -Number.MAX_VALUE || !Utils.isNumber(maxY)) { + // no data in the chart. Either all series collapsed or user passed a blank array + gl.yAxisScale[index] = this.linearScale(0, 5, 5) + } else { + // there is some data. Turn off the allSeriesCollapsed flag + gl.allSeriesCollapsed = false + + if ((y.min !== undefined || y.max !== undefined) && !y.forceNiceScale) { + // fix https://github.com/apexcharts/apexcharts.js/issues/492 + gl.yAxisScale[index] = this.linearScale( + minY, + maxY, + y.tickAmount, + index + ) + } else { + const noMinMaxProvided = + (cnf.yaxis[index].max === undefined && + cnf.yaxis[index].min === undefined) || + cnf.yaxis[index].forceNiceScale + gl.yAxisScale[index] = this.niceScale( + minY, + maxY, + y.tickAmount ? y.tickAmount : diff < 5 && diff > 1 ? diff + 1 : 5, + index, + // fix https://github.com/apexcharts/apexcharts.js/issues/397 + noMinMaxProvided + ) + } + } + } + } + + setXScale(minX, maxX) { + const w = this.w + const gl = w.globals + const x = w.config.xaxis + let diff = Math.abs(maxX - minX) + if (maxX === -Number.MAX_VALUE || !Utils.isNumber(maxX)) { + // no data in the chart. Either all series collapsed or user passed a blank array + gl.xAxisScale = this.linearScale(0, 5, 5) + } else { + gl.xAxisScale = this.linearScale( + minX, + maxX, + x.tickAmount ? x.tickAmount : diff < 5 && diff > 1 ? diff + 1 : 5, + 0 + ) + } + return gl.xAxisScale + } + + setMultipleYScales() { + const gl = this.w.globals + const cnf = this.w.config + + const minYArr = gl.minYArr.concat([]) + const maxYArr = gl.maxYArr.concat([]) + + let scalesIndices = [] + // here, we loop through the yaxis array and find the item which has "seriesName" property + cnf.yaxis.forEach((yaxe, i) => { + let index = i + cnf.series.forEach((s, si) => { + // if seriesName matches and that series is not collapsed, we use that scale + // fix issue #1215 + // proceed even if si is in gl.collapsedSeriesIndices + if (s.name === yaxe.seriesName) { + index = si + + if (i !== si) { + scalesIndices.push({ + index: si, + similarIndex: i, + alreadyExists: true + }) + } else { + scalesIndices.push({ + index: si + }) + } + } + }) + + let minY = minYArr[index] + let maxY = maxYArr[index] + + this.setYScaleForIndex(i, minY, maxY) + }) + + this.sameScaleInMultipleAxes(minYArr, maxYArr, scalesIndices) + } + + sameScaleInMultipleAxes(minYArr, maxYArr, scalesIndices) { + const cnf = this.w.config + const gl = this.w.globals + + // we got the scalesIndices array in the above code, but we need to filter out the items which doesn't have same scales + let similarIndices = [] + scalesIndices.forEach((scale) => { + if (scale.alreadyExists) { + if (typeof similarIndices[scale.index] === 'undefined') { + similarIndices[scale.index] = [] + } + similarIndices[scale.index].push(scale.index) + similarIndices[scale.index].push(scale.similarIndex) + } + }) + + function intersect(a, b) { + return a.filter((value) => b.indexOf(value) !== -1) + } + + gl.yAxisSameScaleIndices = similarIndices + + similarIndices.forEach((si, i) => { + similarIndices.forEach((sj, j) => { + if (i !== j) { + if (intersect(si, sj).length > 0) { + similarIndices[i] = similarIndices[i].concat(similarIndices[j]) + } + } + }) + }) + + // then, we remove duplicates from the similarScale array + let uniqueSimilarIndices = similarIndices.map((item) => { + return item.filter((i, pos) => item.indexOf(i) === pos) + }) + + // sort further to remove whole duplicate arrays later + let sortedIndices = uniqueSimilarIndices.map((s) => s.sort()) + + // remove undefined items + similarIndices = similarIndices.filter((s) => !!s) + + let indices = sortedIndices.slice() + let stringIndices = indices.map((ind) => JSON.stringify(ind)) + indices = indices.filter( + (ind, p) => stringIndices.indexOf(JSON.stringify(ind)) === p + ) + + let sameScaleMinYArr = [] + let sameScaleMaxYArr = [] + minYArr.forEach((minYValue, yi) => { + indices.forEach((scale, i) => { + // we compare only the yIndex which exists in the indices array + if (scale.indexOf(yi) > -1) { + if (typeof sameScaleMinYArr[i] === 'undefined') { + sameScaleMinYArr[i] = [] + sameScaleMaxYArr[i] = [] + } + sameScaleMinYArr[i].push({ + key: yi, + value: minYValue + }) + sameScaleMaxYArr[i].push({ + key: yi, + value: maxYArr[yi] + }) + } + }) + }) + + let sameScaleMin = Array.apply(null, Array(indices.length)).map( + Number.prototype.valueOf, + Number.MIN_VALUE + ) + let sameScaleMax = Array.apply(null, Array(indices.length)).map( + Number.prototype.valueOf, + -Number.MAX_VALUE + ) + + sameScaleMinYArr.forEach((s, i) => { + s.forEach((sc, j) => { + sameScaleMin[i] = Math.min(sc.value, sameScaleMin[i]) + }) + }) + + sameScaleMaxYArr.forEach((s, i) => { + s.forEach((sc, j) => { + sameScaleMax[i] = Math.max(sc.value, sameScaleMax[i]) + }) + }) + + minYArr.forEach((min, i) => { + sameScaleMaxYArr.forEach((s, si) => { + let minY = sameScaleMin[si] + let maxY = sameScaleMax[si] + + if (cnf.chart.stacked) { + // for stacked charts, we need to add the values + maxY = 0 + + s.forEach((ind, k) => { + // fix incorrectly adjust y scale issue #1215 + if (ind.value !== -Number.MAX_VALUE) { + maxY += ind.value + } + if (minY !== Number.MIN_VALUE) { + minY += sameScaleMinYArr[si][k].value + } + }) + } + + s.forEach((ind, k) => { + if (s[k].key === i) { + if (cnf.yaxis[i].min !== undefined) { + if (typeof cnf.yaxis[i].min === 'function') { + minY = cnf.yaxis[i].min(gl.minY) + } else { + minY = cnf.yaxis[i].min + } + } + if (cnf.yaxis[i].max !== undefined) { + if (typeof cnf.yaxis[i].max === 'function') { + maxY = cnf.yaxis[i].max(gl.maxY) + } else { + maxY = cnf.yaxis[i].max + } + } + + this.setYScaleForIndex(i, minY, maxY) + } + }) + }) + }) + } + + // experimental feature which scales the y-axis to a min/max based on x-axis range + autoScaleY(ctx, yaxis, e) { + if (!ctx) { + ctx = this + } + + const w = ctx.w + + if (w.globals.isMultipleYAxis || w.globals.collapsedSeries.length) { + // The autoScale option for multiple y-axis is turned off as it leads to buggy behavior. + // Also, when a series is collapsed, it results in incorrect behavior. Hence turned it off for that too - fixes apexcharts.js#795 + console.warn('autoScaleYaxis is not supported in a multi-yaxis chart.') + return yaxis + } + + const seriesX = w.globals.seriesX[0] + + let isStacked = w.config.chart.stacked + + yaxis.forEach((yaxe, yi) => { + let firstXIndex = 0 + + for (let xi = 0; xi < seriesX.length; xi++) { + if (seriesX[xi] >= e.xaxis.min) { + firstXIndex = xi + break + } + } + + let initialMin = w.globals.minYArr[yi] + let initialMax = w.globals.maxYArr[yi] + let min, max + + let stackedSer = w.globals.stackedSeriesTotals + + w.globals.series.forEach((serie, sI) => { + let firstValue = serie[firstXIndex] + + if (isStacked) { + firstValue = stackedSer[firstXIndex] + min = max = firstValue + + stackedSer.forEach((y, yI) => { + if (seriesX[yI] <= e.xaxis.max && seriesX[yI] >= e.xaxis.min) { + if (y > max && y !== null) max = y + if (serie[yI] < min && serie[yI] !== null) min = serie[yI] + } + }) + } else { + min = max = firstValue + + serie.forEach((y, yI) => { + if (seriesX[yI] <= e.xaxis.max && seriesX[yI] >= e.xaxis.min) { + let valMin = y + let valMax = y + w.globals.series.forEach((wS, wSI) => { + if (y !== null) { + valMin = Math.min(wS[yI], valMin) + valMax = Math.max(wS[yI], valMax) + } + }) + if (valMax > max && valMax !== null) max = valMax + if (valMin < min && valMin !== null) min = valMin + } + }) + } + + if (min === undefined && max === undefined) { + min = initialMin + max = initialMax + } + min *= min < 0 ? 1.1 : 0.9 + max *= max < 0 ? 0.9 : 1.1 + + if (max < 0 && max < initialMax) { + max = initialMax + } + if (min < 0 && min > initialMin) { + min = initialMin + } + + if (yaxis.length > 1) { + yaxis[sI].min = yaxe.min === undefined ? min : yaxe.min + yaxis[sI].max = yaxe.max === undefined ? max : yaxe.max + } else { + yaxis[0].min = yaxe.min === undefined ? min : yaxe.min + yaxis[0].max = yaxe.max === undefined ? max : yaxe.max + } + }) + }) + + return yaxis + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Series.js b/cao_sunyata/static/libs/apexcharts/src/modules/Series.js new file mode 100644 index 0000000..73e487d --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Series.js @@ -0,0 +1,453 @@ +import Graphics from './Graphics' +import Utils from '../utils/Utils' + +/** + * ApexCharts Series Class for interaction with the Series of the chart. + * + * @module Series + **/ + +export default class Series { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.legendInactiveClass = 'legend-mouseover-inactive' + } + + getAllSeriesEls() { + return this.w.globals.dom.baseEl.getElementsByClassName(`apexcharts-series`) + } + + getSeriesByName(seriesName) { + return this.w.globals.dom.baseEl.querySelector( + `.apexcharts-inner .apexcharts-series[seriesName='${Utils.escapeString( + seriesName + )}']` + ) + } + + isSeriesHidden(seriesName) { + const targetElement = this.getSeriesByName(seriesName) + let realIndex = parseInt(targetElement.getAttribute('data:realIndex'), 10) + let isHidden = targetElement.classList.contains( + 'apexcharts-series-collapsed' + ) + + return { isHidden, realIndex } + } + + addCollapsedClassToSeries(elSeries, index) { + const w = this.w + function iterateOnAllCollapsedSeries(series) { + for (let cs = 0; cs < series.length; cs++) { + if (series[cs].index === index) { + elSeries.node.classList.add('apexcharts-series-collapsed') + } + } + } + + iterateOnAllCollapsedSeries(w.globals.collapsedSeries) + iterateOnAllCollapsedSeries(w.globals.ancillaryCollapsedSeries) + } + + toggleSeries(seriesName) { + let isSeriesHidden = this.isSeriesHidden(seriesName) + + this.ctx.legend.legendHelpers.toggleDataSeries( + isSeriesHidden.realIndex, + isSeriesHidden.isHidden + ) + + return isSeriesHidden.isHidden + } + + showSeries(seriesName) { + let isSeriesHidden = this.isSeriesHidden(seriesName) + + if (isSeriesHidden.isHidden) { + this.ctx.legend.legendHelpers.toggleDataSeries( + isSeriesHidden.realIndex, + true + ) + } + } + + hideSeries(seriesName) { + let isSeriesHidden = this.isSeriesHidden(seriesName) + + if (!isSeriesHidden.isHidden) { + this.ctx.legend.legendHelpers.toggleDataSeries( + isSeriesHidden.realIndex, + false + ) + } + } + + resetSeries( + shouldUpdateChart = true, + shouldResetZoom = true, + shouldResetCollapsed = true + ) { + const w = this.w + + let series = Utils.clone(w.globals.initialSeries) + + w.globals.previousPaths = [] + + if (shouldResetCollapsed) { + w.globals.collapsedSeries = [] + w.globals.ancillaryCollapsedSeries = [] + w.globals.collapsedSeriesIndices = [] + w.globals.ancillaryCollapsedSeriesIndices = [] + } else { + series = this.emptyCollapsedSeries(series) + } + + w.config.series = series + + if (shouldUpdateChart) { + if (shouldResetZoom) { + w.globals.zoomed = false + this.ctx.updateHelpers.revertDefaultAxisMinMax() + } + this.ctx.updateHelpers._updateSeries( + series, + w.config.chart.animations.dynamicAnimation.enabled + ) + } + } + + emptyCollapsedSeries(series) { + const w = this.w + for (let i = 0; i < series.length; i++) { + if (w.globals.collapsedSeriesIndices.indexOf(i) > -1) { + series[i].data = [] + } + } + return series + } + toggleSeriesOnHover(e, targetElement) { + const w = this.w + + if (!targetElement) targetElement = e.target + + let allSeriesEls = w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-series, .apexcharts-datalabels` + ) + + if (e.type === 'mousemove') { + let seriesCnt = parseInt(targetElement.getAttribute('rel'), 10) - 1 + + let seriesEl = null + let dataLabelEl = null + if (w.globals.axisCharts || w.config.chart.type === 'radialBar') { + if (w.globals.axisCharts) { + seriesEl = w.globals.dom.baseEl.querySelector( + `.apexcharts-series[data\\:realIndex='${seriesCnt}']` + ) + dataLabelEl = w.globals.dom.baseEl.querySelector( + `.apexcharts-datalabels[data\\:realIndex='${seriesCnt}']` + ) + } else { + seriesEl = w.globals.dom.baseEl.querySelector( + `.apexcharts-series[rel='${seriesCnt + 1}']` + ) + } + } else { + seriesEl = w.globals.dom.baseEl.querySelector( + `.apexcharts-series[rel='${seriesCnt + 1}'] path` + ) + } + + for (let se = 0; se < allSeriesEls.length; se++) { + allSeriesEls[se].classList.add(this.legendInactiveClass) + } + + if (seriesEl !== null) { + if (!w.globals.axisCharts) { + seriesEl.parentNode.classList.remove(this.legendInactiveClass) + } + seriesEl.classList.remove(this.legendInactiveClass) + + if (dataLabelEl !== null) { + dataLabelEl.classList.remove(this.legendInactiveClass) + } + } + } else if (e.type === 'mouseout') { + for (let se = 0; se < allSeriesEls.length; se++) { + allSeriesEls[se].classList.remove(this.legendInactiveClass) + } + } + } + + highlightRangeInSeries(e, targetElement) { + const w = this.w + const allHeatMapElements = w.globals.dom.baseEl.getElementsByClassName( + 'apexcharts-heatmap-rect' + ) + + const activeInactive = (action) => { + for (let i = 0; i < allHeatMapElements.length; i++) { + allHeatMapElements[i].classList[action](this.legendInactiveClass) + } + } + + const removeInactiveClassFromHoveredRange = (range) => { + for (let i = 0; i < allHeatMapElements.length; i++) { + const val = parseInt(allHeatMapElements[i].getAttribute('val'), 10) + if (val >= range.from && val <= range.to) { + allHeatMapElements[i].classList.remove(this.legendInactiveClass) + } + } + } + + if (e.type === 'mousemove') { + let seriesCnt = parseInt(targetElement.getAttribute('rel'), 10) - 1 + activeInactive('add') + + const range = w.config.plotOptions.heatmap.colorScale.ranges[seriesCnt] + + removeInactiveClassFromHoveredRange(range) + } else if (e.type === 'mouseout') { + activeInactive('remove') + } + } + + getActiveConfigSeriesIndex(ignoreBars = false, order = 'asc') { + const w = this.w + let activeIndex = 0 + + if (w.config.series.length > 1) { + // active series flag is required to know if user has not deactivated via legend click + let activeSeriesIndex = w.config.series.map((s, index) => { + let hasBars = false + if (ignoreBars) { + hasBars = + w.config.series[index].type === 'bar' || + w.config.series[index].type === 'column' + } + return s.data && s.data.length > 0 && !hasBars ? index : -1 + }) + + for ( + let a = order === 'asc' ? 0 : activeSeriesIndex.length - 1; + order === 'asc' ? a < activeSeriesIndex.length : a >= 0; + order === 'asc' ? a++ : a-- + ) { + if (activeSeriesIndex[a] !== -1) { + activeIndex = activeSeriesIndex[a] + break + } + } + } + + return activeIndex + } + + getPreviousPaths() { + let w = this.w + + w.globals.previousPaths = [] + + function pushPaths(seriesEls, i, type) { + let paths = seriesEls[i].childNodes + let dArr = { + type, + paths: [], + realIndex: seriesEls[i].getAttribute('data:realIndex') + } + + for (let j = 0; j < paths.length; j++) { + if (paths[j].hasAttribute('pathTo')) { + let d = paths[j].getAttribute('pathTo') + dArr.paths.push({ + d + }) + } + } + + w.globals.previousPaths.push(dArr) + } + + const getPaths = (chartType) => { + return w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-${chartType}-series .apexcharts-series` + ) + } + + const chartTypes = [ + 'line', + 'area', + 'bar', + 'rangebar', + 'candlestick', + 'radar' + ] + chartTypes.forEach((type) => { + const paths = getPaths(type) + for (let p = 0; p < paths.length; p++) { + pushPaths(paths, p, type) + } + }) + + this.handlePrevBubbleScatterPaths('bubble') + this.handlePrevBubbleScatterPaths('scatter') + + let heatTreeSeries = w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-${w.config.chart.type} .apexcharts-series` + ) + + if (heatTreeSeries.length > 0) { + for (let h = 0; h < heatTreeSeries.length; h++) { + let seriesEls = w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-${w.config.chart.type} .apexcharts-series[data\\:realIndex='${h}'] rect` + ) + + let dArr = [] + + for (let i = 0; i < seriesEls.length; i++) { + const getAttr = (x) => { + return seriesEls[i].getAttribute(x) + } + const rect = { + x: parseFloat(getAttr('x')), + y: parseFloat(getAttr('y')), + width: parseFloat(getAttr('width')), + height: parseFloat(getAttr('height')) + } + dArr.push({ + rect, + color: seriesEls[i].getAttribute('color') + }) + } + w.globals.previousPaths.push(dArr) + } + } + + if (!w.globals.axisCharts) { + // for non-axis charts (i.e., circular charts, pathFrom is not usable. We need whole series) + w.globals.previousPaths = w.globals.series + } + } + + handlePrevBubbleScatterPaths(type) { + const w = this.w + let paths = w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-${type}-series .apexcharts-series` + ) + if (paths.length > 0) { + for (let s = 0; s < paths.length; s++) { + let seriesEls = w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-${type}-series .apexcharts-series[data\\:realIndex='${s}'] circle` + ) + let dArr = [] + + for (let i = 0; i < seriesEls.length; i++) { + dArr.push({ + x: seriesEls[i].getAttribute('cx'), + y: seriesEls[i].getAttribute('cy'), + r: seriesEls[i].getAttribute('r') + }) + } + w.globals.previousPaths.push(dArr) + } + } + } + + clearPreviousPaths() { + const w = this.w + w.globals.previousPaths = [] + w.globals.allSeriesCollapsed = false + } + + handleNoData() { + const w = this.w + const me = this + + const noDataOpts = w.config.noData + const graphics = new Graphics(me.ctx) + + let x = w.globals.svgWidth / 2 + let y = w.globals.svgHeight / 2 + let textAnchor = 'middle' + + w.globals.noData = true + w.globals.animationEnded = true + + if (noDataOpts.align === 'left') { + x = 10 + textAnchor = 'start' + } else if (noDataOpts.align === 'right') { + x = w.globals.svgWidth - 10 + textAnchor = 'end' + } + + if (noDataOpts.verticalAlign === 'top') { + y = 50 + } else if (noDataOpts.verticalAlign === 'bottom') { + y = w.globals.svgHeight - 50 + } + + x = x + noDataOpts.offsetX + y = y + parseInt(noDataOpts.style.fontSize, 10) + 2 + noDataOpts.offsetY + + if (noDataOpts.text !== undefined && noDataOpts.text !== '') { + let titleText = graphics.drawText({ + x, + y, + text: noDataOpts.text, + textAnchor, + fontSize: noDataOpts.style.fontSize, + fontFamily: noDataOpts.style.fontFamily, + foreColor: noDataOpts.style.color, + opacity: 1, + class: 'apexcharts-text-nodata' + }) + + w.globals.dom.Paper.add(titleText) + } + } + + // When user clicks on legends, the collapsed series is filled with [0,0,0,...,0] + // This is because we don't want to alter the series' length as it is used at many places + setNullSeriesToZeroValues(series) { + let w = this.w + for (let sl = 0; sl < series.length; sl++) { + if (series[sl].length === 0) { + for (let j = 0; j < series[w.globals.maxValsInArrayIndex].length; j++) { + series[sl].push(0) + } + } + } + return series + } + + hasAllSeriesEqualX() { + let equalLen = true + const w = this.w + + const filteredSerX = this.filteredSeriesX() + + for (let i = 0; i < filteredSerX.length - 1; i++) { + if (filteredSerX[i][0] !== filteredSerX[i + 1][0]) { + equalLen = false + break + } + } + + w.globals.allSeriesHasEqualX = equalLen + + return equalLen + } + + filteredSeriesX() { + const w = this.w + + const filteredSeriesX = w.globals.seriesX.map((ser) => + ser.length > 0 ? ser : [] + ) + + return filteredSeriesX + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Theme.js b/cao_sunyata/static/libs/apexcharts/src/modules/Theme.js new file mode 100644 index 0000000..f7138aa --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Theme.js @@ -0,0 +1,239 @@ +import Utils from '../utils/Utils' + +/** + * ApexCharts Theme Class for setting the colors and palettes. + * + * @module Theme + **/ + +export default class Theme { + constructor(ctx) { + this.ctx = ctx + this.colors = [] + this.w = ctx.w + const w = this.w + + this.isColorFn = false + this.isHeatmapDistributed = + (w.config.chart.type === 'treemap' && + w.config.plotOptions.treemap.distributed) || + (w.config.chart.type === 'heatmap' && + w.config.plotOptions.heatmap.distributed) + this.isBarDistributed = + w.config.plotOptions.bar.distributed && + (w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') + } + + init() { + this.setDefaultColors() + } + + setDefaultColors() { + let w = this.w + let utils = new Utils() + + w.globals.dom.elWrap.classList.add( + `apexcharts-theme-${w.config.theme.mode}` + ) + + if (w.config.colors === undefined) { + w.globals.colors = this.predefined() + } else { + w.globals.colors = w.config.colors + + // if user provided a function in colors, we need to eval here + if ( + Array.isArray(w.config.colors) && + w.config.colors.length > 0 && + typeof w.config.colors[0] === 'function' + ) { + w.globals.colors = w.config.series.map((s, i) => { + let c = w.config.colors[i] + if (!c) c = w.config.colors[0] + if (typeof c === 'function') { + this.isColorFn = true + return c({ + value: w.globals.axisCharts + ? w.globals.series[i][0] + ? w.globals.series[i][0] + : 0 + : w.globals.series[i], + seriesIndex: i, + dataPointIndex: i, + w + }) + } + return c + }) + } + } + + // user defined colors in series array + w.globals.seriesColors.map((c, i) => { + if (c) { + w.globals.colors[i] = c + } + }) + + if (w.config.theme.monochrome.enabled) { + let monoArr = [] + let glsCnt = w.globals.series.length + if (this.isBarDistributed || this.isHeatmapDistributed) { + glsCnt = w.globals.series[0].length * w.globals.series.length + } + + let mainColor = w.config.theme.monochrome.color + let part = 1 / (glsCnt / w.config.theme.monochrome.shadeIntensity) + let shade = w.config.theme.monochrome.shadeTo + let percent = 0 + + for (let gsl = 0; gsl < glsCnt; gsl++) { + let newColor + + if (shade === 'dark') { + newColor = utils.shadeColor(percent * -1, mainColor) + percent = percent + part + } else { + newColor = utils.shadeColor(percent, mainColor) + percent = percent + part + } + + monoArr.push(newColor) + } + w.globals.colors = monoArr.slice() + } + const defaultColors = w.globals.colors.slice() + + // if user specified fewer colors than no. of series, push the same colors again + this.pushExtraColors(w.globals.colors) + + const colorTypes = ['fill', 'stroke'] + colorTypes.forEach((c) => { + if (w.config[c].colors === undefined) { + w.globals[c].colors = this.isColorFn ? w.config.colors : defaultColors + } else { + w.globals[c].colors = w.config[c].colors.slice() + } + this.pushExtraColors(w.globals[c].colors) + }) + + if (w.config.dataLabels.style.colors === undefined) { + w.globals.dataLabels.style.colors = defaultColors + } else { + w.globals.dataLabels.style.colors = w.config.dataLabels.style.colors.slice() + } + this.pushExtraColors(w.globals.dataLabels.style.colors, 50) + + if (w.config.plotOptions.radar.polygons.fill.colors === undefined) { + w.globals.radarPolygons.fill.colors = [ + w.config.theme.mode === 'dark' ? '#424242' : 'none' + ] + } else { + w.globals.radarPolygons.fill.colors = w.config.plotOptions.radar.polygons.fill.colors.slice() + } + this.pushExtraColors(w.globals.radarPolygons.fill.colors, 20) + + // The point colors + if (w.config.markers.colors === undefined) { + w.globals.markers.colors = defaultColors + } else { + w.globals.markers.colors = w.config.markers.colors.slice() + } + this.pushExtraColors(w.globals.markers.colors) + } + + // When the number of colors provided is less than the number of series, this method + // will push same colors to the list + // params: + // distributed is only valid for distributed column/bar charts + pushExtraColors(colorSeries, length, distributed = null) { + let w = this.w + + let len = length || w.globals.series.length + + if (distributed === null) { + distributed = + this.isBarDistributed || + this.isHeatmapDistributed || + (w.config.chart.type === 'heatmap' && + w.config.plotOptions.heatmap.colorScale.inverse) + } + + if (distributed && w.globals.series.length) { + len = + w.globals.series[w.globals.maxValsInArrayIndex].length * + w.globals.series.length + } + + if (colorSeries.length < len) { + let diff = len - colorSeries.length + for (let i = 0; i < diff; i++) { + colorSeries.push(colorSeries[i]) + } + } + } + + updateThemeOptions(options) { + options.chart = options.chart || {} + options.tooltip = options.tooltip || {} + const mode = options.theme.mode || 'light' + const palette = options.theme.palette + ? options.theme.palette + : mode === 'dark' + ? 'palette4' + : 'palette1' + const foreColor = options.chart.foreColor + ? options.chart.foreColor + : mode === 'dark' + ? '#f6f7f8' + : '#373d3f' + + options.tooltip.theme = mode + options.chart.foreColor = foreColor + options.theme.palette = palette + + return options + } + + predefined() { + let palette = this.w.config.theme.palette + + // D6E3F8, FCEFEF, DCE0D9, A5978B, EDDDD4, D6E3F8, FEF5EF + switch (palette) { + case 'palette1': + this.colors = ['#008FFB', '#00E396', '#FEB019', '#FF4560', '#775DD0'] + break + case 'palette2': + this.colors = ['#3f51b5', '#03a9f4', '#4caf50', '#f9ce1d', '#FF9800'] + break + case 'palette3': + this.colors = ['#33b2df', '#546E7A', '#d4526e', '#13d8aa', '#A5978B'] + break + case 'palette4': + this.colors = ['#4ecdc4', '#c7f464', '#81D4FA', '#fd6a6a', '#546E7A'] + break + case 'palette5': + this.colors = ['#2b908f', '#f9a3a4', '#90ee7e', '#fa4443', '#69d2e7'] + break + case 'palette6': + this.colors = ['#449DD1', '#F86624', '#EA3546', '#662E9B', '#C5D86D'] + break + case 'palette7': + this.colors = ['#D7263D', '#1B998B', '#2E294E', '#F46036', '#E2C044'] + break + case 'palette8': + this.colors = ['#662E9B', '#F86624', '#F9C80E', '#EA3546', '#43BCCD'] + break + case 'palette9': + this.colors = ['#5C4742', '#A5978B', '#8D5B4C', '#5A2A27', '#C4BBAF'] + break + case 'palette10': + this.colors = ['#A300D6', '#7D02EB', '#5653FE', '#2983FF', '#00B1F2'] + break + default: + this.colors = ['#008FFB', '#00E396', '#FEB019', '#FF4560', '#775DD0'] + break + } + return this.colors + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/TimeScale.js b/cao_sunyata/static/libs/apexcharts/src/modules/TimeScale.js new file mode 100644 index 0000000..92e5aa3 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/TimeScale.js @@ -0,0 +1,917 @@ +import DateTime from '../utils/DateTime' +import Dimensions from './dimensions/Dimensions' +import Graphics from './Graphics' +import Utils from '../utils/Utils' + +const MINUTES_IN_DAY = 24 * 60 +const SECONDS_IN_DAY = MINUTES_IN_DAY * 60 +const MIN_ZOOM_DAYS = 10 / SECONDS_IN_DAY + +/** + * ApexCharts TimeScale Class for generating time ticks for x-axis. + * + * @module TimeScale + **/ + +class TimeScale { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + this.timeScaleArray = [] + this.utc = this.w.config.xaxis.labels.datetimeUTC + } + + calculateTimeScaleTicks(minX, maxX) { + let w = this.w + + // null check when no series to show + if (w.globals.allSeriesCollapsed) { + w.globals.labels = [] + w.globals.timescaleLabels = [] + return [] + } + + let dt = new DateTime(this.ctx) + + const daysDiff = (maxX - minX) / (1000 * SECONDS_IN_DAY) + this.determineInterval(daysDiff) + + w.globals.disableZoomIn = false + w.globals.disableZoomOut = false + + if (daysDiff < MIN_ZOOM_DAYS) { + w.globals.disableZoomIn = true + } else if (daysDiff > 50000) { + w.globals.disableZoomOut = true + } + + const timeIntervals = dt.getTimeUnitsfromTimestamp(minX, maxX, this.utc) + + const daysWidthOnXAxis = w.globals.gridWidth / daysDiff + const hoursWidthOnXAxis = daysWidthOnXAxis / 24 + const minutesWidthOnXAxis = hoursWidthOnXAxis / 60 + const secondsWidthOnXAxis = minutesWidthOnXAxis / 60 + + let numberOfHours = Math.floor(daysDiff * 24) + let numberOfMinutes = Math.floor(daysDiff * MINUTES_IN_DAY) + let numberOfSeconds = Math.floor(daysDiff * SECONDS_IN_DAY) + let numberOfDays = Math.floor(daysDiff) + let numberOfMonths = Math.floor(daysDiff / 30) + let numberOfYears = Math.floor(daysDiff / 365) + + const firstVal = { + minMillisecond: timeIntervals.minMillisecond, + minSecond: timeIntervals.minSecond, + minMinute: timeIntervals.minMinute, + minHour: timeIntervals.minHour, + minDate: timeIntervals.minDate, + minMonth: timeIntervals.minMonth, + minYear: timeIntervals.minYear + } + + let currentMillisecond = firstVal.minMillisecond + let currentSecond = firstVal.minSecond + let currentMinute = firstVal.minMinute + let currentHour = firstVal.minHour + let currentMonthDate = firstVal.minDate + let currentDate = firstVal.minDate + let currentMonth = firstVal.minMonth + let currentYear = firstVal.minYear + + const params = { + firstVal, + currentMillisecond, + currentSecond, + currentMinute, + currentHour, + currentMonthDate, + currentDate, + currentMonth, + currentYear, + daysWidthOnXAxis, + hoursWidthOnXAxis, + minutesWidthOnXAxis, + secondsWidthOnXAxis, + numberOfSeconds, + numberOfMinutes, + numberOfHours, + numberOfDays, + numberOfMonths, + numberOfYears + } + + switch (this.tickInterval) { + case 'years': { + this.generateYearScale(params) + break + } + case 'months': + case 'half_year': { + this.generateMonthScale(params) + break + } + case 'months_days': + case 'months_fortnight': + case 'days': + case 'week_days': { + this.generateDayScale(params) + break + } + case 'hours': { + this.generateHourScale(params) + break + } + case 'minutes_fives': + case 'minutes': + this.generateMinuteScale(params) + break + case 'seconds_tens': + case 'seconds_fives': + case 'seconds': + this.generateSecondScale(params) + break + } + + // first, we will adjust the month values index + // as in the upper function, it is starting from 0 + // we will start them from 1 + const adjustedMonthInTimeScaleArray = this.timeScaleArray.map((ts) => { + let defaultReturn = { + position: ts.position, + unit: ts.unit, + year: ts.year, + day: ts.day ? ts.day : 1, + hour: ts.hour ? ts.hour : 0, + month: ts.month + 1 + } + if (ts.unit === 'month') { + return { + ...defaultReturn, + day: 1, + value: ts.value + 1 + } + } else if (ts.unit === 'day' || ts.unit === 'hour') { + return { + ...defaultReturn, + value: ts.value + } + } else if (ts.unit === 'minute') { + return { + ...defaultReturn, + value: ts.value, + minute: ts.value + } + } else if (ts.unit === 'second') { + return { + ...defaultReturn, + value: ts.value, + minute: ts.minute, + second: ts.second + } + } + + return ts + }) + + const filteredTimeScale = adjustedMonthInTimeScaleArray.filter((ts) => { + let modulo = 1 + let ticks = Math.ceil(w.globals.gridWidth / 120) + let value = ts.value + if (w.config.xaxis.tickAmount !== undefined) { + ticks = w.config.xaxis.tickAmount + } + if (adjustedMonthInTimeScaleArray.length > ticks) { + modulo = Math.floor(adjustedMonthInTimeScaleArray.length / ticks) + } + + let shouldNotSkipUnit = false // there is a big change in unit i.e days to months + let shouldNotPrint = false // should skip these values + + switch (this.tickInterval) { + case 'years': + // make years label denser + if (ts.unit === 'year') { + shouldNotSkipUnit = true + } + break + case 'half_year': + modulo = 7 + if (ts.unit === 'year') { + shouldNotSkipUnit = true + } + break + case 'months': + modulo = 1 + if (ts.unit === 'year') { + shouldNotSkipUnit = true + } + break + case 'months_fortnight': + modulo = 15 + if (ts.unit === 'year' || ts.unit === 'month') { + shouldNotSkipUnit = true + } + if (value === 30) { + shouldNotPrint = true + } + break + case 'months_days': + modulo = 10 + if (ts.unit === 'month') { + shouldNotSkipUnit = true + } + if (value === 30) { + shouldNotPrint = true + } + break + case 'week_days': + modulo = 8 + if (ts.unit === 'month') { + shouldNotSkipUnit = true + } + break + case 'days': + modulo = 1 + if (ts.unit === 'month') { + shouldNotSkipUnit = true + } + break + case 'hours': + if (ts.unit === 'day') { + shouldNotSkipUnit = true + } + break + case 'minutes_fives': + if (value % 5 !== 0) { + shouldNotPrint = true + } + break + case 'seconds_tens': + if (value % 10 !== 0) { + shouldNotPrint = true + } + break + case 'seconds_fives': + if (value % 5 !== 0) { + shouldNotPrint = true + } + break + } + + if ( + this.tickInterval === 'hours' || + this.tickInterval === 'minutes_fives' || + this.tickInterval === 'seconds_tens' || + this.tickInterval === 'seconds_fives' + ) { + if (!shouldNotPrint) { + return true + } + } else { + if ((value % modulo === 0 || shouldNotSkipUnit) && !shouldNotPrint) { + return true + } + } + }) + + return filteredTimeScale + } + + recalcDimensionsBasedOnFormat(filteredTimeScale, inverted) { + const w = this.w + const reformattedTimescaleArray = this.formatDates(filteredTimeScale) + + const removedOverlappingTS = this.removeOverlappingTS( + reformattedTimescaleArray + ) + + w.globals.timescaleLabels = removedOverlappingTS.slice() + + // at this stage, we need to re-calculate coords of the grid as timeline labels may have altered the xaxis labels coords + // The reason we can't do this prior to this stage is because timeline labels depends on gridWidth, and as the ticks are calculated based on available gridWidth, there can be unknown number of ticks generated for different minX and maxX + // Dependency on Dimensions(), need to refactor correctly + // TODO - find an alternate way to avoid calling this Heavy method twice + let dimensions = new Dimensions(this.ctx) + dimensions.plotCoords() + } + + determineInterval(daysDiff) { + const yearsDiff = daysDiff / 365 + const hoursDiff = daysDiff * 24 + const minutesDiff = hoursDiff * 60 + const secondsDiff = minutesDiff * 60 + switch (true) { + case yearsDiff > 5: + this.tickInterval = 'years' + break + case daysDiff > 800: + this.tickInterval = 'half_year' + break + case daysDiff > 180: + this.tickInterval = 'months' + break + case daysDiff > 90: + this.tickInterval = 'months_fortnight' + break + case daysDiff > 60: + this.tickInterval = 'months_days' + break + case daysDiff > 30: + this.tickInterval = 'week_days' + break + case daysDiff > 2: + this.tickInterval = 'days' + break + case hoursDiff > 2.4: + this.tickInterval = 'hours' + break + case minutesDiff > 15: + this.tickInterval = 'minutes_fives' + break + case minutesDiff > 5: + this.tickInterval = 'minutes' + break + case minutesDiff > 1: + this.tickInterval = 'seconds_tens' + break + case secondsDiff > 20: + this.tickInterval = 'seconds_fives' + break + default: + this.tickInterval = 'seconds' + break + } + } + + generateYearScale({ + firstVal, + currentMonth, + currentYear, + daysWidthOnXAxis, + numberOfYears + }) { + let firstTickValue = firstVal.minYear + let firstTickPosition = 0 + const dt = new DateTime(this.ctx) + + let unit = 'year' + + if (firstVal.minDate > 1 || firstVal.minMonth > 0) { + let remainingDays = dt.determineRemainingDaysOfYear( + firstVal.minYear, + firstVal.minMonth, + firstVal.minDate + ) + + // remainingDaysofFirstMonth is used to reacht the 2nd tick position + let remainingDaysOfFirstYear = + dt.determineDaysOfYear(firstVal.minYear) - remainingDays + 1 + + // calculate the first tick position + firstTickPosition = remainingDaysOfFirstYear * daysWidthOnXAxis + firstTickValue = firstVal.minYear + 1 + // push the first tick in the array + this.timeScaleArray.push({ + position: firstTickPosition, + value: firstTickValue, + unit, + year: firstTickValue, + month: Utils.monthMod(currentMonth + 1) + }) + } else if (firstVal.minDate === 1 && firstVal.minMonth === 0) { + // push the first tick in the array + this.timeScaleArray.push({ + position: firstTickPosition, + value: firstTickValue, + unit, + year: currentYear, + month: Utils.monthMod(currentMonth + 1) + }) + } + + let year = firstTickValue + let pos = firstTickPosition + + // keep drawing rest of the ticks + for (let i = 0; i < numberOfYears; i++) { + year++ + pos = dt.determineDaysOfYear(year - 1) * daysWidthOnXAxis + pos + this.timeScaleArray.push({ + position: pos, + value: year, + unit, + year, + month: 1 + }) + } + } + + generateMonthScale({ + firstVal, + currentMonthDate, + currentMonth, + currentYear, + daysWidthOnXAxis, + numberOfMonths + }) { + let firstTickValue = currentMonth + let firstTickPosition = 0 + const dt = new DateTime(this.ctx) + let unit = 'month' + let yrCounter = 0 + + if (firstVal.minDate > 1) { + // remainingDaysofFirstMonth is used to reacht the 2nd tick position + let remainingDaysOfFirstMonth = + dt.determineDaysOfMonths(currentMonth + 1, firstVal.minYear) - + currentMonthDate + + 1 + + // calculate the first tick position + firstTickPosition = remainingDaysOfFirstMonth * daysWidthOnXAxis + firstTickValue = Utils.monthMod(currentMonth + 1) + + let year = currentYear + yrCounter + let month = Utils.monthMod(firstTickValue) + let value = firstTickValue + // it's Jan, so update the year + if (firstTickValue === 0) { + unit = 'year' + value = year + month = 1 + yrCounter += 1 + year = year + yrCounter + } + + // push the first tick in the array + this.timeScaleArray.push({ + position: firstTickPosition, + value, + unit, + year, + month + }) + } else { + // push the first tick in the array + this.timeScaleArray.push({ + position: firstTickPosition, + value: firstTickValue, + unit, + year: currentYear, + month: Utils.monthMod(currentMonth) + }) + } + + let month = firstTickValue + 1 + let pos = firstTickPosition + + // keep drawing rest of the ticks + for (let i = 0, j = 1; i < numberOfMonths; i++, j++) { + month = Utils.monthMod(month) + + if (month === 0) { + unit = 'year' + yrCounter += 1 + } else { + unit = 'month' + } + let year = this._getYear(currentYear, month, yrCounter) + + pos = dt.determineDaysOfMonths(month, year) * daysWidthOnXAxis + pos + let monthVal = month === 0 ? year : month + this.timeScaleArray.push({ + position: pos, + value: monthVal, + unit, + year, + month: month === 0 ? 1 : month + }) + month++ + } + } + + generateDayScale({ + firstVal, + currentMonth, + currentYear, + hoursWidthOnXAxis, + numberOfDays + }) { + const dt = new DateTime(this.ctx) + let unit = 'day' + let firstTickValue = firstVal.minDate + 1 + let date = firstTickValue + + const changeMonth = (dateVal, month, year) => { + let monthdays = dt.determineDaysOfMonths(month + 1, year) + + if (dateVal > monthdays) { + month = month + 1 + date = 1 + unit = 'month' + val = month + return month + } + + return month + } + + let remainingHours = 24 - firstVal.minHour + let yrCounter = 0 + + // calculate the first tick position + let firstTickPosition = remainingHours * hoursWidthOnXAxis + + let val = firstTickValue + let month = changeMonth(date, currentMonth, currentYear) + + if (firstVal.minHour === 0 && firstVal.minDate === 1) { + // the first value is the first day of month + firstTickPosition = 0 + val = Utils.monthMod(firstVal.minMonth) + unit = 'month' + date = firstVal.minDate + numberOfDays++ + } else if ( + firstVal.minDate !== 1 && + firstVal.minHour === 0 && + firstVal.minMinute === 0 + ) { + // fixes apexcharts/apexcharts.js/issues/1730 + firstTickPosition = 0 + firstTickValue = firstVal.minDate + date = firstTickValue + val = firstTickValue + // in case it's the last date of month, we need to check it + month = changeMonth(date, currentMonth, currentYear) + } + + // push the first tick in the array + this.timeScaleArray.push({ + position: firstTickPosition, + value: val, + unit, + year: this._getYear(currentYear, month, yrCounter), + month: Utils.monthMod(month), + day: date + }) + + let pos = firstTickPosition + // keep drawing rest of the ticks + for (let i = 0; i < numberOfDays; i++) { + date += 1 + unit = 'day' + month = changeMonth( + date, + month, + this._getYear(currentYear, month, yrCounter) + ) + + let year = this._getYear(currentYear, month, yrCounter) + + pos = 24 * hoursWidthOnXAxis + pos + let value = date === 1 ? Utils.monthMod(month) : date + this.timeScaleArray.push({ + position: pos, + value, + unit, + year, + month: Utils.monthMod(month), + day: value + }) + } + } + + generateHourScale({ + firstVal, + currentDate, + currentMonth, + currentYear, + minutesWidthOnXAxis, + numberOfHours + }) { + const dt = new DateTime(this.ctx) + + let yrCounter = 0 + let unit = 'hour' + + const changeDate = (dateVal, month) => { + let monthdays = dt.determineDaysOfMonths(month + 1, currentYear) + if (dateVal > monthdays) { + date = 1 + month = month + 1 + } + return { month, date } + } + + const changeMonth = (dateVal, month) => { + let monthdays = dt.determineDaysOfMonths(month + 1, currentYear) + if (dateVal > monthdays) { + month = month + 1 + return month + } + + return month + } + + // factor in minSeconds as well + let remainingMins = 60 - (firstVal.minMinute + firstVal.minSecond / 60.0) + + let firstTickPosition = remainingMins * minutesWidthOnXAxis + let firstTickValue = firstVal.minHour + 1 + let hour = firstTickValue + 1 + + if (remainingMins === 60) { + firstTickPosition = 0 + firstTickValue = firstVal.minHour + hour = firstTickValue + 1 + } + + let date = currentDate + + let month = changeMonth(date, currentMonth) + + // push the first tick in the array + this.timeScaleArray.push({ + position: firstTickPosition, + value: firstTickValue, + unit, + day: date, + hour, + year: currentYear, + month: Utils.monthMod(month) + }) + + let pos = firstTickPosition + // keep drawing rest of the ticks + for (let i = 0; i < numberOfHours; i++) { + unit = 'hour' + + if (hour >= 24) { + hour = 0 + date += 1 + unit = 'day' + + const checkNextMonth = changeDate(date, month) + + month = checkNextMonth.month + month = changeMonth(date, month) + } + + let year = this._getYear(currentYear, month, yrCounter) + pos = + hour === 0 && i === 0 + ? remainingMins * minutesWidthOnXAxis + : 60 * minutesWidthOnXAxis + pos + let val = hour === 0 ? date : hour + this.timeScaleArray.push({ + position: pos, + value: val, + unit, + hour, + day: date, + year, + month: Utils.monthMod(month) + }) + + hour++ + } + } + + generateMinuteScale({ + currentMillisecond, + currentSecond, + currentMinute, + currentHour, + currentDate, + currentMonth, + currentYear, + minutesWidthOnXAxis, + secondsWidthOnXAxis, + numberOfMinutes + }) { + let yrCounter = 0 + let unit = 'minute' + + let remainingSecs = 60 - currentSecond + let firstTickPosition = + (remainingSecs - currentMillisecond / 1000) * secondsWidthOnXAxis + let minute = currentMinute + 1 + + let date = currentDate + let month = currentMonth + let year = currentYear + let hour = currentHour + + let pos = firstTickPosition + for (let i = 0; i < numberOfMinutes; i++) { + if (minute >= 60) { + minute = 0 + hour += 1 + if (hour === 24) { + hour = 0 + } + } + + this.timeScaleArray.push({ + position: pos, + value: minute, + unit, + hour, + minute, + day: date, + year: this._getYear(year, month, yrCounter), + month: Utils.monthMod(month) + }) + + pos += minutesWidthOnXAxis + minute++ + } + } + + generateSecondScale({ + currentMillisecond, + currentSecond, + currentMinute, + currentHour, + currentDate, + currentMonth, + currentYear, + secondsWidthOnXAxis, + numberOfSeconds + }) { + let yrCounter = 0 + let unit = 'second' + + const remainingMillisecs = 1000 - currentMillisecond + let firstTickPosition = (remainingMillisecs / 1000) * secondsWidthOnXAxis + + let second = currentSecond + 1 + let minute = currentMinute + let date = currentDate + let month = currentMonth + let year = currentYear + let hour = currentHour + + let pos = firstTickPosition + for (let i = 0; i < numberOfSeconds; i++) { + if (second >= 60) { + minute++ + second = 0 + if (minute >= 60) { + hour++ + minute = 0 + if (hour === 24) { + hour = 0 + } + } + } + + this.timeScaleArray.push({ + position: pos, + value: second, + unit, + hour, + minute, + second, + day: date, + year: this._getYear(year, month, yrCounter), + month: Utils.monthMod(month) + }) + + pos += secondsWidthOnXAxis + second++ + } + } + + createRawDateString(ts, value) { + let raw = ts.year + + if (ts.month === 0) { + // invalid month, correct it + ts.month = 1 + } + raw += '-' + ('0' + ts.month.toString()).slice(-2) + + // unit is day + if (ts.unit === 'day') { + raw += ts.unit === 'day' ? '-' + ('0' + value).slice(-2) : '-01' + } else { + raw += '-' + ('0' + (ts.day ? ts.day : '1')).slice(-2) + } + + // unit is hour + if (ts.unit === 'hour') { + raw += ts.unit === 'hour' ? 'T' + ('0' + value).slice(-2) : 'T00' + } else { + raw += 'T' + ('0' + (ts.hour ? ts.hour : '0')).slice(-2) + } + + if (ts.unit === 'minute') { + raw += ':' + ('0' + value).slice(-2) + } else { + raw += ':' + (ts.minute ? ('0' + ts.minute).slice(-2) : '00') + } + + if (ts.unit === 'second') { + raw += ':' + ('0' + value).slice(-2) + } else { + raw += ':00' + } + + if (this.utc) { + raw += '.000Z' + } + return raw + } + + formatDates(filteredTimeScale) { + const w = this.w + + const reformattedTimescaleArray = filteredTimeScale.map((ts) => { + let value = ts.value.toString() + + let dt = new DateTime(this.ctx) + + const raw = this.createRawDateString(ts, value) + + let dateToFormat = dt.getDate(dt.parseDate(raw)) + if (!this.utc) { + // Fixes #1726, #1544, #1485, #1255 + dateToFormat = dt.getDate(dt.parseDateWithTimezone(raw)) + } + + if (w.config.xaxis.labels.format === undefined) { + let customFormat = 'dd MMM' + const dtFormatter = w.config.xaxis.labels.datetimeFormatter + if (ts.unit === 'year') customFormat = dtFormatter.year + if (ts.unit === 'month') customFormat = dtFormatter.month + if (ts.unit === 'day') customFormat = dtFormatter.day + if (ts.unit === 'hour') customFormat = dtFormatter.hour + if (ts.unit === 'minute') customFormat = dtFormatter.minute + if (ts.unit === 'second') customFormat = dtFormatter.second + + value = dt.formatDate(dateToFormat, customFormat) + } else { + value = dt.formatDate(dateToFormat, w.config.xaxis.labels.format) + } + + return { + dateString: raw, + position: ts.position, + value, + unit: ts.unit, + year: ts.year, + month: ts.month + } + }) + + return reformattedTimescaleArray + } + + removeOverlappingTS(arr) { + const graphics = new Graphics(this.ctx) + + let equalLabelLengthFlag = false // These labels got same length? + let constantLabelWidth // If true, what is the constant length to use + if ( + arr.length > 0 && // check arr length + arr[0].value && // check arr[0] contains value + arr.every((lb) => lb.value.length === arr[0].value.length) // check every arr label value is the same as the first one + ) { + equalLabelLengthFlag = true // These labels got same length + constantLabelWidth = graphics.getTextRects(arr[0].value).width // The constant label width to use + } + + let lastDrawnIndex = 0 + + let filteredArray = arr.map((item, index) => { + if (index > 0 && this.w.config.xaxis.labels.hideOverlappingLabels) { + const prevLabelWidth = !equalLabelLengthFlag // if vary in label length + ? graphics.getTextRects(arr[lastDrawnIndex].value).width // get individual length + : constantLabelWidth // else: use constant length + const prevPos = arr[lastDrawnIndex].position + const pos = item.position + + if (pos > prevPos + prevLabelWidth + 10) { + lastDrawnIndex = index + return item + } else { + return null + } + } else { + return item + } + }) + + filteredArray = filteredArray.filter((f) => f !== null) + + return filteredArray + } + + _getYear(currentYear, month, yrCounter) { + return currentYear + Math.floor(month / 12) + yrCounter + } +} + +export default TimeScale diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/TitleSubtitle.js b/cao_sunyata/static/libs/apexcharts/src/modules/TitleSubtitle.js new file mode 100644 index 0000000..2b3f88e --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/TitleSubtitle.js @@ -0,0 +1,52 @@ +import Graphics from './Graphics' + +export default class TitleSubtitle { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + draw() { + this.drawTitleSubtitle('title') + this.drawTitleSubtitle('subtitle') + } + + drawTitleSubtitle(type) { + let w = this.w + const tsConfig = type === 'title' ? w.config.title : w.config.subtitle + + let x = w.globals.svgWidth / 2 + let y = tsConfig.offsetY + let textAnchor = 'middle' + + if (tsConfig.align === 'left') { + x = 10 + textAnchor = 'start' + } else if (tsConfig.align === 'right') { + x = w.globals.svgWidth - 10 + textAnchor = 'end' + } + + x = x + tsConfig.offsetX + y = y + parseInt(tsConfig.style.fontSize, 10) + tsConfig.margin / 2 + + if (tsConfig.text !== undefined) { + let graphics = new Graphics(this.ctx) + let titleText = graphics.drawText({ + x, + y, + text: tsConfig.text, + textAnchor, + fontSize: tsConfig.style.fontSize, + fontFamily: tsConfig.style.fontFamily, + fontWeight: tsConfig.style.fontWeight, + foreColor: tsConfig.style.color, + opacity: 1 + }) + + titleText.node.setAttribute('class', `apexcharts-${type}-text`) + + w.globals.dom.Paper.add(titleText) + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/Toolbar.js b/cao_sunyata/static/libs/apexcharts/src/modules/Toolbar.js new file mode 100644 index 0000000..edfef1b --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/Toolbar.js @@ -0,0 +1,532 @@ +import Graphics from './Graphics' +import Exports from './Exports' +import Scales from './Scales' +import Utils from './../utils/Utils' +import icoPan from './../assets/ico-pan-hand.svg' +import icoZoom from './../assets/ico-zoom-in.svg' +import icoReset from './../assets/ico-home.svg' +import icoZoomIn from './../assets/ico-plus.svg' +import icoZoomOut from './../assets/ico-minus.svg' +import icoSelect from './../assets/ico-select.svg' +import icoMenu from './../assets/ico-menu.svg' + +/** + * ApexCharts Toolbar Class for creating toolbar in axis based charts. + * + * @module Toolbar + **/ + +export default class Toolbar { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + const w = this.w + + this.ev = this.w.config.chart.events + this.selectedClass = 'apexcharts-selected' + + this.localeValues = this.w.globals.locale.toolbar + + this.minX = w.globals.minX + this.maxX = w.globals.maxX + } + + createToolbar() { + let w = this.w + + const createDiv = () => { + return document.createElement('div') + } + const elToolbarWrap = createDiv() + elToolbarWrap.setAttribute('class', 'apexcharts-toolbar') + elToolbarWrap.style.top = w.config.chart.toolbar.offsetY + 'px' + elToolbarWrap.style.right = -w.config.chart.toolbar.offsetX + 3 + 'px' + w.globals.dom.elWrap.appendChild(elToolbarWrap) + + this.elZoom = createDiv() + this.elZoomIn = createDiv() + this.elZoomOut = createDiv() + this.elPan = createDiv() + this.elSelection = createDiv() + this.elZoomReset = createDiv() + this.elMenuIcon = createDiv() + this.elMenu = createDiv() + this.elCustomIcons = [] + + this.t = w.config.chart.toolbar.tools + + if (Array.isArray(this.t.customIcons)) { + for (let i = 0; i < this.t.customIcons.length; i++) { + this.elCustomIcons.push(createDiv()) + } + } + + let toolbarControls = [] + + const appendZoomControl = (type, el, ico) => { + const tool = type.toLowerCase() + if (this.t[tool] && w.config.chart.zoom.enabled) { + toolbarControls.push({ + el, + icon: typeof this.t[tool] === 'string' ? this.t[tool] : ico, + title: this.localeValues[type], + class: `apexcharts-${tool}-icon` + }) + } + } + + appendZoomControl('zoomIn', this.elZoomIn, icoZoomIn) + appendZoomControl('zoomOut', this.elZoomOut, icoZoomOut) + + const zoomSelectionCtrls = (z) => { + if (this.t[z] && w.config.chart[z].enabled) { + toolbarControls.push({ + el: z === 'zoom' ? this.elZoom : this.elSelection, + icon: + typeof this.t[z] === 'string' + ? this.t[z] + : z === 'zoom' + ? icoZoom + : icoSelect, + title: this.localeValues[ + z === 'zoom' ? 'selectionZoom' : 'selection' + ], + class: w.globals.isTouchDevice + ? 'apexcharts-element-hidden' + : `apexcharts-${z}-icon` + }) + } + } + zoomSelectionCtrls('zoom') + zoomSelectionCtrls('selection') + + if (this.t.pan && w.config.chart.zoom.enabled) { + toolbarControls.push({ + el: this.elPan, + icon: typeof this.t.pan === 'string' ? this.t.pan : icoPan, + title: this.localeValues.pan, + class: w.globals.isTouchDevice + ? 'apexcharts-element-hidden' + : 'apexcharts-pan-icon' + }) + } + + appendZoomControl('reset', this.elZoomReset, icoReset) + + if (this.t.download) { + toolbarControls.push({ + el: this.elMenuIcon, + icon: typeof this.t.download === 'string' ? this.t.download : icoMenu, + title: this.localeValues.menu, + class: 'apexcharts-menu-icon' + }) + } + + for (let i = 0; i < this.elCustomIcons.length; i++) { + toolbarControls.push({ + el: this.elCustomIcons[i], + icon: this.t.customIcons[i].icon, + title: this.t.customIcons[i].title, + index: this.t.customIcons[i].index, + class: 'apexcharts-toolbar-custom-icon ' + this.t.customIcons[i].class + }) + } + + toolbarControls.forEach((t, index) => { + if (t.index) { + Utils.moveIndexInArray(toolbarControls, index, t.index) + } + }) + + for (let i = 0; i < toolbarControls.length; i++) { + Graphics.setAttrs(toolbarControls[i].el, { + class: toolbarControls[i].class, + title: toolbarControls[i].title + }) + + toolbarControls[i].el.innerHTML = toolbarControls[i].icon + elToolbarWrap.appendChild(toolbarControls[i].el) + } + + this._createHamburgerMenu(elToolbarWrap) + + if (w.globals.zoomEnabled) { + this.elZoom.classList.add(this.selectedClass) + } else if (w.globals.panEnabled) { + this.elPan.classList.add(this.selectedClass) + } else if (w.globals.selectionEnabled) { + this.elSelection.classList.add(this.selectedClass) + } + + this.addToolbarEventListeners() + } + + _createHamburgerMenu(parent) { + this.elMenuItems = [] + parent.appendChild(this.elMenu) + + Graphics.setAttrs(this.elMenu, { + class: 'apexcharts-menu' + }) + + const menuItems = [ + { + name: 'exportSVG', + title: this.localeValues.exportToSVG + }, + { + name: 'exportPNG', + title: this.localeValues.exportToPNG + }, + { + name: 'exportCSV', + title: this.localeValues.exportToCSV + } + ] + + if (!this.w.globals.allSeriesHasEqualX) { + // if it is a multi series, and all series have variable x values, export CSV won't work + menuItems.splice(2, 1) + } + for (let i = 0; i < menuItems.length; i++) { + this.elMenuItems.push(document.createElement('div')) + this.elMenuItems[i].innerHTML = menuItems[i].title + Graphics.setAttrs(this.elMenuItems[i], { + class: `apexcharts-menu-item ${menuItems[i].name}`, + title: menuItems[i].title + }) + this.elMenu.appendChild(this.elMenuItems[i]) + } + } + + addToolbarEventListeners() { + this.elZoomReset.addEventListener('click', this.handleZoomReset.bind(this)) + this.elSelection.addEventListener( + 'click', + this.toggleZoomSelection.bind(this, 'selection') + ) + this.elZoom.addEventListener( + 'click', + this.toggleZoomSelection.bind(this, 'zoom') + ) + this.elZoomIn.addEventListener('click', this.handleZoomIn.bind(this)) + this.elZoomOut.addEventListener('click', this.handleZoomOut.bind(this)) + this.elPan.addEventListener('click', this.togglePanning.bind(this)) + this.elMenuIcon.addEventListener('click', this.toggleMenu.bind(this)) + this.elMenuItems.forEach((m) => { + if (m.classList.contains('exportSVG')) { + m.addEventListener('click', this.handleDownload.bind(this, 'svg')) + } else if (m.classList.contains('exportPNG')) { + m.addEventListener('click', this.handleDownload.bind(this, 'png')) + } else if (m.classList.contains('exportCSV')) { + m.addEventListener('click', this.handleDownload.bind(this, 'csv')) + } + }) + for (let i = 0; i < this.t.customIcons.length; i++) { + this.elCustomIcons[i].addEventListener( + 'click', + this.t.customIcons[i].click.bind(this, this.ctx, this.ctx.w) + ) + } + } + + toggleZoomSelection(type) { + const charts = this.ctx.getSyncedCharts() + + charts.forEach((ch) => { + ch.ctx.toolbar.toggleOtherControls() + + let el = + type === 'selection' + ? ch.ctx.toolbar.elSelection + : ch.ctx.toolbar.elZoom + let enabledType = + type === 'selection' ? 'selectionEnabled' : 'zoomEnabled' + + ch.w.globals[enabledType] = !ch.w.globals[enabledType] + + if (!el.classList.contains(ch.ctx.toolbar.selectedClass)) { + el.classList.add(ch.ctx.toolbar.selectedClass) + } else { + el.classList.remove(ch.ctx.toolbar.selectedClass) + } + }) + } + + getToolbarIconsReference() { + const w = this.w + if (!this.elZoom) { + this.elZoom = w.globals.dom.baseEl.querySelector('.apexcharts-zoom-icon') + } + if (!this.elPan) { + this.elPan = w.globals.dom.baseEl.querySelector('.apexcharts-pan-icon') + } + if (!this.elSelection) { + this.elSelection = w.globals.dom.baseEl.querySelector( + '.apexcharts-selection-icon' + ) + } + } + + enableZoomPanFromToolbar(type) { + this.toggleOtherControls() + + type === 'pan' + ? (this.w.globals.panEnabled = true) + : (this.w.globals.zoomEnabled = true) + + const el = type === 'pan' ? this.elPan : this.elZoom + const el2 = type === 'pan' ? this.elZoom : this.elPan + if (el) { + el.classList.add(this.selectedClass) + } + if (el2) { + el2.classList.remove(this.selectedClass) + } + } + + togglePanning() { + const charts = this.ctx.getSyncedCharts() + + charts.forEach((ch) => { + ch.ctx.toolbar.toggleOtherControls() + ch.w.globals.panEnabled = !ch.w.globals.panEnabled + + if ( + !ch.ctx.toolbar.elPan.classList.contains(ch.ctx.toolbar.selectedClass) + ) { + ch.ctx.toolbar.elPan.classList.add(ch.ctx.toolbar.selectedClass) + } else { + ch.ctx.toolbar.elPan.classList.remove(ch.ctx.toolbar.selectedClass) + } + }) + } + + toggleOtherControls() { + const w = this.w + w.globals.panEnabled = false + w.globals.zoomEnabled = false + w.globals.selectionEnabled = false + + this.getToolbarIconsReference() + + const toggleEls = [this.elPan, this.elSelection, this.elZoom] + toggleEls.forEach((el) => { + if (el) { + el.classList.remove(this.selectedClass) + } + }) + } + + handleZoomIn() { + const w = this.w + + if (w.globals.isRangeBar) { + this.minX = w.globals.minY + this.maxX = w.globals.maxY + } + + const centerX = (this.minX + this.maxX) / 2 + let newMinX = (this.minX + centerX) / 2 + let newMaxX = (this.maxX + centerX) / 2 + + const newMinXMaxX = this._getNewMinXMaxX(newMinX, newMaxX) + + if (!w.globals.disableZoomIn) { + this.zoomUpdateOptions(newMinXMaxX.minX, newMinXMaxX.maxX) + } + } + + handleZoomOut() { + const w = this.w + + if (w.globals.isRangeBar) { + this.minX = w.globals.minY + this.maxX = w.globals.maxY + } + + // avoid zooming out beyond 1000 which may result in NaN values being printed on x-axis + if ( + w.config.xaxis.type === 'datetime' && + new Date(this.minX).getUTCFullYear() < 1000 + ) { + return + } + + const centerX = (this.minX + this.maxX) / 2 + let newMinX = this.minX - (centerX - this.minX) + let newMaxX = this.maxX - (centerX - this.maxX) + + const newMinXMaxX = this._getNewMinXMaxX(newMinX, newMaxX) + + if (!w.globals.disableZoomOut) { + this.zoomUpdateOptions(newMinXMaxX.minX, newMinXMaxX.maxX) + } + } + + _getNewMinXMaxX(newMinX, newMaxX) { + const shouldFloor = this.w.config.xaxis.convertedCatToNumeric + return { + minX: shouldFloor ? Math.floor(newMinX) : newMinX, + maxX: shouldFloor ? Math.floor(newMaxX) : newMaxX + } + } + + zoomUpdateOptions(newMinX, newMaxX) { + const w = this.w + + if (newMinX === undefined && newMaxX === undefined) { + this.handleZoomReset() + return + } + + if (w.config.xaxis.convertedCatToNumeric) { + // in category charts, avoid zooming out beyond min and max + if (newMinX < 1) { + newMinX = 1 + newMaxX = w.globals.dataPoints + } + + if (newMaxX - newMinX < 2) { + return + } + } + + let xaxis = { + min: newMinX, + max: newMaxX + } + + const beforeZoomRange = this.getBeforeZoomRange(xaxis) + if (beforeZoomRange) { + xaxis = beforeZoomRange.xaxis + } + + let options = { + xaxis + } + + let yaxis = Utils.clone(w.globals.initialConfig.yaxis) + if (w.config.chart.zoom.autoScaleYaxis) { + const scale = new Scales(this.ctx) + yaxis = scale.autoScaleY(this.ctx, yaxis, { + xaxis + }) + } + + if (!w.config.chart.group) { + // if chart in a group, prevent yaxis update here + // fix issue #650 + options.yaxis = yaxis + } + + this.w.globals.zoomed = true + + this.ctx.updateHelpers._updateOptions( + options, + false, + this.w.config.chart.animations.dynamicAnimation.enabled + ) + + this.zoomCallback(xaxis, yaxis) + } + + zoomCallback(xaxis, yaxis) { + if (typeof this.ev.zoomed === 'function') { + this.ev.zoomed(this.ctx, { xaxis, yaxis }) + } + } + + getBeforeZoomRange(xaxis, yaxis) { + let newRange = null + if (typeof this.ev.beforeZoom === 'function') { + newRange = this.ev.beforeZoom(this, { xaxis, yaxis }) + } + + return newRange + } + + toggleMenu() { + window.setTimeout(() => { + if (this.elMenu.classList.contains('apexcharts-menu-open')) { + this.elMenu.classList.remove('apexcharts-menu-open') + } else { + this.elMenu.classList.add('apexcharts-menu-open') + } + }, 0) + } + + handleDownload(type) { + const w = this.w + const exprt = new Exports(this.ctx) + switch (type) { + case 'svg': + exprt.exportToSVG(this.ctx) + break + case 'png': + exprt.exportToPng(this.ctx) + break + case 'csv': + exprt.exportToCSV({ + series: w.config.series, + columnDelimiter: w.config.chart.toolbar.export.csv.columnDelimiter + }) + break + } + } + + handleZoomReset(e) { + const charts = this.ctx.getSyncedCharts() + + charts.forEach((ch) => { + let w = ch.w + + // forget lastXAxis min/max as reset button isn't resetting the x-axis completely if zoomX is called before + w.globals.lastXAxis.min = undefined + w.globals.lastXAxis.max = undefined + + ch.updateHelpers.revertDefaultAxisMinMax() + + if (typeof w.config.chart.events.beforeResetZoom === 'function') { + // here, user get an option to control xaxis and yaxis when resetZoom is called + // at this point, whatever is returned from w.config.chart.events.beforeResetZoom + // is set as the new xaxis/yaxis min/max + const resetZoomRange = w.config.chart.events.beforeResetZoom(ch, w) + + if (resetZoomRange) { + ch.updateHelpers.revertDefaultAxisMinMax(resetZoomRange) + } + } + + if (typeof w.config.chart.events.zoomed === 'function') { + ch.ctx.toolbar.zoomCallback({ + min: w.config.xaxis.min, + max: w.config.xaxis.max + }) + } + + w.globals.zoomed = false + + // if user has some series collapsed before hitting zoom reset button, + // those series should stay collapsed + let series = ch.ctx.series.emptyCollapsedSeries( + Utils.clone(w.globals.initialSeries) + ) + + ch.updateHelpers._updateSeries( + series, + w.config.chart.animations.dynamicAnimation.enabled + ) + }) + } + + destroy() { + this.elZoom = null + this.elZoomIn = null + this.elZoomOut = null + this.elPan = null + this.elSelection = null + this.elZoomReset = null + this.elMenuIcon = null + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/ZoomPanSelection.js b/cao_sunyata/static/libs/apexcharts/src/modules/ZoomPanSelection.js new file mode 100644 index 0000000..5a280b4 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/ZoomPanSelection.js @@ -0,0 +1,777 @@ +import Graphics from './Graphics' +import Utils from './../utils/Utils' +import Toolbar from './Toolbar' +import Scales from './Scales' + +/** + * ApexCharts Zoom Class for handling zooming and panning on axes based charts. + * + * @module ZoomPanSelection + **/ + +export default class ZoomPanSelection extends Toolbar { + constructor(ctx) { + super(ctx) + + this.ctx = ctx + this.w = ctx.w + + this.dragged = false + this.graphics = new Graphics(this.ctx) + + this.eventList = [ + 'mousedown', + 'mouseleave', + 'mousemove', + 'touchstart', + 'touchmove', + 'mouseup', + 'touchend' + ] + + this.clientX = 0 + this.clientY = 0 + this.startX = 0 + this.endX = 0 + this.dragX = 0 + this.startY = 0 + this.endY = 0 + this.dragY = 0 + this.moveDirection = 'none' + } + + init({ xyRatios }) { + let w = this.w + let me = this + + this.xyRatios = xyRatios + + this.zoomRect = this.graphics.drawRect(0, 0, 0, 0) + this.selectionRect = this.graphics.drawRect(0, 0, 0, 0) + this.gridRect = w.globals.dom.baseEl.querySelector('.apexcharts-grid') + + this.zoomRect.node.classList.add('apexcharts-zoom-rect') + this.selectionRect.node.classList.add('apexcharts-selection-rect') + w.globals.dom.elGraphical.add(this.zoomRect) + w.globals.dom.elGraphical.add(this.selectionRect) + + if (w.config.chart.selection.type === 'x') { + this.slDraggableRect = this.selectionRect + .draggable({ + minX: 0, + minY: 0, + maxX: w.globals.gridWidth, + maxY: w.globals.gridHeight + }) + .on('dragmove', this.selectionDragging.bind(this, 'dragging')) + } else if (w.config.chart.selection.type === 'y') { + this.slDraggableRect = this.selectionRect + .draggable({ + minX: 0, + maxX: w.globals.gridWidth + }) + .on('dragmove', this.selectionDragging.bind(this, 'dragging')) + } else { + this.slDraggableRect = this.selectionRect + .draggable() + .on('dragmove', this.selectionDragging.bind(this, 'dragging')) + } + this.preselectedSelection() + + this.hoverArea = w.globals.dom.baseEl.querySelector( + `${w.globals.chartClass} .apexcharts-svg` + ) + this.hoverArea.classList.add('apexcharts-zoomable') + + this.eventList.forEach((event) => { + this.hoverArea.addEventListener( + event, + me.svgMouseEvents.bind(me, xyRatios), + { + capture: false, + passive: true + } + ) + }) + } + + // remove the event listeners which were previously added on hover area + destroy() { + if (this.slDraggableRect) { + this.slDraggableRect.draggable(false) + this.slDraggableRect.off() + this.selectionRect.off() + } + + this.selectionRect = null + this.zoomRect = null + this.gridRect = null + } + + svgMouseEvents(xyRatios, e) { + let w = this.w + let me = this + const toolbar = this.ctx.toolbar + + let zoomtype = w.globals.zoomEnabled + ? w.config.chart.zoom.type + : w.config.chart.selection.type + + const autoSelected = w.config.chart.toolbar.autoSelected + + if (e.shiftKey) { + this.shiftWasPressed = true + toolbar.enableZoomPanFromToolbar(autoSelected === 'pan' ? 'zoom' : 'pan') + } else { + if (this.shiftWasPressed) { + toolbar.enableZoomPanFromToolbar(autoSelected) + this.shiftWasPressed = false + } + } + + if (!e.target) return + + const tc = e.target.classList + let pc + if (e.target.parentNode && e.target.parentNode !== null) { + pc = e.target.parentNode.classList + } + const falsePositives = + tc.contains('apexcharts-selection-rect') || + tc.contains('apexcharts-legend-marker') || + tc.contains('apexcharts-legend-text') || + (pc && pc.contains('apexcharts-toolbar')) + + if (falsePositives) return + + me.clientX = + e.type === 'touchmove' || e.type === 'touchstart' + ? e.touches[0].clientX + : e.type === 'touchend' + ? e.changedTouches[0].clientX + : e.clientX + me.clientY = + e.type === 'touchmove' || e.type === 'touchstart' + ? e.touches[0].clientY + : e.type === 'touchend' + ? e.changedTouches[0].clientY + : e.clientY + + if (e.type === 'mousedown' && e.which === 1) { + let gridRectDim = me.gridRect.getBoundingClientRect() + + me.startX = me.clientX - gridRectDim.left + me.startY = me.clientY - gridRectDim.top + + me.dragged = false + me.w.globals.mousedown = true + } + + if ((e.type === 'mousemove' && e.which === 1) || e.type === 'touchmove') { + me.dragged = true + + if (w.globals.panEnabled) { + w.globals.selection = null + if (me.w.globals.mousedown) { + me.panDragging({ + context: me, + zoomtype, + xyRatios + }) + } + } else { + if ( + (me.w.globals.mousedown && w.globals.zoomEnabled) || + (me.w.globals.mousedown && w.globals.selectionEnabled) + ) { + me.selection = me.selectionDrawing({ + context: me, + zoomtype + }) + } + } + } + + if ( + e.type === 'mouseup' || + e.type === 'touchend' || + e.type === 'mouseleave' + ) { + // we will be calling getBoundingClientRect on each mousedown/mousemove/mouseup + let gridRectDim = me.gridRect.getBoundingClientRect() + + if (me.w.globals.mousedown) { + // user released the drag, now do all the calculations + me.endX = me.clientX - gridRectDim.left + me.endY = me.clientY - gridRectDim.top + me.dragX = Math.abs(me.endX - me.startX) + me.dragY = Math.abs(me.endY - me.startY) + + if (w.globals.zoomEnabled || w.globals.selectionEnabled) { + me.selectionDrawn({ + context: me, + zoomtype + }) + } + + if (w.globals.panEnabled && w.config.xaxis.convertedCatToNumeric) { + me.delayedPanScrolled() + } + } + + if (w.globals.zoomEnabled) { + me.hideSelectionRect(this.selectionRect) + } + + me.dragged = false + me.w.globals.mousedown = false + } + + this.makeSelectionRectDraggable() + } + + makeSelectionRectDraggable() { + const w = this.w + + if (!this.selectionRect) return + + const rectDim = this.selectionRect.node.getBoundingClientRect() + if (rectDim.width > 0 && rectDim.height > 0) { + this.slDraggableRect + .selectize({ + points: 'l, r', + pointSize: 8, + pointType: 'rect' + }) + .resize({ + constraint: { + minX: 0, + minY: 0, + maxX: w.globals.gridWidth, + maxY: w.globals.gridHeight + } + }) + .on('resizing', this.selectionDragging.bind(this, 'resizing')) + } + } + + preselectedSelection() { + const w = this.w + const xyRatios = this.xyRatios + + if (!w.globals.zoomEnabled) { + if ( + typeof w.globals.selection !== 'undefined' && + w.globals.selection !== null + ) { + this.drawSelectionRect(w.globals.selection) + } else { + if ( + w.config.chart.selection.xaxis.min !== undefined && + w.config.chart.selection.xaxis.max !== undefined + ) { + const x = + (w.config.chart.selection.xaxis.min - w.globals.minX) / + xyRatios.xRatio + const width = + w.globals.gridWidth - + (w.globals.maxX - w.config.chart.selection.xaxis.max) / + xyRatios.xRatio - + x + let selectionRect = { + x, + y: 0, + width, + height: w.globals.gridHeight, + translateX: 0, + translateY: 0, + selectionEnabled: true + } + this.drawSelectionRect(selectionRect) + this.makeSelectionRectDraggable() + if (typeof w.config.chart.events.selection === 'function') { + w.config.chart.events.selection(this.ctx, { + xaxis: { + min: w.config.chart.selection.xaxis.min, + max: w.config.chart.selection.xaxis.max + }, + yaxis: {} + }) + } + } + } + } + } + + drawSelectionRect({ x, y, width, height, translateX = 0, translateY = 0 }) { + const w = this.w + const zoomRect = this.zoomRect + const selectionRect = this.selectionRect + if (this.dragged || w.globals.selection !== null) { + let scalingAttrs = { + transform: 'translate(' + translateX + ', ' + translateY + ')' + } + + // change styles based on zoom or selection + // zoom is Enabled and user has dragged, so draw blue rect + if (w.globals.zoomEnabled && this.dragged) { + if (width < 0) width = 1 // fixes apexcharts.js#1168 + zoomRect.attr({ + x, + y, + width, + height, + fill: w.config.chart.zoom.zoomedArea.fill.color, + 'fill-opacity': w.config.chart.zoom.zoomedArea.fill.opacity, + stroke: w.config.chart.zoom.zoomedArea.stroke.color, + 'stroke-width': w.config.chart.zoom.zoomedArea.stroke.width, + 'stroke-opacity': w.config.chart.zoom.zoomedArea.stroke.opacity + }) + Graphics.setAttrs(zoomRect.node, scalingAttrs) + } + + // selection is enabled + if (w.globals.selectionEnabled) { + selectionRect.attr({ + x, + y, + width: width > 0 ? width : 0, + height: height > 0 ? height : 0, + fill: w.config.chart.selection.fill.color, + 'fill-opacity': w.config.chart.selection.fill.opacity, + stroke: w.config.chart.selection.stroke.color, + 'stroke-width': w.config.chart.selection.stroke.width, + 'stroke-dasharray': w.config.chart.selection.stroke.dashArray, + 'stroke-opacity': w.config.chart.selection.stroke.opacity + }) + + Graphics.setAttrs(selectionRect.node, scalingAttrs) + } + } + } + + hideSelectionRect(rect) { + if (rect) { + rect.attr({ + x: 0, + y: 0, + width: 0, + height: 0 + }) + } + } + + selectionDrawing({ context, zoomtype }) { + const w = this.w + let me = context + + let gridRectDim = this.gridRect.getBoundingClientRect() + + let startX = me.startX - 1 + let startY = me.startY + let inversedX = false + let inversedY = false + + let selectionWidth = me.clientX - gridRectDim.left - startX + let selectionHeight = me.clientY - gridRectDim.top - startY + + let selectionRect = {} + + if (Math.abs(selectionWidth + startX) > w.globals.gridWidth) { + // user dragged the mouse outside drawing area to the right + selectionWidth = w.globals.gridWidth - startX + } else if (me.clientX - gridRectDim.left < 0) { + // user dragged the mouse outside drawing area to the left + selectionWidth = startX + } + + // inverse selection X + if (startX > me.clientX - gridRectDim.left) { + inversedX = true + selectionWidth = Math.abs(selectionWidth) + } + + // inverse selection Y + if (startY > me.clientY - gridRectDim.top) { + inversedY = true + selectionHeight = Math.abs(selectionHeight) + } + + if (zoomtype === 'x') { + selectionRect = { + x: inversedX ? startX - selectionWidth : startX, + y: 0, + width: selectionWidth, + height: w.globals.gridHeight + } + } else if (zoomtype === 'y') { + selectionRect = { + x: 0, + y: inversedY ? startY - selectionHeight : startY, + width: w.globals.gridWidth, + height: selectionHeight + } + } else { + selectionRect = { + x: inversedX ? startX - selectionWidth : startX, + y: inversedY ? startY - selectionHeight : startY, + width: selectionWidth, + height: selectionHeight + } + } + + me.drawSelectionRect(selectionRect) + me.selectionDragging('resizing') + return selectionRect + } + + selectionDragging(type, e) { + const w = this.w + const xyRatios = this.xyRatios + + const selRect = this.selectionRect + + let timerInterval = 0 + + if (type === 'resizing') { + timerInterval = 30 + } + + // update selection when selection rect is dragged + const getSelAttr = (attr) => { + return parseFloat(selRect.node.getAttribute(attr)) + } + const draggedProps = { + x: getSelAttr('x'), + y: getSelAttr('y'), + width: getSelAttr('width'), + height: getSelAttr('height') + } + w.globals.selection = draggedProps + // update selection ends + + if ( + typeof w.config.chart.events.selection === 'function' && + w.globals.selectionEnabled + ) { + // a small debouncer is required when resizing to avoid freezing the chart + clearTimeout(this.w.globals.selectionResizeTimer) + this.w.globals.selectionResizeTimer = window.setTimeout(() => { + const gridRectDim = this.gridRect.getBoundingClientRect() + const selectionRect = selRect.node.getBoundingClientRect() + + const minX = + w.globals.xAxisScale.niceMin + + (selectionRect.left - gridRectDim.left) * xyRatios.xRatio + const maxX = + w.globals.xAxisScale.niceMin + + (selectionRect.right - gridRectDim.left) * xyRatios.xRatio + + const minY = + w.globals.yAxisScale[0].niceMin + + (gridRectDim.bottom - selectionRect.bottom) * xyRatios.yRatio[0] + const maxY = + w.globals.yAxisScale[0].niceMax - + (selectionRect.top - gridRectDim.top) * xyRatios.yRatio[0] + + const xyAxis = { + xaxis: { + min: minX, + max: maxX + }, + yaxis: { + min: minY, + max: maxY + } + } + w.config.chart.events.selection(this.ctx, xyAxis) + + if ( + w.config.chart.brush.enabled && + w.config.chart.events.brushScrolled !== undefined + ) { + w.config.chart.events.brushScrolled(this.ctx, xyAxis) + } + }, timerInterval) + } + } + + selectionDrawn({ context, zoomtype }) { + const w = this.w + const me = context + const xyRatios = this.xyRatios + const toolbar = this.ctx.toolbar + + if (me.startX > me.endX) { + let tempX = me.startX + me.startX = me.endX + me.endX = tempX + } + if (me.startY > me.endY) { + let tempY = me.startY + me.startY = me.endY + me.endY = tempY + } + + let xLowestValue = undefined + let xHighestValue = undefined + + if (!w.globals.isRangeBar) { + xLowestValue = w.globals.xAxisScale.niceMin + me.startX * xyRatios.xRatio + xHighestValue = w.globals.xAxisScale.niceMin + me.endX * xyRatios.xRatio + } else { + xLowestValue = + w.globals.yAxisScale[0].niceMin + me.startX * xyRatios.invertedYRatio + xHighestValue = + w.globals.yAxisScale[0].niceMin + me.endX * xyRatios.invertedYRatio + } + + // TODO: we will consider the 1st y axis values here for getting highest and lowest y + let yHighestValue = [] + let yLowestValue = [] + + w.config.yaxis.forEach((yaxe, index) => { + yHighestValue.push( + w.globals.yAxisScale[index].niceMax - xyRatios.yRatio[index] * me.startY + ) + yLowestValue.push( + w.globals.yAxisScale[index].niceMax - xyRatios.yRatio[index] * me.endY + ) + }) + + if ( + me.dragged && + (me.dragX > 10 || me.dragY > 10) && + xLowestValue !== xHighestValue + ) { + if (w.globals.zoomEnabled) { + let yaxis = Utils.clone(w.globals.initialConfig.yaxis) + let xaxis = Utils.clone(w.globals.initialConfig.xaxis) + + w.globals.zoomed = true + + if (w.config.xaxis.convertedCatToNumeric) { + xLowestValue = Math.floor(xLowestValue) + xHighestValue = Math.floor(xHighestValue) + + if (xLowestValue < 1) { + xLowestValue = 1 + xHighestValue = w.globals.dataPoints + } + + if (xHighestValue - xLowestValue < 2) { + xHighestValue = xLowestValue + 1 + } + } + + if (zoomtype === 'xy' || zoomtype === 'x') { + xaxis = { + min: xLowestValue, + max: xHighestValue + } + } + + if (zoomtype === 'xy' || zoomtype === 'y') { + yaxis.forEach((yaxe, index) => { + yaxis[index].min = yLowestValue[index] + yaxis[index].max = yHighestValue[index] + }) + } + + if (w.config.chart.zoom.autoScaleYaxis) { + const scale = new Scales(me.ctx) + yaxis = scale.autoScaleY(me.ctx, yaxis, { + xaxis + }) + } + + if (toolbar) { + let beforeZoomRange = toolbar.getBeforeZoomRange(xaxis, yaxis) + if (beforeZoomRange) { + xaxis = beforeZoomRange.xaxis ? beforeZoomRange.xaxis : xaxis + yaxis = beforeZoomRange.yaxis ? beforeZoomRange.yaxis : yaxis + } + } + + let options = { + xaxis + } + + if (!w.config.chart.group) { + // if chart in a group, prevent yaxis update here + // fix issue #650 + options.yaxis = yaxis + } + me.ctx.updateHelpers._updateOptions( + options, + false, + me.w.config.chart.animations.dynamicAnimation.enabled + ) + + if (typeof w.config.chart.events.zoomed === 'function') { + toolbar.zoomCallback(xaxis, yaxis) + } + } else if (w.globals.selectionEnabled) { + let yaxis = null + let xaxis = null + xaxis = { + min: xLowestValue, + max: xHighestValue + } + if (zoomtype === 'xy' || zoomtype === 'y') { + yaxis = Utils.clone(w.config.yaxis) + yaxis.forEach((yaxe, index) => { + yaxis[index].min = yLowestValue[index] + yaxis[index].max = yHighestValue[index] + }) + } + + w.globals.selection = me.selection + if (typeof w.config.chart.events.selection === 'function') { + w.config.chart.events.selection(me.ctx, { + xaxis, + yaxis + }) + } + } + } + } + + panDragging({ context }) { + const w = this.w + let me = context + + // check to make sure there is data to compare against + if (typeof w.globals.lastClientPosition.x !== 'undefined') { + // get the change from last position to this position + const deltaX = w.globals.lastClientPosition.x - me.clientX + const deltaY = w.globals.lastClientPosition.y - me.clientY + + // check which direction had the highest amplitude and then figure out direction by checking if the value is greater or less than zero + if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX > 0) { + this.moveDirection = 'left' + } else if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX < 0) { + this.moveDirection = 'right' + } else if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY > 0) { + this.moveDirection = 'up' + } else if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY < 0) { + this.moveDirection = 'down' + } + } + + // set the new last position to the current for next time (to get the position of drag) + w.globals.lastClientPosition = { + x: me.clientX, + y: me.clientY + } + + let xLowestValue = w.globals.isRangeBar ? w.globals.minY : w.globals.minX + + let xHighestValue = w.globals.isRangeBar ? w.globals.maxY : w.globals.maxX + + // on a category, we don't pan continuosly as it causes bugs + if (!w.config.xaxis.convertedCatToNumeric) { + me.panScrolled(xLowestValue, xHighestValue) + } + } + + delayedPanScrolled() { + const w = this.w + + let newMinX = w.globals.minX + let newMaxX = w.globals.maxX + const centerX = (w.globals.maxX - w.globals.minX) / 2 + + if (this.moveDirection === 'left') { + newMinX = w.globals.minX + centerX + newMaxX = w.globals.maxX + centerX + } else if (this.moveDirection === 'right') { + newMinX = w.globals.minX - centerX + newMaxX = w.globals.maxX - centerX + } + + newMinX = Math.floor(newMinX) + newMaxX = Math.floor(newMaxX) + this.updateScrolledChart( + { xaxis: { min: newMinX, max: newMaxX } }, + newMinX, + newMaxX + ) + } + + panScrolled(xLowestValue, xHighestValue) { + const w = this.w + + const xyRatios = this.xyRatios + let yaxis = Utils.clone(w.globals.initialConfig.yaxis) + + let xRatio = xyRatios.xRatio + let minX = w.globals.minX + let maxX = w.globals.maxX + if (w.globals.isRangeBar) { + xRatio = xyRatios.invertedYRatio + minX = w.globals.minY + maxX = w.globals.maxY + } + + if (this.moveDirection === 'left') { + xLowestValue = minX + (w.globals.gridWidth / 15) * xRatio + xHighestValue = maxX + (w.globals.gridWidth / 15) * xRatio + } else if (this.moveDirection === 'right') { + xLowestValue = minX - (w.globals.gridWidth / 15) * xRatio + xHighestValue = maxX - (w.globals.gridWidth / 15) * xRatio + } + + if (!w.globals.isRangeBar) { + if ( + xLowestValue < w.globals.initialMinX || + xHighestValue > w.globals.initialMaxX + ) { + xLowestValue = minX + xHighestValue = maxX + } + } + + let xaxis = { + min: xLowestValue, + max: xHighestValue + } + + if (w.config.chart.zoom.autoScaleYaxis) { + const scale = new Scales(this.ctx) + yaxis = scale.autoScaleY(this.ctx, yaxis, { + xaxis + }) + } + + let options = { + xaxis: { + min: xLowestValue, + max: xHighestValue + } + } + + if (!w.config.chart.group) { + // if chart in a group, prevent yaxis update here + // fix issue #650 + options.yaxis = yaxis + } + + this.updateScrolledChart(options, xLowestValue, xHighestValue) + } + + updateScrolledChart(options, xLowestValue, xHighestValue) { + const w = this.w + + this.ctx.updateHelpers._updateOptions(options, false, false) + + if (typeof w.config.chart.events.scrolled === 'function') { + w.config.chart.events.scrolled(this.ctx, { + xaxis: { + min: xLowestValue, + max: xHighestValue + } + }) + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/annotations/Annotations.js b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/Annotations.js new file mode 100644 index 0000000..6157714 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/Annotations.js @@ -0,0 +1,321 @@ +import Graphics from '../../modules/Graphics' +import Utils from '../../utils/Utils' +import Helpers from './Helpers' +import XAxisAnnotations from './XAxisAnnotations' +import YAxisAnnotations from './YAxisAnnotations' +import PointsAnnotations from './PointsAnnotations' +import Options from './../settings/Options' + +/** + * ApexCharts Annotations Class for drawing lines/rects on both xaxis and yaxis. + * + * @module Annotations + **/ +export default class Annotations { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + this.graphics = new Graphics(this.ctx) + + if (this.w.globals.isBarHorizontal) { + this.invertAxis = true + } + + this.helpers = new Helpers(this) + this.xAxisAnnotations = new XAxisAnnotations(this) + this.yAxisAnnotations = new YAxisAnnotations(this) + this.pointsAnnotations = new PointsAnnotations(this) + + if (this.w.globals.isBarHorizontal && this.w.config.yaxis[0].reversed) { + this.inversedReversedAxis = true + } + + this.xDivision = this.w.globals.gridWidth / this.w.globals.dataPoints + } + + drawAxesAnnotations() { + const w = this.w + if (w.globals.axisCharts) { + let yAnnotations = this.yAxisAnnotations.drawYAxisAnnotations() + let xAnnotations = this.xAxisAnnotations.drawXAxisAnnotations() + let pointAnnotations = this.pointsAnnotations.drawPointAnnotations() + + const initialAnim = w.config.chart.animations.enabled + + const annoArray = [yAnnotations, xAnnotations, pointAnnotations] + const annoElArray = [ + xAnnotations.node, + yAnnotations.node, + pointAnnotations.node + ] + for (let i = 0; i < 3; i++) { + w.globals.dom.elGraphical.add(annoArray[i]) + if (initialAnim && !w.globals.resized && !w.globals.dataChanged) { + // fixes apexcharts/apexcharts.js#685 + if ( + w.config.chart.type !== 'scatter' && + w.config.chart.type !== 'bubble' && + w.globals.dataPoints > 1 + ) { + annoElArray[i].classList.add('apexcharts-element-hidden') + } + } + w.globals.delayedElements.push({ el: annoElArray[i], index: 0 }) + } + + // background sizes needs to be calculated after text is drawn, so calling them last + this.helpers.annotationsBackground() + } + } + + drawImageAnnos() { + const w = this.w + + w.config.annotations.images.map((s, index) => { + this.addImage(s, index) + }) + } + + drawTextAnnos() { + const w = this.w + + w.config.annotations.texts.map((t, index) => { + this.addText(t, index) + }) + } + + addXaxisAnnotation(anno, parent, index) { + this.xAxisAnnotations.addXaxisAnnotation(anno, parent, index) + } + + addYaxisAnnotation(anno, parent, index) { + this.yAxisAnnotations.addYaxisAnnotation(anno, parent, index) + } + + addPointAnnotation(anno, parent, index) { + this.pointsAnnotations.addPointAnnotation(anno, parent, index) + } + + addText(params, index) { + const { + x, + y, + text, + textAnchor, + foreColor, + fontSize, + fontFamily, + fontWeight, + cssClass, + backgroundColor, + borderWidth, + strokeDashArray, + borderRadius, + borderColor, + appendTo = '.apexcharts-annotations', + paddingLeft = 4, + paddingRight = 4, + paddingBottom = 2, + paddingTop = 2 + } = params + + const w = this.w + + let elText = this.graphics.drawText({ + x, + y, + text, + textAnchor: textAnchor || 'start', + fontSize: fontSize || '12px', + fontWeight: fontWeight || 'regular', + fontFamily: fontFamily || w.config.chart.fontFamily, + foreColor: foreColor || w.config.chart.foreColor, + cssClass: 'apexcharts-text ' + cssClass ? cssClass : '' + }) + + const parent = w.globals.dom.baseEl.querySelector(appendTo) + if (parent) { + parent.appendChild(elText.node) + } + + const textRect = elText.bbox() + + if (text) { + const elRect = this.graphics.drawRect( + textRect.x - paddingLeft, + textRect.y - paddingTop, + textRect.width + paddingLeft + paddingRight, + textRect.height + paddingBottom + paddingTop, + borderRadius, + backgroundColor ? backgroundColor : 'transparent', + 1, + borderWidth, + borderColor, + strokeDashArray + ) + + parent.insertBefore(elRect.node, elText.node) + } + } + + addImage(params, index) { + const w = this.w + + const { + path, + x = 0, + y = 0, + width = 20, + height = 20, + appendTo = '.apexcharts-annotations' + } = params + + let img = w.globals.dom.Paper.image(path) + img.size(width, height).move(x, y) + + const parent = w.globals.dom.baseEl.querySelector(appendTo) + if (parent) { + parent.appendChild(img.node) + } + + return img + } + + // The addXaxisAnnotation method requires a parent class, and user calling this method externally on the chart instance may not specify parent, hence a different method + addXaxisAnnotationExternal(params, pushToMemory, context) { + this.addAnnotationExternal({ + params, + pushToMemory, + context, + type: 'xaxis', + contextMethod: context.addXaxisAnnotation + }) + return context + } + + addYaxisAnnotationExternal(params, pushToMemory, context) { + this.addAnnotationExternal({ + params, + pushToMemory, + context, + type: 'yaxis', + contextMethod: context.addYaxisAnnotation + }) + return context + } + + addPointAnnotationExternal(params, pushToMemory, context) { + if (typeof this.invertAxis === 'undefined') { + this.invertAxis = context.w.globals.isBarHorizontal + } + + this.addAnnotationExternal({ + params, + pushToMemory, + context, + type: 'point', + contextMethod: context.addPointAnnotation + }) + return context + } + + addAnnotationExternal({ + params, + pushToMemory, + context, + type, + contextMethod + }) { + const me = context + const w = me.w + const parent = w.globals.dom.baseEl.querySelector( + `.apexcharts-${type}-annotations` + ) + const index = parent.childNodes.length + 1 + + const options = new Options() + const axesAnno = Object.assign( + {}, + type === 'xaxis' + ? options.xAxisAnnotation + : type === 'yaxis' + ? options.yAxisAnnotation + : options.pointAnnotation + ) + + const anno = Utils.extend(axesAnno, params) + + switch (type) { + case 'xaxis': + this.addXaxisAnnotation(anno, parent, index) + break + case 'yaxis': + this.addYaxisAnnotation(anno, parent, index) + break + case 'point': + this.addPointAnnotation(anno, parent, index) + break + } + + // add background + let axesAnnoLabel = w.globals.dom.baseEl.querySelector( + `.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${index}']` + ) + const elRect = this.helpers.addBackgroundToAnno(axesAnnoLabel, anno) + if (elRect) { + parent.insertBefore(elRect.node, axesAnnoLabel) + } + + if (pushToMemory) { + w.globals.memory.methodsToExec.push({ + context: me, + id: anno.id ? anno.id : Utils.randomId(), + method: contextMethod, + label: 'addAnnotation', + params + }) + } + + return context + } + + clearAnnotations(ctx) { + const w = ctx.w + let annos = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations' + ) + + // annotations added externally should be cleared out too + w.globals.memory.methodsToExec.map((m, i) => { + if (m.label === 'addText' || m.label === 'addAnnotation') { + w.globals.memory.methodsToExec.splice(i, 1) + } + }) + + annos = Utils.listToArray(annos) + + // delete the DOM elements + Array.prototype.forEach.call(annos, (a) => { + while (a.firstChild) { + a.removeChild(a.firstChild) + } + }) + } + + removeAnnotation(ctx, id) { + const w = ctx.w + let annos = w.globals.dom.baseEl.querySelectorAll(`.${id}`) + + if (annos) { + w.globals.memory.methodsToExec.map((m, i) => { + if (m.id === id) { + w.globals.memory.methodsToExec.splice(i, 1) + } + }) + + Array.prototype.forEach.call(annos, (a) => { + a.parentElement.removeChild(a) + }) + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/annotations/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/Helpers.js new file mode 100644 index 0000000..75ef5aa --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/Helpers.js @@ -0,0 +1,245 @@ +import CoreUtils from '../CoreUtils' + +export default class Helpers { + constructor(annoCtx) { + this.w = annoCtx.w + this.annoCtx = annoCtx + } + + setOrientations(anno, annoIndex = null) { + let w = this.w + + if (anno.label.orientation === 'vertical') { + const i = annoIndex !== null ? annoIndex : 0 + let xAnno = w.globals.dom.baseEl.querySelector( + `.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${i}']` + ) + + if (xAnno !== null) { + const xAnnoCoord = xAnno.getBoundingClientRect() + xAnno.setAttribute( + 'x', + parseFloat(xAnno.getAttribute('x')) - xAnnoCoord.height + 4 + ) + + if (anno.label.position === 'top') { + xAnno.setAttribute( + 'y', + parseFloat(xAnno.getAttribute('y')) + xAnnoCoord.width + ) + } else { + xAnno.setAttribute( + 'y', + parseFloat(xAnno.getAttribute('y')) - xAnnoCoord.width + ) + } + + let annoRotatingCenter = this.annoCtx.graphics.rotateAroundCenter(xAnno) + const x = annoRotatingCenter.x + const y = annoRotatingCenter.y + + xAnno.setAttribute('transform', `rotate(-90 ${x} ${y})`) + } + } + } + + addBackgroundToAnno(annoEl, anno) { + const w = this.w + + if ( + !annoEl || + typeof anno.label.text === 'undefined' || + (typeof anno.label.text !== 'undefined' && + !String(anno.label.text).trim()) + ) + return null + + const elGridRect = w.globals.dom.baseEl + .querySelector('.apexcharts-grid') + .getBoundingClientRect() + + const coords = annoEl.getBoundingClientRect() + + let pleft = anno.label.style.padding.left + let pright = anno.label.style.padding.right + let ptop = anno.label.style.padding.top + let pbottom = anno.label.style.padding.bottom + + if (anno.label.orientation === 'vertical') { + ptop = anno.label.style.padding.left + pbottom = anno.label.style.padding.right + pleft = anno.label.style.padding.top + pright = anno.label.style.padding.bottom + } + + const x1 = coords.left - elGridRect.left - pleft + const y1 = coords.top - elGridRect.top - ptop + const elRect = this.annoCtx.graphics.drawRect( + x1 - w.globals.barPadForNumericAxis, + y1, + coords.width + pleft + pright, + coords.height + ptop + pbottom, + anno.label.borderRadius, + anno.label.style.background, + 1, + anno.label.borderWidth, + anno.label.borderColor, + 0 + ) + + if (anno.id) { + // don't escapeString for this ID as it causes duplicate rects + elRect.node.classList.add(anno.id) + } + + return elRect + } + + annotationsBackground() { + const w = this.w + + const add = (anno, i, type) => { + let annoLabel = w.globals.dom.baseEl.querySelector( + `.apexcharts-${type}-annotations .apexcharts-${type}-annotation-label[rel='${i}']` + ) + + if (annoLabel) { + const parent = annoLabel.parentNode + const elRect = this.addBackgroundToAnno(annoLabel, anno) + + if (elRect) { + parent.insertBefore(elRect.node, annoLabel) + + if (anno.label.mouseEnter) { + elRect.node.addEventListener( + 'mouseenter', + anno.label.mouseEnter.bind(this, anno) + ) + } + if (anno.label.mouseLeave) { + elRect.node.addEventListener( + 'mouseleave', + anno.label.mouseLeave.bind(this, anno) + ) + } + } + } + } + + w.config.annotations.xaxis.map((anno, i) => { + add(anno, i, 'xaxis') + }) + + w.config.annotations.yaxis.map((anno, i) => { + add(anno, i, 'yaxis') + }) + + w.config.annotations.points.map((anno, i) => { + add(anno, i, 'point') + }) + } + + getY1Y2(type, anno) { + let y = type === 'y1' ? anno.y : anno.y2 + let yP + + const w = this.w + if (this.annoCtx.invertAxis) { + let catIndex = w.globals.labels.indexOf(y) + if (w.config.xaxis.convertedCatToNumeric) { + catIndex = w.globals.categoryLabels.indexOf(y) + } + const xLabel = w.globals.dom.baseEl.querySelector( + '.apexcharts-yaxis-texts-g text:nth-child(' + (catIndex + 1) + ')' + ) + if (xLabel) { + yP = parseFloat(xLabel.getAttribute('y')) + } + } else { + let yPos + if (w.config.yaxis[anno.yAxisIndex].logarithmic) { + const coreUtils = new CoreUtils(this.annoCtx.ctx) + y = coreUtils.getLogVal(y, anno.yAxisIndex) + yPos = y / w.globals.yLogRatio[anno.yAxisIndex] + } else { + yPos = + (y - w.globals.minYArr[anno.yAxisIndex]) / + (w.globals.yRange[anno.yAxisIndex] / w.globals.gridHeight) + } + yP = w.globals.gridHeight - yPos + + if ( + w.config.yaxis[anno.yAxisIndex] && + w.config.yaxis[anno.yAxisIndex].reversed + ) { + yP = yPos + } + } + + return yP + } + + getX1X2(type, anno) { + const w = this.w + let min = this.annoCtx.invertAxis ? w.globals.minY : w.globals.minX + let max = this.annoCtx.invertAxis ? w.globals.maxY : w.globals.maxX + const range = this.annoCtx.invertAxis + ? w.globals.yRange[0] + : w.globals.xRange + + let x1 = (anno.x - min) / (range / w.globals.gridWidth) + + if (this.annoCtx.inversedReversedAxis) { + x1 = (max - anno.x) / (range / w.globals.gridWidth) + } + + if ( + (w.config.xaxis.type === 'category' || + w.config.xaxis.convertedCatToNumeric) && + !this.annoCtx.invertAxis && + !w.globals.dataFormatXNumeric + ) { + x1 = this.getStringX(anno.x) + } + + let x2 = (anno.x2 - min) / (range / w.globals.gridWidth) + + if (this.annoCtx.inversedReversedAxis) { + x2 = (max - anno.x2) / (range / w.globals.gridWidth) + } + if ( + (w.config.xaxis.type === 'category' || + w.config.xaxis.convertedCatToNumeric) && + !this.annoCtx.invertAxis && + !w.globals.dataFormatXNumeric + ) { + x2 = this.getStringX(anno.x2) + } + + return type === 'x1' ? x1 : x2 + } + + getStringX(x) { + const w = this.w + let rX = x + + if ( + w.config.xaxis.convertedCatToNumeric && + w.globals.categoryLabels.length + ) { + x = w.globals.categoryLabels.indexOf(x) + 1 + } + + let catIndex = w.globals.labels.indexOf(x) + + const xLabel = w.globals.dom.baseEl.querySelector( + '.apexcharts-xaxis-texts-g text:nth-child(' + (catIndex + 1) + ')' + ) + + if (xLabel) { + rX = parseFloat(xLabel.getAttribute('x')) + } + + return rX + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/annotations/PointsAnnotations.js b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/PointsAnnotations.js new file mode 100644 index 0000000..dc32420 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/PointsAnnotations.js @@ -0,0 +1,122 @@ +import Utils from '../../utils/Utils' +import Helpers from './Helpers' + +export default class PointAnnotations { + constructor(annoCtx) { + this.w = annoCtx.w + this.annoCtx = annoCtx + this.helpers = new Helpers(this.annoCtx) + } + + addPointAnnotation(anno, parent, index) { + const w = this.w + + let x = this.helpers.getX1X2('x1', anno) + let y = this.helpers.getY1Y2('y1', anno) + + if (!Utils.isNumber(x)) return + + let optsPoints = { + pSize: anno.marker.size, + pointStrokeWidth: anno.marker.strokeWidth, + pointFillColor: anno.marker.fillColor, + pointStrokeColor: anno.marker.strokeColor, + shape: anno.marker.shape, + pRadius: anno.marker.radius, + class: `apexcharts-point-annotation-marker ${anno.marker.cssClass} ${ + anno.id ? anno.id : '' + }` + } + + let point = this.annoCtx.graphics.drawMarker( + x + anno.marker.offsetX, + y + anno.marker.offsetY, + optsPoints + ) + + parent.appendChild(point.node) + + const text = anno.label.text ? anno.label.text : '' + + let elText = this.annoCtx.graphics.drawText({ + x: x + anno.label.offsetX, + y: + y + + anno.label.offsetY - + anno.marker.size - + parseFloat(anno.label.style.fontSize) / 1.6, + text, + textAnchor: anno.label.textAnchor, + fontSize: anno.label.style.fontSize, + fontFamily: anno.label.style.fontFamily, + fontWeight: anno.label.style.fontWeight, + foreColor: anno.label.style.color, + cssClass: `apexcharts-point-annotation-label ${ + anno.label.style.cssClass + } ${anno.id ? anno.id : ''}` + }) + + elText.attr({ + rel: index + }) + + parent.appendChild(elText.node) + + // TODO: deprecate this as we will use custom + if (anno.customSVG.SVG) { + let g = this.annoCtx.graphics.group({ + class: + 'apexcharts-point-annotations-custom-svg ' + anno.customSVG.cssClass + }) + + g.attr({ + transform: `translate(${x + anno.customSVG.offsetX}, ${y + + anno.customSVG.offsetY})` + }) + + g.node.innerHTML = anno.customSVG.SVG + parent.appendChild(g.node) + } + + if (anno.image.path) { + let imgWidth = anno.image.width ? anno.image.width : 20 + let imgHeight = anno.image.height ? anno.image.height : 20 + + point = this.annoCtx.addImage({ + x: x + anno.image.offsetX - imgWidth / 2, + y: y + anno.image.offsetY - imgHeight / 2, + width: imgWidth, + height: imgHeight, + path: anno.image.path, + appendTo: '.apexcharts-point-annotations' + }) + } + + if (anno.mouseEnter) { + point.node.addEventListener( + 'mouseenter', + anno.mouseEnter.bind(this, anno) + ) + } + if (anno.mouseLeave) { + point.node.addEventListener( + 'mouseleave', + anno.mouseLeave.bind(this, anno) + ) + } + } + + drawPointAnnotations() { + let w = this.w + + let elg = this.annoCtx.graphics.group({ + class: 'apexcharts-point-annotations' + }) + + w.config.annotations.points.map((anno, index) => { + this.addPointAnnotation(anno, elg.node, index) + }) + + return elg + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/annotations/XAxisAnnotations.js b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/XAxisAnnotations.js new file mode 100644 index 0000000..ff16c93 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/XAxisAnnotations.js @@ -0,0 +1,118 @@ +import Utils from '../../utils/Utils' +import Helpers from './Helpers' + +export default class XAnnotations { + constructor(annoCtx) { + this.w = annoCtx.w + this.annoCtx = annoCtx + + this.invertAxis = this.annoCtx.invertAxis + + this.helpers = new Helpers(this.annoCtx) + } + + addXaxisAnnotation(anno, parent, index) { + let w = this.w + + let x1 = this.helpers.getX1X2('x1', anno) + let x2 + + const text = anno.label.text + + let strokeDashArray = anno.strokeDashArray + + if (!Utils.isNumber(x1)) return + + if (anno.x2 === null || typeof anno.x2 === 'undefined') { + let line = this.annoCtx.graphics.drawLine( + x1 + anno.offsetX, // x1 + 0 + anno.offsetY, // y1 + x1 + anno.offsetX, // x2 + w.globals.gridHeight + anno.offsetY, // y2 + anno.borderColor, // lineColor + strokeDashArray, //dashArray + anno.borderWidth + ) + parent.appendChild(line.node) + if (anno.id) { + line.node.classList.add(anno.id) + } + } else { + x2 = this.helpers.getX1X2('x2', anno) + + if (x2 < x1) { + let temp = x1 + x1 = x2 + x2 = temp + } + + let rect = this.annoCtx.graphics.drawRect( + x1 + anno.offsetX, // x1 + 0 + anno.offsetY, // y1 + x2 - x1, // x2 + w.globals.gridHeight + anno.offsetY, // y2 + 0, // radius + anno.fillColor, // color + anno.opacity, // opacity, + 1, // strokeWidth + anno.borderColor, // strokeColor + strokeDashArray // stokeDashArray + ) + rect.node.classList.add('apexcharts-annotation-rect') + rect.attr('clip-path', `url(#gridRectMask${w.globals.cuid})`) + parent.appendChild(rect.node) + if (anno.id) { + rect.node.classList.add(anno.id) + } + } + let textY = anno.label.position === 'top' ? 4 : w.globals.gridHeight + + let textRects = this.annoCtx.graphics.getTextRects( + text, + parseFloat(anno.label.style.fontSize) + ) + + let elText = this.annoCtx.graphics.drawText({ + x: x1 + anno.label.offsetX, + y: + textY + + anno.label.offsetY - + (anno.label.orientation === 'vertical' + ? anno.label.position === 'top' + ? textRects.width / 2 - 12 + : -textRects.width / 2 + : 0), + text, + textAnchor: anno.label.textAnchor, + fontSize: anno.label.style.fontSize, + fontFamily: anno.label.style.fontFamily, + fontWeight: anno.label.style.fontWeight, + foreColor: anno.label.style.color, + cssClass: `apexcharts-xaxis-annotation-label ${ + anno.label.style.cssClass + } ${anno.id ? anno.id : ''}` + }) + + elText.attr({ + rel: index + }) + + parent.appendChild(elText.node) + + // after placing the annotations on svg, set any vertically placed annotations + this.annoCtx.helpers.setOrientations(anno, index) + } + drawXAxisAnnotations() { + let w = this.w + + let elg = this.annoCtx.graphics.group({ + class: 'apexcharts-xaxis-annotations' + }) + + w.config.annotations.xaxis.map((anno, index) => { + this.addXaxisAnnotation(anno, elg.node, index) + }) + + return elg + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/annotations/YAxisAnnotations.js b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/YAxisAnnotations.js new file mode 100644 index 0000000..0ee2c6c --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/annotations/YAxisAnnotations.js @@ -0,0 +1,112 @@ +import Helpers from './Helpers' + +export default class YAnnotations { + constructor(annoCtx) { + this.w = annoCtx.w + this.annoCtx = annoCtx + + this.helpers = new Helpers(this.annoCtx) + } + + addYaxisAnnotation(anno, parent, index) { + let w = this.w + + let strokeDashArray = anno.strokeDashArray + + let y1 = this.helpers.getY1Y2('y1', anno) + let y2 + + const text = anno.label.text + + if (anno.y2 === null || typeof anno.y2 === 'undefined') { + let line = this.annoCtx.graphics.drawLine( + 0 + anno.offsetX, // x1 + y1 + anno.offsetY, // y1 + this._getYAxisAnnotationWidth(anno), // x2 + y1 + anno.offsetY, // y2 + anno.borderColor, // lineColor + strokeDashArray, // dashArray + anno.borderWidth + ) + parent.appendChild(line.node) + if (anno.id) { + line.node.classList.add(anno.id) + } + } else { + y2 = this.helpers.getY1Y2('y2', anno) + + if (y2 > y1) { + let temp = y1 + y1 = y2 + y2 = temp + } + + let rect = this.annoCtx.graphics.drawRect( + 0 + anno.offsetX, // x1 + y2 + anno.offsetY, // y1 + this._getYAxisAnnotationWidth(anno), // x2 + y1 - y2, // y2 + 0, // radius + anno.fillColor, // color + anno.opacity, // opacity, + 1, // strokeWidth + anno.borderColor, // strokeColor + strokeDashArray // stokeDashArray + ) + rect.node.classList.add('apexcharts-annotation-rect') + rect.attr('clip-path', `url(#gridRectMask${w.globals.cuid})`) + + parent.appendChild(rect.node) + if (anno.id) { + rect.node.classList.add(anno.id) + } + } + let textX = anno.label.position === 'right' ? w.globals.gridWidth : 0 + + let elText = this.annoCtx.graphics.drawText({ + x: textX + anno.label.offsetX, + y: (y2 != null ? y2 : y1) + anno.label.offsetY - 3, + text, + textAnchor: anno.label.textAnchor, + fontSize: anno.label.style.fontSize, + fontFamily: anno.label.style.fontFamily, + fontWeight: anno.label.style.fontWeight, + foreColor: anno.label.style.color, + cssClass: `apexcharts-yaxis-annotation-label ${ + anno.label.style.cssClass + } ${anno.id ? anno.id : ''}` + }) + + elText.attr({ + rel: index + }) + + parent.appendChild(elText.node) + } + + _getYAxisAnnotationWidth(anno) { + // issue apexcharts.js#2009 + const w = this.w + let width = w.globals.gridWidth + if (anno.width.indexOf('%') > -1) { + width = (w.globals.gridWidth * parseInt(anno.width, 10)) / 100 + } else { + width = parseInt(anno.width, 10) + } + return width + anno.offsetX + } + + drawYAxisAnnotations() { + let w = this.w + + let elg = this.annoCtx.graphics.group({ + class: 'apexcharts-yaxis-annotations' + }) + + w.config.annotations.yaxis.map((anno, index) => { + this.addYaxisAnnotation(anno, elg.node, index) + }) + + return elg + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/axes/Axes.js b/cao_sunyata/static/libs/apexcharts/src/modules/axes/Axes.js new file mode 100644 index 0000000..0ecfcbd --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/axes/Axes.js @@ -0,0 +1,39 @@ +import XAxis from './XAxis' +import YAxis from './YAxis' + +export default class Axes { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + drawAxis(type, xyRatios) { + let gl = this.w.globals + let cnf = this.w.config + + let xAxis = new XAxis(this.ctx) + let yAxis = new YAxis(this.ctx) + + if (gl.axisCharts && type !== 'radar') { + let elXaxis, elYaxis + + if (gl.isBarHorizontal) { + elYaxis = yAxis.drawYaxisInversed(0) + elXaxis = xAxis.drawXaxisInversed(0) + + gl.dom.elGraphical.add(elXaxis) + gl.dom.elGraphical.add(elYaxis) + } else { + elXaxis = xAxis.drawXaxis() + gl.dom.elGraphical.add(elXaxis) + + cnf.yaxis.map((yaxe, index) => { + if (gl.ignoreYAxisIndexes.indexOf(index) === -1) { + elYaxis = yAxis.drawYaxis(index) + gl.dom.Paper.add(elYaxis) + } + }) + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/axes/AxesUtils.js b/cao_sunyata/static/libs/apexcharts/src/modules/axes/AxesUtils.js new file mode 100644 index 0000000..60c8307 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/axes/AxesUtils.js @@ -0,0 +1,247 @@ +import Formatters from '../Formatters' +import Graphics from '../Graphics' +import CoreUtils from '../CoreUtils' +import DateTime from '../../utils/DateTime' + +export default class AxesUtils { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + // Based on the formatter function, get the label text and position + getLabel( + labels, + timescaleLabels, + x, + i, + drawnLabels = [], + fontSize = '12px', + isLeafGroup = true + ) { + const w = this.w + let rawLabel = typeof labels[i] === 'undefined' ? '' : labels[i] + let label = rawLabel + + let xlbFormatter = w.globals.xLabelFormatter + let customFormatter = w.config.xaxis.labels.formatter + + let isBold = false + + let xFormat = new Formatters(this.ctx) + let timestamp = rawLabel + + if (isLeafGroup) { + label = xFormat.xLabelFormat(xlbFormatter, rawLabel, timestamp, { + i, + dateFormatter: new DateTime(this.ctx).formatDate, + w + }) + + if (customFormatter !== undefined) { + label = customFormatter(rawLabel, labels[i], { + i, + dateFormatter: new DateTime(this.ctx).formatDate, + w + }) + } + } + + const determineHighestUnit = (unit) => { + let highestUnit = null + timescaleLabels.forEach((t) => { + if (t.unit === 'month') { + highestUnit = 'year' + } else if (t.unit === 'day') { + highestUnit = 'month' + } else if (t.unit === 'hour') { + highestUnit = 'day' + } else if (t.unit === 'minute') { + highestUnit = 'hour' + } + }) + + return highestUnit === unit + } + if (timescaleLabels.length > 0) { + isBold = determineHighestUnit(timescaleLabels[i].unit) + x = timescaleLabels[i].position + label = timescaleLabels[i].value + } else { + if (w.config.xaxis.type === 'datetime' && customFormatter === undefined) { + label = '' + } + } + + if (typeof label === 'undefined') label = '' + + label = Array.isArray(label) ? label : label.toString() + + let graphics = new Graphics(this.ctx) + let textRect = {} + if (w.globals.rotateXLabels && isLeafGroup) { + textRect = graphics.getTextRects( + label, + parseInt(fontSize, 10), + null, + `rotate(${w.config.xaxis.labels.rotate} 0 0)`, + false + ) + } else { + textRect = graphics.getTextRects(label, parseInt(fontSize, 10)) + } + + const allowDuplicatesInTimeScale = + !w.config.xaxis.labels.showDuplicates && this.ctx.timeScale + + if ( + !Array.isArray(label) && + (label.indexOf('NaN') === 0 || + label.toLowerCase().indexOf('invalid') === 0 || + label.toLowerCase().indexOf('infinity') >= 0 || + (drawnLabels.indexOf(label) >= 0 && allowDuplicatesInTimeScale)) + ) { + label = '' + } + + return { + x, + text: label, + textRect, + isBold + } + } + + checkLabelBasedOnTickamount(i, label, labelsLen) { + const w = this.w + + let ticks = w.config.xaxis.tickAmount + if (ticks === 'dataPoints') ticks = Math.round(w.globals.gridWidth / 120) + + if (ticks > labelsLen) return label + let tickMultiple = Math.round(labelsLen / (ticks + 1)) + + if (i % tickMultiple === 0) { + return label + } else { + label.text = '' + } + + return label + } + + checkForOverflowingLabels( + i, + label, + labelsLen, + drawnLabels, + drawnLabelsRects + ) { + const w = this.w + + if (i === 0) { + // check if first label is being truncated + if (w.globals.skipFirstTimelinelabel) { + label.text = '' + } + } + + if (i === labelsLen - 1) { + // check if last label is being truncated + if (w.globals.skipLastTimelinelabel) { + label.text = '' + } + } + + if (w.config.xaxis.labels.hideOverlappingLabels && drawnLabels.length > 0) { + const prev = drawnLabelsRects[drawnLabelsRects.length - 1] + if ( + label.x < + prev.textRect.width / + (w.globals.rotateXLabels + ? Math.abs(w.config.xaxis.labels.rotate) / 12 + : 1.01) + + prev.x + ) { + label.text = '' + } + } + + return label + } + + checkForReversedLabels(i, labels) { + const w = this.w + if (w.config.yaxis[i] && w.config.yaxis[i].reversed) { + labels.reverse() + } + return labels + } + + isYAxisHidden(index) { + const w = this.w + const coreUtils = new CoreUtils(this.ctx) + + return ( + !w.config.yaxis[index].show || + (!w.config.yaxis[index].showForNullSeries && + coreUtils.isSeriesNull(index) && + w.globals.collapsedSeriesIndices.indexOf(index) === -1) + ) + } + + // get the label color for y-axis + // realIndex is the actual series index, while i is the tick Index + getYAxisForeColor(yColors, realIndex) { + const w = this.w + if (Array.isArray(yColors) && w.globals.yAxisScale[realIndex]) { + this.ctx.theme.pushExtraColors( + yColors, + w.globals.yAxisScale[realIndex].result.length, + false + ) + } + return yColors + } + + drawYAxisTicks( + x, + tickAmount, + axisBorder, + axisTicks, + realIndex, + labelsDivider, + elYaxis + ) { + let w = this.w + let graphics = new Graphics(this.ctx) + + // initial label position = 0; + let t = w.globals.translateY + + if (axisTicks.show && tickAmount > 0) { + if (w.config.yaxis[realIndex].opposite === true) x = x + axisTicks.width + + for (let i = tickAmount; i >= 0; i--) { + let tY = + t + tickAmount / 10 + w.config.yaxis[realIndex].labels.offsetY - 1 + if (w.globals.isBarHorizontal) { + tY = labelsDivider * i + } + + if (w.config.chart.type === 'heatmap') { + tY = tY + labelsDivider / 2 + } + let elTick = graphics.drawLine( + x + axisBorder.offsetX - axisTicks.width + axisTicks.offsetX, + tY + axisTicks.offsetY, + x + axisBorder.offsetX + axisTicks.offsetX, + tY + axisTicks.offsetY, + axisTicks.color + ) + elYaxis.add(elTick) + t = t + labelsDivider + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/axes/Grid.js b/cao_sunyata/static/libs/apexcharts/src/modules/axes/Grid.js new file mode 100644 index 0000000..1711405 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/axes/Grid.js @@ -0,0 +1,521 @@ +import CoreUtils from '../CoreUtils' +import Graphics from '../Graphics' +import XAxis from './XAxis' +import AxesUtils from './AxesUtils' + +/** + * ApexCharts Grid Class for drawing Cartesian Grid. + * + * @module Grid + **/ + +class Grid { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + const w = this.w + this.xaxisLabels = w.globals.labels.slice() + this.axesUtils = new AxesUtils(ctx) + + this.isRangeBar = w.globals.seriesRangeBar.length + + if (w.globals.timescaleLabels.length > 0) { + // timescaleLabels labels are there + this.xaxisLabels = w.globals.timescaleLabels.slice() + } + } + + // when using sparklines or when showing no grid, we need to have a grid area which is reused at many places for other calculations as well + drawGridArea(elGrid = null) { + let w = this.w + + let graphics = new Graphics(this.ctx) + + if (elGrid === null) { + elGrid = graphics.group({ + class: 'apexcharts-grid' + }) + } + + let elVerticalLine = graphics.drawLine( + w.globals.padHorizontal, + 1, + w.globals.padHorizontal, + w.globals.gridHeight, + 'transparent' + ) + + let elHorzLine = graphics.drawLine( + w.globals.padHorizontal, + w.globals.gridHeight, + w.globals.gridWidth, + w.globals.gridHeight, + 'transparent' + ) + + elGrid.add(elHorzLine) + elGrid.add(elVerticalLine) + + return elGrid + } + + drawGrid() { + let gl = this.w.globals + + let elgrid = null + + if (gl.axisCharts) { + // grid is drawn after xaxis and yaxis are drawn + elgrid = this.renderGrid() + + this.drawGridArea(elgrid.el) + } + return elgrid + } + + // This mask will clip off overflowing graphics from the drawable area + createGridMask() { + let w = this.w + let gl = w.globals + const graphics = new Graphics(this.ctx) + + let strokeSize = Array.isArray(w.config.stroke.width) + ? 0 + : w.config.stroke.width + + if (Array.isArray(w.config.stroke.width)) { + let strokeMaxSize = 0 + w.config.stroke.width.forEach((m) => { + strokeMaxSize = Math.max(strokeMaxSize, m) + }) + strokeSize = strokeMaxSize + } + + gl.dom.elGridRectMask = document.createElementNS(gl.SVGNS, 'clipPath') + gl.dom.elGridRectMask.setAttribute('id', `gridRectMask${gl.cuid}`) + + gl.dom.elGridRectMarkerMask = document.createElementNS(gl.SVGNS, 'clipPath') + gl.dom.elGridRectMarkerMask.setAttribute( + 'id', + `gridRectMarkerMask${gl.cuid}` + ) + + gl.dom.elForecastMask = document.createElementNS(gl.SVGNS, 'clipPath') + gl.dom.elForecastMask.setAttribute('id', `forecastMask${gl.cuid}`) + + gl.dom.elNonForecastMask = document.createElementNS(gl.SVGNS, 'clipPath') + gl.dom.elNonForecastMask.setAttribute('id', `nonForecastMask${gl.cuid}`) + + // let barHalfWidth = 0 + + const type = w.config.chart.type + const hasBar = + type === 'bar' || + type === 'rangeBar' || + type === 'candlestick' || + type === 'boxPlot' || + w.globals.comboBarCount > 0 + + let barWidthLeft = 0 + let barWidthRight = 0 + if (hasBar && w.globals.isXNumeric && !w.globals.isBarHorizontal) { + barWidthLeft = w.config.grid.padding.left + barWidthRight = w.config.grid.padding.right + + if (gl.barPadForNumericAxis > barWidthLeft) { + barWidthLeft = gl.barPadForNumericAxis + barWidthRight = gl.barPadForNumericAxis + } + } + gl.dom.elGridRect = graphics.drawRect( + -strokeSize / 2 - barWidthLeft - 2, + -strokeSize / 2, + gl.gridWidth + strokeSize + barWidthRight + barWidthLeft + 4, + gl.gridHeight + strokeSize, + 0, + '#fff' + ) + + let markerSize = w.globals.markers.largestSize + 1 + + gl.dom.elGridRectMarker = graphics.drawRect( + -markerSize * 2, + -markerSize * 2, + gl.gridWidth + markerSize * 4, + gl.gridHeight + markerSize * 4, + 0, + '#fff' + ) + gl.dom.elGridRectMask.appendChild(gl.dom.elGridRect.node) + gl.dom.elGridRectMarkerMask.appendChild(gl.dom.elGridRectMarker.node) + + let defs = gl.dom.baseEl.querySelector('defs') + defs.appendChild(gl.dom.elGridRectMask) + defs.appendChild(gl.dom.elForecastMask) + defs.appendChild(gl.dom.elNonForecastMask) + defs.appendChild(gl.dom.elGridRectMarkerMask) + } + + _drawGridLines({ i, x1, y1, x2, y2, xCount, parent }) { + const w = this.w + + const shouldDraw = () => { + if (i === 0 && w.globals.skipFirstTimelinelabel) { + return false + } + + if ( + i === xCount - 1 && + w.globals.skipLastTimelinelabel && + !w.config.xaxis.labels.formatter + ) { + return false + } + if (w.config.chart.type === 'radar') { + return false + } + return true + } + + if (shouldDraw()) { + if (w.config.grid.xaxis.lines.show) { + this._drawGridLine({ x1, y1, x2, y2, parent }) + } + let y_2 = 0 + if (w.globals.hasGroups && w.config.xaxis.tickPlacement === 'between') { + const groups = w.globals.groups + if (groups) { + let gacc = 0 + for (let gi = 0; gacc < i && gi < groups.length; gi++) { + gacc += groups[gi].cols + } + if (gacc === i) { + y_2 = w.globals.xAxisLabelsHeight * 0.6 + } + } + } + + let xAxis = new XAxis(this.ctx) + xAxis.drawXaxisTicks(x1, y_2, this.elg) + } + } + + _drawGridLine({ x1, y1, x2, y2, parent }) { + const w = this.w + + const isHorzLine = parent.node.classList.contains( + 'apexcharts-gridlines-horizontal' + ) + + let strokeDashArray = w.config.grid.strokeDashArray + const offX = w.globals.barPadForNumericAxis + + const graphics = new Graphics(this) + let line = graphics.drawLine( + x1 - (isHorzLine ? offX : 0), + y1, + x2 + (isHorzLine ? offX : 0), + y2, + w.config.grid.borderColor, + strokeDashArray + ) + line.node.classList.add('apexcharts-gridline') + parent.add(line) + } + + _drawGridBandRect({ c, x1, y1, x2, y2, type }) { + const w = this.w + const graphics = new Graphics(this.ctx) + const offX = w.globals.barPadForNumericAxis + + if (type === 'column' && w.config.xaxis.type === 'datetime') return + + const color = w.config.grid[type].colors[c] + + let rect = graphics.drawRect( + x1 - (type === 'row' ? offX : 0), + y1, + x2 + (type === 'row' ? offX * 2 : 0), + y2, + 0, + color, + w.config.grid[type].opacity + ) + this.elg.add(rect) + rect.attr('clip-path', `url(#gridRectMask${w.globals.cuid})`) + rect.node.classList.add(`apexcharts-grid-${type}`) + } + + _drawXYLines({ xCount, tickAmount }) { + const w = this.w + + const datetimeLines = ({ xC, x1, y1, x2, y2 }) => { + for (let i = 0; i < xC; i++) { + x1 = this.xaxisLabels[i].position + x2 = this.xaxisLabels[i].position + + this._drawGridLines({ + i, + x1, + y1, + x2, + y2, + xCount, + parent: this.elgridLinesV + }) + } + } + + const categoryLines = ({ xC, x1, y1, x2, y2 }) => { + if ( + typeof w.config.xaxis.tickAmount !== 'undefined' && + w.config.xaxis.tickAmount !== 'dataPoints' && + w.config.xaxis.tickPlacement === 'on' + ) { + // user has specified tickamount in a category x-axis chart + const visibleLabels = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)' + ) + + visibleLabels.forEach((d, i) => { + const textRect = d.getBBox() + + this._drawGridLines({ + i, + x1: textRect.x + textRect.width / 2, + y1, + x2: textRect.x + textRect.width / 2, + y2, + xCount, + parent: this.elgridLinesV + }) + }) + } else { + for (let i = 0; i < xC + (w.globals.isXNumeric ? 0 : 1); i++) { + if (i === 0 && xC === 1 && w.globals.dataPoints === 1) { + // single datapoint + x1 = w.globals.gridWidth / 2 + x2 = x1 + } + this._drawGridLines({ + i, + x1, + y1, + x2, + y2, + xCount, + parent: this.elgridLinesV + }) + + x1 = x1 + w.globals.gridWidth / (w.globals.isXNumeric ? xC - 1 : xC) + x2 = x1 + } + } + } + + // draw vertical lines + if (w.config.grid.xaxis.lines.show || w.config.xaxis.axisTicks.show) { + let x1 = w.globals.padHorizontal + let y1 = 0 + let x2 + let y2 = w.globals.gridHeight + + if (w.globals.timescaleLabels.length) { + datetimeLines({ xC: xCount, x1, y1, x2, y2 }) + } else { + if (w.globals.isXNumeric) { + xCount = w.globals.xAxisScale.result.length + } + if (w.config.xaxis.convertedCatToNumeric) { + // in case of a convertedCatToNumeric, some labels might be skipped due to hideOverLapping labels, hence use this var to get the visible ticks + xCount = w.globals.xaxisLabelsCount + } + categoryLines({ xC: xCount, x1, y1, x2, y2 }) + } + } + + // draw horizontal lines + if (w.config.grid.yaxis.lines.show) { + let x1 = 0 + let y1 = 0 + let y2 = 0 + let x2 = w.globals.gridWidth + let tA = tickAmount + 1 + + if (this.isRangeBar) { + tA = w.globals.labels.length + } + + for (let i = 0; i < tA + (this.isRangeBar ? 1 : 0); i++) { + this._drawGridLine({ x1, y1, x2, y2, parent: this.elgridLinesH }) + + y1 = y1 + w.globals.gridHeight / (this.isRangeBar ? tA : tickAmount) + + y2 = y1 + } + } + } + + _drawInvertedXYLines({ xCount }) { + const w = this.w + + // draw vertical lines + if (w.config.grid.xaxis.lines.show || w.config.xaxis.axisTicks.show) { + let x1 = w.globals.padHorizontal + let y1 = 0 + let x2 + let y2 = w.globals.gridHeight + for (let i = 0; i < xCount + 1; i++) { + if (w.config.grid.xaxis.lines.show) { + this._drawGridLine({ x1, y1, x2, y2, parent: this.elgridLinesV }) + } + + let xAxis = new XAxis(this.ctx) + xAxis.drawXaxisTicks(x1, 0, this.elg) + x1 = x1 + w.globals.gridWidth / xCount + 0.3 + x2 = x1 + } + } + + // draw horizontal lines + if (w.config.grid.yaxis.lines.show) { + let x1 = 0 + let y1 = 0 + let y2 = 0 + let x2 = w.globals.gridWidth + + for (let i = 0; i < w.globals.dataPoints + 1; i++) { + this._drawGridLine({ x1, y1, x2, y2, parent: this.elgridLinesH }) + + y1 = y1 + w.globals.gridHeight / w.globals.dataPoints + y2 = y1 + } + } + } + + // actual grid rendering + renderGrid() { + let w = this.w + let graphics = new Graphics(this.ctx) + + this.elg = graphics.group({ + class: 'apexcharts-grid' + }) + this.elgridLinesH = graphics.group({ + class: 'apexcharts-gridlines-horizontal' + }) + this.elgridLinesV = graphics.group({ + class: 'apexcharts-gridlines-vertical' + }) + + this.elg.add(this.elgridLinesH) + this.elg.add(this.elgridLinesV) + + if (!w.config.grid.show) { + this.elgridLinesV.hide() + this.elgridLinesH.hide() + } + + let yTickAmount = w.globals.yAxisScale.length + ? w.globals.yAxisScale[0].result.length - 1 + : 5 + for (let i = 0; i < w.globals.series.length; i++) { + if (typeof w.globals.yAxisScale[i] !== 'undefined') { + yTickAmount = w.globals.yAxisScale[i].result.length - 1 + } + if (yTickAmount > 2) break + } + + let xCount + + if (!w.globals.isBarHorizontal || this.isRangeBar) { + xCount = this.xaxisLabels.length + + if (this.isRangeBar) { + yTickAmount = w.globals.labels.length + if (w.config.xaxis.tickAmount && w.config.xaxis.labels.formatter) { + xCount = w.config.xaxis.tickAmount + } + } + this._drawXYLines({ xCount, tickAmount: yTickAmount }) + } else { + xCount = yTickAmount + + // for horizontal bar chart, get the xaxis tickamount + yTickAmount = w.globals.xTickAmount + this._drawInvertedXYLines({ xCount, tickAmount: yTickAmount }) + } + + this.drawGridBands(xCount, yTickAmount) + return { + el: this.elg, + xAxisTickWidth: w.globals.gridWidth / xCount + } + } + + drawGridBands(xCount, tickAmount) { + const w = this.w + + // rows background bands + if ( + w.config.grid.row.colors !== undefined && + w.config.grid.row.colors.length > 0 + ) { + let x1 = 0 + let y1 = 0 + let y2 = w.globals.gridHeight / tickAmount + let x2 = w.globals.gridWidth + + for (let i = 0, c = 0; i < tickAmount; i++, c++) { + if (c >= w.config.grid.row.colors.length) { + c = 0 + } + this._drawGridBandRect({ + c, + x1, + y1, + x2, + y2, + type: 'row' + }) + + y1 = y1 + w.globals.gridHeight / tickAmount + } + } + + // columns background bands + if ( + w.config.grid.column.colors !== undefined && + w.config.grid.column.colors.length > 0 + ) { + const xc = + !w.globals.isBarHorizontal && + (w.config.xaxis.type === 'category' || + w.config.xaxis.convertedCatToNumeric) + ? xCount - 1 + : xCount + let x1 = w.globals.padHorizontal + let y1 = 0 + let x2 = w.globals.padHorizontal + w.globals.gridWidth / xc + let y2 = w.globals.gridHeight + for (let i = 0, c = 0; i < xCount; i++, c++) { + if (c >= w.config.grid.column.colors.length) { + c = 0 + } + this._drawGridBandRect({ + c, + x1, + y1, + x2, + y2, + type: 'column' + }) + + x1 = x1 + w.globals.gridWidth / xc + } + } + } +} + +export default Grid diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/axes/XAxis.js b/cao_sunyata/static/libs/apexcharts/src/modules/axes/XAxis.js new file mode 100644 index 0000000..29bef23 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/axes/XAxis.js @@ -0,0 +1,633 @@ +import Graphics from '../Graphics' +import AxesUtils from './AxesUtils' + +/** + * ApexCharts XAxis Class for drawing X-Axis. + * + * @module XAxis + **/ + +export default class XAxis { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + const w = this.w + this.axesUtils = new AxesUtils(ctx) + + this.xaxisLabels = w.globals.labels.slice() + if (w.globals.timescaleLabels.length > 0 && !w.globals.isBarHorizontal) { + // timeline labels are there and chart is not rangeabr timeline + this.xaxisLabels = w.globals.timescaleLabels.slice() + } + + if (w.config.xaxis.overwriteCategories) { + this.xaxisLabels = w.config.xaxis.overwriteCategories + } + this.drawnLabels = [] + this.drawnLabelsRects = [] + + if (w.config.xaxis.position === 'top') { + this.offY = 0 + } else { + this.offY = w.globals.gridHeight + 1 + } + this.offY = this.offY + w.config.xaxis.axisBorder.offsetY + this.isCategoryBarHorizontal = + w.config.chart.type === 'bar' && w.config.plotOptions.bar.horizontal + + this.xaxisFontSize = w.config.xaxis.labels.style.fontSize + this.xaxisFontFamily = w.config.xaxis.labels.style.fontFamily + this.xaxisForeColors = w.config.xaxis.labels.style.colors + this.xaxisBorderWidth = w.config.xaxis.axisBorder.width + if (this.isCategoryBarHorizontal) { + this.xaxisBorderWidth = w.config.yaxis[0].axisBorder.width.toString() + } + + if (this.xaxisBorderWidth.indexOf('%') > -1) { + this.xaxisBorderWidth = + (w.globals.gridWidth * parseInt(this.xaxisBorderWidth, 10)) / 100 + } else { + this.xaxisBorderWidth = parseInt(this.xaxisBorderWidth, 10) + } + this.xaxisBorderHeight = w.config.xaxis.axisBorder.height + + // For bars, we will only consider single y xais, + // as we are not providing multiple yaxis for bar charts + this.yaxis = w.config.yaxis[0] + } + + drawXaxis() { + let w = this.w + let graphics = new Graphics(this.ctx) + + let elXaxis = graphics.group({ + class: 'apexcharts-xaxis', + transform: `translate(${w.config.xaxis.offsetX}, ${w.config.xaxis.offsetY})` + }) + + let elXaxisTexts = graphics.group({ + class: 'apexcharts-xaxis-texts-g', + transform: `translate(${w.globals.translateXAxisX}, ${w.globals.translateXAxisY})` + }) + + elXaxis.add(elXaxisTexts) + + let labels = [] + + for (let i = 0; i < this.xaxisLabels.length; i++) { + labels.push(this.xaxisLabels[i]) + } + + this.drawXAxisLabelAndGroup( + true, + graphics, + elXaxisTexts, + labels, + w.globals.isXNumeric, + (i, colWidth) => colWidth + ) + + if (w.globals.hasGroups) { + let labelsGroup = w.globals.groups + + labels = [] + for (let i = 0; i < labelsGroup.length; i++) { + labels.push(labelsGroup[i].title) + } + + let overwriteStyles = {} + if (w.config.xaxis.group.style) { + overwriteStyles.xaxisFontSize = w.config.xaxis.group.style.fontSize + overwriteStyles.xaxisFontFamily = w.config.xaxis.group.style.fontFamily + overwriteStyles.xaxisForeColors = w.config.xaxis.group.style.colors + overwriteStyles.fontWeight = w.config.xaxis.group.style.fontWeight + overwriteStyles.cssClass = w.config.xaxis.group.style.cssClass + } + + this.drawXAxisLabelAndGroup( + false, + graphics, + elXaxisTexts, + labels, + false, + (i, colWidth) => labelsGroup[i].cols * colWidth, + overwriteStyles + ) + } + + if (w.config.xaxis.title.text !== undefined) { + let elXaxisTitle = graphics.group({ + class: 'apexcharts-xaxis-title' + }) + + let elXAxisTitleText = graphics.drawText({ + x: w.globals.gridWidth / 2 + w.config.xaxis.title.offsetX, + y: + this.offY + + parseFloat(this.xaxisFontSize) + + w.globals.xAxisLabelsHeight + + w.config.xaxis.title.offsetY, + text: w.config.xaxis.title.text, + textAnchor: 'middle', + fontSize: w.config.xaxis.title.style.fontSize, + fontFamily: w.config.xaxis.title.style.fontFamily, + fontWeight: w.config.xaxis.title.style.fontWeight, + foreColor: w.config.xaxis.title.style.color, + cssClass: + 'apexcharts-xaxis-title-text ' + w.config.xaxis.title.style.cssClass + }) + + elXaxisTitle.add(elXAxisTitleText) + + elXaxis.add(elXaxisTitle) + } + + if (w.config.xaxis.axisBorder.show) { + const offX = w.globals.barPadForNumericAxis + let elHorzLine = graphics.drawLine( + w.globals.padHorizontal + w.config.xaxis.axisBorder.offsetX - offX, + this.offY, + this.xaxisBorderWidth + offX, + this.offY, + w.config.xaxis.axisBorder.color, + 0, + this.xaxisBorderHeight + ) + + elXaxis.add(elHorzLine) + } + + return elXaxis + } + + drawXAxisLabelAndGroup( + isLeafGroup, + graphics, + elXaxisTexts, + labels, + isXNumeric, + colWidthCb, + overwriteStyles = {} + ) { + let drawnLabels = [] + let drawnLabelsRects = [] + let w = this.w + + const xaxisFontSize = overwriteStyles.xaxisFontSize || this.xaxisFontSize + const xaxisFontFamily = + overwriteStyles.xaxisFontFamily || this.xaxisFontFamily + const xaxisForeColors = + overwriteStyles.xaxisForeColors || this.xaxisForeColors + const fontWeight = + overwriteStyles.fontWeight || w.config.xaxis.labels.style.fontWeight + const cssClass = + overwriteStyles.cssClass || w.config.xaxis.labels.style.cssClass + + let colWidth + + // initial x Position (keep adding column width in the loop) + let xPos = w.globals.padHorizontal + + let labelsLen = labels.length + + /** + * labelsLen can be different (whether you are drawing x-axis labels or x-axis group labels) + * hence, we introduce dataPoints to be consistent. + * Also, in datetime/numeric xaxis, dataPoints can be misleading, so we resort to labelsLen for such xaxis type + */ + let dataPoints = + w.config.xaxis.type === 'category' ? w.globals.dataPoints : labelsLen + + if (isXNumeric) { + let len = dataPoints > 1 ? dataPoints - 1 : dataPoints + colWidth = w.globals.gridWidth / len + xPos = xPos + colWidthCb(0, colWidth) / 2 + w.config.xaxis.labels.offsetX + } else { + colWidth = w.globals.gridWidth / dataPoints + xPos = xPos + colWidthCb(0, colWidth) + w.config.xaxis.labels.offsetX + } + + for (let i = 0; i <= labelsLen - 1; i++) { + let x = xPos - colWidthCb(i, colWidth) / 2 + w.config.xaxis.labels.offsetX + + if ( + i === 0 && + labelsLen === 1 && + colWidth / 2 === xPos && + dataPoints === 1 + ) { + // single datapoint + x = w.globals.gridWidth / 2 + } + let label = this.axesUtils.getLabel( + labels, + w.globals.timescaleLabels, + x, + i, + drawnLabels, + xaxisFontSize, + isLeafGroup + ) + + let offsetYCorrection = 28 + if (w.globals.rotateXLabels && isLeafGroup) { + offsetYCorrection = 22 + } + + if (!isLeafGroup) { + offsetYCorrection = + offsetYCorrection + + parseFloat(xaxisFontSize) + + (w.globals.xAxisLabelsHeight - w.globals.xAxisGroupLabelsHeight) + + (w.globals.rotateXLabels ? 10 : 0) + } + + const isCategoryTickAmounts = + typeof w.config.xaxis.tickAmount !== 'undefined' && + w.config.xaxis.tickAmount !== 'dataPoints' && + w.config.xaxis.type !== 'datetime' + + if (isCategoryTickAmounts) { + label = this.axesUtils.checkLabelBasedOnTickamount(i, label, labelsLen) + } else { + label = this.axesUtils.checkForOverflowingLabels( + i, + label, + labelsLen, + drawnLabels, + drawnLabelsRects + ) + } + + const getCatForeColor = () => { + return isLeafGroup && w.config.xaxis.convertedCatToNumeric + ? xaxisForeColors[w.globals.minX + i - 1] + : xaxisForeColors[i] + } + + if (isLeafGroup && label.text) { + w.globals.xaxisLabelsCount++ + } + + if (w.config.xaxis.labels.show) { + let elText = graphics.drawText({ + x: label.x, + y: + this.offY + + w.config.xaxis.labels.offsetY + + offsetYCorrection - + (w.config.xaxis.position === 'top' + ? w.globals.xAxisHeight + w.config.xaxis.axisTicks.height - 2 + : 0), + text: label.text, + textAnchor: 'middle', + fontWeight: label.isBold ? 600 : fontWeight, + fontSize: xaxisFontSize, + fontFamily: xaxisFontFamily, + foreColor: Array.isArray(xaxisForeColors) + ? getCatForeColor() + : xaxisForeColors, + isPlainText: false, + cssClass: + (isLeafGroup + ? 'apexcharts-xaxis-label ' + : 'apexcharts-xaxis-group-label ') + cssClass + }) + elXaxisTexts.add(elText) + + if (isLeafGroup) { + let elTooltipTitle = document.createElementNS( + w.globals.SVGNS, + 'title' + ) + elTooltipTitle.textContent = Array.isArray(label.text) + ? label.text.join(' ') + : label.text + elText.node.appendChild(elTooltipTitle) + if (label.text !== '') { + drawnLabels.push(label.text) + drawnLabelsRects.push(label) + } + } + } + if (i < labelsLen - 1) { + xPos = xPos + colWidthCb(i + 1, colWidth) + } + } + } + + // this actually becomes the vertical axis (for bar charts) + drawXaxisInversed(realIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + + let translateYAxisX = w.config.yaxis[0].opposite + ? w.globals.translateYAxisX[realIndex] + : 0 + + let elYaxis = graphics.group({ + class: 'apexcharts-yaxis apexcharts-xaxis-inversed', + rel: realIndex + }) + + let elYaxisTexts = graphics.group({ + class: 'apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g', + transform: 'translate(' + translateYAxisX + ', 0)' + }) + + elYaxis.add(elYaxisTexts) + + let colHeight + + // initial x Position (keep adding column width in the loop) + let yPos + let labels = [] + + if (w.config.yaxis[realIndex].show) { + for (let i = 0; i < this.xaxisLabels.length; i++) { + labels.push(this.xaxisLabels[i]) + } + } + + colHeight = w.globals.gridHeight / labels.length + yPos = -(colHeight / 2.2) + + let lbFormatter = w.globals.yLabelFormatters[0] + + const ylabels = w.config.yaxis[0].labels + + if (ylabels.show) { + for (let i = 0; i <= labels.length - 1; i++) { + let label = typeof labels[i] === 'undefined' ? '' : labels[i] + + label = lbFormatter(label, { + seriesIndex: realIndex, + dataPointIndex: i, + w + }) + + const yColors = this.axesUtils.getYAxisForeColor( + ylabels.style.colors, + realIndex + ) + const getForeColor = () => { + return Array.isArray(yColors) ? yColors[i] : yColors + } + + let multiY = 0 + if (Array.isArray(label)) { + multiY = (label.length / 2) * parseInt(ylabels.style.fontSize, 10) + } + let elLabel = graphics.drawText({ + x: ylabels.offsetX - 15, + y: yPos + colHeight + ylabels.offsetY - multiY, + text: label, + textAnchor: this.yaxis.opposite ? 'start' : 'end', + foreColor: getForeColor(), + fontSize: ylabels.style.fontSize, + fontFamily: ylabels.style.fontFamily, + fontWeight: ylabels.style.fontWeight, + isPlainText: false, + cssClass: 'apexcharts-yaxis-label ' + ylabels.style.cssClass + }) + + elYaxisTexts.add(elLabel) + + let elTooltipTitle = document.createElementNS(w.globals.SVGNS, 'title') + elTooltipTitle.textContent = Array.isArray(label) + ? label.join(' ') + : label + elLabel.node.appendChild(elTooltipTitle) + + if (w.config.yaxis[realIndex].labels.rotate !== 0) { + let labelRotatingCenter = graphics.rotateAroundCenter(elLabel.node) + elLabel.node.setAttribute( + 'transform', + `rotate(${w.config.yaxis[realIndex].labels.rotate} 0 ${labelRotatingCenter.y})` + ) + } + yPos = yPos + colHeight + } + } + + if (w.config.yaxis[0].title.text !== undefined) { + let elXaxisTitle = graphics.group({ + class: 'apexcharts-yaxis-title apexcharts-xaxis-title-inversed', + transform: 'translate(' + translateYAxisX + ', 0)' + }) + + let elXAxisTitleText = graphics.drawText({ + x: 0, + y: w.globals.gridHeight / 2, + text: w.config.yaxis[0].title.text, + textAnchor: 'middle', + foreColor: w.config.yaxis[0].title.style.color, + fontSize: w.config.yaxis[0].title.style.fontSize, + fontWeight: w.config.yaxis[0].title.style.fontWeight, + fontFamily: w.config.yaxis[0].title.style.fontFamily, + cssClass: + 'apexcharts-yaxis-title-text ' + + w.config.yaxis[0].title.style.cssClass + }) + + elXaxisTitle.add(elXAxisTitleText) + + elYaxis.add(elXaxisTitle) + } + + let offX = 0 + if (this.isCategoryBarHorizontal && w.config.yaxis[0].opposite) { + offX = w.globals.gridWidth + } + const axisBorder = w.config.xaxis.axisBorder + if (axisBorder.show) { + let elVerticalLine = graphics.drawLine( + w.globals.padHorizontal + axisBorder.offsetX + offX, + 1 + axisBorder.offsetY, + w.globals.padHorizontal + axisBorder.offsetX + offX, + w.globals.gridHeight + axisBorder.offsetY, + axisBorder.color, + 0 + ) + + elYaxis.add(elVerticalLine) + } + + if (w.config.yaxis[0].axisTicks.show) { + this.axesUtils.drawYAxisTicks( + offX, + labels.length, + w.config.yaxis[0].axisBorder, + w.config.yaxis[0].axisTicks, + 0, + colHeight, + elYaxis + ) + } + + return elYaxis + } + + drawXaxisTicks(x1, y2, appendToElement) { + let w = this.w + let x2 = x1 + + if (x1 < 0 || x1 - 2 > w.globals.gridWidth) return + + let y1 = this.offY + w.config.xaxis.axisTicks.offsetY + y2 = y2 + y1 + w.config.xaxis.axisTicks.height + if (w.config.xaxis.position === 'top') { + y2 = y1 - w.config.xaxis.axisTicks.height + } + + if (w.config.xaxis.axisTicks.show) { + let graphics = new Graphics(this.ctx) + + let line = graphics.drawLine( + x1 + w.config.xaxis.axisTicks.offsetX, + y1 + w.config.xaxis.offsetY, + x2 + w.config.xaxis.axisTicks.offsetX, + y2 + w.config.xaxis.offsetY, + w.config.xaxis.axisTicks.color + ) + + // we are not returning anything, but appending directly to the element passed in param + appendToElement.add(line) + line.node.classList.add('apexcharts-xaxis-tick') + } + } + + getXAxisTicksPositions() { + const w = this.w + let xAxisTicksPositions = [] + + const xCount = this.xaxisLabels.length + let x1 = w.globals.padHorizontal + + if (w.globals.timescaleLabels.length > 0) { + for (let i = 0; i < xCount; i++) { + x1 = this.xaxisLabels[i].position + xAxisTicksPositions.push(x1) + } + } else { + let xCountForCategoryCharts = xCount + for (let i = 0; i < xCountForCategoryCharts; i++) { + let x1Count = xCountForCategoryCharts + if (w.globals.isXNumeric && w.config.chart.type !== 'bar') { + x1Count -= 1 + } + x1 = x1 + w.globals.gridWidth / x1Count + xAxisTicksPositions.push(x1) + } + } + + return xAxisTicksPositions + } + + // to rotate x-axis labels or to put ... for longer text in xaxis + xAxisLabelCorrections() { + let w = this.w + + let graphics = new Graphics(this.ctx) + + let xAxis = w.globals.dom.baseEl.querySelector('.apexcharts-xaxis-texts-g') + + let xAxisTexts = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)' + ) + let yAxisTextsInversed = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-yaxis-inversed text' + ) + let xAxisTextsInversed = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-xaxis-inversed-texts-g text tspan' + ) + + if (w.globals.rotateXLabels || w.config.xaxis.labels.rotateAlways) { + for (let xat = 0; xat < xAxisTexts.length; xat++) { + let textRotatingCenter = graphics.rotateAroundCenter(xAxisTexts[xat]) + textRotatingCenter.y = textRotatingCenter.y - 1 // + tickWidth/4; + textRotatingCenter.x = textRotatingCenter.x + 1 + + xAxisTexts[xat].setAttribute( + 'transform', + `rotate(${w.config.xaxis.labels.rotate} ${textRotatingCenter.x} ${textRotatingCenter.y})` + ) + + xAxisTexts[xat].setAttribute('text-anchor', `end`) + + let offsetHeight = 10 + + xAxis.setAttribute('transform', `translate(0, ${-offsetHeight})`) + + let tSpan = xAxisTexts[xat].childNodes + + if (w.config.xaxis.labels.trim) { + Array.prototype.forEach.call(tSpan, (ts) => { + graphics.placeTextWithEllipsis( + ts, + ts.textContent, + w.globals.xAxisLabelsHeight - + (w.config.legend.position === 'bottom' ? 20 : 10) + ) + }) + } + } + } else { + let width = w.globals.gridWidth / (w.globals.labels.length + 1) + + for (let xat = 0; xat < xAxisTexts.length; xat++) { + let tSpan = xAxisTexts[xat].childNodes + + if (w.config.xaxis.labels.trim && w.config.xaxis.type !== 'datetime') { + Array.prototype.forEach.call(tSpan, (ts) => { + graphics.placeTextWithEllipsis(ts, ts.textContent, width) + }) + } + } + } + + if (yAxisTextsInversed.length > 0) { + // truncate rotated y axis in bar chart (x axis) + let firstLabelPosX = yAxisTextsInversed[ + yAxisTextsInversed.length - 1 + ].getBBox() + let lastLabelPosX = yAxisTextsInversed[0].getBBox() + + if (firstLabelPosX.x < -20) { + yAxisTextsInversed[ + yAxisTextsInversed.length - 1 + ].parentNode.removeChild( + yAxisTextsInversed[yAxisTextsInversed.length - 1] + ) + } + + if ( + lastLabelPosX.x + lastLabelPosX.width > w.globals.gridWidth && + !w.globals.isBarHorizontal + ) { + yAxisTextsInversed[0].parentNode.removeChild(yAxisTextsInversed[0]) + } + + // truncate rotated x axis in bar chart (y axis) + for (let xat = 0; xat < xAxisTextsInversed.length; xat++) { + graphics.placeTextWithEllipsis( + xAxisTextsInversed[xat], + xAxisTextsInversed[xat].textContent, + w.config.yaxis[0].labels.maxWidth - + (w.config.yaxis[0].title.text + ? parseFloat(w.config.yaxis[0].title.style.fontSize) * 2 + : 0) - + 15 + ) + } + } + } + + // renderXAxisBands() { + // let w = this.w; + + // let plotBand = document.createElementNS(w.globals.SVGNS, 'rect') + // w.globals.dom.elGraphical.add(plotBand) + // } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/axes/YAxis.js b/cao_sunyata/static/libs/apexcharts/src/modules/axes/YAxis.js new file mode 100644 index 0000000..d8effd2 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/axes/YAxis.js @@ -0,0 +1,558 @@ +import Graphics from '../Graphics' +import Utils from '../../utils/Utils' +import AxesUtils from './AxesUtils' + +/** + * ApexCharts YAxis Class for drawing Y-Axis. + * + * @module YAxis + **/ + +export default class YAxis { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + const w = this.w + + this.xaxisFontSize = w.config.xaxis.labels.style.fontSize + this.axisFontFamily = w.config.xaxis.labels.style.fontFamily + + this.xaxisForeColors = w.config.xaxis.labels.style.colors + this.isCategoryBarHorizontal = + w.config.chart.type === 'bar' && w.config.plotOptions.bar.horizontal + + this.xAxisoffX = 0 + if (w.config.xaxis.position === 'bottom') { + this.xAxisoffX = w.globals.gridHeight + } + this.drawnLabels = [] + this.axesUtils = new AxesUtils(ctx) + } + + drawYaxis(realIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + + const yaxisStyle = w.config.yaxis[realIndex].labels.style + let yaxisFontSize = yaxisStyle.fontSize + let yaxisFontFamily = yaxisStyle.fontFamily + let yaxisFontWeight = yaxisStyle.fontWeight + + let elYaxis = graphics.group({ + class: 'apexcharts-yaxis', + rel: realIndex, + transform: 'translate(' + w.globals.translateYAxisX[realIndex] + ', 0)' + }) + + if (this.axesUtils.isYAxisHidden(realIndex)) { + return elYaxis + } + + let elYaxisTexts = graphics.group({ + class: 'apexcharts-yaxis-texts-g' + }) + + elYaxis.add(elYaxisTexts) + + let tickAmount = w.globals.yAxisScale[realIndex].result.length - 1 + + // labelsDivider is simply svg height/number of ticks + let labelsDivider = w.globals.gridHeight / tickAmount + + // initial label position = 0; + let l = w.globals.translateY + let lbFormatter = w.globals.yLabelFormatters[realIndex] + + let labels = w.globals.yAxisScale[realIndex].result.slice() + + labels = this.axesUtils.checkForReversedLabels(realIndex, labels) + + let firstLabel = '' + if (w.config.yaxis[realIndex].labels.show) { + for (let i = tickAmount; i >= 0; i--) { + let val = labels[i] + + val = lbFormatter(val, i, w) + + let xPad = w.config.yaxis[realIndex].labels.padding + if (w.config.yaxis[realIndex].opposite && w.config.yaxis.length !== 0) { + xPad = xPad * -1 + } + + const yColors = this.axesUtils.getYAxisForeColor( + yaxisStyle.colors, + realIndex + ) + const getForeColor = () => { + return Array.isArray(yColors) ? yColors[i] : yColors + } + + let label = graphics.drawText({ + x: xPad, + y: l + tickAmount / 10 + w.config.yaxis[realIndex].labels.offsetY + 1, + text: val, + textAnchor: w.config.yaxis[realIndex].opposite ? 'start' : 'end', + fontSize: yaxisFontSize, + fontFamily: yaxisFontFamily, + fontWeight: yaxisFontWeight, + maxWidth: w.config.yaxis[realIndex].labels.maxWidth, + foreColor: getForeColor(), + isPlainText: false, + cssClass: 'apexcharts-yaxis-label ' + yaxisStyle.cssClass + }) + if (i === tickAmount) { + firstLabel = label + } + elYaxisTexts.add(label) + + let elTooltipTitle = document.createElementNS(w.globals.SVGNS, 'title') + elTooltipTitle.textContent = Array.isArray(val) ? val.join(' ') : val + label.node.appendChild(elTooltipTitle) + + if (w.config.yaxis[realIndex].labels.rotate !== 0) { + let firstabelRotatingCenter = graphics.rotateAroundCenter( + firstLabel.node + ) + let labelRotatingCenter = graphics.rotateAroundCenter(label.node) + label.node.setAttribute( + 'transform', + `rotate(${w.config.yaxis[realIndex].labels.rotate} ${firstabelRotatingCenter.x} ${labelRotatingCenter.y})` + ) + } + l = l + labelsDivider + } + } + + if (w.config.yaxis[realIndex].title.text !== undefined) { + let elYaxisTitle = graphics.group({ + class: 'apexcharts-yaxis-title' + }) + + let x = 0 + if (w.config.yaxis[realIndex].opposite) { + x = w.globals.translateYAxisX[realIndex] + } + let elYAxisTitleText = graphics.drawText({ + x, + y: + w.globals.gridHeight / 2 + + w.globals.translateY + + w.config.yaxis[realIndex].title.offsetY, + text: w.config.yaxis[realIndex].title.text, + textAnchor: 'end', + foreColor: w.config.yaxis[realIndex].title.style.color, + fontSize: w.config.yaxis[realIndex].title.style.fontSize, + fontWeight: w.config.yaxis[realIndex].title.style.fontWeight, + fontFamily: w.config.yaxis[realIndex].title.style.fontFamily, + cssClass: + 'apexcharts-yaxis-title-text ' + + w.config.yaxis[realIndex].title.style.cssClass + }) + + elYaxisTitle.add(elYAxisTitleText) + + elYaxis.add(elYaxisTitle) + } + + let axisBorder = w.config.yaxis[realIndex].axisBorder + + let x = 31 + axisBorder.offsetX + if (w.config.yaxis[realIndex].opposite) { + x = -31 - axisBorder.offsetX + } + + if (axisBorder.show) { + let elVerticalLine = graphics.drawLine( + x, + w.globals.translateY + axisBorder.offsetY - 2, + x, + w.globals.gridHeight + w.globals.translateY + axisBorder.offsetY + 2, + axisBorder.color, + 0, + axisBorder.width + ) + + elYaxis.add(elVerticalLine) + } + if (w.config.yaxis[realIndex].axisTicks.show) { + this.axesUtils.drawYAxisTicks( + x, + tickAmount, + axisBorder, + w.config.yaxis[realIndex].axisTicks, + realIndex, + labelsDivider, + elYaxis + ) + } + + return elYaxis + } + + // This actually becomes horizontal axis (for bar charts) + drawYaxisInversed(realIndex) { + let w = this.w + let graphics = new Graphics(this.ctx) + + let elXaxis = graphics.group({ + class: 'apexcharts-xaxis apexcharts-yaxis-inversed' + }) + + let elXaxisTexts = graphics.group({ + class: 'apexcharts-xaxis-texts-g', + transform: `translate(${w.globals.translateXAxisX}, ${w.globals.translateXAxisY})` + }) + + elXaxis.add(elXaxisTexts) + + let tickAmount = w.globals.yAxisScale[realIndex].result.length - 1 + + // labelsDivider is simply svg width/number of ticks + let labelsDivider = w.globals.gridWidth / tickAmount + 0.1 + + // initial label position; + let l = labelsDivider + w.config.xaxis.labels.offsetX + + let lbFormatter = w.globals.xLabelFormatter + + let labels = w.globals.yAxisScale[realIndex].result.slice() + + let timescaleLabels = w.globals.timescaleLabels + if (timescaleLabels.length > 0) { + this.xaxisLabels = timescaleLabels.slice() + labels = timescaleLabels.slice() + tickAmount = labels.length + } + + labels = this.axesUtils.checkForReversedLabels(realIndex, labels) + + const tl = timescaleLabels.length + + if (w.config.xaxis.labels.show) { + for (let i = tl ? 0 : tickAmount; tl ? i < tl : i >= 0; tl ? i++ : i--) { + let val = labels[i] + val = lbFormatter(val, i, w) + + let x = + w.globals.gridWidth + + w.globals.padHorizontal - + (l - labelsDivider + w.config.xaxis.labels.offsetX) + + if (timescaleLabels.length) { + let label = this.axesUtils.getLabel( + labels, + timescaleLabels, + x, + i, + this.drawnLabels, + this.xaxisFontSize + ) + x = label.x + val = label.text + this.drawnLabels.push(label.text) + + if (i === 0 && w.globals.skipFirstTimelinelabel) { + val = '' + } + if (i === labels.length - 1 && w.globals.skipLastTimelinelabel) { + val = '' + } + } + let elTick = graphics.drawText({ + x, + y: + this.xAxisoffX + + w.config.xaxis.labels.offsetY + + 30 - + (w.config.xaxis.position === 'top' + ? w.globals.xAxisHeight + w.config.xaxis.axisTicks.height - 2 + : 0), + text: val, + textAnchor: 'middle', + foreColor: Array.isArray(this.xaxisForeColors) + ? this.xaxisForeColors[realIndex] + : this.xaxisForeColors, + fontSize: this.xaxisFontSize, + fontFamily: this.xaxisFontFamily, + fontWeight: w.config.xaxis.labels.style.fontWeight, + isPlainText: false, + cssClass: + 'apexcharts-xaxis-label ' + w.config.xaxis.labels.style.cssClass + }) + + elXaxisTexts.add(elTick) + + elTick.tspan(val) + + let elTooltipTitle = document.createElementNS(w.globals.SVGNS, 'title') + elTooltipTitle.textContent = val + elTick.node.appendChild(elTooltipTitle) + + l = l + labelsDivider + } + } + + this.inversedYAxisTitleText(elXaxis) + this.inversedYAxisBorder(elXaxis) + + return elXaxis + } + + inversedYAxisBorder(parent) { + const w = this.w + const graphics = new Graphics(this.ctx) + + let axisBorder = w.config.xaxis.axisBorder + if (axisBorder.show) { + let lineCorrection = 0 + if (w.config.chart.type === 'bar' && w.globals.isXNumeric) { + lineCorrection = lineCorrection - 15 + } + let elHorzLine = graphics.drawLine( + w.globals.padHorizontal + lineCorrection + axisBorder.offsetX, + this.xAxisoffX, + w.globals.gridWidth, + this.xAxisoffX, + axisBorder.color, + 0, + axisBorder.height + ) + + parent.add(elHorzLine) + } + } + + inversedYAxisTitleText(parent) { + const w = this.w + const graphics = new Graphics(this.ctx) + if (w.config.xaxis.title.text !== undefined) { + let elYaxisTitle = graphics.group({ + class: 'apexcharts-xaxis-title apexcharts-yaxis-title-inversed' + }) + + let elYAxisTitleText = graphics.drawText({ + x: w.globals.gridWidth / 2 + w.config.xaxis.title.offsetX, + y: + this.xAxisoffX + + parseFloat(this.xaxisFontSize) + + parseFloat(w.config.xaxis.title.style.fontSize) + + w.config.xaxis.title.offsetY + + 20, + text: w.config.xaxis.title.text, + textAnchor: 'middle', + fontSize: w.config.xaxis.title.style.fontSize, + fontFamily: w.config.xaxis.title.style.fontFamily, + fontWeight: w.config.xaxis.title.style.fontWeight, + foreColor: w.config.xaxis.title.style.color, + cssClass: + 'apexcharts-xaxis-title-text ' + w.config.xaxis.title.style.cssClass + }) + + elYaxisTitle.add(elYAxisTitleText) + + parent.add(elYaxisTitle) + } + } + + yAxisTitleRotate(realIndex, yAxisOpposite) { + let w = this.w + + let graphics = new Graphics(this.ctx) + + let yAxisLabelsCoord = { + width: 0, + height: 0 + } + let yAxisTitleCoord = { + width: 0, + height: 0 + } + + let elYAxisLabelsWrap = w.globals.dom.baseEl.querySelector( + ` .apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-texts-g` + ) + + if (elYAxisLabelsWrap !== null) { + yAxisLabelsCoord = elYAxisLabelsWrap.getBoundingClientRect() + } + + let yAxisTitle = w.globals.dom.baseEl.querySelector( + `.apexcharts-yaxis[rel='${realIndex}'] .apexcharts-yaxis-title text` + ) + + if (yAxisTitle !== null) { + yAxisTitleCoord = yAxisTitle.getBoundingClientRect() + } + + if (yAxisTitle !== null) { + let x = this.xPaddingForYAxisTitle( + realIndex, + yAxisLabelsCoord, + yAxisTitleCoord, + yAxisOpposite + ) + + yAxisTitle.setAttribute('x', x.xPos - (yAxisOpposite ? 10 : 0)) + } + + if (yAxisTitle !== null) { + let titleRotatingCenter = graphics.rotateAroundCenter(yAxisTitle) + yAxisTitle.setAttribute( + 'transform', + `rotate(${ + yAxisOpposite + ? w.config.yaxis[realIndex].title.rotate * -1 + : w.config.yaxis[realIndex].title.rotate + } ${titleRotatingCenter.x} ${titleRotatingCenter.y})` + ) + } + } + + xPaddingForYAxisTitle( + realIndex, + yAxisLabelsCoord, + yAxisTitleCoord, + yAxisOpposite + ) { + let w = this.w + let oppositeAxisCount = 0 + + let x = 0 + let padd = 10 + + if (w.config.yaxis[realIndex].title.text === undefined || realIndex < 0) { + return { + xPos: x, + padd: 0 + } + } + + if (yAxisOpposite) { + x = + yAxisLabelsCoord.width + + w.config.yaxis[realIndex].title.offsetX + + yAxisTitleCoord.width / 2 + + padd / 2 + + oppositeAxisCount += 1 + + if (oppositeAxisCount === 0) { + x = x - padd / 2 + } + } else { + x = + yAxisLabelsCoord.width * -1 + + w.config.yaxis[realIndex].title.offsetX + + padd / 2 + + yAxisTitleCoord.width / 2 + + if (w.globals.isBarHorizontal) { + padd = 25 + x = + yAxisLabelsCoord.width * -1 - + w.config.yaxis[realIndex].title.offsetX - + padd + } + } + + return { + xPos: x, + padd + } + } + + // sets the x position of the y-axis by counting the labels width, title width and any offset + setYAxisXPosition(yaxisLabelCoords, yTitleCoords) { + let w = this.w + + let xLeft = 0 + let xRight = 0 + let leftOffsetX = 18 + let rightOffsetX = 1 + + if (w.config.yaxis.length > 1) { + this.multipleYs = true + } + + w.config.yaxis.map((yaxe, index) => { + let shouldNotDrawAxis = + w.globals.ignoreYAxisIndexes.indexOf(index) > -1 || + !yaxe.show || + yaxe.floating || + yaxisLabelCoords[index].width === 0 + + let axisWidth = yaxisLabelCoords[index].width + yTitleCoords[index].width + + if (!yaxe.opposite) { + xLeft = w.globals.translateX - leftOffsetX + + if (!shouldNotDrawAxis) { + leftOffsetX = leftOffsetX + axisWidth + 20 + } + + w.globals.translateYAxisX[index] = xLeft + yaxe.labels.offsetX + } else { + if (w.globals.isBarHorizontal) { + xRight = w.globals.gridWidth + w.globals.translateX - 1 + + w.globals.translateYAxisX[index] = xRight - yaxe.labels.offsetX + } else { + xRight = w.globals.gridWidth + w.globals.translateX + rightOffsetX + + if (!shouldNotDrawAxis) { + rightOffsetX = rightOffsetX + axisWidth + 20 + } + + w.globals.translateYAxisX[index] = xRight - yaxe.labels.offsetX + 20 + } + } + }) + } + + setYAxisTextAlignments() { + const w = this.w + + let yaxis = w.globals.dom.baseEl.getElementsByClassName(`apexcharts-yaxis`) + yaxis = Utils.listToArray(yaxis) + yaxis.forEach((y, index) => { + const yaxe = w.config.yaxis[index] + // proceed only if user has specified alignment + if (yaxe && yaxe.labels.align !== undefined) { + const yAxisInner = w.globals.dom.baseEl.querySelector( + `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g` + ) + let yAxisTexts = w.globals.dom.baseEl.querySelectorAll( + `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-label` + ) + + yAxisTexts = Utils.listToArray(yAxisTexts) + + const rect = yAxisInner.getBoundingClientRect() + + if (yaxe.labels.align === 'left') { + yAxisTexts.forEach((label, lI) => { + label.setAttribute('text-anchor', 'start') + }) + if (!yaxe.opposite) { + yAxisInner.setAttribute('transform', `translate(-${rect.width}, 0)`) + } + } else if (yaxe.labels.align === 'center') { + yAxisTexts.forEach((label, lI) => { + label.setAttribute('text-anchor', 'middle') + }) + yAxisInner.setAttribute( + 'transform', + `translate(${(rect.width / 2) * (!yaxe.opposite ? -1 : 1)}, 0)` + ) + } else if (yaxe.labels.align === 'right') { + yAxisTexts.forEach((label, lI) => { + label.setAttribute('text-anchor', 'end') + }) + if (yaxe.opposite) { + yAxisInner.setAttribute('transform', `translate(${rect.width}, 0)`) + } + } + } + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Dimensions.js b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Dimensions.js new file mode 100644 index 0000000..8e6eab9 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Dimensions.js @@ -0,0 +1,336 @@ +import YAxis from '../axes/YAxis' +import Helpers from './Helpers' +import DimXAxis from './XAxis' +import DimYAxis from './YAxis' +import Grid from './Grid' + +/** + * ApexCharts Dimensions Class for calculating rects of all elements that are drawn and will be drawn. + * + * @module Dimensions + **/ + +export default class Dimensions { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + this.lgRect = {} + this.yAxisWidth = 0 + this.yAxisWidthLeft = 0 + this.yAxisWidthRight = 0 + this.xAxisHeight = 0 + this.isSparkline = this.w.config.chart.sparkline.enabled + + this.dimHelpers = new Helpers(this) + this.dimYAxis = new DimYAxis(this) + this.dimXAxis = new DimXAxis(this) + this.dimGrid = new Grid(this) + this.lgWidthForSideLegends = 0 + this.gridPad = this.w.config.grid.padding + this.xPadRight = 0 + this.xPadLeft = 0 + } + + /** + * @memberof Dimensions + * @param {object} w - chart context + **/ + plotCoords() { + let w = this.w + let gl = w.globals + + this.lgRect = this.dimHelpers.getLegendsRect() + + if ( + this.isSparkline && + (w.config.markers.discrete.length > 0 || w.config.markers.size > 0) + ) { + Object.entries(this.gridPad).forEach(([k, v]) => { + this.gridPad[k] = Math.max(v, this.w.globals.markers.largestSize / 1.5) + }) + } + + if (gl.axisCharts) { + // for line / area / scatter / column + this.setDimensionsForAxisCharts() + } else { + // for pie / donuts / circle + this.setDimensionsForNonAxisCharts() + } + + this.dimGrid.gridPadFortitleSubtitle() + + // after calculating everything, apply padding set by user + gl.gridHeight = gl.gridHeight - this.gridPad.top - this.gridPad.bottom + + gl.gridWidth = + gl.gridWidth - + this.gridPad.left - + this.gridPad.right - + this.xPadRight - + this.xPadLeft + + let barWidth = this.dimGrid.gridPadForColumnsInNumericAxis(gl.gridWidth) + + gl.gridWidth = gl.gridWidth - barWidth * 2 + + gl.translateX = + gl.translateX + + this.gridPad.left + + this.xPadLeft + + (barWidth > 0 ? barWidth + 4 : 0) + gl.translateY = gl.translateY + this.gridPad.top + } + + setDimensionsForAxisCharts() { + let w = this.w + let gl = w.globals + + let yaxisLabelCoords = this.dimYAxis.getyAxisLabelsCoords() + let yTitleCoords = this.dimYAxis.getyAxisTitleCoords() + + w.globals.yLabelsCoords = [] + w.globals.yTitleCoords = [] + w.config.yaxis.map((yaxe, index) => { + // store the labels and titles coords in global vars + w.globals.yLabelsCoords.push({ + width: yaxisLabelCoords[index].width, + index + }) + w.globals.yTitleCoords.push({ + width: yTitleCoords[index].width, + index + }) + }) + + this.yAxisWidth = this.dimYAxis.getTotalYAxisWidth() + + let xaxisLabelCoords = this.dimXAxis.getxAxisLabelsCoords() + let xaxisGroupLabelCoords = this.dimXAxis.getxAxisGroupLabelsCoords() + let xtitleCoords = this.dimXAxis.getxAxisTitleCoords() + + this.conditionalChecksForAxisCoords( + xaxisLabelCoords, + xtitleCoords, + xaxisGroupLabelCoords + ) + + gl.translateXAxisY = w.globals.rotateXLabels ? this.xAxisHeight / 8 : -4 + gl.translateXAxisX = + w.globals.rotateXLabels && + w.globals.isXNumeric && + w.config.xaxis.labels.rotate <= -45 + ? -this.xAxisWidth / 4 + : 0 + + if (w.globals.isBarHorizontal) { + gl.rotateXLabels = false + gl.translateXAxisY = + -1 * (parseInt(w.config.xaxis.labels.style.fontSize, 10) / 1.5) + } + + gl.translateXAxisY = gl.translateXAxisY + w.config.xaxis.labels.offsetY + gl.translateXAxisX = gl.translateXAxisX + w.config.xaxis.labels.offsetX + + let yAxisWidth = this.yAxisWidth + let xAxisHeight = this.xAxisHeight + gl.xAxisLabelsHeight = this.xAxisHeight - xtitleCoords.height + gl.xAxisGroupLabelsHeight = gl.xAxisLabelsHeight - xaxisLabelCoords.height + gl.xAxisLabelsWidth = this.xAxisWidth + gl.xAxisHeight = this.xAxisHeight + let translateY = 10 + + if (w.config.chart.type === 'radar' || this.isSparkline) { + yAxisWidth = 0 + xAxisHeight = gl.goldenPadding + } + + if (this.isSparkline) { + this.lgRect = { + height: 0, + width: 0 + } + } + + if (this.isSparkline || w.config.chart.type === 'treemap') { + yAxisWidth = 0 + xAxisHeight = 0 + translateY = 0 + } + + if (!this.isSparkline) { + this.dimXAxis.additionalPaddingXLabels(xaxisLabelCoords) + } + + const legendTopBottom = () => { + gl.translateX = yAxisWidth + gl.gridHeight = + gl.svgHeight - + this.lgRect.height - + xAxisHeight - + (!this.isSparkline && w.config.chart.type !== 'treemap' + ? w.globals.rotateXLabels + ? 10 + : 15 + : 0) + gl.gridWidth = gl.svgWidth - yAxisWidth + } + + if (w.config.xaxis.position === 'top') + translateY = gl.xAxisHeight - w.config.xaxis.axisTicks.height - 5 + + switch (w.config.legend.position) { + case 'bottom': + gl.translateY = translateY + legendTopBottom() + break + case 'top': + gl.translateY = this.lgRect.height + translateY + legendTopBottom() + break + case 'left': + gl.translateY = translateY + gl.translateX = this.lgRect.width + yAxisWidth + gl.gridHeight = gl.svgHeight - xAxisHeight - 12 + gl.gridWidth = gl.svgWidth - this.lgRect.width - yAxisWidth + break + case 'right': + gl.translateY = translateY + gl.translateX = yAxisWidth + gl.gridHeight = gl.svgHeight - xAxisHeight - 12 + gl.gridWidth = gl.svgWidth - this.lgRect.width - yAxisWidth - 5 + break + default: + throw new Error('Legend position not supported') + } + + this.dimGrid.setGridXPosForDualYAxis(yTitleCoords, yaxisLabelCoords) + + // after drawing everything, set the Y axis positions + let objyAxis = new YAxis(this.ctx) + objyAxis.setYAxisXPosition(yaxisLabelCoords, yTitleCoords) + } + + setDimensionsForNonAxisCharts() { + let w = this.w + let gl = w.globals + let cnf = w.config + let xPad = 0 + + if (w.config.legend.show && !w.config.legend.floating) { + xPad = 20 + } + + const type = + cnf.chart.type === 'pie' || + cnf.chart.type === 'polarArea' || + cnf.chart.type === 'donut' + ? 'pie' + : 'radialBar' + + let offY = cnf.plotOptions[type].offsetY + let offX = cnf.plotOptions[type].offsetX + + if (!cnf.legend.show || cnf.legend.floating) { + gl.gridHeight = + gl.svgHeight - cnf.grid.padding.left + cnf.grid.padding.right + gl.gridWidth = gl.gridHeight + + gl.translateY = offY + gl.translateX = offX + (gl.svgWidth - gl.gridWidth) / 2 + + return + } + + switch (cnf.legend.position) { + case 'bottom': + gl.gridHeight = gl.svgHeight - this.lgRect.height - gl.goldenPadding + gl.gridWidth = gl.svgWidth + gl.translateY = offY - 10 + gl.translateX = offX + (gl.svgWidth - gl.gridWidth) / 2 + break + case 'top': + gl.gridHeight = gl.svgHeight - this.lgRect.height - gl.goldenPadding + gl.gridWidth = gl.svgWidth + gl.translateY = this.lgRect.height + offY + 10 + gl.translateX = offX + (gl.svgWidth - gl.gridWidth) / 2 + break + case 'left': + gl.gridWidth = gl.svgWidth - this.lgRect.width - xPad + gl.gridHeight = + cnf.chart.height !== 'auto' ? gl.svgHeight : gl.gridWidth + gl.translateY = offY + gl.translateX = offX + this.lgRect.width + xPad + break + case 'right': + gl.gridWidth = gl.svgWidth - this.lgRect.width - xPad - 5 + gl.gridHeight = + cnf.chart.height !== 'auto' ? gl.svgHeight : gl.gridWidth + gl.translateY = offY + gl.translateX = offX + 10 + break + default: + throw new Error('Legend position not supported') + } + } + + conditionalChecksForAxisCoords( + xaxisLabelCoords, + xtitleCoords, + xaxisGroupLabelCoords + ) { + const w = this.w + + const xAxisNum = w.globals.hasGroups ? 2 : 1 + + const baseXAxisHeight = + xaxisGroupLabelCoords.height + + xaxisLabelCoords.height + + xtitleCoords.height + const xAxisHeightMultiplicate = w.globals.isMultiLineX + ? 1.2 + : w.globals.LINE_HEIGHT_RATIO + const rotatedXAxisOffset = w.globals.rotateXLabels ? 22 : 10 + const rotatedXAxisLegendOffset = + w.globals.rotateXLabels && w.config.legend.position === 'bottom' + const additionalOffset = rotatedXAxisLegendOffset ? 10 : 0 + + this.xAxisHeight = + baseXAxisHeight * xAxisHeightMultiplicate + + xAxisNum * rotatedXAxisOffset + + additionalOffset + + this.xAxisWidth = xaxisLabelCoords.width + + if ( + this.xAxisHeight - xtitleCoords.height > + w.config.xaxis.labels.maxHeight + ) { + this.xAxisHeight = w.config.xaxis.labels.maxHeight + } + + if ( + w.config.xaxis.labels.minHeight && + this.xAxisHeight < w.config.xaxis.labels.minHeight + ) { + this.xAxisHeight = w.config.xaxis.labels.minHeight + } + + if (w.config.xaxis.floating) { + this.xAxisHeight = 0 + } + + let minYAxisWidth = 0 + let maxYAxisWidth = 0 + w.config.yaxis.forEach((y) => { + minYAxisWidth += y.labels.minWidth + maxYAxisWidth += y.labels.maxWidth + }) + if (this.yAxisWidth < minYAxisWidth) { + this.yAxisWidth = minYAxisWidth + } + if (this.yAxisWidth > maxYAxisWidth) { + this.yAxisWidth = maxYAxisWidth + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Grid.js b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Grid.js new file mode 100644 index 0000000..0dcb808 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Grid.js @@ -0,0 +1,151 @@ +import AxesUtils from '../axes/AxesUtils' + +export default class DimGrid { + constructor(dCtx) { + this.w = dCtx.w + this.dCtx = dCtx + } + + gridPadForColumnsInNumericAxis(gridWidth) { + const w = this.w + + if (w.globals.noData || w.globals.allSeriesCollapsed) { + return 0 + } + + const hasBar = (type) => { + return ( + type === 'bar' || + type === 'rangeBar' || + type === 'candlestick' || + type === 'boxPlot' + ) + } + + const type = w.config.chart.type + + let barWidth = 0 + let seriesLen = hasBar(type) ? w.config.series.length : 1 + + if (w.globals.comboBarCount > 0) { + seriesLen = w.globals.comboBarCount + } + w.globals.collapsedSeries.forEach((c) => { + if (hasBar(c.type)) { + seriesLen = seriesLen - 1 + } + }) + if (w.config.chart.stacked) { + seriesLen = 1 + } + + const barsPresent = hasBar(type) || w.globals.comboBarCount > 0 + + if ( + barsPresent && + w.globals.isXNumeric && + !w.globals.isBarHorizontal && + seriesLen > 0 + ) { + let xRatio = 0 + let xRange = Math.abs(w.globals.initialMaxX - w.globals.initialMinX) + + if (xRange <= 3) { + xRange = w.globals.dataPoints + } + + xRatio = xRange / gridWidth + + let xDivision + // max barwidth should be equal to minXDiff to avoid overlap + if (w.globals.minXDiff && w.globals.minXDiff / xRatio > 0) { + xDivision = w.globals.minXDiff / xRatio + } + + if (xDivision > gridWidth / 2) { + xDivision = xDivision / 2 + } + barWidth = + ((xDivision / seriesLen) * + parseInt(w.config.plotOptions.bar.columnWidth, 10)) / + 100 + + if (barWidth < 1) { + barWidth = 1 + } + + barWidth = barWidth / (seriesLen > 1 ? 1 : 1.5) + 5 + + w.globals.barPadForNumericAxis = barWidth + } + return barWidth + } + + gridPadFortitleSubtitle() { + const w = this.w + const gl = w.globals + let gridShrinkOffset = + this.dCtx.isSparkline || !w.globals.axisCharts ? 0 : 10 + + const titleSubtitle = ['title', 'subtitle'] + + titleSubtitle.forEach((t) => { + if (w.config[t].text !== undefined) { + gridShrinkOffset += w.config[t].margin + } else { + gridShrinkOffset += + this.dCtx.isSparkline || !w.globals.axisCharts ? 0 : 5 + } + }) + + if ( + w.config.legend.show && + w.config.legend.position === 'bottom' && + !w.config.legend.floating && + !w.globals.axisCharts + ) { + gridShrinkOffset += 10 + } + + let titleCoords = this.dCtx.dimHelpers.getTitleSubtitleCoords('title') + let subtitleCoords = this.dCtx.dimHelpers.getTitleSubtitleCoords('subtitle') + + gl.gridHeight = + gl.gridHeight - + titleCoords.height - + subtitleCoords.height - + gridShrinkOffset + + gl.translateY = + gl.translateY + + titleCoords.height + + subtitleCoords.height + + gridShrinkOffset + } + + setGridXPosForDualYAxis(yTitleCoords, yaxisLabelCoords) { + let w = this.w + const axesUtils = new AxesUtils(this.dCtx.ctx) + + w.config.yaxis.map((yaxe, index) => { + if ( + w.globals.ignoreYAxisIndexes.indexOf(index) === -1 && + !yaxe.floating && + !axesUtils.isYAxisHidden(index) + ) { + if (yaxe.opposite) { + w.globals.translateX = + w.globals.translateX - + (yaxisLabelCoords[index].width + yTitleCoords[index].width) - + parseInt(w.config.yaxis[index].labels.style.fontSize, 10) / 1.2 - + 12 + } + + // fixes apexcharts.js#1599 + if (w.globals.translateX < 2) { + w.globals.translateX = 2 + } + } + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Helpers.js new file mode 100644 index 0000000..0404bf5 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/Helpers.js @@ -0,0 +1,100 @@ +import Utils from '../../utils/Utils' + +export default class Helpers { + constructor(dCtx) { + this.w = dCtx.w + this.dCtx = dCtx + } + + /** + * Get Chart Title/Subtitle Dimensions + * @memberof Dimensions + * @return {{width, height}} + **/ + getTitleSubtitleCoords(type) { + let w = this.w + let width = 0 + let height = 0 + + const floating = + type === 'title' ? w.config.title.floating : w.config.subtitle.floating + + let el = w.globals.dom.baseEl.querySelector(`.apexcharts-${type}-text`) + + if (el !== null && !floating) { + let coord = el.getBoundingClientRect() + width = coord.width + height = w.globals.axisCharts ? coord.height + 5 : coord.height + } + + return { + width, + height + } + } + + getLegendsRect() { + let w = this.w + + let elLegendWrap = w.globals.dom.baseEl.querySelector('.apexcharts-legend') + + if ( + !w.config.legend.height && + (w.config.legend.position === 'top' || + w.config.legend.position === 'bottom') + ) { + // avoid legend to take up all the space + elLegendWrap.style.maxHeight = w.globals.svgHeight / 2 + 'px' + } + + let lgRect = Object.assign({}, Utils.getBoundingClientRect(elLegendWrap)) + + if ( + elLegendWrap !== null && + !w.config.legend.floating && + w.config.legend.show + ) { + this.dCtx.lgRect = { + x: lgRect.x, + y: lgRect.y, + height: lgRect.height, + width: lgRect.height === 0 ? 0 : lgRect.width + } + } else { + this.dCtx.lgRect = { + x: 0, + y: 0, + height: 0, + width: 0 + } + } + + // if legend takes up all of the chart space, we need to restrict it. + if ( + w.config.legend.position === 'left' || + w.config.legend.position === 'right' + ) { + if (this.dCtx.lgRect.width * 1.5 > w.globals.svgWidth) { + this.dCtx.lgRect.width = w.globals.svgWidth / 1.5 + } + } + + return this.dCtx.lgRect + } + + getLargestStringFromMultiArr(val, arr) { + const w = this.w + let valArr = val + if (w.globals.isMultiLineX) { + // if the xaxis labels has multiline texts (array) + let maxArrs = arr.map((xl, idx) => { + return Array.isArray(xl) ? xl.length : 1 + }) + let maxArrLen = Math.max(...maxArrs) + let maxArrIndex = maxArrs.indexOf(maxArrLen) + valArr = arr[maxArrIndex] + } + + return valArr + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/XAxis.js b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/XAxis.js new file mode 100644 index 0000000..c247910 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/XAxis.js @@ -0,0 +1,385 @@ +import Formatters from '../Formatters' +import Graphics from '../Graphics' +import Utils from '../../utils/Utils' +import DateTime from '../../utils/DateTime' + +export default class DimXAxis { + constructor(dCtx) { + this.w = dCtx.w + this.dCtx = dCtx + } + + /** + * Get X Axis Dimensions + * @memberof Dimensions + * @return {{width, height}} + **/ + getxAxisLabelsCoords() { + let w = this.w + + let xaxisLabels = w.globals.labels.slice() + if (w.config.xaxis.convertedCatToNumeric && xaxisLabels.length === 0) { + xaxisLabels = w.globals.categoryLabels + } + + let rect + + if (w.globals.timescaleLabels.length > 0) { + const coords = this.getxAxisTimeScaleLabelsCoords() + rect = { + width: coords.width, + height: coords.height + } + w.globals.rotateXLabels = false + } else { + this.dCtx.lgWidthForSideLegends = + (w.config.legend.position === 'left' || + w.config.legend.position === 'right') && + !w.config.legend.floating + ? this.dCtx.lgRect.width + : 0 + + // get the longest string from the labels array and also apply label formatter + let xlbFormatter = w.globals.xLabelFormatter + // prevent changing xaxisLabels to avoid issues in multi-yaxes - fix #522 + let val = Utils.getLargestStringFromArr(xaxisLabels) + let valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr( + val, + xaxisLabels + ) + + // the labels gets changed for bar charts + if (w.globals.isBarHorizontal) { + val = w.globals.yAxisScale[0].result.reduce( + (a, b) => (a.length > b.length ? a : b), + 0 + ) + valArr = val + } + + let xFormat = new Formatters(this.dCtx.ctx) + let timestamp = val + val = xFormat.xLabelFormat(xlbFormatter, val, timestamp, { + i: undefined, + dateFormatter: new DateTime(this.dCtx.ctx).formatDate, + w + }) + valArr = xFormat.xLabelFormat(xlbFormatter, valArr, timestamp, { + i: undefined, + dateFormatter: new DateTime(this.dCtx.ctx).formatDate, + w + }) + + if ( + (w.config.xaxis.convertedCatToNumeric && typeof val === 'undefined') || + String(val).trim() === '' + ) { + val = '1' + valArr = val + } + + let graphics = new Graphics(this.dCtx.ctx) + let xLabelrect = graphics.getTextRects( + val, + w.config.xaxis.labels.style.fontSize + ) + let xArrLabelrect = xLabelrect + if (val !== valArr) { + xArrLabelrect = graphics.getTextRects( + valArr, + w.config.xaxis.labels.style.fontSize + ) + } + + rect = { + width: + xLabelrect.width >= xArrLabelrect.width + ? xLabelrect.width + : xArrLabelrect.width, + height: + xLabelrect.height >= xArrLabelrect.height + ? xLabelrect.height + : xArrLabelrect.height + } + + if ( + (rect.width * xaxisLabels.length > + w.globals.svgWidth - + this.dCtx.lgWidthForSideLegends - + this.dCtx.yAxisWidth - + this.dCtx.gridPad.left - + this.dCtx.gridPad.right && + w.config.xaxis.labels.rotate !== 0) || + w.config.xaxis.labels.rotateAlways + ) { + if (!w.globals.isBarHorizontal) { + w.globals.rotateXLabels = true + const getRotatedTextRects = (text) => { + return graphics.getTextRects( + text, + w.config.xaxis.labels.style.fontSize, + w.config.xaxis.labels.style.fontFamily, + `rotate(${w.config.xaxis.labels.rotate} 0 0)`, + false + ) + } + xLabelrect = getRotatedTextRects(val) + if (val !== valArr) { + xArrLabelrect = getRotatedTextRects(valArr) + } + + rect.height = + (xLabelrect.height > xArrLabelrect.height + ? xLabelrect.height + : xArrLabelrect.height) / 1.5 + rect.width = + xLabelrect.width > xArrLabelrect.width + ? xLabelrect.width + : xArrLabelrect.width + } + } else { + w.globals.rotateXLabels = false + } + } + + if (!w.config.xaxis.labels.show) { + rect = { + width: 0, + height: 0 + } + } + + return { + width: rect.width, + height: rect.height + } + } + + /** + * Get X Axis Label Group height + * @memberof Dimensions + * @return {{width, height}} + */ + getxAxisGroupLabelsCoords() { + let w = this.w + + if (!w.globals.hasGroups) { + return { width: 0, height: 0 } + } + + const fontSize = + w.config.xaxis.group.style?.fontSize || + w.config.xaxis.labels.style.fontSize + + let xaxisLabels = w.globals.groups.map((g) => g.title) + + let rect + + // prevent changing xaxisLabels to avoid issues in multi-yaxes - fix #522 + let val = Utils.getLargestStringFromArr(xaxisLabels) + let valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr( + val, + xaxisLabels + ) + + let graphics = new Graphics(this.dCtx.ctx) + let xLabelrect = graphics.getTextRects(val, fontSize) + let xArrLabelrect = xLabelrect + if (val !== valArr) { + xArrLabelrect = graphics.getTextRects(valArr, fontSize) + } + + rect = { + width: + xLabelrect.width >= xArrLabelrect.width + ? xLabelrect.width + : xArrLabelrect.width, + height: + xLabelrect.height >= xArrLabelrect.height + ? xLabelrect.height + : xArrLabelrect.height + } + + if (!w.config.xaxis.labels.show) { + rect = { + width: 0, + height: 0 + } + } + + return { + width: rect.width, + height: rect.height + } + } + + /** + * Get X Axis Title Dimensions + * @memberof Dimensions + * @return {{width, height}} + **/ + getxAxisTitleCoords() { + let w = this.w + let width = 0 + let height = 0 + + if (w.config.xaxis.title.text !== undefined) { + let graphics = new Graphics(this.dCtx.ctx) + + let rect = graphics.getTextRects( + w.config.xaxis.title.text, + w.config.xaxis.title.style.fontSize + ) + + width = rect.width + height = rect.height + } + + return { + width, + height + } + } + + getxAxisTimeScaleLabelsCoords() { + let w = this.w + let rect + + this.dCtx.timescaleLabels = w.globals.timescaleLabels.slice() + + let labels = this.dCtx.timescaleLabels.map((label) => label.value) + + // get the longest string from the labels array and also apply label formatter to it + let val = labels.reduce((a, b) => { + // if undefined, maybe user didn't pass the datetime(x) values + if (typeof a === 'undefined') { + console.error( + 'You have possibly supplied invalid Date format. Please supply a valid JavaScript Date' + ) + return 0 + } else { + return a.length > b.length ? a : b + } + }, 0) + + let graphics = new Graphics(this.dCtx.ctx) + rect = graphics.getTextRects(val, w.config.xaxis.labels.style.fontSize) + + let totalWidthRotated = rect.width * 1.05 * labels.length + + if ( + totalWidthRotated > w.globals.gridWidth && + w.config.xaxis.labels.rotate !== 0 + ) { + w.globals.overlappingXLabels = true + } + + return rect + } + + // In certain cases, the last labels gets cropped in xaxis. + // Hence, we add some additional padding based on the label length to avoid the last label being cropped or we don't draw it at all + additionalPaddingXLabels(xaxisLabelCoords) { + const w = this.w + const gl = w.globals + const cnf = w.config + const xtype = cnf.xaxis.type + + let lbWidth = xaxisLabelCoords.width + + gl.skipLastTimelinelabel = false + gl.skipFirstTimelinelabel = false + const isBarOpposite = + w.config.yaxis[0].opposite && w.globals.isBarHorizontal + + const isCollapsed = (i) => gl.collapsedSeriesIndices.indexOf(i) !== -1 + + const rightPad = (yaxe) => { + if (this.dCtx.timescaleLabels && this.dCtx.timescaleLabels.length) { + // for timeline labels, we take the last label and check if it exceeds gridWidth + const firstimescaleLabel = this.dCtx.timescaleLabels[0] + const lastTimescaleLabel = this.dCtx.timescaleLabels[ + this.dCtx.timescaleLabels.length - 1 + ] + + const lastLabelPosition = + lastTimescaleLabel.position + + lbWidth / 1.75 - + this.dCtx.yAxisWidthRight + + const firstLabelPosition = + firstimescaleLabel.position - + lbWidth / 1.75 + + this.dCtx.yAxisWidthLeft + + let lgRightRectWidth = + w.config.legend.position === 'right' && this.dCtx.lgRect.width > 0 + ? this.dCtx.lgRect.width + : 0 + if ( + lastLabelPosition > + gl.svgWidth - gl.translateX - lgRightRectWidth + ) { + gl.skipLastTimelinelabel = true + } + + if ( + firstLabelPosition < + -((!yaxe.show || yaxe.floating) && + (cnf.chart.type === 'bar' || + cnf.chart.type === 'candlestick' || + cnf.chart.type === 'rangeBar' || + cnf.chart.type === 'boxPlot') + ? lbWidth / 1.75 + : 10) + ) { + gl.skipFirstTimelinelabel = true + } + } else if (xtype === 'datetime') { + // If user has enabled DateTime, but uses own's formatter + if (this.dCtx.gridPad.right < lbWidth && !gl.rotateXLabels) { + gl.skipLastTimelinelabel = true + } + } else if (xtype !== 'datetime') { + if ( + this.dCtx.gridPad.right < lbWidth / 2 - this.dCtx.yAxisWidthRight && + !gl.rotateXLabels && + !w.config.xaxis.labels.trim && + (w.config.xaxis.tickPlacement !== 'between' || + w.globals.isBarHorizontal) + ) { + this.dCtx.xPadRight = lbWidth / 2 + 1 + } + } + } + + const padYAxe = (yaxe, i) => { + if (isCollapsed(i)) return + + // the code below causes issue apexcharts.js#1989 + // after testing with other use-cases, this has no actual value, hence commented + // if (xtype !== 'datetime') { + // if ( + // this.dCtx.gridPad.left < lbWidth / 2 - this.dCtx.yAxisWidthLeft && + // !gl.rotateXLabels && + // !cnf.xaxis.labels.trim + // ) { + // this.dCtx.xPadLeft = lbWidth / 2 + 1 + // } + // } + + rightPad(yaxe) + } + + cnf.yaxis.forEach((yaxe, i) => { + if (isBarOpposite) { + if (this.dCtx.gridPad.left < lbWidth) { + this.dCtx.xPadLeft = lbWidth / 2 + 1 + } + this.dCtx.xPadRight = lbWidth / 2 + 1 + } else { + padYAxe(yaxe, i) + } + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/YAxis.js b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/YAxis.js new file mode 100644 index 0000000..8adf715 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/dimensions/YAxis.js @@ -0,0 +1,205 @@ +import Graphics from '../Graphics' +import Utils from '../../utils/Utils' +import AxesUtils from '../axes/AxesUtils' + +export default class DimYAxis { + constructor(dCtx) { + this.w = dCtx.w + this.dCtx = dCtx + } + + /** + * Get Y Axis Dimensions + * @memberof Dimensions + * @return {{width, height}} + **/ + getyAxisLabelsCoords() { + let w = this.w + + let width = 0 + let height = 0 + let ret = [] + let labelPad = 10 + const axesUtils = new AxesUtils(this.dCtx.ctx) + + w.config.yaxis.map((yaxe, index) => { + const yS = w.globals.yAxisScale[index] + let yAxisMinWidth = 0 + if ( + !axesUtils.isYAxisHidden(index) && + yaxe.labels.show && + yaxe.labels.minWidth !== undefined + ) + yAxisMinWidth = yaxe.labels.minWidth + + if ( + !axesUtils.isYAxisHidden(index) && + yaxe.labels.show && + yS.result.length + ) { + let lbFormatter = w.globals.yLabelFormatters[index] + let minV = yS.niceMin === Number.MIN_VALUE ? 0 : yS.niceMin + const longestStr = + String(minV).length > String(yS.niceMax).length ? minV : yS.niceMax + + // the second parameter -1 is the index of tick which user can use in the formatter + let val = lbFormatter(longestStr, { + seriesIndex: index, + dataPointIndex: -1, + w + }) + let valArr = val + + // if user has specified a custom formatter, and the result is null or empty, we need to discard the formatter and take the value as it is. + if (typeof val === 'undefined' || val.length === 0) { + val = longestStr + } + + if (w.globals.isBarHorizontal) { + labelPad = 0 + + let barYaxisLabels = w.globals.labels.slice() + + // get the longest string from the labels array and also apply label formatter to it + val = Utils.getLargestStringFromArr(barYaxisLabels) + + val = lbFormatter(val, { seriesIndex: index, dataPointIndex: -1, w }) + valArr = this.dCtx.dimHelpers.getLargestStringFromMultiArr( + val, + barYaxisLabels + ) + } + + let graphics = new Graphics(this.dCtx.ctx) + + let rotateStr = 'rotate('.concat(yaxe.labels.rotate, ' 0 0)') + let rect = graphics.getTextRects( + val, + yaxe.labels.style.fontSize, + yaxe.labels.style.fontFamily, + rotateStr, + false + ) + + let arrLabelrect = rect + + if (val !== valArr) { + arrLabelrect = graphics.getTextRects( + valArr, + yaxe.labels.style.fontSize, + yaxe.labels.style.fontFamily, + rotateStr, + false + ) + } + + ret.push({ + width: + (yAxisMinWidth > arrLabelrect.width || yAxisMinWidth > rect.width + ? yAxisMinWidth + : arrLabelrect.width > rect.width + ? arrLabelrect.width + : rect.width) + labelPad, + height: + arrLabelrect.height > rect.height + ? arrLabelrect.height + : rect.height + }) + } else { + ret.push({ + width, + height + }) + } + }) + + return ret + } + + /** + * Get Y Axis Dimensions + * @memberof Dimensions + * @return {{width, height}} + **/ + getyAxisTitleCoords() { + let w = this.w + let ret = [] + + w.config.yaxis.map((yaxe, index) => { + if (yaxe.show && yaxe.title.text !== undefined) { + let graphics = new Graphics(this.dCtx.ctx) + let rotateStr = 'rotate('.concat(yaxe.title.rotate, ' 0 0)') + let rect = graphics.getTextRects( + yaxe.title.text, + yaxe.title.style.fontSize, + yaxe.title.style.fontFamily, + rotateStr, + false + ) + + ret.push({ + width: rect.width, + height: rect.height + }) + } else { + ret.push({ + width: 0, + height: 0 + }) + } + }) + + return ret + } + + getTotalYAxisWidth() { + let w = this.w + let yAxisWidth = 0 + let yAxisWidthLeft = 0 + let yAxisWidthRight = 0 + let padding = w.globals.yAxisScale.length > 1 ? 10 : 0 + const axesUtils = new AxesUtils(this.dCtx.ctx) + + const isHiddenYAxis = function(index) { + return w.globals.ignoreYAxisIndexes.indexOf(index) > -1 + } + + const padForLabelTitle = (coord, index) => { + let floating = w.config.yaxis[index].floating + let width = 0 + + if (coord.width > 0 && !floating) { + width = coord.width + padding + if (isHiddenYAxis(index)) { + width = width - coord.width - padding + } + } else { + width = floating || axesUtils.isYAxisHidden(index) ? 0 : 5 + } + + w.config.yaxis[index].opposite + ? (yAxisWidthRight = yAxisWidthRight + width) + : (yAxisWidthLeft = yAxisWidthLeft + width) + + yAxisWidth = yAxisWidth + width + } + + w.globals.yLabelsCoords.map((yLabelCoord, index) => { + padForLabelTitle(yLabelCoord, index) + }) + + w.globals.yTitleCoords.map((yTitleCoord, index) => { + padForLabelTitle(yTitleCoord, index) + }) + + if (w.globals.isBarHorizontal && !w.config.yaxis[0].floating) { + yAxisWidth = + w.globals.yLabelsCoords[0].width + w.globals.yTitleCoords[0].width + 15 + } + + this.dCtx.yAxisWidthLeft = yAxisWidthLeft + this.dCtx.yAxisWidthRight = yAxisWidthRight + + return yAxisWidth + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/helpers/Destroy.js b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/Destroy.js new file mode 100644 index 0000000..578e3ce --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/Destroy.js @@ -0,0 +1,88 @@ +export default class Destroy { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + clear({ isUpdating }) { + if (this.ctx.zoomPanSelection) { + this.ctx.zoomPanSelection.destroy() + } + if (this.ctx.toolbar) { + this.ctx.toolbar.destroy() + } + + this.ctx.animations = null + this.ctx.axes = null + this.ctx.annotations = null + this.ctx.core = null + this.ctx.data = null + this.ctx.grid = null + this.ctx.series = null + this.ctx.responsive = null + this.ctx.theme = null + this.ctx.formatters = null + this.ctx.titleSubtitle = null + this.ctx.legend = null + this.ctx.dimensions = null + this.ctx.options = null + this.ctx.crosshairs = null + this.ctx.zoomPanSelection = null + this.ctx.updateHelpers = null + this.ctx.toolbar = null + this.ctx.localization = null + this.ctx.w.globals.tooltip = null + this.clearDomElements({ isUpdating }) + } + + killSVG(draw) { + draw.each(function(i, children) { + this.removeClass('*') + this.off() + this.stop() + }, true) + draw.ungroup() + draw.clear() + } + + clearDomElements({ isUpdating }) { + const elSVG = this.w.globals.dom.Paper.node + // fixes apexcharts.js#1654 & vue-apexcharts#256 + if (elSVG.parentNode && elSVG.parentNode.parentNode && !isUpdating) { + elSVG.parentNode.parentNode.style.minHeight = 'unset' + } + + // detach root event + const baseEl = this.w.globals.dom.baseEl + if (baseEl) { + // see https://github.com/apexcharts/vue-apexcharts/issues/275 + this.ctx.eventList.forEach((event) => { + baseEl.removeEventListener(event, this.ctx.events.documentEvent) + }) + } + + const domEls = this.w.globals.dom + + if (this.ctx.el !== null) { + // remove all child elements - resetting the whole chart + while (this.ctx.el.firstChild) { + this.ctx.el.removeChild(this.ctx.el.firstChild) + } + } + + this.killSVG(domEls.Paper) + domEls.Paper.remove() + + domEls.elWrap = null + domEls.elGraphical = null + domEls.elAnnotations = null + domEls.elLegendWrap = null + domEls.baseEl = null + domEls.elGridRect = null + domEls.elGridRectMask = null + domEls.elGridRectMarkerMask = null + domEls.elForecastMask = null + domEls.elNonForecastMask = null + domEls.elDefs = null + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/helpers/InitCtxVariables.js b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/InitCtxVariables.js new file mode 100644 index 0000000..b86e9a7 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/InitCtxVariables.js @@ -0,0 +1,104 @@ +import Events from '../Events' +import Localization from './Localization' +import Animations from '../Animations' +import Axes from '../axes/Axes' +import Config from '../settings/Config' +import CoreUtils from '../CoreUtils' +import Crosshairs from '../Crosshairs' +import Grid from '../axes/Grid' +import Graphics from '../Graphics' +import Exports from '../Exports' +import Options from '../settings/Options' +import Responsive from '../Responsive' +import Series from '../Series' +import Theme from '../Theme' +import Formatters from '../Formatters' +import TitleSubtitle from '../TitleSubtitle' +import Legend from '../legend/Legend' +import Toolbar from '../Toolbar' +import Dimensions from '../dimensions/Dimensions' +import ZoomPanSelection from '../ZoomPanSelection' +import Tooltip from '../tooltip/Tooltip' +import Core from '../Core' +import Data from '../Data' +import UpdateHelpers from './UpdateHelpers' + +import '../../svgjs/svg.js' +import 'svg.filter.js' +import 'svg.pathmorphing.js' +import 'svg.draggable.js' +import 'svg.select.js' +import 'svg.resize.js' + +// global Apex object which user can use to override chart's defaults globally +if (typeof window.Apex === 'undefined') { + window.Apex = {} +} + +export default class InitCtxVariables { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + initModules() { + this.ctx.publicMethods = [ + 'updateOptions', + 'updateSeries', + 'appendData', + 'appendSeries', + 'toggleSeries', + 'showSeries', + 'hideSeries', + 'setLocale', + 'resetSeries', + 'zoomX', + 'toggleDataPointSelection', + 'dataURI', + 'addXaxisAnnotation', + 'addYaxisAnnotation', + 'addPointAnnotation', + 'clearAnnotations', + 'removeAnnotation', + 'paper', + 'destroy' + ] + + this.ctx.eventList = [ + 'click', + 'mousedown', + 'mousemove', + 'mouseleave', + 'touchstart', + 'touchmove', + 'touchleave', + 'mouseup', + 'touchend' + ] + + this.ctx.animations = new Animations(this.ctx) + this.ctx.axes = new Axes(this.ctx) + this.ctx.core = new Core(this.ctx.el, this.ctx) + this.ctx.config = new Config({}) + this.ctx.data = new Data(this.ctx) + this.ctx.grid = new Grid(this.ctx) + this.ctx.graphics = new Graphics(this.ctx) + this.ctx.coreUtils = new CoreUtils(this.ctx) + this.ctx.crosshairs = new Crosshairs(this.ctx) + this.ctx.events = new Events(this.ctx) + this.ctx.exports = new Exports(this.ctx) + this.ctx.localization = new Localization(this.ctx) + this.ctx.options = new Options() + this.ctx.responsive = new Responsive(this.ctx) + this.ctx.series = new Series(this.ctx) + this.ctx.theme = new Theme(this.ctx) + this.ctx.formatters = new Formatters(this.ctx) + this.ctx.titleSubtitle = new TitleSubtitle(this.ctx) + this.ctx.legend = new Legend(this.ctx) + this.ctx.toolbar = new Toolbar(this.ctx) + this.ctx.dimensions = new Dimensions(this.ctx) + this.ctx.updateHelpers = new UpdateHelpers(this.ctx) + this.ctx.zoomPanSelection = new ZoomPanSelection(this.ctx) + this.ctx.w.globals.tooltip = new Tooltip(this.ctx) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/helpers/Localization.js b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/Localization.js new file mode 100644 index 0000000..c06e862 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/Localization.js @@ -0,0 +1,39 @@ +import Utils from '../../utils/Utils' + +import en from '../../locales/en.json' + +export default class Localization { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + setCurrentLocaleValues(localeName) { + let locales = this.w.config.chart.locales + + // check if user has specified locales in global Apex variable + // if yes - then extend those with local chart's locale + if ( + window.Apex.chart && + window.Apex.chart.locales && + window.Apex.chart.locales.length > 0 + ) { + locales = this.w.config.chart.locales.concat(window.Apex.chart.locales) + } + + // find the locale from the array of locales which user has set (either by chart.defaultLocale or by calling setLocale() method.) + const selectedLocale = locales.filter((c) => c.name === localeName)[0] + + if (selectedLocale) { + // create a complete locale object by extending defaults so you don't get undefined errors. + let ret = Utils.extend(en, selectedLocale) + + // store these locale options in global var for ease access + this.w.globals.locale = ret.options + } else { + throw new Error( + 'Wrong locale name provided. Please make sure you set the correct locale name in options' + ) + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/helpers/UpdateHelpers.js b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/UpdateHelpers.js new file mode 100644 index 0000000..6af9d36 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/helpers/UpdateHelpers.js @@ -0,0 +1,282 @@ +import Defaults from '../settings/Defaults' +import Config from '../settings/Config' +import CoreUtils from '../CoreUtils' +import Graphics from '../Graphics' +import Utils from '../../utils/Utils' + +export default class UpdateHelpers { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + } + + /** + * private method to update Options. + * + * @param {object} options - A new config object can be passed which will be merged with the existing config object + * @param {boolean} redraw - should redraw from beginning or should use existing paths and redraw from there + * @param {boolean} animate - should animate or not on updating Options + * @param {boolean} overwriteInitialConfig - should update the initial config or not + */ + _updateOptions( + options, + redraw = false, + animate = true, + updateSyncedCharts = true, + overwriteInitialConfig = false + ) { + return new Promise((resolve) => { + let charts = [this.ctx] + if (updateSyncedCharts) { + charts = this.ctx.getSyncedCharts() + } + + if (this.ctx.w.globals.isExecCalled) { + // If the user called exec method, we don't want to get grouped charts as user specifically provided a chartID to update + charts = [this.ctx] + this.ctx.w.globals.isExecCalled = false + } + + charts.forEach((ch, chartIndex) => { + let w = ch.w + + w.globals.shouldAnimate = animate + + if (!redraw) { + w.globals.resized = true + w.globals.dataChanged = true + + if (animate) { + ch.series.getPreviousPaths() + } + } + + if (options && typeof options === 'object') { + ch.config = new Config(options) + options = CoreUtils.extendArrayProps(ch.config, options, w) + + // fixes #914, #623 + if (ch.w.globals.chartID !== this.ctx.w.globals.chartID) { + // don't overwrite series of synchronized charts + delete options.series + } + + w.config = Utils.extend(w.config, options) + + if (overwriteInitialConfig) { + // we need to forget the lastXAxis and lastYAxis as user forcefully overwriteInitialConfig. If we do not do this, and next time when user zooms the chart after setting yaxis.min/max or xaxis.min/max - the stored lastXAxis will never allow the chart to use the updated min/max by user. + w.globals.lastXAxis = options.xaxis + ? Utils.clone(options.xaxis) + : [] + w.globals.lastYAxis = options.yaxis + ? Utils.clone(options.yaxis) + : [] + + // After forgetting lastAxes, we need to restore the new config in initialConfig/initialSeries + w.globals.initialConfig = Utils.extend({}, w.config) + w.globals.initialSeries = Utils.clone(w.config.series) + + if (options.series) { + // Replace the collapsed series data + for (let i = 0; i < w.globals.collapsedSeriesIndices.length; i++) { + let series = w.config.series[w.globals.collapsedSeriesIndices[i]] + w.globals.collapsedSeries[i].data = w.globals.axisCharts ? series.data.slice() : series + } + for (let i = 0; i < w.globals.ancillaryCollapsedSeriesIndices.length; i++) { + let series = w.config.series[w.globals.ancillaryCollapsedSeriesIndices[i]] + w.globals.ancillaryCollapsedSeries[i].data = w.globals.axisCharts ? series.data.slice() : series + } + + // Ensure that auto-generated axes are scaled to the visible data + ch.series.emptyCollapsedSeries(w.config.series) + } + } + } + + return ch.update(options).then(() => { + if (chartIndex === charts.length - 1) { + resolve(ch) + } + }) + }) + }) + } + + /** + * Private method to update Series. + * + * @param {array} series - New series which will override the existing + */ + _updateSeries(newSeries, animate, overwriteInitialSeries = false) { + return new Promise((resolve) => { + const w = this.w + + w.globals.shouldAnimate = animate + + w.globals.dataChanged = true + + if (animate) { + this.ctx.series.getPreviousPaths() + } + + let existingSeries + + // axis charts + if (w.globals.axisCharts) { + existingSeries = newSeries.map((s, i) => { + return this._extendSeries(s, i) + }) + + if (existingSeries.length === 0) { + existingSeries = [{ data: [] }] + } + w.config.series = existingSeries + } else { + // non-axis chart (pie/radialbar) + w.config.series = newSeries.slice() + } + + if (overwriteInitialSeries) { + w.globals.initialSeries = Utils.clone(w.config.series) + } + return this.ctx.update().then(() => { + resolve(this.ctx) + }) + }) + } + + _extendSeries(s, i) { + const w = this.w + const ser = w.config.series[i] + + return { + ...w.config.series[i], + name: s.name ? s.name : ser && ser.name, + color: s.color ? s.color : ser && ser.color, + type: s.type ? s.type : ser && ser.type, + data: s.data ? s.data : ser && ser.data + } + } + + toggleDataPointSelection(seriesIndex, dataPointIndex) { + const w = this.w + let elPath = null + const parent = `.apexcharts-series[data\\:realIndex='${seriesIndex}']` + + if (w.globals.axisCharts) { + elPath = w.globals.dom.Paper.select( + `${parent} path[j='${dataPointIndex}'], ${parent} circle[j='${dataPointIndex}'], ${parent} rect[j='${dataPointIndex}']` + ).members[0] + } else { + // dataPointIndex will be undefined here, hence using seriesIndex + if (typeof dataPointIndex === 'undefined') { + elPath = w.globals.dom.Paper.select( + `${parent} path[j='${seriesIndex}']` + ).members[0] + + if ( + w.config.chart.type === 'pie' || + w.config.chart.type === 'polarArea' || + w.config.chart.type === 'donut' + ) { + this.ctx.pie.pieClicked(seriesIndex) + } + } + } + + if (elPath) { + const graphics = new Graphics(this.ctx) + graphics.pathMouseDown(elPath, null) + } else { + console.warn('toggleDataPointSelection: Element not found') + return null + } + + return elPath.node ? elPath.node : null + } + + forceXAxisUpdate(options) { + const w = this.w + const minmax = ['min', 'max'] + + minmax.forEach((a) => { + if (typeof options.xaxis[a] !== 'undefined') { + w.config.xaxis[a] = options.xaxis[a] + w.globals.lastXAxis[a] = options.xaxis[a] + } + }) + + if (options.xaxis.categories && options.xaxis.categories.length) { + w.config.xaxis.categories = options.xaxis.categories + } + + if (w.config.xaxis.convertedCatToNumeric) { + const defaults = new Defaults(options) + options = defaults.convertCatToNumericXaxis(options, this.ctx) + } + return options + } + + forceYAxisUpdate(options) { + const w = this.w + if (w.config.chart.stacked && w.config.chart.stackType === '100%') { + if (Array.isArray(options.yaxis)) { + options.yaxis.forEach((yaxe, index) => { + options.yaxis[index].min = 0 + options.yaxis[index].max = 100 + }) + } else { + options.yaxis.min = 0 + options.yaxis.max = 100 + } + } + return options + } + + /** + * This function reverts the yaxis and xaxis min/max values to what it was when the chart was defined. + * This function fixes an important bug where a user might load a new series after zooming in/out of previous series which resulted in wrong min/max + * Also, this should never be called internally on zoom/pan - the reset should only happen when user calls the updateSeries() function externally + * The function also accepts an object {xaxis, yaxis} which when present is set as the new xaxis/yaxis + */ + revertDefaultAxisMinMax(opts) { + const w = this.w + + let xaxis = w.globals.lastXAxis + let yaxis = w.globals.lastYAxis + + if (opts && opts.xaxis) { + xaxis = opts.xaxis + } + if (opts && opts.yaxis) { + yaxis = opts.yaxis + } + w.config.xaxis.min = xaxis.min + w.config.xaxis.max = xaxis.max + + const getLastYAxis = (index) => { + if (typeof yaxis[index] !== 'undefined') { + w.config.yaxis[index].min = yaxis[index].min + w.config.yaxis[index].max = yaxis[index].max + } + } + + w.config.yaxis.map((yaxe, index) => { + if (w.globals.zoomed) { + // user has zoomed, check the last yaxis + getLastYAxis(index) + } else { + // user hasn't zoomed, check the last yaxis first + if (typeof yaxis[index] !== 'undefined') { + getLastYAxis(index) + } else { + // if last y-axis don't exist, check the original yaxis + if (typeof this.ctx.opts.yaxis[index] !== 'undefined') { + yaxe.min = this.ctx.opts.yaxis[index].min + yaxe.max = this.ctx.opts.yaxis[index].max + } + } + } + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/legend/Helpers.js b/cao_sunyata/static/libs/apexcharts/src/modules/legend/Helpers.js new file mode 100644 index 0000000..e16a600 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/legend/Helpers.js @@ -0,0 +1,296 @@ +import Graphics from '../Graphics' +import Utils from '../../utils/Utils' + +export default class Helpers { + constructor(lgCtx) { + this.w = lgCtx.w + this.lgCtx = lgCtx + } + + getLegendStyles() { + let stylesheet = document.createElement('style') + stylesheet.setAttribute('type', 'text/css') + + const text = ` + + .apexcharts-legend { + display: flex; + overflow: auto; + padding: 0 10px; + } + .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { + flex-wrap: wrap + } + .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { + flex-direction: column; + bottom: 0; + } + .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { + justify-content: flex-start; + } + .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { + justify-content: center; + } + .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { + justify-content: flex-end; + } + .apexcharts-legend-series { + cursor: pointer; + line-height: normal; + } + .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{ + display: flex; + align-items: center; + } + .apexcharts-legend-text { + position: relative; + font-size: 14px; + } + .apexcharts-legend-text *, .apexcharts-legend-marker * { + pointer-events: none; + } + .apexcharts-legend-marker { + position: relative; + display: inline-block; + cursor: pointer; + margin-right: 3px; + border-style: solid; + } + + .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{ + display: inline-block; + } + .apexcharts-legend-series.apexcharts-no-click { + cursor: auto; + } + .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { + display: none !important; + } + .apexcharts-inactive-legend { + opacity: 0.45; + }` + + let rules = document.createTextNode(text) + + stylesheet.appendChild(rules) + + return stylesheet + } + + getLegendBBox() { + const w = this.w + let currLegendsWrap = w.globals.dom.baseEl.querySelector( + '.apexcharts-legend' + ) + let currLegendsWrapRect = currLegendsWrap.getBoundingClientRect() + + let currLegendsWrapWidth = currLegendsWrapRect.width + let currLegendsWrapHeight = currLegendsWrapRect.height + + return { + clwh: currLegendsWrapHeight, + clww: currLegendsWrapWidth + } + } + + appendToForeignObject() { + const gl = this.w.globals + + gl.dom.elLegendForeign = document.createElementNS(gl.SVGNS, 'foreignObject') + + let elForeign = gl.dom.elLegendForeign + + elForeign.setAttribute('x', 0) + elForeign.setAttribute('y', 0) + elForeign.setAttribute('width', gl.svgWidth) + elForeign.setAttribute('height', gl.svgHeight) + gl.dom.elLegendWrap.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml') + + elForeign.appendChild(gl.dom.elLegendWrap) + elForeign.appendChild(this.getLegendStyles()) + + //gl.dom.elGraphical.node.insertAdjacentElement('afterend', elForeign) + // the above line causes issue #1907 + gl.dom.Paper.node.insertBefore(elForeign, gl.dom.elGraphical.node) + } + + toggleDataSeries(seriesCnt, isHidden) { + const w = this.w + if (w.globals.axisCharts || w.config.chart.type === 'radialBar') { + w.globals.resized = true // we don't want initial animations again + + let seriesEl = null + + let realIndex = null + + // yes, make it null. 1 series will rise at a time + w.globals.risingSeries = [] + + if (w.globals.axisCharts) { + seriesEl = w.globals.dom.baseEl.querySelector( + `.apexcharts-series[data\\:realIndex='${seriesCnt}']` + ) + realIndex = parseInt(seriesEl.getAttribute('data:realIndex'), 10) + } else { + seriesEl = w.globals.dom.baseEl.querySelector( + `.apexcharts-series[rel='${seriesCnt + 1}']` + ) + realIndex = parseInt(seriesEl.getAttribute('rel'), 10) - 1 + } + + if (isHidden) { + const seriesToMakeVisible = [ + { + cs: w.globals.collapsedSeries, + csi: w.globals.collapsedSeriesIndices + }, + { + cs: w.globals.ancillaryCollapsedSeries, + csi: w.globals.ancillaryCollapsedSeriesIndices + } + ] + seriesToMakeVisible.forEach((r) => { + this.riseCollapsedSeries(r.cs, r.csi, realIndex) + }) + } else { + this.hideSeries({ seriesEl, realIndex }) + } + } else { + // for non-axis charts i.e pie / donuts + let seriesEl = w.globals.dom.Paper.select( + ` .apexcharts-series[rel='${seriesCnt + 1}'] path` + ) + + const type = w.config.chart.type + if (type === 'pie' || type === 'polarArea' || type === 'donut') { + let dataLabels = w.config.plotOptions.pie.donut.labels + + const graphics = new Graphics(this.lgCtx.ctx) + graphics.pathMouseDown(seriesEl.members[0], null) + this.lgCtx.ctx.pie.printDataLabelsInner( + seriesEl.members[0].node, + dataLabels + ) + } + + seriesEl.fire('click') + } + } + + hideSeries({ seriesEl, realIndex }) { + const w = this.w + + let series = Utils.clone(w.config.series) + + if (w.globals.axisCharts) { + let shouldNotHideYAxis = false + + if ( + w.config.yaxis[realIndex] && + w.config.yaxis[realIndex].show && + w.config.yaxis[realIndex].showAlways + ) { + shouldNotHideYAxis = true + if (w.globals.ancillaryCollapsedSeriesIndices.indexOf(realIndex) < 0) { + w.globals.ancillaryCollapsedSeries.push({ + index: realIndex, + data: series[realIndex].data.slice(), + type: seriesEl.parentNode.className.baseVal.split('-')[1] + }) + w.globals.ancillaryCollapsedSeriesIndices.push(realIndex) + } + } + + if (!shouldNotHideYAxis) { + w.globals.collapsedSeries.push({ + index: realIndex, + data: series[realIndex].data.slice(), + type: seriesEl.parentNode.className.baseVal.split('-')[1] + }) + w.globals.collapsedSeriesIndices.push(realIndex) + + let removeIndexOfRising = w.globals.risingSeries.indexOf(realIndex) + + w.globals.risingSeries.splice(removeIndexOfRising, 1) + } + } else { + w.globals.collapsedSeries.push({ + index: realIndex, + data: series[realIndex] + }) + w.globals.collapsedSeriesIndices.push(realIndex) + } + + let seriesChildren = seriesEl.childNodes + for (let sc = 0; sc < seriesChildren.length; sc++) { + if ( + seriesChildren[sc].classList.contains('apexcharts-series-markers-wrap') + ) { + if (seriesChildren[sc].classList.contains('apexcharts-hide')) { + seriesChildren[sc].classList.remove('apexcharts-hide') + } else { + seriesChildren[sc].classList.add('apexcharts-hide') + } + } + } + + w.globals.allSeriesCollapsed = + w.globals.collapsedSeries.length === w.config.series.length + + series = this._getSeriesBasedOnCollapsedState(series) + this.lgCtx.ctx.updateHelpers._updateSeries( + series, + w.config.chart.animations.dynamicAnimation.enabled + ) + } + + riseCollapsedSeries(collapsedSeries, seriesIndices, realIndex) { + const w = this.w + let series = Utils.clone(w.config.series) + + if (collapsedSeries.length > 0) { + for (let c = 0; c < collapsedSeries.length; c++) { + if (collapsedSeries[c].index === realIndex) { + if (w.globals.axisCharts) { + series[realIndex].data = collapsedSeries[c].data.slice() + collapsedSeries.splice(c, 1) + seriesIndices.splice(c, 1) + w.globals.risingSeries.push(realIndex) + } else { + series[realIndex] = collapsedSeries[c].data + collapsedSeries.splice(c, 1) + seriesIndices.splice(c, 1) + w.globals.risingSeries.push(realIndex) + } + } + } + + series = this._getSeriesBasedOnCollapsedState(series) + + this.lgCtx.ctx.updateHelpers._updateSeries( + series, + w.config.chart.animations.dynamicAnimation.enabled + ) + } + } + + _getSeriesBasedOnCollapsedState(series) { + const w = this.w + + if (w.globals.axisCharts) { + series.forEach((s, sI) => { + if (w.globals.collapsedSeriesIndices.indexOf(sI) > -1) { + series[sI].data = [] + } + }) + } else { + series.forEach((s, sI) => { + if (w.globals.collapsedSeriesIndices.indexOf(sI) > -1) { + series[sI] = 0 + } + }) + } + + return series + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/legend/Legend.js b/cao_sunyata/static/libs/apexcharts/src/modules/legend/Legend.js new file mode 100644 index 0000000..9fe8fec --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/legend/Legend.js @@ -0,0 +1,481 @@ +import CoreUtils from '../CoreUtils' +import Dimensions from '../dimensions/Dimensions' +import Graphics from '../Graphics' +import Series from '../Series' +import Utils from '../../utils/Utils' +import Helpers from './Helpers' + +/** + * ApexCharts Legend Class to draw legend. + * + * @module Legend + **/ + +class Legend { + constructor(ctx, opts) { + this.ctx = ctx + this.w = ctx.w + + this.onLegendClick = this.onLegendClick.bind(this) + this.onLegendHovered = this.onLegendHovered.bind(this) + + this.isBarsDistributed = + this.w.config.chart.type === 'bar' && + this.w.config.plotOptions.bar.distributed && + this.w.config.series.length === 1 + + this.legendHelpers = new Helpers(this) + } + + init() { + const w = this.w + + const gl = w.globals + const cnf = w.config + + const showLegendAlways = + (cnf.legend.showForSingleSeries && gl.series.length === 1) || + this.isBarsDistributed || + gl.series.length > 1 + + if ((showLegendAlways || !gl.axisCharts) && cnf.legend.show) { + while (gl.dom.elLegendWrap.firstChild) { + gl.dom.elLegendWrap.removeChild(gl.dom.elLegendWrap.firstChild) + } + + this.drawLegends() + if (!Utils.isIE11()) { + this.legendHelpers.appendToForeignObject() + } else { + // IE11 doesn't supports foreignObject, hence append it to + document + .getElementsByTagName('head')[0] + .appendChild(this.legendHelpers.getLegendStyles()) + } + + if (cnf.legend.position === 'bottom' || cnf.legend.position === 'top') { + this.legendAlignHorizontal() + } else if ( + cnf.legend.position === 'right' || + cnf.legend.position === 'left' + ) { + this.legendAlignVertical() + } + } + } + + drawLegends() { + let me = this + let w = this.w + + let fontFamily = w.config.legend.fontFamily + + let legendNames = w.globals.seriesNames + let fillcolor = w.globals.colors.slice() + + if (w.config.chart.type === 'heatmap') { + const ranges = w.config.plotOptions.heatmap.colorScale.ranges + legendNames = ranges.map((colorScale) => { + return colorScale.name + ? colorScale.name + : colorScale.from + ' - ' + colorScale.to + }) + fillcolor = ranges.map((color) => color.color) + } else if (this.isBarsDistributed) { + legendNames = w.globals.labels.slice() + } + + if (w.config.legend.customLegendItems.length) { + legendNames = w.config.legend.customLegendItems + } + let legendFormatter = w.globals.legendFormatter + + let isLegendInversed = w.config.legend.inverseOrder + + for ( + let i = isLegendInversed ? legendNames.length - 1 : 0; + isLegendInversed ? i >= 0 : i <= legendNames.length - 1; + isLegendInversed ? i-- : i++ + ) { + let text = legendFormatter(legendNames[i], { seriesIndex: i, w }) + + let collapsedSeries = false + let ancillaryCollapsedSeries = false + if (w.globals.collapsedSeries.length > 0) { + for (let c = 0; c < w.globals.collapsedSeries.length; c++) { + if (w.globals.collapsedSeries[c].index === i) { + collapsedSeries = true + } + } + } + + if (w.globals.ancillaryCollapsedSeriesIndices.length > 0) { + for ( + let c = 0; + c < w.globals.ancillaryCollapsedSeriesIndices.length; + c++ + ) { + if (w.globals.ancillaryCollapsedSeriesIndices[c] === i) { + ancillaryCollapsedSeries = true + } + } + } + + let elMarker = document.createElement('span') + elMarker.classList.add('apexcharts-legend-marker') + + let mOffsetX = w.config.legend.markers.offsetX + let mOffsetY = w.config.legend.markers.offsetY + let mHeight = w.config.legend.markers.height + let mWidth = w.config.legend.markers.width + let mBorderWidth = w.config.legend.markers.strokeWidth + let mBorderColor = w.config.legend.markers.strokeColor + let mBorderRadius = w.config.legend.markers.radius + + // todo - untested code below + // if (Array.isArray(w.config.legend.markers.shape)) { + // } else { + // if (w.config.legend.markers.shape !== 'circle') { + // mBorderRadius = 1 + // } + // } + + let mStyle = elMarker.style + + mStyle.background = fillcolor[i] + mStyle.color = fillcolor[i] + mStyle.setProperty('background', fillcolor[i], 'important') + + // override fill color with custom legend.markers.fillColors + if ( + w.config.legend.markers.fillColors && + w.config.legend.markers.fillColors[i] + ) { + mStyle.background = w.config.legend.markers.fillColors[i] + } + + // override with data color + if (w.globals.seriesColors[i] !== undefined) { + mStyle.background = w.globals.seriesColors[i] + mStyle.color = w.globals.seriesColors[i] + } + + mStyle.height = Array.isArray(mHeight) + ? parseFloat(mHeight[i]) + 'px' + : parseFloat(mHeight) + 'px' + mStyle.width = Array.isArray(mWidth) + ? parseFloat(mWidth[i]) + 'px' + : parseFloat(mWidth) + 'px' + mStyle.left = + (Array.isArray(mOffsetX) + ? parseFloat(mOffsetX[i]) + : parseFloat(mOffsetX)) + 'px' + mStyle.top = + (Array.isArray(mOffsetY) + ? parseFloat(mOffsetY[i]) + : parseFloat(mOffsetY)) + 'px' + mStyle.borderWidth = Array.isArray(mBorderWidth) + ? mBorderWidth[i] + : mBorderWidth + mStyle.borderColor = Array.isArray(mBorderColor) + ? mBorderColor[i] + : mBorderColor + mStyle.borderRadius = Array.isArray(mBorderRadius) + ? parseFloat(mBorderRadius[i]) + 'px' + : parseFloat(mBorderRadius) + 'px' + + if (w.config.legend.markers.customHTML) { + if (Array.isArray(w.config.legend.markers.customHTML)) { + if (w.config.legend.markers.customHTML[i]) { + elMarker.innerHTML = w.config.legend.markers.customHTML[i]() + } + } else { + elMarker.innerHTML = w.config.legend.markers.customHTML() + } + } + + Graphics.setAttrs(elMarker, { + rel: i + 1, + 'data:collapsed': collapsedSeries || ancillaryCollapsedSeries + }) + + if (collapsedSeries || ancillaryCollapsedSeries) { + elMarker.classList.add('apexcharts-inactive-legend') + } + + let elLegend = document.createElement('div') + + let elLegendText = document.createElement('span') + elLegendText.classList.add('apexcharts-legend-text') + elLegendText.innerHTML = Array.isArray(text) ? text.join(' ') : text + + let textColor = w.config.legend.labels.useSeriesColors + ? w.globals.colors[i] + : w.config.legend.labels.colors + + if (!textColor) { + textColor = w.config.chart.foreColor + } + + elLegendText.style.color = textColor + + elLegendText.style.fontSize = parseFloat(w.config.legend.fontSize) + 'px' + elLegendText.style.fontWeight = w.config.legend.fontWeight + elLegendText.style.fontFamily = fontFamily || w.config.chart.fontFamily + + Graphics.setAttrs(elLegendText, { + rel: i + 1, + i, + 'data:default-text': encodeURIComponent(text), + 'data:collapsed': collapsedSeries || ancillaryCollapsedSeries + }) + + elLegend.appendChild(elMarker) + elLegend.appendChild(elLegendText) + + const coreUtils = new CoreUtils(this.ctx) + if (!w.config.legend.showForZeroSeries) { + const total = coreUtils.getSeriesTotalByIndex(i) + + if ( + total === 0 && + coreUtils.seriesHaveSameValues(i) && + !coreUtils.isSeriesNull(i) && + w.globals.collapsedSeriesIndices.indexOf(i) === -1 && + w.globals.ancillaryCollapsedSeriesIndices.indexOf(i) === -1 + ) { + elLegend.classList.add('apexcharts-hidden-zero-series') + } + } + + if (!w.config.legend.showForNullSeries) { + if ( + coreUtils.isSeriesNull(i) && + w.globals.collapsedSeriesIndices.indexOf(i) === -1 && + w.globals.ancillaryCollapsedSeriesIndices.indexOf(i) === -1 + ) { + elLegend.classList.add('apexcharts-hidden-null-series') + } + } + + w.globals.dom.elLegendWrap.appendChild(elLegend) + w.globals.dom.elLegendWrap.classList.add( + `apexcharts-align-${w.config.legend.horizontalAlign}` + ) + w.globals.dom.elLegendWrap.classList.add( + 'apx-legend-position-' + w.config.legend.position + ) + + elLegend.classList.add('apexcharts-legend-series') + elLegend.style.margin = `${w.config.legend.itemMargin.vertical}px ${w.config.legend.itemMargin.horizontal}px` + w.globals.dom.elLegendWrap.style.width = w.config.legend.width + ? w.config.legend.width + 'px' + : '' + w.globals.dom.elLegendWrap.style.height = w.config.legend.height + ? w.config.legend.height + 'px' + : '' + + Graphics.setAttrs(elLegend, { + rel: i + 1, + seriesName: Utils.escapeString(legendNames[i]), + 'data:collapsed': collapsedSeries || ancillaryCollapsedSeries + }) + + if (collapsedSeries || ancillaryCollapsedSeries) { + elLegend.classList.add('apexcharts-inactive-legend') + } + + if (!w.config.legend.onItemClick.toggleDataSeries) { + elLegend.classList.add('apexcharts-no-click') + } + } + + w.globals.dom.elWrap.addEventListener('click', me.onLegendClick, true) + + if ( + w.config.legend.onItemHover.highlightDataSeries && + w.config.legend.customLegendItems.length === 0 + ) { + w.globals.dom.elWrap.addEventListener( + 'mousemove', + me.onLegendHovered, + true + ) + w.globals.dom.elWrap.addEventListener( + 'mouseout', + me.onLegendHovered, + true + ) + } + } + + setLegendWrapXY(offsetX, offsetY) { + let w = this.w + + let elLegendWrap = w.globals.dom.baseEl.querySelector('.apexcharts-legend') + + const legendRect = elLegendWrap.getBoundingClientRect() + + let x = 0 + let y = 0 + + if (w.config.legend.position === 'bottom') { + y = y + (w.globals.svgHeight - legendRect.height / 2) + } else if (w.config.legend.position === 'top') { + const dim = new Dimensions(this.ctx) + const titleH = dim.dimHelpers.getTitleSubtitleCoords('title').height + const subtitleH = dim.dimHelpers.getTitleSubtitleCoords('subtitle').height + + y = + y + + (titleH > 0 ? titleH - 10 : 0) + + (subtitleH > 0 ? subtitleH - 10 : 0) + } + + elLegendWrap.style.position = 'absolute' + + x = x + offsetX + w.config.legend.offsetX + y = y + offsetY + w.config.legend.offsetY + + elLegendWrap.style.left = x + 'px' + elLegendWrap.style.top = y + 'px' + + if (w.config.legend.position === 'bottom') { + elLegendWrap.style.top = 'auto' + elLegendWrap.style.bottom = 5 - w.config.legend.offsetY + 'px' + } else if (w.config.legend.position === 'right') { + elLegendWrap.style.left = 'auto' + elLegendWrap.style.right = 25 + w.config.legend.offsetX + 'px' + } + + const fixedHeigthWidth = ['width', 'height'] + fixedHeigthWidth.forEach((hw) => { + if (elLegendWrap.style[hw]) { + elLegendWrap.style[hw] = parseInt(w.config.legend[hw], 10) + 'px' + } + }) + } + + legendAlignHorizontal() { + let w = this.w + + let elLegendWrap = w.globals.dom.baseEl.querySelector('.apexcharts-legend') + + elLegendWrap.style.right = 0 + + let lRect = this.legendHelpers.getLegendBBox() + + let dimensions = new Dimensions(this.ctx) + let titleRect = dimensions.dimHelpers.getTitleSubtitleCoords('title') + let subtitleRect = dimensions.dimHelpers.getTitleSubtitleCoords('subtitle') + + let offsetX = 20 + let offsetY = 0 + + // the whole legend box is set to bottom + if (w.config.legend.position === 'bottom') { + offsetY = -lRect.clwh / 1.8 + } else if (w.config.legend.position === 'top') { + offsetY = + titleRect.height + + subtitleRect.height + + w.config.title.margin + + w.config.subtitle.margin - + 10 + } + + this.setLegendWrapXY(offsetX, offsetY) + } + + legendAlignVertical() { + let w = this.w + + let lRect = this.legendHelpers.getLegendBBox() + + let offsetY = 20 + let offsetX = 0 + + if (w.config.legend.position === 'left') { + offsetX = 20 + } + + if (w.config.legend.position === 'right') { + offsetX = w.globals.svgWidth - lRect.clww - 10 + } + + this.setLegendWrapXY(offsetX, offsetY) + } + + onLegendHovered(e) { + const w = this.w + + const hoverOverLegend = + e.target.classList.contains('apexcharts-legend-text') || + e.target.classList.contains('apexcharts-legend-marker') + + if (w.config.chart.type !== 'heatmap' && !this.isBarsDistributed) { + if ( + !e.target.classList.contains('apexcharts-inactive-legend') && + hoverOverLegend + ) { + let series = new Series(this.ctx) + series.toggleSeriesOnHover(e, e.target) + } + } else { + // for heatmap handling + if (hoverOverLegend) { + let seriesCnt = parseInt(e.target.getAttribute('rel'), 10) - 1 + this.ctx.events.fireEvent('legendHover', [this.ctx, seriesCnt, this.w]) + + let series = new Series(this.ctx) + series.highlightRangeInSeries(e, e.target) + } + } + } + + onLegendClick(e) { + const w = this.w + + if (w.config.legend.customLegendItems.length) return + + if ( + e.target.classList.contains('apexcharts-legend-text') || + e.target.classList.contains('apexcharts-legend-marker') + ) { + let seriesCnt = parseInt(e.target.getAttribute('rel'), 10) - 1 + let isHidden = e.target.getAttribute('data:collapsed') === 'true' + + const legendClick = this.w.config.chart.events.legendClick + if (typeof legendClick === 'function') { + legendClick(this.ctx, seriesCnt, this.w) + } + + this.ctx.events.fireEvent('legendClick', [this.ctx, seriesCnt, this.w]) + + const markerClick = this.w.config.legend.markers.onClick + if ( + typeof markerClick === 'function' && + e.target.classList.contains('apexcharts-legend-marker') + ) { + markerClick(this.ctx, seriesCnt, this.w) + this.ctx.events.fireEvent('legendMarkerClick', [ + this.ctx, + seriesCnt, + this.w + ]) + } + + // for now - just prevent click on heatmap legend - and allow hover only + const clickAllowed = + w.config.chart.type !== 'treemap' && + w.config.chart.type !== 'heatmap' && + !this.isBarsDistributed + + if (clickAllowed && w.config.legend.onItemClick.toggleDataSeries) { + this.legendHelpers.toggleDataSeries(seriesCnt, isHidden) + } + } + } +} + +export default Legend diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/settings/Config.js b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Config.js new file mode 100644 index 0000000..5fc677f --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Config.js @@ -0,0 +1,345 @@ +import Defaults from './Defaults' +import Utils from './../../utils/Utils' +import Options from './Options' + +/** + * ApexCharts Config Class for extending user options with pre-defined ApexCharts config. + * + * @module Config + **/ +export default class Config { + constructor(opts) { + this.opts = opts + } + + init({ responsiveOverride }) { + let opts = this.opts + let options = new Options() + let defaults = new Defaults(opts) + + this.chartType = opts.chart.type + + if (this.chartType === 'histogram') { + // technically, a histogram can be drawn by a column chart with no spaces in between + opts.chart.type = 'bar' + opts = Utils.extend( + { + plotOptions: { + bar: { + columnWidth: '99.99%' + } + } + }, + opts + ) + } + + opts = this.extendYAxis(opts) + opts = this.extendAnnotations(opts) + + let config = options.init() + let newDefaults = {} + if (opts && typeof opts === 'object') { + let chartDefaults = {} + const chartTypes = [ + 'line', + 'area', + 'bar', + 'candlestick', + 'boxPlot', + 'rangeBar', + 'histogram', + 'bubble', + 'scatter', + 'heatmap', + 'treemap', + 'pie', + 'polarArea', + 'donut', + 'radar', + 'radialBar' + ] + + if (chartTypes.indexOf(opts.chart.type) !== -1) { + chartDefaults = defaults[opts.chart.type]() + } else { + chartDefaults = defaults.line() + } + + if (opts.chart.brush && opts.chart.brush.enabled) { + chartDefaults = defaults.brush(chartDefaults) + } + + if (opts.chart.stacked && opts.chart.stackType === '100%') { + opts = defaults.stacked100(opts) + } + + // If user has specified a dark theme, make the tooltip dark too + this.checkForDarkTheme(window.Apex) // check global window Apex options + this.checkForDarkTheme(opts) // check locally passed options + + opts.xaxis = opts.xaxis || window.Apex.xaxis || {} + + // an important boolean needs to be set here + // otherwise all the charts will have this flag set to true window.Apex.xaxis is set globally + if (!responsiveOverride) { + opts.xaxis.convertedCatToNumeric = false + } + + opts = this.checkForCatToNumericXAxis(this.chartType, chartDefaults, opts) + + if ( + (opts.chart.sparkline && opts.chart.sparkline.enabled) || + (window.Apex.chart && + window.Apex.chart.sparkline && + window.Apex.chart.sparkline.enabled) + ) { + chartDefaults = defaults.sparkline(chartDefaults) + } + newDefaults = Utils.extend(config, chartDefaults) + } + + // config should cascade in this fashion + // default-config < global-apex-variable-config < user-defined-config + + // get GLOBALLY defined options and merge with the default config + let mergedWithDefaultConfig = Utils.extend(newDefaults, window.Apex) + + // get the merged config and extend with user defined config + config = Utils.extend(mergedWithDefaultConfig, opts) + + // some features are not supported. those mismatches should be handled + config = this.handleUserInputErrors(config) + + return config + } + + checkForCatToNumericXAxis(chartType, chartDefaults, opts) { + let defaults = new Defaults(opts) + + const isBarHorizontal = + (chartType === 'bar' || chartType === 'boxPlot') && + opts.plotOptions && + opts.plotOptions.bar && + opts.plotOptions.bar.horizontal + + const unsupportedZoom = + chartType === 'pie' || + chartType === 'polarArea' || + chartType === 'donut' || + chartType === 'radar' || + chartType === 'radialBar' || + chartType === 'heatmap' + + const notNumericXAxis = + opts.xaxis.type !== 'datetime' && opts.xaxis.type !== 'numeric' + + let tickPlacement = opts.xaxis.tickPlacement + ? opts.xaxis.tickPlacement + : chartDefaults.xaxis && chartDefaults.xaxis.tickPlacement + if ( + !isBarHorizontal && + !unsupportedZoom && + notNumericXAxis && + tickPlacement !== 'between' + ) { + opts = defaults.convertCatToNumeric(opts) + } + + return opts + } + + extendYAxis(opts, w) { + let options = new Options() + + if ( + typeof opts.yaxis === 'undefined' || + !opts.yaxis || + (Array.isArray(opts.yaxis) && opts.yaxis.length === 0) + ) { + opts.yaxis = {} + } + + // extend global yaxis config (only if object is provided / not an array) + if ( + opts.yaxis.constructor !== Array && + window.Apex.yaxis && + window.Apex.yaxis.constructor !== Array + ) { + opts.yaxis = Utils.extend(opts.yaxis, window.Apex.yaxis) + } + + // as we can't extend nested object's array with extend, we need to do it first + // user can provide either an array or object in yaxis config + if (opts.yaxis.constructor !== Array) { + // convert the yaxis to array if user supplied object + opts.yaxis = [Utils.extend(options.yAxis, opts.yaxis)] + } else { + opts.yaxis = Utils.extendArray(opts.yaxis, options.yAxis) + } + + let isLogY = false + opts.yaxis.forEach((y) => { + if (y.logarithmic) { + isLogY = true + } + }) + + let series = opts.series + if (w && !series) { + series = w.config.series + } + + // A logarithmic chart works correctly when each series has a corresponding y-axis + // If this is not the case, we manually create yaxis for multi-series log chart + if (isLogY && series.length !== opts.yaxis.length && series.length) { + opts.yaxis = series.map((s, i) => { + if (!s.name) { + series[i].name = `series-${i + 1}` + } + if (opts.yaxis[i]) { + opts.yaxis[i].seriesName = series[i].name + return opts.yaxis[i] + } else { + const newYaxis = Utils.extend(options.yAxis, opts.yaxis[0]) + newYaxis.show = false + return newYaxis + } + }) + } + + if (isLogY && series.length > 1 && series.length !== opts.yaxis.length) { + console.warn( + 'A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both.' + ) + } + return opts + } + + // annotations also accepts array, so we need to extend them manually + extendAnnotations(opts) { + if (typeof opts.annotations === 'undefined') { + opts.annotations = {} + opts.annotations.yaxis = [] + opts.annotations.xaxis = [] + opts.annotations.points = [] + } + + opts = this.extendYAxisAnnotations(opts) + opts = this.extendXAxisAnnotations(opts) + opts = this.extendPointAnnotations(opts) + + return opts + } + + extendYAxisAnnotations(opts) { + let options = new Options() + + opts.annotations.yaxis = Utils.extendArray( + typeof opts.annotations.yaxis !== 'undefined' + ? opts.annotations.yaxis + : [], + options.yAxisAnnotation + ) + return opts + } + + extendXAxisAnnotations(opts) { + let options = new Options() + + opts.annotations.xaxis = Utils.extendArray( + typeof opts.annotations.xaxis !== 'undefined' + ? opts.annotations.xaxis + : [], + options.xAxisAnnotation + ) + return opts + } + extendPointAnnotations(opts) { + let options = new Options() + + opts.annotations.points = Utils.extendArray( + typeof opts.annotations.points !== 'undefined' + ? opts.annotations.points + : [], + options.pointAnnotation + ) + return opts + } + + checkForDarkTheme(opts) { + if (opts.theme && opts.theme.mode === 'dark') { + if (!opts.tooltip) { + opts.tooltip = {} + } + if (opts.tooltip.theme !== 'light') { + opts.tooltip.theme = 'dark' + } + + if (!opts.chart.foreColor) { + opts.chart.foreColor = '#f6f7f8' + } + + if (!opts.chart.background) { + opts.chart.background = '#424242' + } + + if (!opts.theme.palette) { + opts.theme.palette = 'palette4' + } + } + } + + handleUserInputErrors(opts) { + let config = opts + // conflicting tooltip option. intersect makes sure to focus on 1 point at a time. Shared cannot be used along with it + if (config.tooltip.shared && config.tooltip.intersect) { + throw new Error( + 'tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.' + ) + } + + if (config.chart.type === 'bar' && config.plotOptions.bar.horizontal) { + // No multiple yaxis for bars + if (config.yaxis.length > 1) { + throw new Error( + 'Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false' + ) + } + + // if yaxis is reversed in horizontal bar chart, you should draw the y-axis on right side + if (config.yaxis[0].reversed) { + config.yaxis[0].opposite = true + } + + config.xaxis.tooltip.enabled = false // no xaxis tooltip for horizontal bar + config.yaxis[0].tooltip.enabled = false // no xaxis tooltip for horizontal bar + config.chart.zoom.enabled = false // no zooming for horz bars + } + + if (config.chart.type === 'bar' || config.chart.type === 'rangeBar') { + if (config.tooltip.shared) { + if ( + config.xaxis.crosshairs.width === 'barWidth' && + config.series.length > 1 + ) { + config.xaxis.crosshairs.width = 'tickWidth' + } + } + } + + if ( + config.chart.type === 'candlestick' || + config.chart.type === 'boxPlot' + ) { + if (config.yaxis[0].reversed) { + console.warn( + `Reversed y-axis in ${config.chart.type} chart is not supported.` + ) + config.yaxis[0].reversed = false + } + } + + return config + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/settings/Defaults.js b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Defaults.js new file mode 100644 index 0000000..5858a0e --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Defaults.js @@ -0,0 +1,857 @@ +import Utils from '../../utils/Utils' +import RangeBar from '../../charts/RangeBar' + +/** + * ApexCharts Default Class for setting default options for all chart types. + * + * @module Defaults + **/ + +export default class Defaults { + constructor(opts) { + this.opts = opts + } + + line() { + return { + chart: { + animations: { + easing: 'swing' + } + }, + dataLabels: { + enabled: false + }, + stroke: { + width: 5, + curve: 'straight' + }, + markers: { + size: 0, + hover: { + sizeOffset: 6 + } + }, + xaxis: { + crosshairs: { + width: 1 + } + } + } + } + + sparkline(defaults) { + this.opts.yaxis[0].show = false + this.opts.yaxis[0].title.text = '' + this.opts.yaxis[0].axisBorder.show = false + this.opts.yaxis[0].axisTicks.show = false + this.opts.yaxis[0].floating = true + + const ret = { + grid: { + show: false, + padding: { + left: 0, + right: 0, + top: 0, + bottom: 0 + } + }, + legend: { + show: false + }, + xaxis: { + labels: { + show: false + }, + tooltip: { + enabled: false + }, + axisBorder: { + show: false + }, + axisTicks: { + show: false + } + }, + chart: { + toolbar: { + show: false + }, + zoom: { + enabled: false + } + }, + dataLabels: { + enabled: false + } + } + + return Utils.extend(defaults, ret) + } + + bar() { + return { + chart: { + stacked: false, + animations: { + easing: 'swing' + } + }, + plotOptions: { + bar: { + dataLabels: { + position: 'center' + } + } + }, + dataLabels: { + style: { + colors: ['#fff'] + }, + background: { + enabled: false + } + }, + stroke: { + width: 0, + lineCap: 'round' + }, + fill: { + opacity: 0.85 + }, + legend: { + markers: { + shape: 'square', + radius: 2, + size: 8 + } + }, + tooltip: { + shared: false, + intersect: true + }, + xaxis: { + tooltip: { + enabled: false + }, + tickPlacement: 'between', + crosshairs: { + width: 'barWidth', + position: 'back', + fill: { + type: 'gradient' + }, + dropShadow: { + enabled: false + }, + stroke: { + width: 0 + } + } + } + } + } + + candlestick() { + return { + stroke: { + width: 1, + colors: ['#333'] + }, + fill: { + opacity: 1 + }, + dataLabels: { + enabled: false + }, + tooltip: { + shared: true, + custom: ({ seriesIndex, dataPointIndex, w }) => { + return this._getBoxTooltip( + w, + seriesIndex, + dataPointIndex, + ['Open', 'High', '', 'Low', 'Close'], + 'candlestick' + ) + } + }, + states: { + active: { + filter: { + type: 'none' + } + } + }, + xaxis: { + crosshairs: { + width: 1 + } + } + } + } + + boxPlot() { + return { + chart: { + animations: { + dynamicAnimation: { + enabled: false + } + } + }, + stroke: { + width: 1, + colors: ['#24292e'] + }, + dataLabels: { + enabled: false + }, + tooltip: { + shared: true, + custom: ({ seriesIndex, dataPointIndex, w }) => { + return this._getBoxTooltip( + w, + seriesIndex, + dataPointIndex, + ['Minimum', 'Q1', 'Median', 'Q3', 'Maximum'], + 'boxPlot' + ) + } + }, + markers: { + size: 5, + strokeWidth: 1, + strokeColors: '#111' + }, + xaxis: { + crosshairs: { + width: 1 + } + } + } + } + + rangeBar() { + const handleTimelineTooltip = (opts) => { + const rangeCtx = new RangeBar(opts.ctx, null) + + const { + color, + seriesName, + ylabel, + startVal, + endVal + } = rangeCtx.getTooltipValues(opts) + return rangeCtx.buildCustomTooltipHTML({ + color, + seriesName, + ylabel, + start: startVal, + end: endVal + }) + } + + const handleRangeColumnTooltip = (opts) => { + const rangeCtx = new RangeBar(opts.ctx, null) + + const { + color, + seriesName, + ylabel, + start, + end + } = rangeCtx.getTooltipValues(opts) + return rangeCtx.buildCustomTooltipHTML({ + color, + seriesName, + ylabel, + start, + end + }) + } + return { + stroke: { + width: 0, + lineCap: 'square' + }, + plotOptions: { + bar: { + borderRadius: 0, + dataLabels: { + position: 'center' + } + } + }, + dataLabels: { + enabled: false, + formatter(val, { ctx, seriesIndex, dataPointIndex, w }) { + const start = w.globals.seriesRangeStart[seriesIndex][dataPointIndex] + const end = w.globals.seriesRangeEnd[seriesIndex][dataPointIndex] + return end - start + }, + background: { + enabled: false + }, + style: { + colors: ['#fff'] + } + }, + tooltip: { + shared: false, + followCursor: true, + custom(opts) { + if ( + opts.w.config.plotOptions && + opts.w.config.plotOptions.bar && + opts.w.config.plotOptions.bar.horizontal + ) { + return handleTimelineTooltip(opts) + } else { + return handleRangeColumnTooltip(opts) + } + } + }, + xaxis: { + tickPlacement: 'between', + tooltip: { + enabled: false + }, + crosshairs: { + stroke: { + width: 0 + } + } + } + } + } + + area() { + return { + stroke: { + width: 4, + fill: { + type: 'solid', + gradient: { + inverseColors: false, + shade: 'light', + type: 'vertical', + opacityFrom: 0.65, + opacityTo: 0.5, + stops: [0, 100, 100] + } + } + }, + fill: { + type: 'gradient', + gradient: { + inverseColors: false, + shade: 'light', + type: 'vertical', + opacityFrom: 0.65, + opacityTo: 0.5, + stops: [0, 100, 100] + } + }, + markers: { + size: 0, + hover: { + sizeOffset: 6 + } + }, + tooltip: { + followCursor: false + } + } + } + + brush(defaults) { + const ret = { + chart: { + toolbar: { + autoSelected: 'selection', + show: false + }, + zoom: { + enabled: false + } + }, + dataLabels: { + enabled: false + }, + stroke: { + width: 1 + }, + tooltip: { + enabled: false + }, + xaxis: { + tooltip: { + enabled: false + } + } + } + + return Utils.extend(defaults, ret) + } + + stacked100(opts) { + opts.dataLabels = opts.dataLabels || {} + opts.dataLabels.formatter = opts.dataLabels.formatter || undefined + const existingDataLabelFormatter = opts.dataLabels.formatter + + opts.yaxis.forEach((yaxe, index) => { + opts.yaxis[index].min = 0 + opts.yaxis[index].max = 100 + }) + + const isBar = opts.chart.type === 'bar' + + if (isBar) { + opts.dataLabels.formatter = + existingDataLabelFormatter || + function(val) { + if (typeof val === 'number') { + return val ? val.toFixed(0) + '%' : val + } + return val + } + } + return opts + } + + // This function removes the left and right spacing in chart for line/area/scatter if xaxis type = category for those charts by converting xaxis = numeric. Numeric/Datetime xaxis prevents the unnecessary spacing in the left/right of the chart area + convertCatToNumeric(opts) { + opts.xaxis.convertedCatToNumeric = true + + return opts + } + + convertCatToNumericXaxis(opts, ctx, cats) { + opts.xaxis.type = 'numeric' + opts.xaxis.labels = opts.xaxis.labels || {} + opts.xaxis.labels.formatter = + opts.xaxis.labels.formatter || + function(val) { + return Utils.isNumber(val) ? Math.floor(val) : val + } + + const defaultFormatter = opts.xaxis.labels.formatter + let labels = + opts.xaxis.categories && opts.xaxis.categories.length + ? opts.xaxis.categories + : opts.labels + + if (cats && cats.length) { + labels = cats.map((c) => { + return Array.isArray(c) ? c : String(c) + }) + } + + if (labels && labels.length) { + opts.xaxis.labels.formatter = function(val) { + return Utils.isNumber(val) + ? defaultFormatter(labels[Math.floor(val) - 1]) + : defaultFormatter(val) + } + } + + opts.xaxis.categories = [] + opts.labels = [] + opts.xaxis.tickAmount = opts.xaxis.tickAmount || 'dataPoints' + return opts + } + + bubble() { + return { + dataLabels: { + style: { + colors: ['#fff'] + } + }, + tooltip: { + shared: false, + intersect: true + }, + xaxis: { + crosshairs: { + width: 0 + } + }, + fill: { + type: 'solid', + gradient: { + shade: 'light', + inverse: true, + shadeIntensity: 0.55, + opacityFrom: 0.4, + opacityTo: 0.8 + } + } + } + } + + scatter() { + return { + dataLabels: { + enabled: false + }, + tooltip: { + shared: false, + intersect: true + }, + markers: { + size: 6, + strokeWidth: 1, + hover: { + sizeOffset: 2 + } + } + } + } + + heatmap() { + return { + chart: { + stacked: false + }, + fill: { + opacity: 1 + }, + dataLabels: { + style: { + colors: ['#fff'] + } + }, + stroke: { + colors: ['#fff'] + }, + tooltip: { + followCursor: true, + marker: { + show: false + }, + x: { + show: false + } + }, + legend: { + position: 'top', + markers: { + shape: 'square', + size: 10, + offsetY: 2 + } + }, + grid: { + padding: { + right: 20 + } + } + } + } + + treemap() { + return { + chart: { + zoom: { + enabled: false + } + }, + dataLabels: { + style: { + fontSize: 14, + fontWeight: 600, + colors: ['#fff'] + } + }, + stroke: { + show: true, + width: 2, + colors: ['#fff'] + }, + legend: { + show: false + }, + fill: { + gradient: { + stops: [0, 100] + } + }, + tooltip: { + followCursor: true, + x: { + show: false + } + }, + grid: { + padding: { + left: 0, + right: 0 + } + }, + xaxis: { + crosshairs: { + show: false + }, + tooltip: { + enabled: false + } + } + } + } + + pie() { + return { + chart: { + toolbar: { + show: false + } + }, + plotOptions: { + pie: { + donut: { + labels: { + show: false + } + } + } + }, + dataLabels: { + formatter(val) { + return val.toFixed(1) + '%' + }, + style: { + colors: ['#fff'] + }, + background: { + enabled: false + }, + dropShadow: { + enabled: true + } + }, + stroke: { + colors: ['#fff'] + }, + fill: { + opacity: 1, + gradient: { + shade: 'light', + stops: [0, 100] + } + }, + tooltip: { + theme: 'dark', + fillSeriesColor: true + }, + legend: { + position: 'right' + } + } + } + + donut() { + return { + chart: { + toolbar: { + show: false + } + }, + dataLabels: { + formatter(val) { + return val.toFixed(1) + '%' + }, + style: { + colors: ['#fff'] + }, + background: { + enabled: false + }, + dropShadow: { + enabled: true + } + }, + stroke: { + colors: ['#fff'] + }, + fill: { + opacity: 1, + gradient: { + shade: 'light', + shadeIntensity: 0.35, + stops: [80, 100], + opacityFrom: 1, + opacityTo: 1 + } + }, + tooltip: { + theme: 'dark', + fillSeriesColor: true + }, + legend: { + position: 'right' + } + } + } + + polarArea() { + this.opts.yaxis[0].tickAmount = this.opts.yaxis[0].tickAmount + ? this.opts.yaxis[0].tickAmount + : 6 + + return { + chart: { + toolbar: { + show: false + } + }, + dataLabels: { + formatter(val) { + return val.toFixed(1) + '%' + }, + enabled: false + }, + stroke: { + show: true, + width: 2 + }, + fill: { + opacity: 0.7 + }, + tooltip: { + theme: 'dark', + fillSeriesColor: true + }, + legend: { + position: 'right' + } + } + } + + radar() { + this.opts.yaxis[0].labels.offsetY = this.opts.yaxis[0].labels.offsetY + ? this.opts.yaxis[0].labels.offsetY + : 6 + + return { + dataLabels: { + enabled: false, + style: { + fontSize: '11px' + } + }, + stroke: { + width: 2 + }, + markers: { + size: 3, + strokeWidth: 1, + strokeOpacity: 1 + }, + fill: { + opacity: 0.2 + }, + tooltip: { + shared: false, + intersect: true, + followCursor: true + }, + grid: { + show: false + }, + xaxis: { + labels: { + formatter: (val) => val, + style: { + colors: ['#a8a8a8'], + fontSize: '11px' + } + }, + tooltip: { + enabled: false + }, + crosshairs: { + show: false + } + } + } + } + + radialBar() { + return { + chart: { + animations: { + dynamicAnimation: { + enabled: true, + speed: 800 + } + }, + toolbar: { + show: false + } + }, + fill: { + gradient: { + shade: 'dark', + shadeIntensity: 0.4, + inverseColors: false, + type: 'diagonal2', + opacityFrom: 1, + opacityTo: 1, + stops: [70, 98, 100] + } + }, + legend: { + show: false, + position: 'right' + }, + tooltip: { + enabled: false, + fillSeriesColor: true + } + } + } + + _getBoxTooltip(w, seriesIndex, dataPointIndex, labels, chartType) { + const o = w.globals.seriesCandleO[seriesIndex][dataPointIndex] + const h = w.globals.seriesCandleH[seriesIndex][dataPointIndex] + const m = w.globals.seriesCandleM[seriesIndex][dataPointIndex] + const l = w.globals.seriesCandleL[seriesIndex][dataPointIndex] + const c = w.globals.seriesCandleC[seriesIndex][dataPointIndex] + + if ( + w.config.series[seriesIndex].type && + w.config.series[seriesIndex].type !== chartType + ) { + return `
+ ${ + w.config.series[seriesIndex].name + ? w.config.series[seriesIndex].name + : 'series-' + (seriesIndex + 1) + }: ${w.globals.series[seriesIndex][dataPointIndex]} +
` + } else { + return ( + `
` + + `
${labels[0]}: ` + + o + + '
' + + `
${labels[1]}: ` + + h + + '
' + + (m + ? `
${labels[2]}: ` + m + '
' + : '') + + `
${labels[3]}: ` + + l + + '
' + + `
${labels[4]}: ` + + c + + '
' + + '
' + ) + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/settings/Globals.js b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Globals.js new file mode 100644 index 0000000..9e161e1 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Globals.js @@ -0,0 +1,226 @@ +import Utils from './../../utils/Utils' + +export default class Globals { + initGlobalVars(gl) { + gl.series = [] // the MAIN series array (y values) + gl.seriesCandleO = [] + gl.seriesCandleH = [] + gl.seriesCandleM = [] + gl.seriesCandleL = [] + gl.seriesCandleC = [] + gl.seriesRangeStart = [] + gl.seriesRangeEnd = [] + gl.seriesRangeBar = [] + gl.seriesPercent = [] + gl.seriesGoals = [] + gl.seriesX = [] + gl.seriesZ = [] + gl.seriesNames = [] + gl.seriesTotals = [] + gl.seriesLog = [] + gl.seriesColors = [] + gl.stackedSeriesTotals = [] + gl.seriesXvalues = [] // we will need this in tooltip (it's x position) + // when we will have unequal x values, we will need + // some way to get x value depending on mouse pointer + gl.seriesYvalues = [] // we will need this when deciding which series + // user hovered on + gl.labels = [] + gl.hasGroups = false + gl.groups = [] + gl.categoryLabels = [] + gl.timescaleLabels = [] + gl.noLabelsProvided = false + gl.resizeTimer = null + gl.selectionResizeTimer = null + gl.delayedElements = [] + gl.pointsArray = [] + gl.dataLabelsRects = [] + gl.isXNumeric = false + gl.xaxisLabelsCount = 0 + gl.skipLastTimelinelabel = false + gl.skipFirstTimelinelabel = false + gl.isDataXYZ = false + gl.isMultiLineX = false + gl.isMultipleYAxis = false + gl.maxY = -Number.MAX_VALUE + gl.minY = Number.MIN_VALUE + gl.minYArr = [] + gl.maxYArr = [] + gl.maxX = -Number.MAX_VALUE + gl.minX = Number.MAX_VALUE + gl.initialMaxX = -Number.MAX_VALUE + gl.initialMinX = Number.MAX_VALUE + gl.maxDate = 0 + gl.minDate = Number.MAX_VALUE + gl.minZ = Number.MAX_VALUE + gl.maxZ = -Number.MAX_VALUE + gl.minXDiff = Number.MAX_VALUE + gl.yAxisScale = [] + gl.xAxisScale = null + gl.xAxisTicksPositions = [] + gl.yLabelsCoords = [] + gl.yTitleCoords = [] + gl.barPadForNumericAxis = 0 + gl.padHorizontal = 0 + gl.xRange = 0 + gl.yRange = [] + gl.zRange = 0 + gl.dataPoints = 0 + gl.xTickAmount = 0 + } + + globalVars(config) { + return { + chartID: null, // chart ID - apexcharts-cuid + cuid: null, // chart ID - random numbers excluding "apexcharts" part + events: { + beforeMount: [], + mounted: [], + updated: [], + clicked: [], + selection: [], + dataPointSelection: [], + zoomed: [], + scrolled: [] + }, + colors: [], + clientX: null, + clientY: null, + fill: { + colors: [] + }, + stroke: { + colors: [] + }, + dataLabels: { + style: { + colors: [] + } + }, + radarPolygons: { + fill: { + colors: [] + } + }, + markers: { + colors: [], + size: config.markers.size, + largestSize: 0 + }, + animationEnded: false, + isTouchDevice: 'ontouchstart' in window || navigator.msMaxTouchPoints, + isDirty: false, // chart has been updated after the initial render. This is different than dataChanged property. isDirty means user manually called some method to update + isExecCalled: false, // whether user updated the chart through the exec method + initialConfig: null, // we will store the first config user has set to go back when user finishes interactions like zooming and come out of it + initialSeries: [], + lastXAxis: [], + lastYAxis: [], + columnSeries: null, + labels: [], // store the text to draw on x axis + // Don't mutate the labels, many things including tooltips depends on it! + timescaleLabels: [], // store the timescaleLabels Labels in another variable + noLabelsProvided: false, // if user didn't provide any categories/labels or x values, fallback to 1,2,3,4... + allSeriesCollapsed: false, + collapsedSeries: [], // when user collapses a series, it goes into this array + collapsedSeriesIndices: [], // this stores the index of the collapsedSeries instead of whole object for quick access + ancillaryCollapsedSeries: [], // when user collapses an "alwaysVisible" series, it goes into this array + ancillaryCollapsedSeriesIndices: [], // this stores the index of the ancillaryCollapsedSeries whose y-axis is always visible + risingSeries: [], // when user re-opens a collapsed series, it goes here + dataFormatXNumeric: false, // boolean value to indicate user has passed numeric x values + capturedSeriesIndex: -1, + capturedDataPointIndex: -1, + selectedDataPoints: [], + goldenPadding: 35, // this value is used at a lot of places for spacing purpose + invalidLogScale: false, // if a user enabled log scale but the data provided is not valid to generate a log scale, turn on this flag + ignoreYAxisIndexes: [], // when series are being collapsed in multiple y axes, ignore certain index + yAxisSameScaleIndices: [], + maxValsInArrayIndex: 0, + radialSize: 0, + selection: undefined, + zoomEnabled: + config.chart.toolbar.autoSelected === 'zoom' && + config.chart.toolbar.tools.zoom && + config.chart.zoom.enabled, + panEnabled: + config.chart.toolbar.autoSelected === 'pan' && + config.chart.toolbar.tools.pan, + selectionEnabled: + config.chart.toolbar.autoSelected === 'selection' && + config.chart.toolbar.tools.selection, + yaxis: null, + mousedown: false, + lastClientPosition: {}, // don't reset this variable this the chart is destroyed. It is used to detect right or left mousemove in panning + visibleXRange: undefined, + yValueDecimal: 0, // are there floating numbers in the series. If yes, this represent the len of the decimals + total: 0, + SVGNS: 'http://www.w3.org/2000/svg', // svg namespace + svgWidth: 0, // the whole svg width + svgHeight: 0, // the whole svg height + noData: false, // whether there is any data to display or not + locale: {}, // the current locale values will be preserved here for global access + dom: {}, // for storing all dom nodes in this particular property + memory: { + methodsToExec: [] + }, + shouldAnimate: true, + skipLastTimelinelabel: false, // when last label is cropped, skip drawing it + skipFirstTimelinelabel: false, // when first label is cropped, skip drawing it + delayedElements: [], // element which appear after animation has finished + axisCharts: true, // chart type = line or area or bar + // (refer them also as plot charts in the code) + isDataXYZ: false, // bool: data was provided in a {[x,y,z]} pattern + resized: false, // bool: user has resized + resizeTimer: null, // timeout function to make a small delay before + // drawing when user resized + comboCharts: false, // bool: whether it's a combination of line/column + dataChanged: false, // bool: has data changed dynamically + previousPaths: [], // array: when data is changed, it will animate from + // previous paths + allSeriesHasEqualX: true, + pointsArray: [], // store the points positions here to draw later on hover + // format is - [[x,y],[x,y]... [x,y]] + dataLabelsRects: [], // store the positions of datalabels to prevent collision + lastDrawnDataLabelsIndexes: [], + hasNullValues: false, // bool: whether series contains null values + easing: null, // function: animation effect to apply + zoomed: false, // whether user has zoomed or not + gridWidth: 0, // drawable width of actual graphs (series paths) + gridHeight: 0, // drawable height of actual graphs (series paths) + rotateXLabels: false, + defaultLabels: false, + xLabelFormatter: undefined, // formatter for x axis labels + yLabelFormatters: [], + xaxisTooltipFormatter: undefined, // formatter for x axis tooltip + ttKeyFormatter: undefined, + ttVal: undefined, + ttZFormatter: undefined, + LINE_HEIGHT_RATIO: 1.618, + xAxisLabelsHeight: 0, + xAxisGroupLabelsHeight: 0, + xAxisLabelsWidth: 0, + yAxisLabelsWidth: 0, + scaleX: 1, + scaleY: 1, + translateX: 0, + translateY: 0, + translateYAxisX: [], + yAxisWidths: [], + translateXAxisY: 0, + translateXAxisX: 0, + tooltip: null + } + } + + init(config) { + let globals = this.globalVars(config) + this.initGlobalVars(globals) + + globals.initialConfig = Utils.extend({}, config) + globals.initialSeries = Utils.clone(config.series) + + globals.lastXAxis = Utils.clone(globals.initialConfig.xaxis) + globals.lastYAxis = Utils.clone(globals.initialConfig.yaxis) + return globals + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/settings/Options.js b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Options.js new file mode 100644 index 0000000..210b50c --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/settings/Options.js @@ -0,0 +1,1082 @@ +/** + * ApexCharts Options for setting the initial configuration of ApexCharts + **/ +import en from './../../locales/en.json' + +export default class Options { + constructor() { + this.yAxis = { + show: true, + showAlways: false, + showForNullSeries: true, + seriesName: undefined, + opposite: false, + reversed: false, + logarithmic: false, + logBase: 10, + tickAmount: undefined, + forceNiceScale: false, + max: undefined, + min: undefined, + floating: false, + decimalsInFloat: undefined, + labels: { + show: true, + minWidth: 0, + maxWidth: 160, + offsetX: 0, + offsetY: 0, + align: undefined, + rotate: 0, + padding: 20, + style: { + colors: [], + fontSize: '11px', + fontWeight: 400, + fontFamily: undefined, + cssClass: '' + }, + formatter: undefined + }, + axisBorder: { + show: false, + color: '#e0e0e0', + width: 1, + offsetX: 0, + offsetY: 0 + }, + axisTicks: { + show: false, + color: '#e0e0e0', + width: 6, + offsetX: 0, + offsetY: 0 + }, + title: { + text: undefined, + rotate: -90, + offsetY: 0, + offsetX: 0, + style: { + color: undefined, + fontSize: '11px', + fontWeight: 900, + fontFamily: undefined, + cssClass: '' + } + }, + tooltip: { + enabled: false, + offsetX: 0 + }, + crosshairs: { + show: true, + position: 'front', + stroke: { + color: '#b6b6b6', + width: 1, + dashArray: 0 + } + } + } + + this.pointAnnotation = { + id: undefined, + x: 0, + y: null, + yAxisIndex: 0, + seriesIndex: 0, + mouseEnter: undefined, + mouseLeave: undefined, + marker: { + size: 4, + fillColor: '#fff', + strokeWidth: 2, + strokeColor: '#333', + shape: 'circle', + offsetX: 0, + offsetY: 0, + radius: 2, + cssClass: '' + }, + label: { + borderColor: '#c2c2c2', + borderWidth: 1, + borderRadius: 2, + text: undefined, + textAnchor: 'middle', + offsetX: 0, + offsetY: 0, + mouseEnter: undefined, + mouseLeave: undefined, + style: { + background: '#fff', + color: undefined, + fontSize: '11px', + fontFamily: undefined, + fontWeight: 400, + cssClass: '', + padding: { + left: 5, + right: 5, + top: 2, + bottom: 2 + } + } + }, + customSVG: { + // this will be deprecated in the next major version as it is going to be replaced with a better alternative below + SVG: undefined, + cssClass: undefined, + offsetX: 0, + offsetY: 0 + }, + image: { + path: undefined, + width: 20, + height: 20, + offsetX: 0, + offsetY: 0 + } + } + + this.yAxisAnnotation = { + id: undefined, + y: 0, + y2: null, + strokeDashArray: 1, + fillColor: '#c2c2c2', + borderColor: '#c2c2c2', + borderWidth: 1, + opacity: 0.3, + offsetX: 0, + offsetY: 0, + width: '100%', + yAxisIndex: 0, + label: { + borderColor: '#c2c2c2', + borderWidth: 1, + borderRadius: 2, + text: undefined, + textAnchor: 'end', + position: 'right', + offsetX: 0, + offsetY: -3, + mouseEnter: undefined, + mouseLeave: undefined, + style: { + background: '#fff', + color: undefined, + fontSize: '11px', + fontFamily: undefined, + fontWeight: 400, + cssClass: '', + padding: { + left: 5, + right: 5, + top: 2, + bottom: 2 + } + } + } + } + + this.xAxisAnnotation = { + id: undefined, + x: 0, + x2: null, + strokeDashArray: 1, + fillColor: '#c2c2c2', + borderColor: '#c2c2c2', + borderWidth: 1, + opacity: 0.3, + offsetX: 0, + offsetY: 0, + label: { + borderColor: '#c2c2c2', + borderWidth: 1, + borderRadius: 2, + text: undefined, + textAnchor: 'middle', + orientation: 'vertical', + position: 'top', + offsetX: 0, + offsetY: 0, + mouseEnter: undefined, + mouseLeave: undefined, + style: { + background: '#fff', + color: undefined, + fontSize: '11px', + fontFamily: undefined, + fontWeight: 400, + cssClass: '', + padding: { + left: 5, + right: 5, + top: 2, + bottom: 2 + } + } + } + } + + this.text = { + x: 0, + y: 0, + text: '', + textAnchor: 'start', + foreColor: undefined, + fontSize: '13px', + fontFamily: undefined, + fontWeight: 400, + appendTo: '.apexcharts-annotations', + backgroundColor: 'transparent', + borderColor: '#c2c2c2', + borderRadius: 0, + borderWidth: 0, + paddingLeft: 4, + paddingRight: 4, + paddingTop: 2, + paddingBottom: 2 + } + } + init() { + return { + annotations: { + position: 'front', + yaxis: [this.yAxisAnnotation], + xaxis: [this.xAxisAnnotation], + points: [this.pointAnnotation], + texts: [], + images: [], + shapes: [] + }, + chart: { + animations: { + enabled: true, + easing: 'easeinout', // linear, easeout, easein, easeinout, swing, bounce, elastic + speed: 800, + animateGradually: { + delay: 150, + enabled: true + }, + dynamicAnimation: { + enabled: true, + speed: 350 + } + }, + background: 'transparent', + locales: [en], + defaultLocale: 'en', + dropShadow: { + enabled: false, + enabledOnSeries: undefined, + top: 2, + left: 2, + blur: 4, + color: '#000', + opacity: 0.35 + }, + events: { + animationEnd: undefined, + beforeMount: undefined, + mounted: undefined, + updated: undefined, + click: undefined, + mouseMove: undefined, + mouseLeave: undefined, + legendClick: undefined, + markerClick: undefined, + selection: undefined, + dataPointSelection: undefined, + dataPointMouseEnter: undefined, + dataPointMouseLeave: undefined, + beforeZoom: undefined, + beforeResetZoom: undefined, + zoomed: undefined, + scrolled: undefined, + brushScrolled: undefined + }, + foreColor: '#373d3f', + fontFamily: 'Helvetica, Arial, sans-serif', + height: 'auto', + parentHeightOffset: 15, + redrawOnParentResize: true, + redrawOnWindowResize: true, + id: undefined, + group: undefined, + offsetX: 0, + offsetY: 0, + selection: { + enabled: false, + type: 'x', + // selectedPoints: undefined, // default datapoints that should be selected automatically + fill: { + color: '#24292e', + opacity: 0.1 + }, + stroke: { + width: 1, + color: '#24292e', + opacity: 0.4, + dashArray: 3 + }, + xaxis: { + min: undefined, + max: undefined + }, + yaxis: { + min: undefined, + max: undefined + } + }, + sparkline: { + enabled: false + }, + brush: { + enabled: false, + autoScaleYaxis: true, + target: undefined + }, + stacked: false, + stackType: 'normal', + toolbar: { + show: true, + offsetX: 0, + offsetY: 0, + tools: { + download: true, + selection: true, + zoom: true, + zoomin: true, + zoomout: true, + pan: true, + reset: true, + customIcons: [] + }, + export: { + csv: { + filename: undefined, + columnDelimiter: ',', + headerCategory: 'category', + headerValue: 'value', + dateFormatter(timestamp) { + return new Date(timestamp).toDateString() + } + }, + png: { + filename: undefined + }, + svg: { + filename: undefined + } + }, + autoSelected: 'zoom' // accepts -> zoom, pan, selection + }, + type: 'line', + width: '100%', + zoom: { + enabled: true, + type: 'x', + autoScaleYaxis: false, + zoomedArea: { + fill: { + color: '#90CAF9', + opacity: 0.4 + }, + stroke: { + color: '#0D47A1', + opacity: 0.4, + width: 1 + } + } + } + }, + plotOptions: { + area: { + fillTo: 'origin' + }, + bar: { + horizontal: false, + columnWidth: '70%', // should be in percent 0 - 100 + barHeight: '70%', // should be in percent 0 - 100 + distributed: false, + borderRadius: 0, + rangeBarOverlap: true, + rangeBarGroupRows: false, + colors: { + ranges: [], + backgroundBarColors: [], + backgroundBarOpacity: 1, + backgroundBarRadius: 0 + }, + dataLabels: { + position: 'top', // top, center, bottom + maxItems: 100, + hideOverflowingLabels: true, + orientation: 'horizontal' + // TODO: provide stackedLabels for stacked charts which gives additions of values + } + }, + bubble: { + minBubbleRadius: undefined, + maxBubbleRadius: undefined + }, + candlestick: { + colors: { + upward: '#00B746', + downward: '#EF403C' + }, + wick: { + useFillColor: true + } + }, + boxPlot: { + colors: { + upper: '#00E396', + lower: '#008FFB' + } + }, + heatmap: { + radius: 2, + enableShades: true, + shadeIntensity: 0.5, + reverseNegativeShade: false, + distributed: false, + useFillColorAsStroke: false, + colorScale: { + inverse: false, + ranges: [], + min: undefined, + max: undefined + } + }, + treemap: { + enableShades: true, + shadeIntensity: 0.5, + distributed: false, + reverseNegativeShade: false, + useFillColorAsStroke: false, + colorScale: { + inverse: false, + ranges: [], + min: undefined, + max: undefined + } + }, + radialBar: { + inverseOrder: false, + startAngle: 0, + endAngle: 360, + offsetX: 0, + offsetY: 0, + hollow: { + margin: 5, + size: '50%', + background: 'transparent', + image: undefined, + imageWidth: 150, + imageHeight: 150, + imageOffsetX: 0, + imageOffsetY: 0, + imageClipped: true, + position: 'front', + dropShadow: { + enabled: false, + top: 0, + left: 0, + blur: 3, + color: '#000', + opacity: 0.5 + } + }, + track: { + show: true, + startAngle: undefined, + endAngle: undefined, + background: '#f2f2f2', + strokeWidth: '97%', + opacity: 1, + margin: 5, // margin is in pixels + dropShadow: { + enabled: false, + top: 0, + left: 0, + blur: 3, + color: '#000', + opacity: 0.5 + } + }, + dataLabels: { + show: true, + name: { + show: true, + fontSize: '16px', + fontFamily: undefined, + fontWeight: 600, + color: undefined, + offsetY: 0, + formatter(val) { + return val + } + }, + value: { + show: true, + fontSize: '14px', + fontFamily: undefined, + fontWeight: 400, + color: undefined, + offsetY: 16, + formatter(val) { + return val + '%' + } + }, + total: { + show: false, + label: 'Total', + fontSize: '16px', + fontWeight: 600, + fontFamily: undefined, + color: undefined, + formatter(w) { + return ( + w.globals.seriesTotals.reduce((a, b) => a + b, 0) / + w.globals.series.length + + '%' + ) + } + } + } + }, + pie: { + customScale: 1, + offsetX: 0, + offsetY: 0, + startAngle: 0, + endAngle: 360, + expandOnClick: true, + dataLabels: { + // These are the percentage values which are displayed on slice + offset: 0, // offset by which labels will move outside + minAngleToShowLabel: 10 + }, + donut: { + size: '65%', + background: 'transparent', + labels: { + // These are the inner labels appearing inside donut + show: false, + name: { + show: true, + fontSize: '16px', + fontFamily: undefined, + fontWeight: 600, + color: undefined, + offsetY: -10, + formatter(val) { + return val + } + }, + value: { + show: true, + fontSize: '20px', + fontFamily: undefined, + fontWeight: 400, + color: undefined, + offsetY: 10, + formatter(val) { + return val + } + }, + total: { + show: false, + showAlways: false, + label: 'Total', + fontSize: '16px', + fontWeight: 400, + fontFamily: undefined, + color: undefined, + formatter(w) { + return w.globals.seriesTotals.reduce((a, b) => a + b, 0) + } + } + } + } + }, + polarArea: { + rings: { + strokeWidth: 1, + strokeColor: '#e8e8e8' + }, + spokes: { + strokeWidth: 1, + connectorColors: '#e8e8e8' + } + }, + radar: { + size: undefined, + offsetX: 0, + offsetY: 0, + polygons: { + // strokeColor: '#e8e8e8', // should be deprecated in the minor version i.e 3.2 + strokeWidth: 1, + strokeColors: '#e8e8e8', + connectorColors: '#e8e8e8', + fill: { + colors: undefined + } + } + } + }, + colors: undefined, + dataLabels: { + enabled: true, + enabledOnSeries: undefined, + formatter(val) { + return val !== null ? val : '' + }, + textAnchor: 'middle', + distributed: false, + offsetX: 0, + offsetY: 0, + style: { + fontSize: '12px', + fontFamily: undefined, + fontWeight: 600, + colors: undefined + }, + background: { + enabled: true, + foreColor: '#fff', + borderRadius: 2, + padding: 4, + opacity: 0.9, + borderWidth: 1, + borderColor: '#fff', + dropShadow: { + enabled: false, + top: 1, + left: 1, + blur: 1, + color: '#000', + opacity: 0.45 + } + }, + dropShadow: { + enabled: false, + top: 1, + left: 1, + blur: 1, + color: '#000', + opacity: 0.45 + } + }, + fill: { + type: 'solid', + colors: undefined, // array of colors + opacity: 0.85, + gradient: { + shade: 'dark', + type: 'horizontal', + shadeIntensity: 0.5, + gradientToColors: undefined, + inverseColors: true, + opacityFrom: 1, + opacityTo: 1, + stops: [0, 50, 100], + colorStops: [] + }, + image: { + src: [], + width: undefined, // optional + height: undefined // optional + }, + pattern: { + style: 'squares', // String | Array of Strings + width: 6, + height: 6, + strokeWidth: 2 + } + }, + forecastDataPoints: { + count: 0, + fillOpacity: 0.5, + strokeWidth: undefined, + dashArray: 4 + }, + grid: { + show: true, + borderColor: '#e0e0e0', + strokeDashArray: 0, + position: 'back', + xaxis: { + lines: { + show: false + } + }, + yaxis: { + lines: { + show: true + } + }, + row: { + colors: undefined, // takes as array which will be repeated on rows + opacity: 0.5 + }, + column: { + colors: undefined, // takes an array which will be repeated on columns + opacity: 0.5 + }, + padding: { + top: 0, + right: 10, + bottom: 0, + left: 12 + } + }, + labels: [], + legend: { + show: true, + showForSingleSeries: false, + showForNullSeries: true, + showForZeroSeries: true, + floating: false, + position: 'bottom', // whether to position legends in 1 of 4 + // direction - top, bottom, left, right + horizontalAlign: 'center', // when position top/bottom, you can specify whether to align legends left, right or center + inverseOrder: false, + fontSize: '12px', + fontFamily: undefined, + fontWeight: 400, + width: undefined, + height: undefined, + formatter: undefined, + tooltipHoverFormatter: undefined, + offsetX: -20, + offsetY: 4, + customLegendItems: [], + labels: { + colors: undefined, + useSeriesColors: false + }, + markers: { + width: 12, + height: 12, + strokeWidth: 0, + fillColors: undefined, + strokeColor: '#fff', + radius: 12, + customHTML: undefined, + offsetX: 0, + offsetY: 0, + onClick: undefined + }, + itemMargin: { + horizontal: 5, + vertical: 2 + }, + onItemClick: { + toggleDataSeries: true + }, + onItemHover: { + highlightDataSeries: true + } + }, + markers: { + discrete: [], + size: 0, + colors: undefined, + //strokeColor: '#fff', // TODO: deprecate in major version 4.0 + strokeColors: '#fff', + strokeWidth: 2, + strokeOpacity: 0.9, + strokeDashArray: 0, + fillOpacity: 1, + shape: 'circle', + width: 8, // only applicable when shape is rect/square + height: 8, // only applicable when shape is rect/square + radius: 2, + offsetX: 0, + offsetY: 0, + onClick: undefined, + onDblClick: undefined, + showNullDataPoints: true, + hover: { + size: undefined, + sizeOffset: 3 + } + }, + noData: { + text: undefined, + align: 'center', + verticalAlign: 'middle', + offsetX: 0, + offsetY: 0, + style: { + color: undefined, + fontSize: '14px', + fontFamily: undefined + } + }, + responsive: [], // breakpoints should follow ascending order 400, then 700, then 1000 + series: undefined, + states: { + normal: { + filter: { + type: 'none', + value: 0 + } + }, + hover: { + filter: { + type: 'lighten', + value: 0.1 + } + }, + active: { + allowMultipleDataPointsSelection: false, + filter: { + type: 'darken', + value: 0.5 + } + } + }, + title: { + text: undefined, + align: 'left', + margin: 5, + offsetX: 0, + offsetY: 0, + floating: false, + style: { + fontSize: '14px', + fontWeight: 900, + fontFamily: undefined, + color: undefined + } + }, + subtitle: { + text: undefined, + align: 'left', + margin: 5, + offsetX: 0, + offsetY: 30, + floating: false, + style: { + fontSize: '12px', + fontWeight: 400, + fontFamily: undefined, + color: undefined + } + }, + stroke: { + show: true, + curve: 'smooth', // "smooth" / "straight" / "stepline" + lineCap: 'butt', // round, butt , square + width: 2, + colors: undefined, // array of colors + dashArray: 0, // single value or array of values + fill: { + type: 'solid', + colors: undefined, // array of colors + opacity: 0.85, + gradient: { + shade: 'dark', + type: 'horizontal', + shadeIntensity: 0.5, + gradientToColors: undefined, + inverseColors: true, + opacityFrom: 1, + opacityTo: 1, + stops: [0, 50, 100], + colorStops: [] + } + } + }, + tooltip: { + enabled: true, + enabledOnSeries: undefined, + shared: true, + followCursor: false, // when disabled, the tooltip will show on top of the series instead of mouse position + intersect: false, // when enabled, tooltip will only show when user directly hovers over point + inverseOrder: false, + custom: undefined, + fillSeriesColor: false, + theme: 'light', + cssClass: '', + style: { + fontSize: '12px', + fontFamily: undefined + }, + onDatasetHover: { + highlightDataSeries: false + }, + x: { + // x value + show: true, + format: 'dd MMM', // dd/MM, dd MMM yy, dd MMM yyyy + formatter: undefined // a custom user supplied formatter function + }, + y: { + formatter: undefined, + title: { + formatter(seriesName) { + return seriesName ? seriesName + ': ' : '' + } + } + }, + z: { + formatter: undefined, + title: 'Size: ' + }, + marker: { + show: true, + fillColors: undefined + }, + items: { + display: 'flex' + }, + fixed: { + enabled: false, + position: 'topRight', // topRight, topLeft, bottomRight, bottomLeft + offsetX: 0, + offsetY: 0 + } + }, + xaxis: { + type: 'category', + categories: [], + convertedCatToNumeric: false, // internal property which should not be altered outside + offsetX: 0, + offsetY: 0, + overwriteCategories: undefined, + labels: { + show: true, + rotate: -45, + rotateAlways: false, + hideOverlappingLabels: true, + trim: false, + minHeight: undefined, + maxHeight: 120, + showDuplicates: true, + style: { + colors: [], + fontSize: '12px', + fontWeight: 400, + fontFamily: undefined, + cssClass: '' + }, + offsetX: 0, + offsetY: 0, + format: undefined, + formatter: undefined, // custom formatter function which will override format + datetimeUTC: true, + datetimeFormatter: { + year: 'yyyy', + month: "MMM 'yy", + day: 'dd MMM', + hour: 'HH:mm', + minute: 'HH:mm:ss', + second: 'HH:mm:ss' + } + }, + group: { + groups: [], + style: { + colors: [], + fontSize: '12px', + fontWeight: 400, + fontFamily: undefined, + cssClass: '' + } + }, + axisBorder: { + show: true, + color: '#e0e0e0', + width: '100%', + height: 1, + offsetX: 0, + offsetY: 0 + }, + axisTicks: { + show: true, + color: '#e0e0e0', + height: 6, + offsetX: 0, + offsetY: 0 + }, + tickAmount: undefined, + tickPlacement: 'on', + min: undefined, + max: undefined, + range: undefined, + floating: false, + decimalsInFloat: undefined, + position: 'bottom', + title: { + text: undefined, + offsetX: 0, + offsetY: 0, + style: { + color: undefined, + fontSize: '12px', + fontWeight: 900, + fontFamily: undefined, + cssClass: '' + } + }, + crosshairs: { + show: true, + width: 1, // tickWidth/barWidth or an integer + position: 'back', + opacity: 0.9, + stroke: { + color: '#b6b6b6', + width: 1, + dashArray: 3 + }, + fill: { + type: 'solid', // solid, gradient + color: '#B1B9C4', + gradient: { + colorFrom: '#D8E3F0', + colorTo: '#BED1E6', + stops: [0, 100], + opacityFrom: 0.4, + opacityTo: 0.5 + } + }, + dropShadow: { + enabled: false, + left: 0, + top: 0, + blur: 1, + opacity: 0.4 + } + }, + tooltip: { + enabled: true, + offsetY: 0, + formatter: undefined, + style: { + fontSize: '12px', + fontFamily: undefined + } + } + }, + yaxis: this.yAxis, + theme: { + mode: 'light', + palette: 'palette1', // If defined, it will overwrite globals.colors variable + monochrome: { + // monochrome allows you to select just 1 color and fill out the rest with light/dark shade (intensity can be selected) + enabled: false, + color: '#008FFB', + shadeTo: 'light', + shadeIntensity: 0.65 + } + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/AxesTooltip.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/AxesTooltip.js new file mode 100644 index 0000000..320e7d4 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/AxesTooltip.js @@ -0,0 +1,193 @@ +/** + * ApexCharts Tooltip.AxesTooltip Class. + * This file deals with the x-axis and y-axis tooltips. + * + * @module Tooltip.AxesTooltip + **/ + +class AxesTooltip { + constructor(tooltipContext) { + this.w = tooltipContext.w + this.ttCtx = tooltipContext + } + + /** + * This method adds the secondary tooltip which appears below x axis + * @memberof Tooltip + **/ + drawXaxisTooltip() { + let w = this.w + const ttCtx = this.ttCtx + + const isBottom = w.config.xaxis.position === 'bottom' + + ttCtx.xaxisOffY = isBottom + ? w.globals.gridHeight + 1 + : -w.globals.xAxisHeight - w.config.xaxis.axisTicks.height + 3 + const tooltipCssClass = isBottom + ? 'apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom' + : 'apexcharts-xaxistooltip apexcharts-xaxistooltip-top' + + let renderTo = w.globals.dom.elWrap + + if (ttCtx.isXAxisTooltipEnabled) { + let xaxisTooltip = w.globals.dom.baseEl.querySelector( + '.apexcharts-xaxistooltip' + ) + + if (xaxisTooltip === null) { + ttCtx.xaxisTooltip = document.createElement('div') + ttCtx.xaxisTooltip.setAttribute( + 'class', + tooltipCssClass + ' apexcharts-theme-' + w.config.tooltip.theme + ) + + renderTo.appendChild(ttCtx.xaxisTooltip) + + ttCtx.xaxisTooltipText = document.createElement('div') + ttCtx.xaxisTooltipText.classList.add('apexcharts-xaxistooltip-text') + + ttCtx.xaxisTooltipText.style.fontFamily = + w.config.xaxis.tooltip.style.fontFamily || w.config.chart.fontFamily + ttCtx.xaxisTooltipText.style.fontSize = + w.config.xaxis.tooltip.style.fontSize + + ttCtx.xaxisTooltip.appendChild(ttCtx.xaxisTooltipText) + } + } + } + + /** + * This method adds the secondary tooltip which appears below x axis + * @memberof Tooltip + **/ + drawYaxisTooltip() { + let w = this.w + const ttCtx = this.ttCtx + + for (let i = 0; i < w.config.yaxis.length; i++) { + const isRight = + w.config.yaxis[i].opposite || w.config.yaxis[i].crosshairs.opposite + + ttCtx.yaxisOffX = isRight ? w.globals.gridWidth + 1 : 1 + let tooltipCssClass = isRight + ? `apexcharts-yaxistooltip apexcharts-yaxistooltip-${i} apexcharts-yaxistooltip-right` + : `apexcharts-yaxistooltip apexcharts-yaxistooltip-${i} apexcharts-yaxistooltip-left` + + w.globals.yAxisSameScaleIndices.map((samescales, ssi) => { + samescales.map((s, si) => { + if (si === i) { + tooltipCssClass += w.config.yaxis[si].show + ? ` ` + : ` apexcharts-yaxistooltip-hidden` + } + }) + }) + + let renderTo = w.globals.dom.elWrap + + let yaxisTooltip = w.globals.dom.baseEl.querySelector( + `.apexcharts-yaxistooltip apexcharts-yaxistooltip-${i}` + ) + + if (yaxisTooltip === null) { + ttCtx.yaxisTooltip = document.createElement('div') + ttCtx.yaxisTooltip.setAttribute( + 'class', + tooltipCssClass + ' apexcharts-theme-' + w.config.tooltip.theme + ) + + renderTo.appendChild(ttCtx.yaxisTooltip) + + if (i === 0) ttCtx.yaxisTooltipText = [] + + ttCtx.yaxisTooltipText[i] = document.createElement('div') + ttCtx.yaxisTooltipText[i].classList.add('apexcharts-yaxistooltip-text') + + ttCtx.yaxisTooltip.appendChild(ttCtx.yaxisTooltipText[i]) + } + } + } + + /** + * @memberof Tooltip + **/ + setXCrosshairWidth() { + let w = this.w + const ttCtx = this.ttCtx + + // set xcrosshairs width + const xcrosshairs = ttCtx.getElXCrosshairs() + ttCtx.xcrosshairsWidth = parseInt(w.config.xaxis.crosshairs.width, 10) + + if (!w.globals.comboCharts) { + if (w.config.xaxis.crosshairs.width === 'tickWidth') { + let count = w.globals.labels.length + ttCtx.xcrosshairsWidth = w.globals.gridWidth / count + } else if (w.config.xaxis.crosshairs.width === 'barWidth') { + let bar = w.globals.dom.baseEl.querySelector('.apexcharts-bar-area') + if (bar !== null) { + let barWidth = parseFloat(bar.getAttribute('barWidth')) + ttCtx.xcrosshairsWidth = barWidth + } else { + ttCtx.xcrosshairsWidth = 1 + } + } + } else { + let bar = w.globals.dom.baseEl.querySelector('.apexcharts-bar-area') + if (bar !== null && w.config.xaxis.crosshairs.width === 'barWidth') { + let barWidth = parseFloat(bar.getAttribute('barWidth')) + ttCtx.xcrosshairsWidth = barWidth + } else { + if (w.config.xaxis.crosshairs.width === 'tickWidth') { + let count = w.globals.labels.length + ttCtx.xcrosshairsWidth = w.globals.gridWidth / count + } + } + } + + if (w.globals.isBarHorizontal) { + ttCtx.xcrosshairsWidth = 0 + } + if (xcrosshairs !== null && ttCtx.xcrosshairsWidth > 0) { + xcrosshairs.setAttribute('width', ttCtx.xcrosshairsWidth) + } + } + + handleYCrosshair() { + let w = this.w + const ttCtx = this.ttCtx + + // set ycrosshairs height + ttCtx.ycrosshairs = w.globals.dom.baseEl.querySelector( + '.apexcharts-ycrosshairs' + ) + + ttCtx.ycrosshairsHidden = w.globals.dom.baseEl.querySelector( + '.apexcharts-ycrosshairs-hidden' + ) + } + + drawYaxisTooltipText(index, clientY, xyRatios) { + const ttCtx = this.ttCtx + const w = this.w + + let lbFormatter = w.globals.yLabelFormatters[index] + + if (ttCtx.yaxisTooltips[index]) { + const elGrid = ttCtx.getElGrid() + const seriesBound = elGrid.getBoundingClientRect() + + const hoverY = (clientY - seriesBound.top) * xyRatios.yRatio[index] + const height = w.globals.maxYArr[index] - w.globals.minYArr[index] + + const val = w.globals.minYArr[index] + (height - hoverY) + + ttCtx.tooltipPosition.moveYCrosshairs(clientY - seriesBound.top) + ttCtx.yaxisTooltipText[index].innerHTML = lbFormatter(val) + ttCtx.tooltipPosition.moveYAxisTooltip(index) + } + } +} + +export default AxesTooltip diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Intersect.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Intersect.js new file mode 100644 index 0000000..e3a33b8 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Intersect.js @@ -0,0 +1,369 @@ +import Utils from '../../utils/Utils' + +/** + * ApexCharts Tooltip.Intersect Class. + * This file deals with functions related to intersecting tooltips + * (tooltips that appear when user hovers directly over a data-point whether) + * + * @module Tooltip.Intersect + **/ + +class Intersect { + constructor(tooltipContext) { + this.w = tooltipContext.w + this.ttCtx = tooltipContext + } + + // a helper function to get an element's attribute value + getAttr(e, attr) { + return parseFloat(e.target.getAttribute(attr)) + } + + // handle tooltip for heatmaps and treemaps + handleHeatTreeTooltip({ e, opt, x, y, type }) { + const ttCtx = this.ttCtx + const w = this.w + + if (e.target.classList.contains(`apexcharts-${type}-rect`)) { + let i = this.getAttr(e, 'i') + let j = this.getAttr(e, 'j') + let cx = this.getAttr(e, 'cx') + let cy = this.getAttr(e, 'cy') + let width = this.getAttr(e, 'width') + let height = this.getAttr(e, 'height') + + ttCtx.tooltipLabels.drawSeriesTexts({ + ttItems: opt.ttItems, + i, + j, + shared: false, + e + }) + + w.globals.capturedSeriesIndex = i + w.globals.capturedDataPointIndex = j + + x = cx + ttCtx.tooltipRect.ttWidth / 2 + width + y = cy + ttCtx.tooltipRect.ttHeight / 2 - height / 2 + + ttCtx.tooltipPosition.moveXCrosshairs(cx + width / 2) + + if (x > w.globals.gridWidth / 2) { + x = cx - ttCtx.tooltipRect.ttWidth / 2 + width + } + if (ttCtx.w.config.tooltip.followCursor) { + let seriesBound = w.globals.dom.elWrap.getBoundingClientRect() + x = + w.globals.clientX - + seriesBound.left - + (x > w.globals.gridWidth / 2 ? ttCtx.tooltipRect.ttWidth : 0) + y = + w.globals.clientY - + seriesBound.top - + (y > w.globals.gridHeight / 2 ? ttCtx.tooltipRect.ttHeight : 0) + } + } + + return { + x, + y + } + } + + /** + * handle tooltips for line/area/scatter charts where tooltip.intersect is true + * when user hovers over the marker directly, this function is executed + */ + handleMarkerTooltip({ e, opt, x, y }) { + let w = this.w + const ttCtx = this.ttCtx + + let i + let j + if (e.target.classList.contains('apexcharts-marker')) { + let cx = parseInt(opt.paths.getAttribute('cx'), 10) + let cy = parseInt(opt.paths.getAttribute('cy'), 10) + let val = parseFloat(opt.paths.getAttribute('val')) + + j = parseInt(opt.paths.getAttribute('rel'), 10) + i = + parseInt( + opt.paths.parentNode.parentNode.parentNode.getAttribute('rel'), + 10 + ) - 1 + + if (ttCtx.intersect) { + const el = Utils.findAncestor(opt.paths, 'apexcharts-series') + if (el) { + i = parseInt(el.getAttribute('data:realIndex'), 10) + } + } + + ttCtx.tooltipLabels.drawSeriesTexts({ + ttItems: opt.ttItems, + i, + j, + shared: ttCtx.showOnIntersect ? false : w.config.tooltip.shared, + e + }) + + if (e.type === 'mouseup') { + ttCtx.markerClick(e, i, j) + } + + w.globals.capturedSeriesIndex = i + w.globals.capturedDataPointIndex = j + + x = cx + y = cy + w.globals.translateY - ttCtx.tooltipRect.ttHeight * 1.4 + + if (ttCtx.w.config.tooltip.followCursor) { + const elGrid = ttCtx.getElGrid() + const seriesBound = elGrid.getBoundingClientRect() + y = ttCtx.e.clientY + w.globals.translateY - seriesBound.top + } + + if (val < 0) { + y = cy + } + ttCtx.marker.enlargeCurrentPoint(j, opt.paths, x, y) + } + + return { + x, + y + } + } + + /** + * handle tooltips for bar/column charts + */ + handleBarTooltip({ e, opt }) { + const w = this.w + const ttCtx = this.ttCtx + + const tooltipEl = ttCtx.getElTooltip() + + let bx = 0 + let x = 0 + let y = 0 + let i = 0 + let strokeWidth + let barXY = this.getBarTooltipXY({ + e, + opt + }) + i = barXY.i + let barHeight = barXY.barHeight + let j = barXY.j + + w.globals.capturedSeriesIndex = i + w.globals.capturedDataPointIndex = j + + if ( + (w.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars()) || + !w.config.tooltip.shared + ) { + x = barXY.x + y = barXY.y + strokeWidth = Array.isArray(w.config.stroke.width) + ? w.config.stroke.width[i] + : w.config.stroke.width + bx = x + } else { + if (!w.globals.comboCharts && !w.config.tooltip.shared) { + // todo: re-check this condition as it's always 0 + bx = bx / 2 + } + } + + // y is NaN, make it touch the bottom of grid area + if (isNaN(y)) { + y = w.globals.svgHeight - ttCtx.tooltipRect.ttHeight + } else if (y < 0) { + y = 0 + } + + const seriesIndex = parseInt( + opt.paths.parentNode.getAttribute('data:realIndex'), + 10 + ) + + const isReversed = w.globals.isMultipleYAxis + ? w.config.yaxis[seriesIndex] && w.config.yaxis[seriesIndex].reversed + : w.config.yaxis[0].reversed + + if (x + ttCtx.tooltipRect.ttWidth > w.globals.gridWidth && !isReversed) { + x = x - ttCtx.tooltipRect.ttWidth + } else if (x < 0) { + x = 0 + } + + if (ttCtx.w.config.tooltip.followCursor) { + const elGrid = ttCtx.getElGrid() + const seriesBound = elGrid.getBoundingClientRect() + y = ttCtx.e.clientY - seriesBound.top + } + + // if tooltip is still null, querySelector + if (ttCtx.tooltip === null) { + ttCtx.tooltip = w.globals.dom.baseEl.querySelector('.apexcharts-tooltip') + } + + if (!w.config.tooltip.shared) { + if (w.globals.comboBarCount > 0) { + ttCtx.tooltipPosition.moveXCrosshairs(bx + strokeWidth / 2) + } else { + ttCtx.tooltipPosition.moveXCrosshairs(bx) + } + } + + // move tooltip here + if ( + !ttCtx.fixedTooltip && + (!w.config.tooltip.shared || + (w.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars())) + ) { + if (isReversed) { + x = x - ttCtx.tooltipRect.ttWidth + if (x < 0) { + x = 0 + } + } + if ( + isReversed && + !(w.globals.isBarHorizontal && ttCtx.tooltipUtil.hasBars()) + ) { + y = y + barHeight - (w.globals.series[i][j] < 0 ? barHeight : 0) * 2 + } + if (ttCtx.tooltipRect.ttHeight + y > w.globals.gridHeight) { + y = + w.globals.gridHeight - + ttCtx.tooltipRect.ttHeight + + w.globals.translateY + } else { + y = y + w.globals.translateY - ttCtx.tooltipRect.ttHeight / 2 + + if (y < 0) { + y = 0 + } + } + + tooltipEl.style.left = x + w.globals.translateX + 'px' + tooltipEl.style.top = y + 'px' + } + } + + getBarTooltipXY({ e, opt }) { + let w = this.w + let j = null + const ttCtx = this.ttCtx + let i = 0 + let x = 0 + let y = 0 + let barWidth = 0 + let barHeight = 0 + + const cl = e.target.classList + + if ( + cl.contains('apexcharts-bar-area') || + cl.contains('apexcharts-candlestick-area') || + cl.contains('apexcharts-boxPlot-area') || + cl.contains('apexcharts-rangebar-area') + ) { + let bar = e.target + let barRect = bar.getBoundingClientRect() + + let seriesBound = opt.elGrid.getBoundingClientRect() + + let bh = barRect.height + barHeight = barRect.height + let bw = barRect.width + + let cx = parseInt(bar.getAttribute('cx'), 10) + let cy = parseInt(bar.getAttribute('cy'), 10) + barWidth = parseFloat(bar.getAttribute('barWidth')) + const clientX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX + + j = parseInt(bar.getAttribute('j'), 10) + i = parseInt(bar.parentNode.getAttribute('rel'), 10) - 1 + + let y1 = bar.getAttribute('data-range-y1') + let y2 = bar.getAttribute('data-range-y2') + + if (w.globals.comboCharts) { + i = parseInt(bar.parentNode.getAttribute('data:realIndex'), 10) + } + + // if (w.config.tooltip.shared) { + // this check not needed at the moment + // const yDivisor = w.globals.gridHeight / (w.globals.series.length) + // const hoverY = ttCtx.clientY - ttCtx.seriesBound.top + + // j = Math.ceil(hoverY / yDivisor) + // } + + ttCtx.tooltipLabels.drawSeriesTexts({ + ttItems: opt.ttItems, + i, + j, + y1: y1 ? parseInt(y1, 10) : null, + y2: y2 ? parseInt(y2, 10) : null, + shared: ttCtx.showOnIntersect ? false : w.config.tooltip.shared, + e + }) + + if (w.config.tooltip.followCursor) { + if (w.globals.isBarHorizontal) { + x = clientX - seriesBound.left + 15 + y = + cy - + ttCtx.dataPointsDividedHeight + + bh / 2 - + ttCtx.tooltipRect.ttHeight / 2 + } else { + if (w.globals.isXNumeric) { + x = cx - bw / 2 + } else { + x = cx - ttCtx.dataPointsDividedWidth + bw / 2 + } + y = e.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2 - 15 + } + } else { + if (w.globals.isBarHorizontal) { + x = cx + if (x < ttCtx.xyRatios.baseLineInvertedY) { + x = cx - ttCtx.tooltipRect.ttWidth + } + + y = + cy - + ttCtx.dataPointsDividedHeight + + bh / 2 - + ttCtx.tooltipRect.ttHeight / 2 + } else { + // if columns + if (w.globals.isXNumeric) { + x = cx - bw / 2 + } else { + x = cx - ttCtx.dataPointsDividedWidth + bw / 2 + } + + y = cy // - ttCtx.tooltipRect.ttHeight / 2 + 10 + } + } + } + + return { + x, + y, + barHeight, + barWidth, + i, + j + } + } +} + +export default Intersect diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Labels.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Labels.js new file mode 100644 index 0000000..7e05bfe --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Labels.js @@ -0,0 +1,506 @@ +import Formatters from '../Formatters' +import DateTime from '../../utils/DateTime' +import Utils from './Utils' + +/** + * ApexCharts Tooltip.Labels Class to draw texts on the tooltip. + * This file deals with printing actual text on the tooltip. + * + * @module Tooltip.Labels + **/ + +export default class Labels { + constructor(tooltipContext) { + this.w = tooltipContext.w + this.ctx = tooltipContext.ctx + this.ttCtx = tooltipContext + this.tooltipUtil = new Utils(tooltipContext) + } + + drawSeriesTexts({ shared = true, ttItems, i = 0, j = null, y1, y2, e }) { + let w = this.w + + if (w.config.tooltip.custom !== undefined) { + this.handleCustomTooltip({ i, j, y1, y2, w }) + } else { + this.toggleActiveInactiveSeries(shared) + } + + let values = this.getValuesToPrint({ + i, + j + }) + + this.printLabels({ + i, + j, + values, + ttItems, + shared, + e + }) + + // Re-calculate tooltip dimensions now that we have drawn the text + const tooltipEl = this.ttCtx.getElTooltip() + + this.ttCtx.tooltipRect.ttWidth = tooltipEl.getBoundingClientRect().width + this.ttCtx.tooltipRect.ttHeight = tooltipEl.getBoundingClientRect().height + } + + printLabels({ i, j, values, ttItems, shared, e }) { + const w = this.w + let val + let goalVals = [] + const hasGoalValues = (gi) => { + return ( + w.globals.seriesGoals[gi] && + w.globals.seriesGoals[gi][j] && + Array.isArray(w.globals.seriesGoals[gi][j]) + ) + } + + const { xVal, zVal, xAxisTTVal } = values + + let seriesName = '' + + let pColor = w.globals.colors[i] // The pColor here is for the markers inside tooltip + if (j !== null && w.config.plotOptions.bar.distributed) { + pColor = w.globals.colors[j] + } + + for ( + let t = 0, inverset = w.globals.series.length - 1; + t < w.globals.series.length; + t++, inverset-- + ) { + let f = this.getFormatters(i) + seriesName = this.getSeriesName({ + fn: f.yLbTitleFormatter, + index: i, + seriesIndex: i, + j + }) + + if (w.config.chart.type === 'treemap') { + seriesName = f.yLbTitleFormatter(String(w.config.series[i].data[j].x), { + series: w.globals.series, + seriesIndex: i, + dataPointIndex: j, + w + }) + } + + const tIndex = w.config.tooltip.inverseOrder ? inverset : t + + if (w.globals.axisCharts) { + const getValBySeriesIndex = (index) => { + return f.yLbFormatter(w.globals.series[index][j], { + series: w.globals.series, + seriesIndex: index, + dataPointIndex: j, + w + }) + } + if (shared) { + f = this.getFormatters(tIndex) + + seriesName = this.getSeriesName({ + fn: f.yLbTitleFormatter, + index: tIndex, + seriesIndex: i, + j + }) + pColor = w.globals.colors[tIndex] + + val = getValBySeriesIndex(tIndex) + if (hasGoalValues(tIndex)) { + goalVals = w.globals.seriesGoals[tIndex][j].map((goal) => { + return { + attrs: goal, + val: f.yLbFormatter(goal.value, { + seriesIndex: tIndex, + dataPointIndex: j, + w + }) + } + }) + } + } else { + // get a color from a hover area (if it's a line pattern then get from a first line) + const targetFill = e?.target?.getAttribute('fill'); + if (targetFill) { + pColor = (targetFill.indexOf("url") !== -1) ? ( + document + .querySelector(targetFill.substr(4).slice(0, -1)) + .childNodes[0] + .getAttribute("stroke") + ) : targetFill; + } + val = getValBySeriesIndex(i) + if (hasGoalValues(i) && Array.isArray(w.globals.seriesGoals[i][j])) { + goalVals = w.globals.seriesGoals[i][j].map((goal) => { + return { + attrs: goal, + val: f.yLbFormatter(goal.value, { + seriesIndex: i, + dataPointIndex: j, + w + }) + } + }) + } + } + } + + // for pie / donuts + if (j === null) { + val = f.yLbFormatter(w.globals.series[i], { + ...w, + seriesIndex: i, + dataPointIndex: i + }) + } + + this.DOMHandling({ + i, + t: tIndex, + j, + ttItems, + values: { + val, + goalVals, + xVal, + xAxisTTVal, + zVal + }, + seriesName, + shared, + pColor + }) + } + } + + getFormatters(i) { + const w = this.w + + let yLbFormatter = w.globals.yLabelFormatters[i] + let yLbTitleFormatter + + if (w.globals.ttVal !== undefined) { + if (Array.isArray(w.globals.ttVal)) { + yLbFormatter = w.globals.ttVal[i] && w.globals.ttVal[i].formatter + yLbTitleFormatter = + w.globals.ttVal[i] && + w.globals.ttVal[i].title && + w.globals.ttVal[i].title.formatter + } else { + yLbFormatter = w.globals.ttVal.formatter + if (typeof w.globals.ttVal.title.formatter === 'function') { + yLbTitleFormatter = w.globals.ttVal.title.formatter + } + } + } else { + yLbTitleFormatter = w.config.tooltip.y.title.formatter + } + + if (typeof yLbFormatter !== 'function') { + if (w.globals.yLabelFormatters[0]) { + yLbFormatter = w.globals.yLabelFormatters[0] + } else { + yLbFormatter = function (label) { + return label + } + } + } + + if (typeof yLbTitleFormatter !== 'function') { + yLbTitleFormatter = function (label) { + return label + } + } + + return { + yLbFormatter, + yLbTitleFormatter + } + } + + getSeriesName({ fn, index, seriesIndex, j }) { + const w = this.w + return fn(String(w.globals.seriesNames[index]), { + series: w.globals.series, + seriesIndex, + dataPointIndex: j, + w + }) + } + + DOMHandling({ i, t, j, ttItems, values, seriesName, shared, pColor }) { + const w = this.w + const ttCtx = this.ttCtx + + const { val, goalVals, xVal, xAxisTTVal, zVal } = values + + let ttItemsChildren = null + ttItemsChildren = ttItems[t].children + + if (w.config.tooltip.fillSeriesColor) { + ttItems[t].style.backgroundColor = pColor + ttItemsChildren[0].style.display = 'none' + } + + if (ttCtx.showTooltipTitle) { + if (ttCtx.tooltipTitle === null) { + // get it once if null, and store it in class property + ttCtx.tooltipTitle = w.globals.dom.baseEl.querySelector( + '.apexcharts-tooltip-title' + ) + } + ttCtx.tooltipTitle.innerHTML = xVal + } + + // if xaxis tooltip is constructed, we need to replace the innerHTML + if (ttCtx.isXAxisTooltipEnabled) { + ttCtx.xaxisTooltipText.innerHTML = xAxisTTVal !== '' ? xAxisTTVal : xVal + } + + const ttYLabel = ttItems[t].querySelector( + '.apexcharts-tooltip-text-y-label' + ) + if (ttYLabel) { + ttYLabel.innerHTML = seriesName ? seriesName : '' + } + const ttYVal = ttItems[t].querySelector('.apexcharts-tooltip-text-y-value') + if (ttYVal) { + ttYVal.innerHTML = typeof val !== 'undefined' ? val : '' + } + + if ( + ttItemsChildren[0] && + ttItemsChildren[0].classList.contains('apexcharts-tooltip-marker') + ) { + if ( + w.config.tooltip.marker.fillColors && + Array.isArray(w.config.tooltip.marker.fillColors) + ) { + pColor = w.config.tooltip.marker.fillColors[t] + } + + ttItemsChildren[0].style.backgroundColor = pColor + } + + if (!w.config.tooltip.marker.show) { + ttItemsChildren[0].style.display = 'none' + } + + const ttGLabel = ttItems[t].querySelector( + '.apexcharts-tooltip-text-goals-label' + ) + const ttGVal = ttItems[t].querySelector( + '.apexcharts-tooltip-text-goals-value' + ) + + if (goalVals.length && w.globals.seriesGoals[t]) { + const createGoalsHtml = () => { + let gLabels = '
' + let gVals = '
' + goalVals.forEach((goal, gi) => { + gLabels += `
${goal.attrs.name}
` + gVals += `
${goal.val}
` + }) + ttGLabel.innerHTML = gLabels + `
` + ttGVal.innerHTML = gVals + `
` + } + if (shared) { + if ( + w.globals.seriesGoals[t][j] && + Array.isArray(w.globals.seriesGoals[t][j]) + ) { + createGoalsHtml() + } else { + ttGLabel.innerHTML = '' + ttGVal.innerHTML = '' + } + } else { + createGoalsHtml() + } + } else { + ttGLabel.innerHTML = '' + ttGVal.innerHTML = '' + } + + if (zVal !== null) { + const ttZLabel = ttItems[t].querySelector( + '.apexcharts-tooltip-text-z-label' + ) + ttZLabel.innerHTML = w.config.tooltip.z.title + const ttZVal = ttItems[t].querySelector( + '.apexcharts-tooltip-text-z-value' + ) + ttZVal.innerHTML = typeof zVal !== 'undefined' ? zVal : '' + } + + if (shared && ttItemsChildren[0]) { + // hide when no Val or series collapsed + if ( + typeof val === 'undefined' || + val === null || + w.globals.ancillaryCollapsedSeriesIndices.indexOf(t) > -1 || + w.globals.collapsedSeriesIndices.indexOf(t) > -1 + ) { + ttItemsChildren[0].parentNode.style.display = 'none' + } else { + ttItemsChildren[0].parentNode.style.display = + w.config.tooltip.items.display + } + + // TODO: issue #1240 needs to be looked at again. commenting it because this also hides single series values with 0 in it (shared tooltip) + + // if (w.globals.stackedSeriesTotals[j] === 0) { + // // shared tooltip and all values are null, so we need to hide the x value too + // let allYZeroForJ = false + // for (let si = 1; si < w.globals.seriesYvalues.length; si++) { + // if ( + // w.globals.seriesYvalues[si][j] === + // w.globals.seriesYvalues[si - 1][j] + // ) { + // allYZeroForJ = true + // } + // } + + // if (allYZeroForJ) { + // ttCtx.tooltipTitle.style.display = 'none' + // } else { + // ttCtx.tooltipTitle.style.display = w.config.tooltip.items.display + // } + // } else { + // ttCtx.tooltipTitle.style.display = w.config.tooltip.items.display + // } + } + } + + toggleActiveInactiveSeries(shared) { + const w = this.w + if (shared) { + // make all tooltips active + this.tooltipUtil.toggleAllTooltipSeriesGroups('enable') + } else { + // disable all tooltip text groups + this.tooltipUtil.toggleAllTooltipSeriesGroups('disable') + + // enable the first tooltip text group + let firstTooltipSeriesGroup = w.globals.dom.baseEl.querySelector( + '.apexcharts-tooltip-series-group' + ) + + if (firstTooltipSeriesGroup) { + firstTooltipSeriesGroup.classList.add('apexcharts-active') + firstTooltipSeriesGroup.style.display = w.config.tooltip.items.display + } + } + } + + getValuesToPrint({ i, j }) { + const w = this.w + const filteredSeriesX = this.ctx.series.filteredSeriesX() + + let xVal = '' + let xAxisTTVal = '' + let zVal = null + let val = null + + const customFormatterOpts = { + series: w.globals.series, + seriesIndex: i, + dataPointIndex: j, + w + } + + let zFormatter = w.globals.ttZFormatter + + if (j === null) { + val = w.globals.series[i] + } else { + if (w.globals.isXNumeric && w.config.chart.type !== 'treemap') { + xVal = filteredSeriesX[i][j] + if (filteredSeriesX[i].length === 0) { + // a series (possibly the first one) might be collapsed, so get the next active index + const firstActiveSeriesIndex = this.tooltipUtil.getFirstActiveXArray( + filteredSeriesX + ) + xVal = filteredSeriesX[firstActiveSeriesIndex][j] + } + } else { + xVal = + typeof w.globals.labels[j] !== 'undefined' ? w.globals.labels[j] : '' + } + } + + let bufferXVal = xVal + + if (w.globals.isXNumeric && w.config.xaxis.type === 'datetime') { + let xFormat = new Formatters(this.ctx) + xVal = xFormat.xLabelFormat( + w.globals.ttKeyFormatter, + bufferXVal, + bufferXVal, + { + i: undefined, + dateFormatter: new DateTime(this.ctx).formatDate, + w: this.w + } + ) + } else { + if (w.globals.isBarHorizontal) { + xVal = w.globals.yLabelFormatters[0](bufferXVal, customFormatterOpts) + } else { + xVal = w.globals.xLabelFormatter(bufferXVal, customFormatterOpts) + } + } + + // override default x-axis formatter with tooltip formatter + if (w.config.tooltip.x.formatter !== undefined) { + xVal = w.globals.ttKeyFormatter(bufferXVal, customFormatterOpts) + } + + if (w.globals.seriesZ.length > 0 && w.globals.seriesZ[i].length > 0) { + zVal = zFormatter(w.globals.seriesZ[i][j], w) + } + + if (typeof w.config.xaxis.tooltip.formatter === 'function') { + xAxisTTVal = w.globals.xaxisTooltipFormatter( + bufferXVal, + customFormatterOpts + ) + } else { + xAxisTTVal = xVal + } + + return { + val: Array.isArray(val) ? val.join(' ') : val, + xVal: Array.isArray(xVal) ? xVal.join(' ') : xVal, + xAxisTTVal: Array.isArray(xAxisTTVal) ? xAxisTTVal.join(' ') : xAxisTTVal, + zVal + } + } + + handleCustomTooltip({ i, j, y1, y2, w }) { + const tooltipEl = this.ttCtx.getElTooltip() + let fn = w.config.tooltip.custom + + if (Array.isArray(fn) && fn[i]) { + fn = fn[i] + } + + // override everything with a custom html tooltip and replace it + tooltipEl.innerHTML = fn({ + ctx: this.ctx, + series: w.globals.series, + seriesIndex: i, + dataPointIndex: j, + y1, + y2, + w + }) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Marker.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Marker.js new file mode 100644 index 0000000..9a6d6bd --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Marker.js @@ -0,0 +1,188 @@ +import Graphics from '../Graphics' +import Position from './Position' +import Markers from '../../modules/Markers' +import Utils from '../../utils/Utils' + +/** + * ApexCharts Tooltip.Marker Class to draw texts on the tooltip. + * This file deals with the markers that appear near tooltip in line/area charts. + * These markers helps the user to associate the data-points and the values + * that are shown in the tooltip + * + * @module Tooltip.Marker + **/ + +export default class Marker { + constructor(tooltipContext) { + this.w = tooltipContext.w + this.ttCtx = tooltipContext + this.ctx = tooltipContext.ctx + this.tooltipPosition = new Position(tooltipContext) + } + + drawDynamicPoints() { + let w = this.w + + let graphics = new Graphics(this.ctx) + let marker = new Markers(this.ctx) + + let elsSeries = w.globals.dom.baseEl.querySelectorAll('.apexcharts-series') + + elsSeries = [...elsSeries] + + if (w.config.chart.stacked) { + elsSeries.sort((a, b) => { + return ( + parseFloat(a.getAttribute('data:realIndex')) - + parseFloat(b.getAttribute('data:realIndex')) + ) + }) + } + + for (let i = 0; i < elsSeries.length; i++) { + let pointsMain = elsSeries[i].querySelector( + `.apexcharts-series-markers-wrap` + ) + + if (pointsMain !== null) { + // it can be null as we have tooltips in donut/bar charts + let point + + let PointClasses = `apexcharts-marker w${(Math.random() + 1) + .toString(36) + .substring(4)}` + if ( + (w.config.chart.type === 'line' || w.config.chart.type === 'area') && + !w.globals.comboCharts && + !w.config.tooltip.intersect + ) { + PointClasses += ' no-pointer-events' + } + + let elPointOptions = marker.getMarkerConfig({ + cssClass: PointClasses, + seriesIndex: Number(pointsMain.getAttribute('data:realIndex')) // fixes apexcharts/apexcharts.js #1427 + }) + + point = graphics.drawMarker(0, 0, elPointOptions) + + point.node.setAttribute('default-marker-size', 0) + + let elPointsG = document.createElementNS(w.globals.SVGNS, 'g') + elPointsG.classList.add('apexcharts-series-markers') + + elPointsG.appendChild(point.node) + pointsMain.appendChild(elPointsG) + } + } + } + + enlargeCurrentPoint(rel, point, x = null, y = null) { + let w = this.w + + if (w.config.chart.type !== 'bubble') { + this.newPointSize(rel, point) + } + + let cx = point.getAttribute('cx') + let cy = point.getAttribute('cy') + + if (x !== null && y !== null) { + cx = x + cy = y + } + + this.tooltipPosition.moveXCrosshairs(cx) + + if (!this.fixedTooltip) { + if (w.config.chart.type === 'radar') { + const elGrid = this.ttCtx.getElGrid() + const seriesBound = elGrid.getBoundingClientRect() + + cx = this.ttCtx.e.clientX - seriesBound.left + } + + this.tooltipPosition.moveTooltip(cx, cy, w.config.markers.hover.size) + } + } + + enlargePoints(j) { + let w = this.w + let me = this + const ttCtx = this.ttCtx + + let col = j + + let points = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker' + ) + + let newSize = w.config.markers.hover.size + + for (let p = 0; p < points.length; p++) { + let rel = points[p].getAttribute('rel') + let index = points[p].getAttribute('index') + + if (newSize === undefined) { + newSize = + w.globals.markers.size[index] + w.config.markers.hover.sizeOffset + } + + if (col === parseInt(rel, 10)) { + me.newPointSize(col, points[p]) + + let cx = points[p].getAttribute('cx') + let cy = points[p].getAttribute('cy') + + me.tooltipPosition.moveXCrosshairs(cx) + + if (!ttCtx.fixedTooltip) { + me.tooltipPosition.moveTooltip(cx, cy, newSize) + } + } else { + me.oldPointSize(points[p]) + } + } + } + + newPointSize(rel, point) { + let w = this.w + let newSize = w.config.markers.hover.size + + let elPoint = + rel === 0 ? point.parentNode.firstChild : point.parentNode.lastChild + + if (elPoint.getAttribute('default-marker-size') !== '0') { + const index = parseInt(elPoint.getAttribute('index'), 10) + if (newSize === undefined) { + newSize = + w.globals.markers.size[index] + w.config.markers.hover.sizeOffset + } + + if (newSize < 0) newSize = 0 + elPoint.setAttribute('r', newSize) + } + } + + oldPointSize(point) { + const size = parseFloat(point.getAttribute('default-marker-size')) + point.setAttribute('r', size) + } + + resetPointsSize() { + let w = this.w + + let points = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker' + ) + + for (let p = 0; p < points.length; p++) { + const size = parseFloat(points[p].getAttribute('default-marker-size')) + if (Utils.isNumber(size) && size >= 0) { + points[p].setAttribute('r', size) + } else { + points[p].setAttribute('r', 0) + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Position.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Position.js new file mode 100644 index 0000000..66be5cd --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Position.js @@ -0,0 +1,434 @@ +import Graphics from '../Graphics' +import Series from '../Series' + +/** + * ApexCharts Tooltip.Position Class to move the tooltip based on x and y position. + * + * @module Tooltip.Position + **/ + +export default class Position { + constructor(tooltipContext) { + this.ttCtx = tooltipContext + this.ctx = tooltipContext.ctx + this.w = tooltipContext.w + } + + /** + * This will move the crosshair (the vertical/horz line that moves along with mouse) + * Along with this, this function also calls the xaxisMove function + * @memberof Position + * @param {int} - cx = point's x position, wherever point's x is, you need to move crosshair + */ + moveXCrosshairs(cx, j = null) { + const ttCtx = this.ttCtx + let w = this.w + + const xcrosshairs = ttCtx.getElXCrosshairs() + + let x = cx - ttCtx.xcrosshairsWidth / 2 + + let tickAmount = w.globals.labels.slice().length + if (j !== null) { + x = (w.globals.gridWidth / tickAmount) * j + } + + if (xcrosshairs !== null && !w.globals.isBarHorizontal) { + xcrosshairs.setAttribute('x', x) + xcrosshairs.setAttribute('x1', x) + xcrosshairs.setAttribute('x2', x) + xcrosshairs.setAttribute('y2', w.globals.gridHeight) + xcrosshairs.classList.add('apexcharts-active') + } + + if (x < 0) { + x = 0 + } + + if (x > w.globals.gridWidth) { + x = w.globals.gridWidth + } + + if (ttCtx.isXAxisTooltipEnabled) { + let tx = x + if ( + w.config.xaxis.crosshairs.width === 'tickWidth' || + w.config.xaxis.crosshairs.width === 'barWidth' + ) { + tx = x + ttCtx.xcrosshairsWidth / 2 + } + this.moveXAxisTooltip(tx) + } + } + + /** + * This will move the crosshair (the vertical/horz line that moves along with mouse) + * Along with this, this function also calls the xaxisMove function + * @memberof Position + * @param {int} - cx = point's x position, wherever point's x is, you need to move crosshair + */ + moveYCrosshairs(cy) { + const ttCtx = this.ttCtx + + if (ttCtx.ycrosshairs !== null) { + Graphics.setAttrs(ttCtx.ycrosshairs, { + y1: cy, + y2: cy + }) + } + if (ttCtx.ycrosshairsHidden !== null) { + Graphics.setAttrs(ttCtx.ycrosshairsHidden, { + y1: cy, + y2: cy + }) + } + } + + /** + ** AxisTooltip is the small rectangle which appears on x axis with x value, when user moves + * @memberof Position + * @param {int} - cx = point's x position, wherever point's x is, you need to move + */ + moveXAxisTooltip(cx) { + let w = this.w + const ttCtx = this.ttCtx + + if (ttCtx.xaxisTooltip !== null && ttCtx.xcrosshairsWidth !== 0) { + ttCtx.xaxisTooltip.classList.add('apexcharts-active') + + let cy = + ttCtx.xaxisOffY + + w.config.xaxis.tooltip.offsetY + + w.globals.translateY + + 1 + + w.config.xaxis.offsetY + + let xaxisTTText = ttCtx.xaxisTooltip.getBoundingClientRect() + let xaxisTTTextWidth = xaxisTTText.width + + cx = cx - xaxisTTTextWidth / 2 + + if (!isNaN(cx)) { + cx = cx + w.globals.translateX + + let textRect = 0 + const graphics = new Graphics(this.ctx) + textRect = graphics.getTextRects(ttCtx.xaxisTooltipText.innerHTML) + + ttCtx.xaxisTooltipText.style.minWidth = textRect.width + 'px' + ttCtx.xaxisTooltip.style.left = cx + 'px' + ttCtx.xaxisTooltip.style.top = cy + 'px' + } + } + } + + moveYAxisTooltip(index) { + const w = this.w + const ttCtx = this.ttCtx + + if (ttCtx.yaxisTTEls === null) { + ttCtx.yaxisTTEls = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-yaxistooltip' + ) + } + + const ycrosshairsHiddenRectY1 = parseInt( + ttCtx.ycrosshairsHidden.getAttribute('y1'), + 10 + ) + let cy = w.globals.translateY + ycrosshairsHiddenRectY1 + + const yAxisTTRect = ttCtx.yaxisTTEls[index].getBoundingClientRect() + const yAxisTTHeight = yAxisTTRect.height + let cx = w.globals.translateYAxisX[index] - 2 + + if (w.config.yaxis[index].opposite) { + cx = cx - 26 + } + + cy = cy - yAxisTTHeight / 2 + + if (w.globals.ignoreYAxisIndexes.indexOf(index) === -1) { + ttCtx.yaxisTTEls[index].classList.add('apexcharts-active') + ttCtx.yaxisTTEls[index].style.top = cy + 'px' + ttCtx.yaxisTTEls[index].style.left = + cx + w.config.yaxis[index].tooltip.offsetX + 'px' + } else { + ttCtx.yaxisTTEls[index].classList.remove('apexcharts-active') + } + } + + /** + ** moves the whole tooltip by changing x, y attrs + * @memberof Position + * @param {int} - cx = point's x position, wherever point's x is, you need to move tooltip + * @param {int} - cy = point's y position, wherever point's y is, you need to move tooltip + * @param {int} - r = point's radius + */ + moveTooltip(cx, cy, r = null) { + let w = this.w + + let ttCtx = this.ttCtx + const tooltipEl = ttCtx.getElTooltip() + let tooltipRect = ttCtx.tooltipRect + + let pointR = r !== null ? parseFloat(r) : 1 + + let x = parseFloat(cx) + pointR + 5 + let y = parseFloat(cy) + pointR / 2 // - tooltipRect.ttHeight / 2 + + if (x > w.globals.gridWidth / 2) { + x = x - tooltipRect.ttWidth - pointR - 10 + } + + if (x > w.globals.gridWidth - tooltipRect.ttWidth - 10) { + x = w.globals.gridWidth - tooltipRect.ttWidth + } + + if (x < -20) { + x = -20 + } + + if (w.config.tooltip.followCursor) { + const elGrid = ttCtx.getElGrid() + const seriesBound = elGrid.getBoundingClientRect() + y = + ttCtx.e.clientY + + w.globals.translateY - + seriesBound.top - + tooltipRect.ttHeight / 2 + } else { + if (!w.globals.isBarHorizontal) { + if (tooltipRect.ttHeight / 2 + y > w.globals.gridHeight) { + y = w.globals.gridHeight - tooltipRect.ttHeight + w.globals.translateY + } + + if (y < 0) { + y = 0 + } + } + } + + if (!isNaN(x)) { + x = x + w.globals.translateX + + tooltipEl.style.left = x + 'px' + tooltipEl.style.top = y + 'px' + } + } + + moveMarkers(i, j) { + let w = this.w + let ttCtx = this.ttCtx + + if (w.globals.markers.size[i] > 0) { + let allPoints = w.globals.dom.baseEl.querySelectorAll( + ` .apexcharts-series[data\\:realIndex='${i}'] .apexcharts-marker` + ) + for (let p = 0; p < allPoints.length; p++) { + if (parseInt(allPoints[p].getAttribute('rel'), 10) === j) { + ttCtx.marker.resetPointsSize() + ttCtx.marker.enlargeCurrentPoint(j, allPoints[p]) + } + } + } else { + ttCtx.marker.resetPointsSize() + this.moveDynamicPointOnHover(j, i) + } + } + + // This function is used when you need to show markers/points only on hover - + // DIFFERENT X VALUES in multiple series + moveDynamicPointOnHover(j, capturedSeries) { + let w = this.w + let ttCtx = this.ttCtx + let cx = 0 + let cy = 0 + + let pointsArr = w.globals.pointsArray + + let hoverSize = ttCtx.tooltipUtil.getHoverMarkerSize(capturedSeries) + + const serType = w.config.series[capturedSeries].type + if ( + serType && + (serType === 'column' || + serType === 'candlestick' || + serType === 'boxPlot') + ) { + // fix error mentioned in #811 + return + } + + cx = pointsArr[capturedSeries][j][0] + cy = pointsArr[capturedSeries][j][1] ? pointsArr[capturedSeries][j][1] : 0 + + let point = w.globals.dom.baseEl.querySelector( + `.apexcharts-series[data\\:realIndex='${capturedSeries}'] .apexcharts-series-markers circle` + ) + + if (point && cy < w.globals.gridHeight && cy > 0) { + point.setAttribute('r', hoverSize) + + point.setAttribute('cx', cx) + point.setAttribute('cy', cy) + } + + // point.style.opacity = w.config.markers.hover.opacity + + this.moveXCrosshairs(cx) + + if (!ttCtx.fixedTooltip) { + this.moveTooltip(cx, cy, hoverSize) + } + } + + // This function is used when you need to show markers/points only on hover - + // SAME X VALUES in multiple series + moveDynamicPointsOnHover(j) { + const ttCtx = this.ttCtx + let w = ttCtx.w + let cx = 0 + let cy = 0 + let activeSeries = 0 + + let pointsArr = w.globals.pointsArray + + let series = new Series(this.ctx) + activeSeries = series.getActiveConfigSeriesIndex(true) + + let hoverSize = ttCtx.tooltipUtil.getHoverMarkerSize(activeSeries) + + if (pointsArr[activeSeries]) { + cx = pointsArr[activeSeries][j][0] + cy = pointsArr[activeSeries][j][1] + } + + let points = ttCtx.tooltipUtil.getAllMarkers() + + if (points !== null) { + for (let p = 0; p < w.globals.series.length; p++) { + let pointArr = pointsArr[p] + + if (w.globals.comboCharts) { + // in a combo chart, if column charts are present, markers will not match with the number of series, hence this patch to push a null value in points array + if (typeof pointArr === 'undefined') { + // nodelist to array + points.splice(p, 0, null) + } + } + if (pointArr && pointArr.length) { + let pcy = pointsArr[p][j][1] + points[p].setAttribute('cx', cx) + + if ( + pcy !== null && + !isNaN(pcy) && + pcy < w.globals.gridHeight + hoverSize && + pcy + hoverSize > 0 + ) { + points[p] && points[p].setAttribute('r', hoverSize) + points[p] && points[p].setAttribute('cy', pcy) + } else { + points[p] && points[p].setAttribute('r', 0) + } + } + } + } + + this.moveXCrosshairs(cx) + + if (!ttCtx.fixedTooltip) { + let tcy = cy || w.globals.gridHeight + this.moveTooltip(cx, tcy, hoverSize) + } + } + + moveStickyTooltipOverBars(j) { + const w = this.w + const ttCtx = this.ttCtx + + let barLen = w.globals.columnSeries + ? w.globals.columnSeries.length + : w.globals.series.length + + let i = + barLen >= 2 && barLen % 2 === 0 + ? Math.floor(barLen / 2) + : Math.floor(barLen / 2) + 1 + + if (w.globals.isBarHorizontal) { + let series = new Series(this.ctx) + i = series.getActiveConfigSeriesIndex(false, 'desc') + 1 + } + let jBar = w.globals.dom.baseEl.querySelector( + `.apexcharts-bar-series .apexcharts-series[rel='${i}'] path[j='${j}'], .apexcharts-candlestick-series .apexcharts-series[rel='${i}'] path[j='${j}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${i}'] path[j='${j}'], .apexcharts-rangebar-series .apexcharts-series[rel='${i}'] path[j='${j}']` + ) + + let bcx = jBar ? parseFloat(jBar.getAttribute('cx')) : 0 + let bcy = jBar ? parseFloat(jBar.getAttribute('cy')) : 0 + let bw = jBar ? parseFloat(jBar.getAttribute('barWidth')) : 0 + let bh = jBar ? parseFloat(jBar.getAttribute('barHeight')) : 0 + + const elGrid = ttCtx.getElGrid() + let seriesBound = elGrid.getBoundingClientRect() + + const isBoxOrCandle = + jBar.classList.contains('apexcharts-candlestick-area') || + jBar.classList.contains('apexcharts-boxPlot-area') + if (w.globals.isXNumeric) { + if (jBar && !isBoxOrCandle) { + bcx = bcx - (barLen % 2 !== 0 ? bw / 2 : 0) + } + + if ( + jBar && // fixes apexcharts.js#2354 + isBoxOrCandle && + w.globals.comboCharts + ) { + bcx = bcx - bw / 2 + } + } else { + if (!w.globals.isBarHorizontal) { + bcx = + ttCtx.xAxisTicksPositions[j - 1] + ttCtx.dataPointsDividedWidth / 2 + if (isNaN(bcx)) { + bcx = ttCtx.xAxisTicksPositions[j] - ttCtx.dataPointsDividedWidth / 2 + } + } + } + + if (!w.globals.isBarHorizontal) { + if (w.config.tooltip.followCursor) { + bcy = ttCtx.e.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2 + } else { + if (bcy + ttCtx.tooltipRect.ttHeight + 15 > w.globals.gridHeight) { + bcy = w.globals.gridHeight + } + } + } else { + if (bcy > w.globals.gridHeight / 2) { + bcy = bcy - ttCtx.tooltipRect.ttHeight + } + + bcy = bcy + w.config.grid.padding.top + bh / 3 + + if (bcy + bh > w.globals.gridHeight) { + bcy = w.globals.gridHeight - bh + } + } + + if (bcy < -10) { + bcy = -10 + } + + if (!w.globals.isBarHorizontal) { + this.moveXCrosshairs(bcx) + } + + if (!ttCtx.fixedTooltip) { + let tcy = bcy || w.globals.gridHeight + this.moveTooltip(bcx, tcy) + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/README.md b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/README.md new file mode 100644 index 0000000..bae129b --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/README.md @@ -0,0 +1,20 @@ +### AxesTooltip.js +This file deals with the x-axis and y-axis tooltips. + +### Intersect.js +This file deals with functions related to intersecting tooltips (tooltips that appear when user hovers directly over a data-point whether). + +### Labels.js +This file deals with printing actual text on the tooltip. + +### Marker.js +This file deals with the markers that appear near tooltip in line/area charts. These markers helps the user to associate the data-points and the values that are shown in the tooltip + +### Position.js +This file deals with positioning of the tooltip. + +### Tooltip.js +This is the primary file which is an entry point for all tooltip related functionality. + +### Utils.js +Helper functions related to tooltips. diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Tooltip.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Tooltip.js new file mode 100644 index 0000000..1c7b828 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Tooltip.js @@ -0,0 +1,886 @@ +import Labels from './Labels' +import Position from './Position' +import Marker from './Marker' +import Intersect from './Intersect' +import AxesTooltip from './AxesTooltip' +import Graphics from '../Graphics' +import Series from '../Series' +import XAxis from './../axes/XAxis' +import Utils from './Utils' + +/** + * ApexCharts Core Tooltip Class to handle the tooltip generation. + * + * @module Tooltip + **/ + +export default class Tooltip { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + const w = this.w + + this.tConfig = w.config.tooltip + + this.tooltipUtil = new Utils(this) + this.tooltipLabels = new Labels(this) + this.tooltipPosition = new Position(this) + this.marker = new Marker(this) + this.intersect = new Intersect(this) + this.axesTooltip = new AxesTooltip(this) + this.showOnIntersect = this.tConfig.intersect + this.showTooltipTitle = this.tConfig.x.show + this.fixedTooltip = this.tConfig.fixed.enabled + this.xaxisTooltip = null + this.yaxisTTEls = null + this.isBarShared = !w.globals.isBarHorizontal && this.tConfig.shared + this.lastHoverTime = Date.now() + } + + getElTooltip(ctx) { + if (!ctx) ctx = this + if (!ctx.w.globals.dom.baseEl) return null + + return ctx.w.globals.dom.baseEl.querySelector('.apexcharts-tooltip') + } + + getElXCrosshairs() { + return this.w.globals.dom.baseEl.querySelector('.apexcharts-xcrosshairs') + } + + getElGrid() { + return this.w.globals.dom.baseEl.querySelector('.apexcharts-grid') + } + + drawTooltip(xyRatios) { + let w = this.w + this.xyRatios = xyRatios + this.isXAxisTooltipEnabled = + w.config.xaxis.tooltip.enabled && w.globals.axisCharts + this.yaxisTooltips = w.config.yaxis.map((y, i) => { + return y.show && y.tooltip.enabled && w.globals.axisCharts ? true : false + }) + this.allTooltipSeriesGroups = [] + + if (!w.globals.axisCharts) { + this.showTooltipTitle = false + } + + const tooltipEl = document.createElement('div') + tooltipEl.classList.add('apexcharts-tooltip') + if (w.config.tooltip.cssClass) { + tooltipEl.classList.add(w.config.tooltip.cssClass) + } + tooltipEl.classList.add(`apexcharts-theme-${this.tConfig.theme}`) + w.globals.dom.elWrap.appendChild(tooltipEl) + + if (w.globals.axisCharts) { + this.axesTooltip.drawXaxisTooltip() + this.axesTooltip.drawYaxisTooltip() + this.axesTooltip.setXCrosshairWidth() + this.axesTooltip.handleYCrosshair() + + let xAxis = new XAxis(this.ctx) + this.xAxisTicksPositions = xAxis.getXAxisTicksPositions() + } + + // we forcefully set intersect true for these conditions + if ( + (w.globals.comboCharts || + this.tConfig.intersect || + w.config.chart.type === 'rangeBar') && + !this.tConfig.shared + ) { + this.showOnIntersect = true + } + + if (w.config.markers.size === 0 || w.globals.markers.largestSize === 0) { + // when user don't want to show points all the time, but only on when hovering on series + this.marker.drawDynamicPoints(this) + } + + // no visible series, exit + if (w.globals.collapsedSeries.length === w.globals.series.length) return + + this.dataPointsDividedHeight = w.globals.gridHeight / w.globals.dataPoints + this.dataPointsDividedWidth = w.globals.gridWidth / w.globals.dataPoints + + if (this.showTooltipTitle) { + this.tooltipTitle = document.createElement('div') + this.tooltipTitle.classList.add('apexcharts-tooltip-title') + this.tooltipTitle.style.fontFamily = + this.tConfig.style.fontFamily || w.config.chart.fontFamily + this.tooltipTitle.style.fontSize = this.tConfig.style.fontSize + tooltipEl.appendChild(this.tooltipTitle) + } + + let ttItemsCnt = w.globals.series.length // whether shared or not, default is shared + if ((w.globals.xyCharts || w.globals.comboCharts) && this.tConfig.shared) { + if (!this.showOnIntersect) { + ttItemsCnt = w.globals.series.length + } else { + ttItemsCnt = 1 + } + } + + this.legendLabels = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-legend-text' + ) + + this.ttItems = this.createTTElements(ttItemsCnt) + this.addSVGEvents() + } + + createTTElements(ttItemsCnt) { + const w = this.w + let ttItems = [] + + const tooltipEl = this.getElTooltip() + for (let i = 0; i < ttItemsCnt; i++) { + let gTxt = document.createElement('div') + gTxt.classList.add('apexcharts-tooltip-series-group') + gTxt.style.order = w.config.tooltip.inverseOrder ? ttItemsCnt - i : i + 1 + if ( + this.tConfig.shared && + this.tConfig.enabledOnSeries && + Array.isArray(this.tConfig.enabledOnSeries) + ) { + if (this.tConfig.enabledOnSeries.indexOf(i) < 0) { + gTxt.classList.add('apexcharts-tooltip-series-group-hidden') + } + } + + let point = document.createElement('span') + point.classList.add('apexcharts-tooltip-marker') + point.style.backgroundColor = w.globals.colors[i] + gTxt.appendChild(point) + + const gYZ = document.createElement('div') + gYZ.classList.add('apexcharts-tooltip-text') + + gYZ.style.fontFamily = + this.tConfig.style.fontFamily || w.config.chart.fontFamily + gYZ.style.fontSize = this.tConfig.style.fontSize + ;['y', 'goals', 'z'].forEach((g) => { + const gValText = document.createElement('div') + gValText.classList.add(`apexcharts-tooltip-${g}-group`) + + let txtLabel = document.createElement('span') + txtLabel.classList.add(`apexcharts-tooltip-text-${g}-label`) + gValText.appendChild(txtLabel) + + let txtValue = document.createElement('span') + txtValue.classList.add(`apexcharts-tooltip-text-${g}-value`) + gValText.appendChild(txtValue) + + gYZ.appendChild(gValText) + }) + + gTxt.appendChild(gYZ) + + tooltipEl.appendChild(gTxt) + + ttItems.push(gTxt) + } + + return ttItems + } + + addSVGEvents() { + const w = this.w + let type = w.config.chart.type + const tooltipEl = this.getElTooltip() + + const commonBar = !!( + type === 'bar' || + type === 'candlestick' || + type === 'boxPlot' || + type === 'rangeBar' + ) + + const chartWithmarkers = + type === 'area' || + type === 'line' || + type === 'scatter' || + type === 'bubble' || + type === 'radar' + + let hoverArea = w.globals.dom.Paper.node + + const elGrid = this.getElGrid() + if (elGrid) { + this.seriesBound = elGrid.getBoundingClientRect() + } + + let tooltipY = [] + let tooltipX = [] + + let seriesHoverParams = { + hoverArea, + elGrid, + tooltipEl, + tooltipY, + tooltipX, + ttItems: this.ttItems + } + + let points + + if (w.globals.axisCharts) { + if (chartWithmarkers) { + points = w.globals.dom.baseEl.querySelectorAll( + ".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker" + ) + } else if (commonBar) { + points = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area' + ) + } else if (type === 'heatmap' || type === 'treemap') { + points = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap' + ) + } + + if (points && points.length) { + for (let p = 0; p < points.length; p++) { + tooltipY.push(points[p].getAttribute('cy')) + tooltipX.push(points[p].getAttribute('cx')) + } + } + } + + const validSharedChartTypes = + (w.globals.xyCharts && !this.showOnIntersect) || + (w.globals.comboCharts && !this.showOnIntersect) || + (commonBar && this.tooltipUtil.hasBars() && this.tConfig.shared) + + if (validSharedChartTypes) { + this.addPathsEventListeners([hoverArea], seriesHoverParams) + } else if ( + (commonBar && !w.globals.comboCharts) || + (chartWithmarkers && this.showOnIntersect) + ) { + this.addDatapointEventsListeners(seriesHoverParams) + } else if ( + !w.globals.axisCharts || + type === 'heatmap' || + type === 'treemap' + ) { + let seriesAll = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series' + ) + this.addPathsEventListeners(seriesAll, seriesHoverParams) + } + + if (this.showOnIntersect) { + let lineAreaPoints = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker' + ) + if (lineAreaPoints.length > 0) { + // if we find any lineSeries, addEventListeners for them + this.addPathsEventListeners(lineAreaPoints, seriesHoverParams) + } + + // combo charts may have bars, so add event listeners here too + if (this.tooltipUtil.hasBars() && !this.tConfig.shared) { + this.addDatapointEventsListeners(seriesHoverParams) + } + } + } + + drawFixedTooltipRect() { + let w = this.w + + const tooltipEl = this.getElTooltip() + + let tooltipRect = tooltipEl.getBoundingClientRect() + + let ttWidth = tooltipRect.width + 10 + let ttHeight = tooltipRect.height + 10 + let x = this.tConfig.fixed.offsetX + let y = this.tConfig.fixed.offsetY + + const fixed = this.tConfig.fixed.position.toLowerCase() + + if (fixed.indexOf('right') > -1) { + x = x + w.globals.svgWidth - ttWidth + 10 + } + if (fixed.indexOf('bottom') > -1) { + y = y + w.globals.svgHeight - ttHeight - 10 + } + + tooltipEl.style.left = x + 'px' + tooltipEl.style.top = y + 'px' + + return { + x, + y, + ttWidth, + ttHeight + } + } + + addDatapointEventsListeners(seriesHoverParams) { + let w = this.w + let points = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area' + ) + this.addPathsEventListeners(points, seriesHoverParams) + } + + addPathsEventListeners(paths, opts) { + let self = this + + for (let p = 0; p < paths.length; p++) { + let extendedOpts = { + paths: paths[p], + tooltipEl: opts.tooltipEl, + tooltipY: opts.tooltipY, + tooltipX: opts.tooltipX, + elGrid: opts.elGrid, + hoverArea: opts.hoverArea, + ttItems: opts.ttItems + } + + let events = ['mousemove', 'mouseup', 'touchmove', 'mouseout', 'touchend'] + + events.map((ev) => { + return paths[p].addEventListener( + ev, + self.onSeriesHover.bind(self, extendedOpts), + { capture: false, passive: true } + ) + }) + } + } + + /* + ** Check to see if the tooltips should be updated based on a mouse / touch event + */ + onSeriesHover(opt, e) { + // If a user is moving their mouse quickly, don't bother updating the tooltip every single frame + + const targetDelay = 100 + const timeSinceLastUpdate = Date.now() - this.lastHoverTime + if (timeSinceLastUpdate >= targetDelay) { + // The tooltip was last updated over 100ms ago - redraw it even if the user is still moving their + // mouse so they get some feedback that their moves are being registered + this.seriesHover(opt, e) + } else { + // The tooltip was last updated less than 100ms ago + // Cancel any other delayed draw, so we don't show stale data + clearTimeout(this.seriesHoverTimeout) + + // Schedule the next draw so that it happens about 100ms after the last update + this.seriesHoverTimeout = setTimeout(() => { + this.seriesHover(opt, e) + }, targetDelay - timeSinceLastUpdate) + } + } + + /* + ** The actual series hover function + */ + seriesHover(opt, e) { + this.lastHoverTime = Date.now() + let chartGroups = [] + const w = this.w + + // if user has more than one charts in group, we need to sync + if (w.config.chart.group) { + chartGroups = this.ctx.getGroupedCharts() + } + + if ( + w.globals.axisCharts && + ((w.globals.minX === -Infinity && w.globals.maxX === Infinity) || + w.globals.dataPoints === 0) + ) { + return + } + + if (chartGroups.length) { + chartGroups.forEach((ch) => { + const tooltipEl = this.getElTooltip(ch) + + const newOpts = { + paths: opt.paths, + tooltipEl, + tooltipY: opt.tooltipY, + tooltipX: opt.tooltipX, + elGrid: opt.elGrid, + hoverArea: opt.hoverArea, + ttItems: ch.w.globals.tooltip.ttItems + } + + // all the charts should have the same minX and maxX (same xaxis) for multiple tooltips to work correctly + if ( + ch.w.globals.minX === this.w.globals.minX && + ch.w.globals.maxX === this.w.globals.maxX + ) { + ch.w.globals.tooltip.seriesHoverByContext({ + chartCtx: ch, + ttCtx: ch.w.globals.tooltip, + opt: newOpts, + e + }) + } + }) + } else { + this.seriesHoverByContext({ + chartCtx: this.ctx, + ttCtx: this.w.globals.tooltip, + opt, + e + }) + } + } + + seriesHoverByContext({ chartCtx, ttCtx, opt, e }) { + let w = chartCtx.w + const tooltipEl = this.getElTooltip() + + if (!tooltipEl) return + + // tooltipRect is calculated on every mousemove, because the text is dynamic + ttCtx.tooltipRect = { + x: 0, + y: 0, + ttWidth: tooltipEl.getBoundingClientRect().width, + ttHeight: tooltipEl.getBoundingClientRect().height + } + ttCtx.e = e + + // highlight the current hovered bars + if ( + ttCtx.tooltipUtil.hasBars() && + !w.globals.comboCharts && + !ttCtx.isBarShared + ) { + if (this.tConfig.onDatasetHover.highlightDataSeries) { + let series = new Series(chartCtx) + series.toggleSeriesOnHover(e, e.target.parentNode) + } + } + + if (ttCtx.fixedTooltip) { + ttCtx.drawFixedTooltipRect() + } + + if (w.globals.axisCharts) { + ttCtx.axisChartsTooltips({ + e, + opt, + tooltipRect: ttCtx.tooltipRect + }) + } else { + // non-plot charts i.e pie/donut/circle + ttCtx.nonAxisChartsTooltips({ + e, + opt, + tooltipRect: ttCtx.tooltipRect + }) + } + } + + // tooltip handling for line/area/bar/columns/scatter + axisChartsTooltips({ e, opt }) { + let w = this.w + let x, y + + let seriesBound = opt.elGrid.getBoundingClientRect() + + const clientX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX + const clientY = e.type === 'touchmove' ? e.touches[0].clientY : e.clientY + + this.clientY = clientY + this.clientX = clientX + + w.globals.capturedSeriesIndex = -1 + w.globals.capturedDataPointIndex = -1 + + if ( + clientY < seriesBound.top || + clientY > seriesBound.top + seriesBound.height + ) { + this.handleMouseOut(opt) + return + } + + if ( + Array.isArray(this.tConfig.enabledOnSeries) && + !w.config.tooltip.shared + ) { + const index = parseInt(opt.paths.getAttribute('index'), 10) + if (this.tConfig.enabledOnSeries.indexOf(index) < 0) { + this.handleMouseOut(opt) + return + } + } + + const tooltipEl = this.getElTooltip() + const xcrosshairs = this.getElXCrosshairs() + + let isStickyTooltip = + w.globals.xyCharts || + (w.config.chart.type === 'bar' && + !w.globals.isBarHorizontal && + this.tooltipUtil.hasBars() && + this.tConfig.shared) || + (w.globals.comboCharts && this.tooltipUtil.hasBars()) + + if ( + e.type === 'mousemove' || + e.type === 'touchmove' || + e.type === 'mouseup' + ) { + // there is no series to hover over + if ( + w.globals.collapsedSeries.length + + w.globals.ancillaryCollapsedSeries.length === + w.globals.series.length + ) { + return + } + + if (xcrosshairs !== null) { + xcrosshairs.classList.add('apexcharts-active') + } + + const hasYAxisTooltip = this.yaxisTooltips.filter((b) => { + return b === true + }) + if (this.ycrosshairs !== null && hasYAxisTooltip.length) { + this.ycrosshairs.classList.add('apexcharts-active') + } + + if (isStickyTooltip && !this.showOnIntersect) { + this.handleStickyTooltip(e, clientX, clientY, opt) + } else { + if ( + w.config.chart.type === 'heatmap' || + w.config.chart.type === 'treemap' + ) { + let markerXY = this.intersect.handleHeatTreeTooltip({ + e, + opt, + x, + y, + type: w.config.chart.type + }) + x = markerXY.x + y = markerXY.y + + tooltipEl.style.left = x + 'px' + tooltipEl.style.top = y + 'px' + } else { + if (this.tooltipUtil.hasBars()) { + this.intersect.handleBarTooltip({ + e, + opt + }) + } + + if (this.tooltipUtil.hasMarkers()) { + // intersect - line/area/scatter/bubble + this.intersect.handleMarkerTooltip({ + e, + opt, + x, + y + }) + } + } + } + + if (this.yaxisTooltips.length) { + for (let yt = 0; yt < w.config.yaxis.length; yt++) { + this.axesTooltip.drawYaxisTooltipText(yt, clientY, this.xyRatios) + } + } + + opt.tooltipEl.classList.add('apexcharts-active') + } else if (e.type === 'mouseout' || e.type === 'touchend') { + this.handleMouseOut(opt) + } + } + + // tooltip handling for pie/donuts + nonAxisChartsTooltips({ e, opt, tooltipRect }) { + let w = this.w + let rel = opt.paths.getAttribute('rel') + + const tooltipEl = this.getElTooltip() + + let seriesBound = w.globals.dom.elWrap.getBoundingClientRect() + + if (e.type === 'mousemove' || e.type === 'touchmove') { + tooltipEl.classList.add('apexcharts-active') + + this.tooltipLabels.drawSeriesTexts({ + ttItems: opt.ttItems, + i: parseInt(rel, 10) - 1, + shared: false + }) + + let x = w.globals.clientX - seriesBound.left - tooltipRect.ttWidth / 2 + let y = w.globals.clientY - seriesBound.top - tooltipRect.ttHeight - 10 + + tooltipEl.style.left = x + 'px' + tooltipEl.style.top = y + 'px' + + if (w.config.legend.tooltipHoverFormatter) { + let legendFormatter = w.config.legend.tooltipHoverFormatter + + const i = rel - 1 + const legendName = this.legendLabels[i].getAttribute( + 'data:default-text' + ) + + let text = legendFormatter(legendName, { + seriesIndex: i, + dataPointIndex: i, + w + }) + + this.legendLabels[i].innerHTML = text + } + } else if (e.type === 'mouseout' || e.type === 'touchend') { + tooltipEl.classList.remove('apexcharts-active') + if (w.config.legend.tooltipHoverFormatter) { + this.legendLabels.forEach((l) => { + const defaultText = l.getAttribute('data:default-text') + l.innerHTML = decodeURIComponent(defaultText) + }) + } + } + } + + handleStickyTooltip(e, clientX, clientY, opt) { + const w = this.w + let capj = this.tooltipUtil.getNearestValues({ + context: this, + hoverArea: opt.hoverArea, + elGrid: opt.elGrid, + clientX, + clientY + }) + + let j = capj.j + let capturedSeries = capj.capturedSeries + + const bounds = opt.elGrid.getBoundingClientRect() + if (capj.hoverX < 0 || capj.hoverX > bounds.width) { + this.handleMouseOut(opt) + return + } + + if (capturedSeries !== null) { + this.handleStickyCapturedSeries(e, capturedSeries, opt, j) + } else { + // couldn't capture any series. check if shared X is same, + // if yes, draw a grouped tooltip + if (this.tooltipUtil.isXoverlap(j) || w.globals.isBarHorizontal) { + this.create(e, this, 0, j, opt.ttItems) + } + } + } + + handleStickyCapturedSeries(e, capturedSeries, opt, j) { + const w = this.w + if (!this.tConfig.shared) { + let ignoreNull = w.globals.series[capturedSeries][j] === null + if (ignoreNull) { + this.handleMouseOut(opt) + return + } + } + + if (typeof w.globals.series[capturedSeries][j] !== 'undefined') { + if ( + this.tConfig.shared && + this.tooltipUtil.isXoverlap(j) && + this.tooltipUtil.isInitialSeriesSameLen() + ) { + this.create(e, this, capturedSeries, j, opt.ttItems) + } else { + this.create(e, this, capturedSeries, j, opt.ttItems, false) + } + } else { + if (this.tooltipUtil.isXoverlap(j)) { + this.create(e, this, 0, j, opt.ttItems) + } + } + } + + deactivateHoverFilter() { + let w = this.w + let graphics = new Graphics(this.ctx) + + let allPaths = w.globals.dom.Paper.select(`.apexcharts-bar-area`) + + for (let b = 0; b < allPaths.length; b++) { + graphics.pathMouseLeave(allPaths[b]) + } + } + + handleMouseOut(opt) { + const w = this.w + + const xcrosshairs = this.getElXCrosshairs() + + opt.tooltipEl.classList.remove('apexcharts-active') + this.deactivateHoverFilter() + if (w.config.chart.type !== 'bubble') { + this.marker.resetPointsSize() + } + if (xcrosshairs !== null) { + xcrosshairs.classList.remove('apexcharts-active') + } + if (this.ycrosshairs !== null) { + this.ycrosshairs.classList.remove('apexcharts-active') + } + if (this.isXAxisTooltipEnabled) { + this.xaxisTooltip.classList.remove('apexcharts-active') + } + if (this.yaxisTooltips.length) { + if (this.yaxisTTEls === null) { + this.yaxisTTEls = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-yaxistooltip' + ) + } + for (let i = 0; i < this.yaxisTTEls.length; i++) { + this.yaxisTTEls[i].classList.remove('apexcharts-active') + } + } + + if (w.config.legend.tooltipHoverFormatter) { + this.legendLabels.forEach((l) => { + const defaultText = l.getAttribute('data:default-text') + l.innerHTML = decodeURIComponent(defaultText) + }) + } + } + + markerClick(e, seriesIndex, dataPointIndex) { + const w = this.w + if (typeof w.config.chart.events.markerClick === 'function') { + w.config.chart.events.markerClick(e, this.ctx, { + seriesIndex, + dataPointIndex, + w + }) + } + this.ctx.events.fireEvent('markerClick', [ + e, + this.ctx, + { seriesIndex, dataPointIndex, w } + ]) + } + + create(e, context, capturedSeries, j, ttItems, shared = null) { + let w = this.w + let ttCtx = context + + if (e.type === 'mouseup') { + this.markerClick(e, capturedSeries, j) + } + + if (shared === null) shared = this.tConfig.shared + + const hasMarkers = this.tooltipUtil.hasMarkers() + + const bars = this.tooltipUtil.getElBars() + + if (w.config.legend.tooltipHoverFormatter) { + let legendFormatter = w.config.legend.tooltipHoverFormatter + + let els = Array.from(this.legendLabels) + + // reset all legend values first + els.forEach((l) => { + const legendName = l.getAttribute('data:default-text') + l.innerHTML = decodeURIComponent(legendName) + }) + + // for irregular time series + for (let i = 0; i < els.length; i++) { + const l = els[i] + const lsIndex = parseInt(l.getAttribute('i'), 10) + const legendName = decodeURIComponent( + l.getAttribute('data:default-text') + ) + + let text = legendFormatter(legendName, { + seriesIndex: shared ? lsIndex : capturedSeries, + dataPointIndex: j, + w + }) + + if (!shared) { + l.innerHTML = lsIndex === capturedSeries ? text : legendName + if (capturedSeries === lsIndex) { + break + } + } else { + l.innerHTML = + w.globals.collapsedSeriesIndices.indexOf(lsIndex) < 0 + ? text + : legendName + } + } + } + + if (shared) { + ttCtx.tooltipLabels.drawSeriesTexts({ + ttItems, + i: capturedSeries, + j, + shared: this.showOnIntersect ? false : this.tConfig.shared + }) + + if (hasMarkers) { + if (w.globals.markers.largestSize > 0) { + ttCtx.marker.enlargePoints(j) + } else { + ttCtx.tooltipPosition.moveDynamicPointsOnHover(j) + } + } + + if (this.tooltipUtil.hasBars()) { + this.barSeriesHeight = this.tooltipUtil.getBarsHeight(bars) + if (this.barSeriesHeight > 0) { + // hover state, activate snap filter + let graphics = new Graphics(this.ctx) + let paths = w.globals.dom.Paper.select( + `.apexcharts-bar-area[j='${j}']` + ) + + // de-activate first + this.deactivateHoverFilter() + + this.tooltipPosition.moveStickyTooltipOverBars(j) + + for (let b = 0; b < paths.length; b++) { + graphics.pathMouseEnter(paths[b]) + } + } + } + } else { + ttCtx.tooltipLabels.drawSeriesTexts({ + shared: false, + ttItems, + i: capturedSeries, + j + }) + + if (this.tooltipUtil.hasBars()) { + ttCtx.tooltipPosition.moveStickyTooltipOverBars(j) + } + + if (hasMarkers) { + ttCtx.tooltipPosition.moveMarkers(capturedSeries, j) + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Utils.js b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Utils.js new file mode 100644 index 0000000..84c47a0 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/modules/tooltip/Utils.js @@ -0,0 +1,359 @@ +import Utilities from '../../utils/Utils' + +/** + * ApexCharts Tooltip.Utils Class to support Tooltip functionality. + * + * @module Tooltip.Utils + **/ + +export default class Utils { + constructor(tooltipContext) { + this.w = tooltipContext.w + this.ttCtx = tooltipContext + this.ctx = tooltipContext.ctx + } + + /** + ** When hovering over series, you need to capture which series is being hovered on. + ** This function will return both capturedseries index as well as inner index of that series + * @memberof Utils + * @param {object} + * - hoverArea = the rect on which user hovers + * - elGrid = dimensions of the hover rect (it can be different than hoverarea) + */ + getNearestValues({ hoverArea, elGrid, clientX, clientY }) { + let w = this.w + + const seriesBound = elGrid.getBoundingClientRect() + const hoverWidth = seriesBound.width + const hoverHeight = seriesBound.height + + let xDivisor = hoverWidth / (w.globals.dataPoints - 1) + let yDivisor = hoverHeight / w.globals.dataPoints + + const hasBars = this.hasBars() + + if ( + (w.globals.comboCharts || hasBars) && + !w.config.xaxis.convertedCatToNumeric + ) { + xDivisor = hoverWidth / w.globals.dataPoints + } + + let hoverX = clientX - seriesBound.left - w.globals.barPadForNumericAxis + let hoverY = clientY - seriesBound.top + + const notInRect = + hoverX < 0 || hoverY < 0 || hoverX > hoverWidth || hoverY > hoverHeight + + if (notInRect) { + hoverArea.classList.remove('hovering-zoom') + hoverArea.classList.remove('hovering-pan') + } else { + if (w.globals.zoomEnabled) { + hoverArea.classList.remove('hovering-pan') + hoverArea.classList.add('hovering-zoom') + } else if (w.globals.panEnabled) { + hoverArea.classList.remove('hovering-zoom') + hoverArea.classList.add('hovering-pan') + } + } + + let j = Math.round(hoverX / xDivisor) + let jHorz = Math.floor(hoverY / yDivisor) + + if (hasBars && !w.config.xaxis.convertedCatToNumeric) { + j = Math.ceil(hoverX / xDivisor) + j = j - 1 + } + + let capturedSeries = null + let closest = null + let seriesXValArr = [] + let seriesYValArr = [] + + //add extra values to show markers for the first points. Included both axes to avoid incorrect positioning of the marker + w.globals.seriesXvalues.forEach((value) => { + seriesXValArr.push([value[0] + 0.000001].concat(value)) + }) + w.globals.seriesYvalues.forEach((value) => { + seriesYValArr.push([value[0] + 0.000001].concat(value)) + }) + + seriesXValArr = seriesXValArr.map((seriesXVal) => { + return seriesXVal.filter((s) => Utilities.isNumber(s)) + }) + seriesYValArr = seriesYValArr.map((seriesYVal) => { + return seriesYVal.filter((s) => Utilities.isNumber(s)) + }) + + // if X axis type is not category and tooltip is not shared, then we need to find the cursor position and get the nearest value + if (w.globals.isXNumeric) { + // Change origin of cursor position so that we can compute the relative nearest point to the cursor on our chart + // we only need to scale because all points are relative to the bounds.left and bounds.top => origin is virtually (0, 0) + const chartGridEl = this.ttCtx.getElGrid() + const chartGridElBoundingRect = chartGridEl.getBoundingClientRect() + const transformedHoverX = + hoverX * (chartGridElBoundingRect.width / hoverWidth) + const transformedHoverY = + hoverY * (chartGridElBoundingRect.height / hoverHeight) + + closest = this.closestInMultiArray( + transformedHoverX, + transformedHoverY, + seriesXValArr, + seriesYValArr + ) + capturedSeries = closest.index + j = closest.j + + if (capturedSeries !== null) { + // initial push, it should be a little smaller than the 1st val + seriesXValArr = w.globals.seriesXvalues[capturedSeries] + + closest = this.closestInArray(transformedHoverX, seriesXValArr) + + j = closest.index + } + } + + w.globals.capturedSeriesIndex = + capturedSeries === null ? -1 : capturedSeries + + if (!j || j < 1) j = 0 + + if (w.globals.isBarHorizontal) { + w.globals.capturedDataPointIndex = jHorz + } else { + w.globals.capturedDataPointIndex = j + } + + return { + capturedSeries, + j: w.globals.isBarHorizontal ? jHorz : j, + hoverX, + hoverY + } + } + + closestInMultiArray(hoverX, hoverY, Xarrays, Yarrays) { + let w = this.w + let activeIndex = 0 + let currIndex = null + let j = -1 + + if (w.globals.series.length > 1) { + activeIndex = this.getFirstActiveXArray(Xarrays) + } else { + currIndex = 0 + } + + let currX = Xarrays[activeIndex][0] + let diffX = Math.abs(hoverX - currX) + + // find nearest point on x-axis + Xarrays.forEach((arrX) => { + arrX.forEach((x, iX) => { + const newDiff = Math.abs(hoverX - x) + if (newDiff < diffX) { + diffX = newDiff + j = iX + } + }) + }) + + if (j !== -1) { + // find nearest graph on y-axis relevanted to nearest point on x-axis + let currY = Yarrays[activeIndex][j] + let diffY = Math.abs(hoverY - currY) + currIndex = activeIndex + + Yarrays.forEach((arrY, iAY) => { + const newDiff = Math.abs(hoverY - arrY[j]) + if (newDiff < diffY) { + diffY = newDiff + currIndex = iAY + } + }) + } + + return { + index: currIndex, + j + } + } + + getFirstActiveXArray(Xarrays) { + const w = this.w + let activeIndex = 0 + + let firstActiveSeriesIndex = Xarrays.map((xarr, index) => { + return xarr.length > 0 ? index : -1 + }) + + for (let a = 0; a < firstActiveSeriesIndex.length; a++) { + if ( + firstActiveSeriesIndex[a] !== -1 && + w.globals.collapsedSeriesIndices.indexOf(a) === -1 && + w.globals.ancillaryCollapsedSeriesIndices.indexOf(a) === -1 + ) { + activeIndex = firstActiveSeriesIndex[a] + break + } + } + + return activeIndex + } + + closestInArray(val, arr) { + let curr = arr[0] + let currIndex = null + let diff = Math.abs(val - curr) + + for (let i = 0; i < arr.length; i++) { + let newdiff = Math.abs(val - arr[i]) + if (newdiff < diff) { + diff = newdiff + currIndex = i + } + } + + return { + index: currIndex + } + } + + /** + * When there are multiple series, it is possible to have different x values for each series. + * But it may be possible in those multiple series, that there is same x value for 2 or more + * series. + * @memberof Utils + * @param {int} + * - j = is the inner index of series -> (series[i][j]) + * @return {bool} + */ + isXoverlap(j) { + let w = this.w + let xSameForAllSeriesJArr = [] + + const seriesX = w.globals.seriesX.filter((s) => typeof s[0] !== 'undefined') + + if (seriesX.length > 0) { + for (let i = 0; i < seriesX.length - 1; i++) { + if ( + typeof seriesX[i][j] !== 'undefined' && + typeof seriesX[i + 1][j] !== 'undefined' + ) { + if (seriesX[i][j] !== seriesX[i + 1][j]) { + xSameForAllSeriesJArr.push('unEqual') + } + } + } + } + + if (xSameForAllSeriesJArr.length === 0) { + return true + } + + return false + } + + isInitialSeriesSameLen() { + let sameLen = true + + const initialSeries = this.w.globals.initialSeries + + for (let i = 0; i < initialSeries.length - 1; i++) { + if (initialSeries[i].data.length !== initialSeries[i + 1].data.length) { + sameLen = false + break + } + } + + return sameLen + } + + getBarsHeight(allbars) { + let bars = [...allbars] + const totalHeight = bars.reduce((acc, bar) => acc + bar.getBBox().height, 0) + + return totalHeight + } + + getElMarkers() { + return this.w.globals.dom.baseEl.querySelectorAll( + ' .apexcharts-series-markers' + ) + } + + getAllMarkers() { + // first get all marker parents. This parent class contains series-index + // which helps to sort the markers as they are dynamic + let markersWraps = this.w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-series-markers-wrap' + ) + + markersWraps = [...markersWraps] + markersWraps.sort((a, b) => { + var indexA = Number(a.getAttribute('data:realIndex')) + var indexB = Number(b.getAttribute('data:realIndex')) + return indexB < indexA ? 1 : indexB > indexA ? -1 : 0 + }) + + let markers = [] + markersWraps.forEach((m) => { + markers.push(m.querySelector('.apexcharts-marker')) + }) + + return markers + } + + hasMarkers() { + const markers = this.getElMarkers() + return markers.length > 0 + } + + getElBars() { + return this.w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series' + ) + } + + hasBars() { + const bars = this.getElBars() + return bars.length > 0 + } + + getHoverMarkerSize(index) { + const w = this.w + let hoverSize = w.config.markers.hover.size + + if (hoverSize === undefined) { + hoverSize = + w.globals.markers.size[index] + w.config.markers.hover.sizeOffset + } + return hoverSize + } + + toggleAllTooltipSeriesGroups(state) { + let w = this.w + const ttCtx = this.ttCtx + + if (ttCtx.allTooltipSeriesGroups.length === 0) { + ttCtx.allTooltipSeriesGroups = w.globals.dom.baseEl.querySelectorAll( + '.apexcharts-tooltip-series-group' + ) + } + + let allTooltipSeriesGroups = ttCtx.allTooltipSeriesGroups + for (let i = 0; i < allTooltipSeriesGroups.length; i++) { + if (state === 'enable') { + allTooltipSeriesGroups[i].classList.add('apexcharts-active') + allTooltipSeriesGroups[i].style.display = w.config.tooltip.items.display + } else { + allTooltipSeriesGroups[i].classList.remove('apexcharts-active') + allTooltipSeriesGroups[i].style.display = 'none' + } + } + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/svgjs/svg.js b/cao_sunyata/static/libs/apexcharts/src/svgjs/svg.js new file mode 100644 index 0000000..ca9a884 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/svgjs/svg.js @@ -0,0 +1,3752 @@ +/*! +* svg.js - A lightweight library for manipulating and animating SVG. +* @version 2.6.6 +* https://svgdotjs.github.io/ +*/; +(function (root, factory) { + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define(function () { + return factory(root, root.document) + }) + /* below check fixes #412 */ + } else if (typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = root.document ? factory(root, root.document) : function (w) { return factory(w, w.document) } + } else { + root.SVG = factory(root, root.document) + } +}(typeof window !== 'undefined' ? window : this, function (window, document) { +// Find global reference - uses 'this' by default when available, +// falls back to 'window' otherwise (for bundlers like Webpack) + var globalRef = (typeof this !== 'undefined') ? this : window + + // The main wrapping element + var SVG = globalRef.SVG = function (element) { + if (SVG.supported) { + element = new SVG.Doc(element) + + if (!SVG.parser.draw) { SVG.prepare() } + + return element + } + } + + // Default namespaces + SVG.ns = 'http://www.w3.org/2000/svg' + SVG.xmlns = 'http://www.w3.org/2000/xmlns/' + SVG.xlink = 'http://www.w3.org/1999/xlink' + SVG.svgjs = 'http://svgjs.dev' + + // Svg support test + SVG.supported = (function () { + return true + // !!document.createElementNS && + // !! document.createElementNS(SVG.ns,'svg').createSVGRect + })() + + // Don't bother to continue if SVG is not supported + if (!SVG.supported) return false + + // Element id sequence + SVG.did = 1000 + + // Get next named element id + SVG.eid = function (name) { + return 'Svgjs' + capitalize(name) + (SVG.did++) + } + + // Method for element creation + SVG.create = function (name) { + // create element + var element = document.createElementNS(this.ns, name) + + // apply unique id + element.setAttribute('id', this.eid(name)) + + return element + } + + // Method for extending objects + SVG.extend = function () { + var modules, methods + + // Get list of modules + modules = [].slice.call(arguments) + + // Get object with extensions + methods = modules.pop() + + for (var i = modules.length - 1; i >= 0; i--) { + if (modules[i]) { + for (var key in methods) { modules[i].prototype[key] = methods[key] } + } + } + + // Make sure SVG.Set inherits any newly added methods + if (SVG.Set && SVG.Set.inherit) { SVG.Set.inherit() } + } + + // Invent new element + SVG.invent = function (config) { + // Create element initializer + var initializer = typeof config.create === 'function' + ? config.create + : function () { + this.constructor.call(this, SVG.create(config.create)) + } + + // Inherit prototype + if (config.inherit) { initializer.prototype = new config.inherit() } + + // Extend with methods + if (config.extend) { SVG.extend(initializer, config.extend) } + + // Attach construct method to parent + if (config.construct) { SVG.extend(config.parent || SVG.Container, config.construct) } + + return initializer + } + + // Adopt existing svg elements + SVG.adopt = function (node) { + // check for presence of node + if (!node) return null + + // make sure a node isn't already adopted + if (node.instance) return node.instance + + // initialize variables + var element + + // adopt with element-specific settings + if (node.nodeName == 'svg') { element = node.parentNode instanceof window.SVGElement ? new SVG.Nested() : new SVG.Doc() } else if (node.nodeName == 'linearGradient') { element = new SVG.Gradient('linear') } else if (node.nodeName == 'radialGradient') { element = new SVG.Gradient('radial') } else if (SVG[capitalize(node.nodeName)]) { element = new SVG[capitalize(node.nodeName)]() } else { element = new SVG.Element(node) } + + // ensure references + element.type = node.nodeName + element.node = node + node.instance = element + + // SVG.Class specific preparations + if (element instanceof SVG.Doc) { element.namespace().defs() } + + // pull svgjs data from the dom (getAttributeNS doesn't work in html5) + element.setData(JSON.parse(node.getAttribute('svgjs:data')) || {}) + + return element + } + + // Initialize parsing element + SVG.prepare = function () { + // Select document body and create invisible svg element + var body = document.getElementsByTagName('body')[0], + draw = (body ? new SVG.Doc(body) : SVG.adopt(document.documentElement).nested()).size(2, 0) + + // Create parser object + SVG.parser = { + body: body || document.documentElement, + draw: draw.style('opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden').node, + poly: draw.polyline().node, + path: draw.path().node, + native: SVG.create('svg') + } + } + + SVG.parser = { + native: SVG.create('svg') + } + + document.addEventListener('DOMContentLoaded', function () { + if (!SVG.parser.draw) { SVG.prepare() } + }, false) + + // Storage for regular expressions + SVG.regex = { + // Parse unit value + numberAndUnit: /^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i, + + // Parse hex value + hex: /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, + + // Parse rgb value + rgb: /rgb\((\d+),(\d+),(\d+)\)/, + + // Parse reference id + reference: /#([a-z0-9\-_]+)/i, + + // splits a transformation chain + transforms: /\)\s*,?\s*/, + + // Whitespace + whitespace: /\s/g, + + // Test hex value + isHex: /^#[a-f0-9]{3,6}$/i, + + // Test rgb value + isRgb: /^rgb\(/, + + // Test css declaration + isCss: /[^:]+:[^;]+;?/, + + // Test for blank string + isBlank: /^(\s+)?$/, + + // Test for numeric string + isNumber: /^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + + // Test for percent value + isPercent: /^-?[\d\.]+%$/, + + // Test for image url + isImage: /\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i, + + // split at whitespace and comma + delimiter: /[\s,]+/, + + // The following regex are used to parse the d attribute of a path + + // Matches all hyphens which are not after an exponent + hyphen: /([^e])\-/gi, + + // Replaces and tests for all path letters + pathLetters: /[MLHVCSQTAZ]/gi, + + // yes we need this one, too + isPathLetter: /[MLHVCSQTAZ]/i, + + // matches 0.154.23.45 + numbersWithDots: /((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi, + + // matches . + dots: /\./g + } + + SVG.utils = { + // Map function + map: function (array, block) { + var il = array.length, + result = [] + + for (var i = 0; i < il; i++) { result.push(block(array[i])) } + + return result + }, + + // Filter function + filter: function (array, block) { + var il = array.length, + result = [] + + for (var i = 0; i < il; i++) { + if (block(array[i])) { result.push(array[i]) } + } + + return result + }, + + filterSVGElements: function (nodes) { + return this.filter(nodes, function (el) { return el instanceof window.SVGElement }) + } + + } + + SVG.defaults = { + // Default attribute values + attrs: { + // fill and stroke + 'fill-opacity': 1, + 'stroke-opacity': 1, + 'stroke-width': 0, + 'stroke-linejoin': 'miter', + 'stroke-linecap': 'butt', + fill: '#000000', + stroke: '#000000', + opacity: 1, + // position + x: 0, + y: 0, + cx: 0, + cy: 0, + // size + width: 0, + height: 0, + // radius + r: 0, + rx: 0, + ry: 0, + // gradient + offset: 0, + 'stop-opacity': 1, + 'stop-color': '#000000', + // text + 'font-size': 16, + 'font-family': 'Helvetica, Arial, sans-serif', + 'text-anchor': 'start' + } + + } + // Module for color convertions + SVG.Color = function (color) { + var match + + // initialize defaults + this.r = 0 + this.g = 0 + this.b = 0 + + if (!color) return + + // parse color + if (typeof color === 'string') { + if (SVG.regex.isRgb.test(color)) { + // get rgb values + match = SVG.regex.rgb.exec(color.replace(SVG.regex.whitespace, '')) + + // parse numeric values + this.r = parseInt(match[1]) + this.g = parseInt(match[2]) + this.b = parseInt(match[3]) + } else if (SVG.regex.isHex.test(color)) { + // get hex values + match = SVG.regex.hex.exec(fullHex(color)) + + // parse numeric values + this.r = parseInt(match[1], 16) + this.g = parseInt(match[2], 16) + this.b = parseInt(match[3], 16) + } + } else if (typeof color === 'object') { + this.r = color.r + this.g = color.g + this.b = color.b + } + } + + SVG.extend(SVG.Color, { + // Default to hex conversion + toString: function () { + return this.toHex() + }, + // Build hex value + toHex: function () { + return '#' + + compToHex(this.r) + + compToHex(this.g) + + compToHex(this.b) + }, + // Build rgb value + toRgb: function () { + return 'rgb(' + [this.r, this.g, this.b].join() + ')' + }, + // Calculate true brightness + brightness: function () { + return (this.r / 255 * 0.30) + + (this.g / 255 * 0.59) + + (this.b / 255 * 0.11) + }, + // Make color morphable + morph: function (color) { + this.destination = new SVG.Color(color) + + return this + }, + // Get morphed color at given position + at: function (pos) { + // make sure a destination is defined + if (!this.destination) return this + + // normalise pos + pos = pos < 0 ? 0 : pos > 1 ? 1 : pos + + // generate morphed color + return new SVG.Color({ + r: ~~(this.r + (this.destination.r - this.r) * pos), + g: ~~(this.g + (this.destination.g - this.g) * pos), + b: ~~(this.b + (this.destination.b - this.b) * pos) + }) + } + + }) + + // Testers + + // Test if given value is a color string + SVG.Color.test = function (color) { + color += '' + return SVG.regex.isHex.test(color) || + SVG.regex.isRgb.test(color) + } + + // Test if given value is a rgb object + SVG.Color.isRgb = function (color) { + return color && typeof color.r === 'number' && + typeof color.g === 'number' && + typeof color.b === 'number' + } + + // Test if given value is a color + SVG.Color.isColor = function (color) { + return SVG.Color.isRgb(color) || SVG.Color.test(color) + } + // Module for array conversion + SVG.Array = function (array, fallback) { + array = (array || []).valueOf() + + // if array is empty and fallback is provided, use fallback + if (array.length == 0 && fallback) { array = fallback.valueOf() } + + // parse array + this.value = this.parse(array) + } + + SVG.extend(SVG.Array, { + + // Convert array to string + toString: function () { + return this.value.join(' ') + }, + // Real value + valueOf: function () { + return this.value + }, + // Parse whitespace separated string + parse: function (array) { + array = array.valueOf() + + // if already is an array, no need to parse it + if (Array.isArray(array)) return array + + return this.split(array) + }, + + }) + // Poly points array + SVG.PointArray = function (array, fallback) { + SVG.Array.call(this, array, fallback || [[0, 0]]) + } + + // Inherit from SVG.Array + SVG.PointArray.prototype = new SVG.Array() + SVG.PointArray.prototype.constructor = SVG.PointArray + + + var pathHandlers = { + M: function (c, p, p0) { + p.x = p0.x = c[0] + p.y = p0.y = c[1] + + return ['M', p.x, p.y] + }, + L: function (c, p) { + p.x = c[0] + p.y = c[1] + return ['L', c[0], c[1]] + }, + H: function (c, p) { + p.x = c[0] + return ['H', c[0]] + }, + V: function (c, p) { + p.y = c[0] + return ['V', c[0]] + }, + C: function (c, p) { + p.x = c[4] + p.y = c[5] + return ['C', c[0], c[1], c[2], c[3], c[4], c[5]] + }, + Q: function (c, p) { + p.x = c[2] + p.y = c[3] + return ['Q', c[0], c[1], c[2], c[3]] + }, + Z: function (c, p, p0) { + p.x = p0.x + p.y = p0.y + return ['Z'] + }, + } + + var mlhvqtcsa = 'mlhvqtcsaz'.split('') + + for (var i = 0, il = mlhvqtcsa.length; i < il; ++i) { + pathHandlers[mlhvqtcsa[i]] = (function (i) { + return function (c, p, p0) { + if (i == 'H') c[0] = c[0] + p.x + else if (i == 'V') c[0] = c[0] + p.y + else if (i == 'A') { + c[5] = c[5] + p.x, + c[6] = c[6] + p.y + } else { + for (var j = 0, jl = c.length; j < jl; ++j) { + c[j] = c[j] + (j % 2 ? p.y : p.x) + } + } + + if(pathHandlers && typeof pathHandlers[i] === 'function') { + // this check fixes jest unit tests + return pathHandlers[i](c, p, p0) + } + } + })(mlhvqtcsa[i].toUpperCase()) + } + + // Path points array + SVG.PathArray = function (array, fallback) { + SVG.Array.call(this, array, fallback || [['M', 0, 0]]) + } + + // Inherit from SVG.Array + SVG.PathArray.prototype = new SVG.Array() + SVG.PathArray.prototype.constructor = SVG.PathArray + + SVG.extend(SVG.PathArray, { + // Convert array to string + toString: function () { + return arrayToString(this.value) + }, + // Move path string + move: function (x, y) { + // get bounding box of current situation + var box = this.bbox() + + // get relative offset + x -= box.x + y -= box.y + + return this + }, + // Get morphed path array at given position + at: function (pos) { + // make sure a destination is defined + if (!this.destination) return this + + var sourceArray = this.value, + destinationArray = this.destination.value, + array = [], pathArray = new SVG.PathArray(), + il, jl + + // Animate has specified in the SVG spec + // See: https://www.w3.org/TR/SVG11/paths.html#PathElement + for (var i = 0, il = sourceArray.length; i < il; i++) { + array[i] = [sourceArray[i][0]] + for (var j = 1, jl = sourceArray[i].length; j < jl; j++) { + array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos + } + // For the two flags of the elliptical arc command, the SVG spec say: + // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true + // Elliptical arc command as an array followed by corresponding indexes: + // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y] + // 0 1 2 3 4 5 6 7 + if (array[i][0] === 'A') { + array[i][4] = +(array[i][4] != 0) + array[i][5] = +(array[i][5] != 0) + } + } + + // Directly modify the value of a path array, this is done this way for performance + pathArray.value = array + return pathArray + }, + // Absolutize and parse path to array + parse: function (array) { + // if it's already a patharray, no need to parse it + if (array instanceof SVG.PathArray) return array.valueOf() + + // prepare for parsing + var i, x0, y0, s, seg, arr, + x = 0, + y = 0, + paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 } + + if (typeof array === 'string') { + array = array + .replace(SVG.regex.numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123 + .replace(SVG.regex.pathLetters, ' $& ') // put some room between letters and numbers + .replace(SVG.regex.hyphen, '$1 -') // add space before hyphen + .trim() // trim + .split(SVG.regex.delimiter) // split into array + } else { + array = array.reduce(function (prev, curr) { + return [].concat.call(prev, curr) + }, []) + } + + // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...] + var arr = [], + p = new SVG.Point(), + p0 = new SVG.Point(), + index = 0, + len = array.length + + do { + // Test if we have a path letter + if (SVG.regex.isPathLetter.test(array[index])) { + s = array[index] + ++index + // If last letter was a move command and we got no new, it defaults to [L]ine + } else if (s == 'M') { + s = 'L' + } else if (s == 'm') { + s = 'l' + } + + arr.push(pathHandlers[s].call(null, + array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat), + p, p0 + ) + ) + } while (len > index) + + return arr + }, + // Get bounding box of path + bbox: function () { + if (!SVG.parser.draw) { SVG.prepare() } + SVG.parser.path.setAttribute('d', this.toString()) + + return SVG.parser.path.getBBox() + } + + }) + + // Module for unit convertions + SVG.Number = SVG.invent({ + // Initialize + create: function (value, unit) { + // initialize defaults + this.value = 0 + this.unit = unit || '' + + // parse value + if (typeof value === 'number') { + // ensure a valid numeric value + this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value + } else if (typeof value === 'string') { + unit = value.match(SVG.regex.numberAndUnit) + + if (unit) { + // make value numeric + this.value = parseFloat(unit[1]) + + // normalize + if (unit[5] == '%') { this.value /= 100 } else if (unit[5] == 's') { this.value *= 1000 } + + // store unit + this.unit = unit[5] + } + } else { + if (value instanceof SVG.Number) { + this.value = value.valueOf() + this.unit = value.unit + } + } + }, + // Add methods + extend: { + // Stringalize + toString: function () { + return ( + this.unit == '%' + ? ~~(this.value * 1e8) / 1e6 + : this.unit == 's' + ? this.value / 1e3 + : this.value + ) + this.unit + }, + toJSON: function () { + return this.toString() + }, // Convert to primitive + valueOf: function () { + return this.value + }, + // Add number + plus: function (number) { + number = new SVG.Number(number) + return new SVG.Number(this + number, this.unit || number.unit) + }, + // Subtract number + minus: function (number) { + number = new SVG.Number(number) + return new SVG.Number(this - number, this.unit || number.unit) + }, + // Multiply number + times: function (number) { + number = new SVG.Number(number) + return new SVG.Number(this * number, this.unit || number.unit) + }, + // Divide number + divide: function (number) { + number = new SVG.Number(number) + return new SVG.Number(this / number, this.unit || number.unit) + }, + // Convert to different unit + to: function (unit) { + var number = new SVG.Number(this) + + if (typeof unit === 'string') { number.unit = unit } + + return number + }, + // Make number morphable + morph: function (number) { + this.destination = new SVG.Number(number) + + if (number.relative) { + this.destination.value += this.value + } + + return this + }, + // Get morphed number at given position + at: function (pos) { + // Make sure a destination is defined + if (!this.destination) return this + + // Generate new morphed number + return new SVG.Number(this.destination) + .minus(this) + .times(pos) + .plus(this) + } + + } + }) + + SVG.Element = SVG.invent({ + // Initialize node + create: function (node) { + // make stroke value accessible dynamically + this._stroke = SVG.defaults.attrs.stroke + this._event = null + + // initialize data object + this.dom = {} + + // create circular reference + if (this.node = node) { + this.type = node.nodeName + this.node.instance = this + + // store current attribute value + this._stroke = node.getAttribute('stroke') || this._stroke + } + }, + + // Add class methods + extend: { + // Move over x-axis + x: function (x) { + return this.attr('x', x) + }, + // Move over y-axis + y: function (y) { + return this.attr('y', y) + }, + // Move by center over x-axis + cx: function (x) { + return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2) + }, + // Move by center over y-axis + cy: function (y) { + return y == null ? this.y() + this.height() / 2 : this.y(y - this.height() / 2) + }, + // Move element to given x and y values + move: function (x, y) { + return this.x(x).y(y) + }, + // Move element by its center + center: function (x, y) { + return this.cx(x).cy(y) + }, + // Set width of element + width: function (width) { + return this.attr('width', width) + }, + // Set height of element + height: function (height) { + return this.attr('height', height) + }, + // Set element size to given width and height + size: function (width, height) { + var p = proportionalSize(this, width, height) + + return this + .width(new SVG.Number(p.width)) + .height(new SVG.Number(p.height)) + }, + // Clone element + clone: function (parent) { + // write dom data to the dom so the clone can pickup the data + this.writeDataToDom() + + // clone element and assign new id + var clone = assignNewId(this.node.cloneNode(true)) + + // insert the clone in the given parent or after myself + if (parent) parent.add(clone) + else this.after(clone) + + return clone + }, + // Remove element + remove: function () { + if (this.parent()) { this.parent().removeElement(this) } + + return this + }, + // Replace element + replace: function (element) { + this.after(element).remove() + + return element + }, + // Add element to given container and return self + addTo: function (parent) { + return parent.put(this) + }, + // Add element to given container and return container + putIn: function (parent) { + return parent.add(this) + }, + // Get / set id + id: function (id) { + return this.attr('id', id) + }, + + // Show element + show: function () { + return this.style('display', '') + }, + // Hide element + hide: function () { + return this.style('display', 'none') + }, + // Is element visible? + visible: function () { + return this.style('display') != 'none' + }, + // Return id on string conversion + toString: function () { + return this.attr('id') + }, + // Return array of classes on the node + classes: function () { + var attr = this.attr('class') + + return attr == null ? [] : attr.trim().split(SVG.regex.delimiter) + }, + // Return true if class exists on the node, false otherwise + hasClass: function (name) { + return this.classes().indexOf(name) != -1 + }, + // Add class to the node + addClass: function (name) { + if (!this.hasClass(name)) { + var array = this.classes() + array.push(name) + this.attr('class', array.join(' ')) + } + + return this + }, + // Remove class from the node + removeClass: function (name) { + if (this.hasClass(name)) { + this.attr('class', this.classes().filter(function (c) { + return c != name + }).join(' ')) + } + + return this + }, + // Toggle the presence of a class on the node + toggleClass: function (name) { + return this.hasClass(name) ? this.removeClass(name) : this.addClass(name) + }, + // Get referenced element form attribute value + reference: function (attr) { + return SVG.get(this.attr(attr)) + }, + // Returns the parent element instance + parent: function (type) { + var parent = this + + // check for parent + if (!parent.node.parentNode) return null + + // get parent element + parent = SVG.adopt(parent.node.parentNode) + + if (!type) return parent + + // loop trough ancestors if type is given + while (parent && parent.node instanceof window.SVGElement) { + if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent + if (!parent.node.parentNode || parent.node.parentNode.nodeName == '#document') return null // #759, #720 + parent = SVG.adopt(parent.node.parentNode) + } + }, + // Get parent document + doc: function () { + return this instanceof SVG.Doc ? this : this.parent(SVG.Doc) + }, + // return array of all ancestors of given type up to the root svg + parents: function (type) { + var parents = [], parent = this + + do { + parent = parent.parent(type) + if (!parent || !parent.node) break + + parents.push(parent) + } while (parent.parent) + + return parents + }, + // matches the element vs a css selector + matches: function (selector) { + return matches(this.node, selector) + }, + // Returns the svg node to call native svg methods on it + native: function () { + return this.node + }, + // Import raw svg + svg: function (svg) { + // create temporary holder + var well = document.createElement('svg') + + // act as a setter if svg is given + if (svg && this instanceof SVG.Parent) { + // dump raw svg + well.innerHTML = '' + svg.replace(/\n/, '').replace(/<([\w:-]+)([^<]+?)\/>/g, '<$1$2>') + '' + + // transplant nodes + for (var i = 0, il = well.firstChild.childNodes.length; i < il; i++) { this.node.appendChild(well.firstChild.firstChild) } + + // otherwise act as a getter + } else { + // create a wrapping svg element in case of partial content + well.appendChild(svg = document.createElement('svg')) + + // write svgjs data to the dom + this.writeDataToDom() + + // insert a copy of this node + svg.appendChild(this.node.cloneNode(true)) + + // return target element + return well.innerHTML.replace(/^/, '').replace(/<\/svg>$/, '') + } + + return this + }, + + // write svgjs data to the dom + writeDataToDom: function () { + // dump variables recursively + if (this.each || this.lines) { + var fn = this.each ? this : this.lines() + fn.each(function () { + this.writeDataToDom() + }) + } + + // remove previously set data + this.node.removeAttribute('svgjs:data') + + if (Object.keys(this.dom).length) { this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) } // see #428 + + return this + }, + // set given data to the elements data property + setData: function (o) { + this.dom = o + return this + }, + is: function (obj) { + return is(this, obj) + } + } + }) + + SVG.easing = { + '-': function (pos) { return pos }, + '<>': function (pos) { return -Math.cos(pos * Math.PI) / 2 + 0.5 }, + '>': function (pos) { return Math.sin(pos * Math.PI / 2) }, + '<': function (pos) { return -Math.cos(pos * Math.PI / 2) + 1 } + } + + SVG.morph = function (pos) { + return function (from, to) { + return new SVG.MorphObj(from, to).at(pos) + } + } + + SVG.Situation = SVG.invent({ + + create: function (o) { + this.init = false + this.reversed = false + this.reversing = false + + this.duration = new SVG.Number(o.duration).valueOf() + this.delay = new SVG.Number(o.delay).valueOf() + + this.start = +new Date() + this.delay + this.finish = this.start + this.duration + this.ease = o.ease + + // this.loop is incremented from 0 to this.loops + // it is also incremented when in an infinite loop (when this.loops is true) + this.loop = 0 + this.loops = false + + this.animations = { + // functionToCall: [list of morphable objects] + // e.g. move: [SVG.Number, SVG.Number] + } + + this.attrs = { + // holds all attributes which are not represented from a function svg.js provides + // e.g. someAttr: SVG.Number + } + + this.styles = { + // holds all styles which should be animated + // e.g. fill-color: SVG.Color + } + + this.transforms = [ + // holds all transformations as transformation objects + // e.g. [SVG.Rotate, SVG.Translate, SVG.Matrix] + ] + + this.once = { + // functions to fire at a specific position + // e.g. "0.5": function foo(){} + } + } + + }) + + SVG.FX = SVG.invent({ + + create: function (element) { + this._target = element + this.situations = [] + this.active = false + this.situation = null + this.paused = false + this.lastPos = 0 + this.pos = 0 + // The absolute position of an animation is its position in the context of its complete duration (including delay and loops) + // When performing a delay, absPos is below 0 and when performing a loop, its value is above 1 + this.absPos = 0 + this._speed = 1 + }, + + extend: { + + /** + * sets or returns the target of this animation + * @param o object || number In case of Object it holds all parameters. In case of number its the duration of the animation + * @param ease function || string Function which should be used for easing or easing keyword + * @param delay Number indicating the delay before the animation starts + * @return target || this + */ + animate: function (o, ease, delay) { + if (typeof o === 'object') { + ease = o.ease + delay = o.delay + o = o.duration + } + + var situation = new SVG.Situation({ + duration: o || 1000, + delay: delay || 0, + ease: SVG.easing[ease || '-'] || ease + }) + + this.queue(situation) + + return this + }, + + /** + * sets a delay before the next element of the queue is called + * @param delay Duration of delay in milliseconds + * @return this.target() + */ + + + /** + * sets or returns the target of this animation + * @param null || target SVG.Element which should be set as new target + * @return target || this + */ + target: function (target) { + if (target && target instanceof SVG.Element) { + this._target = target + return this + } + + return this._target + }, + + // returns the absolute position at a given time + timeToAbsPos: function (timestamp) { + return (timestamp - this.situation.start) / (this.situation.duration / this._speed) + }, + + // returns the timestamp from a given absolute positon + absPosToTime: function (absPos) { + return this.situation.duration / this._speed * absPos + this.situation.start + }, + + // starts the animationloop + startAnimFrame: function () { + this.stopAnimFrame() + this.animationFrame = window.requestAnimationFrame(function () { this.step() }.bind(this)) + }, + + // cancels the animationframe + stopAnimFrame: function () { + window.cancelAnimationFrame(this.animationFrame) + }, + + // kicks off the animation - only does something when the queue is currently not active and at least one situation is set + start: function () { + // dont start if already started + if (!this.active && this.situation) { + this.active = true + this.startCurrent() + } + + return this + }, + + // start the current situation + startCurrent: function () { + this.situation.start = +new Date() + this.situation.delay / this._speed + this.situation.finish = this.situation.start + this.situation.duration / this._speed + return this.initAnimations().step() + }, + + /** + * adds a function / Situation to the animation queue + * @param fn function / situation to add + * @return this + */ + queue: function (fn) { + if (typeof fn === 'function' || fn instanceof SVG.Situation) { this.situations.push(fn) } + + if (!this.situation) this.situation = this.situations.shift() + + return this + }, + + /** + * pulls next element from the queue and execute it + * @return this + */ + dequeue: function () { + // stop current animation + this.stop() + + // get next animation from queue + this.situation = this.situations.shift() + + if (this.situation) { + if (this.situation instanceof SVG.Situation) { + this.start() + } else { + // If it is not a SVG.Situation, then it is a function, we execute it + this.situation.call(this) + } + } + + return this + }, + + // updates all animations to the current state of the element + // this is important when one property could be changed from another property + initAnimations: function () { + var source + var s = this.situation + + if (s.init) return this + + for (var i in s.animations) { + source = this.target()[i]() + + if (!Array.isArray(source)) { + source = [source] + } + + if (!Array.isArray(s.animations[i])) { + s.animations[i] = [s.animations[i]] + } + + // if(s.animations[i].length > source.length) { + // source.concat = source.concat(s.animations[i].slice(source.length, s.animations[i].length)) + // } + + for (var j = source.length; j--;) { + // The condition is because some methods return a normal number instead + // of a SVG.Number + if (s.animations[i][j] instanceof SVG.Number) { source[j] = new SVG.Number(source[j]) } + + s.animations[i][j] = source[j].morph(s.animations[i][j]) + } + } + + for (var i in s.attrs) { + s.attrs[i] = new SVG.MorphObj(this.target().attr(i), s.attrs[i]) + } + + for (var i in s.styles) { + s.styles[i] = new SVG.MorphObj(this.target().style(i), s.styles[i]) + } + + s.initialTransformation = this.target().matrixify() + + s.init = true + return this + }, + clearQueue: function () { + this.situations = [] + return this + }, + clearCurrent: function () { + this.situation = null + return this + }, + /** stops the animation immediately + * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. + * @param clearQueue A Boolean indicating whether to remove queued animation as well. + * @return this + */ + stop: function (jumpToEnd, clearQueue) { + var active = this.active + this.active = false + + if (clearQueue) { + this.clearQueue() + } + + if (jumpToEnd && this.situation) { + // initialize the situation if it was not + !active && this.startCurrent() + this.atEnd() + } + + this.stopAnimFrame() + + return this.clearCurrent() + }, + + + + after: function (fn) { + var c = this.last(), + wrapper = function wrapper (e) { + if (e.detail.situation == c) { + fn.call(this, c) + this.off('finished.fx', wrapper) // prevent memory leak + } + } + + this.target().on('finished.fx', wrapper) + + return this._callStart() + }, + // adds a callback which is called whenever one animation step is performed + during: function (fn) { + var c = this.last(), + wrapper = function (e) { + if (e.detail.situation == c) { + fn.call(this, e.detail.pos, SVG.morph(e.detail.pos), e.detail.eased, c) + } + } + + // see above + this.target().off('during.fx', wrapper).on('during.fx', wrapper) + + this.after(function () { + this.off('during.fx', wrapper) + }) + + return this._callStart() + }, + + // calls after ALL animations in the queue are finished + afterAll: function (fn) { + var wrapper = function wrapper (e) { + fn.call(this) + this.off('allfinished.fx', wrapper) + } + + // see above + this.target().off('allfinished.fx', wrapper).on('allfinished.fx', wrapper) + + return this._callStart() + }, + + + last: function () { + return this.situations.length ? this.situations[this.situations.length - 1] : this.situation + }, + + // adds one property to the animations + add: function (method, args, type) { + this.last()[type || 'animations'][method] = args + return this._callStart() + }, + + /** perform one step of the animation + * @param ignoreTime Boolean indicating whether to ignore time and use position directly or recalculate position based on time + * @return this + */ + step: function (ignoreTime) { + // convert current time to an absolute position + if (!ignoreTime) this.absPos = this.timeToAbsPos(+new Date()) + + // This part convert an absolute position to a position + if (this.situation.loops !== false) { + var absPos, absPosInt, lastLoop + + // If the absolute position is below 0, we just treat it as if it was 0 + absPos = Math.max(this.absPos, 0) + absPosInt = Math.floor(absPos) + + if (this.situation.loops === true || absPosInt < this.situation.loops) { + this.pos = absPos - absPosInt + lastLoop = this.situation.loop + this.situation.loop = absPosInt + } else { + this.absPos = this.situation.loops + this.pos = 1 + // The -1 here is because we don't want to toggle reversed when all the loops have been completed + lastLoop = this.situation.loop - 1 + this.situation.loop = this.situation.loops + } + + if (this.situation.reversing) { + // Toggle reversed if an odd number of loops as occured since the last call of step + this.situation.reversed = this.situation.reversed != Boolean((this.situation.loop - lastLoop) % 2) + } + } else { + // If there are no loop, the absolute position must not be above 1 + this.absPos = Math.min(this.absPos, 1) + this.pos = this.absPos + } + + // while the absolute position can be below 0, the position must not be below 0 + if (this.pos < 0) this.pos = 0 + + if (this.situation.reversed) this.pos = 1 - this.pos + + // apply easing + var eased = this.situation.ease(this.pos) + + // call once-callbacks + for (var i in this.situation.once) { + if (i > this.lastPos && i <= eased) { + this.situation.once[i].call(this.target(), this.pos, eased) + delete this.situation.once[i] + } + } + + // fire during callback with position, eased position and current situation as parameter + if (this.active) this.target().fire('during', {pos: this.pos, eased: eased, fx: this, situation: this.situation}) + + // the user may call stop or finish in the during callback + // so make sure that we still have a valid situation + if (!this.situation) { + return this + } + + // apply the actual animation to every property + this.eachAt() + + // do final code when situation is finished + if ((this.pos == 1 && !this.situation.reversed) || (this.situation.reversed && this.pos == 0)) { + // stop animation callback + this.stopAnimFrame() + + // fire finished callback with current situation as parameter + this.target().fire('finished', {fx: this, situation: this.situation}) + + if (!this.situations.length) { + this.target().fire('allfinished') + + // Recheck the length since the user may call animate in the afterAll callback + if (!this.situations.length) { + this.target().off('.fx') // there shouldnt be any binding left, but to make sure... + this.active = false + } + } + + // start next animation + if (this.active) this.dequeue() + else this.clearCurrent() + } else if (!this.paused && this.active) { + // we continue animating when we are not at the end + this.startAnimFrame() + } + + // save last eased position for once callback triggering + this.lastPos = eased + return this + }, + + // calculates the step for every property and calls block with it + eachAt: function () { + var len, at, self = this, target = this.target(), s = this.situation + + // apply animations which can be called trough a method + for (var i in s.animations) { + at = [].concat(s.animations[i]).map(function (el) { + return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el + }) + + target[i].apply(target, at) + } + + // apply animation which has to be applied with attr() + for (var i in s.attrs) { + at = [i].concat(s.attrs[i]).map(function (el) { + return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el + }) + + target.attr.apply(target, at) + } + + // apply animation which has to be applied with style() + for (var i in s.styles) { + at = [i].concat(s.styles[i]).map(function (el) { + return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el + }) + + target.style.apply(target, at) + } + + // animate initialTransformation which has to be chained + if (s.transforms.length) { + // get initial initialTransformation + at = s.initialTransformation + for (var i = 0, len = s.transforms.length; i < len; i++) { + // get next transformation in chain + var a = s.transforms[i] + + // multiply matrix directly + if (a instanceof SVG.Matrix) { + if (a.relative) { + at = at.multiply(new SVG.Matrix().morph(a).at(s.ease(this.pos))) + } else { + at = at.morph(a).at(s.ease(this.pos)) + } + continue + } + + // when transformation is absolute we have to reset the needed transformation first + if (!a.relative) { a.undo(at.extract()) } + + // and reapply it after + at = at.multiply(a.at(s.ease(this.pos))) + } + + // set new matrix on element + target.matrix(at) + } + + return this + }, + + // adds an once-callback which is called at a specific position and never again + once: function (pos, fn, isEased) { + var c = this.last() + if (!isEased) pos = c.ease(pos) + + c.once[pos] = fn + + return this + }, + + _callStart: function () { + setTimeout(function () { this.start() }.bind(this), 0) + return this + } + + }, + + parent: SVG.Element, + + // Add method to parent elements + construct: { + // Get fx module or create a new one, then animate with given duration and ease + animate: function (o, ease, delay) { + return (this.fx || (this.fx = new SVG.FX(this))).animate(o, ease, delay) + }, + delay: function (delay) { + return (this.fx || (this.fx = new SVG.FX(this))).delay(delay) + }, + stop: function (jumpToEnd, clearQueue) { + if (this.fx) { this.fx.stop(jumpToEnd, clearQueue) } + + return this + }, + finish: function () { + if (this.fx) { this.fx.finish() } + + return this + }, + + } + + }) + + // MorphObj is used whenever no morphable object is given + SVG.MorphObj = SVG.invent({ + + create: function (from, to) { + // prepare color for morphing + if (SVG.Color.isColor(to)) return new SVG.Color(from).morph(to) + // check if we have a list of values + if (SVG.regex.delimiter.test(from)) { + // prepare path for morphing + if (SVG.regex.pathLetters.test(from)) return new SVG.PathArray(from).morph(to) + // prepare value list for morphing + else return new SVG.Array(from).morph(to) + } + // prepare number for morphing + if (SVG.regex.numberAndUnit.test(to)) return new SVG.Number(from).morph(to) + + // prepare for plain morphing + this.value = from + this.destination = to + }, + + extend: { + at: function (pos, real) { + return real < 1 ? this.value : this.destination + }, + + valueOf: function () { + return this.value + } + } + + }) + + SVG.extend(SVG.FX, { + // Add animatable attributes + attr: function (a, v, relative) { + // apply attributes individually + if (typeof a === 'object') { + for (var key in a) { this.attr(key, a[key]) } + } else { + this.add(a, v, 'attrs') + } + + return this + }, + // Add animatable plot + plot: function (a, b, c, d) { + // Lines can be plotted with 4 arguments + if (arguments.length == 4) { + return this.plot([a, b, c, d]) + } + + return this.add('plot', new (this.target().morphArray)(a)) + }, + }) + + SVG.Box = SVG.invent({ + create: function (x, y, width, height) { + if (typeof x === 'object' && !(x instanceof SVG.Element)) { + // chromes getBoundingClientRect has no x and y property + return SVG.Box.call(this, x.left != null ? x.left : x.x, x.top != null ? x.top : x.y, x.width, x.height) + } else if (arguments.length == 4) { + this.x = x + this.y = y + this.width = width + this.height = height + } + + // add center, right, bottom... + fullBox(this) + } + }) + + SVG.BBox = SVG.invent({ + // Initialize + create: function (element) { + SVG.Box.apply(this, [].slice.call(arguments)) + + // get values if element is given + if (element instanceof SVG.Element) { + var box + + // yes this is ugly, but Firefox can be a pain when it comes to elements that are not yet rendered + try { + if (!document.documentElement.contains) { + // This is IE - it does not support contains() for top-level SVGs + var topParent = element.node + while (topParent.parentNode) { + topParent = topParent.parentNode + } + if (topParent != document) throw new Error('Element not in the dom') + } else { + // the element is NOT in the dom, throw error + // disabling the check below which fixes issue #76 + // if (!document.documentElement.contains(element.node)) throw new Exception('Element not in the dom') + } + + // find native bbox + box = element.node.getBBox() + } catch (e) { + if (element instanceof SVG.Shape) { + if (!SVG.parser.draw) { + // fixes apexcharts/vue-apexcharts #14 + SVG.prepare() + } + var clone = element.clone(SVG.parser.draw.instance).show() + + if(clone && clone.node && typeof clone.node.getBBox === 'function') { + // this check fixes jest unit tests + box = clone.node.getBBox() + } + if(clone && typeof clone.remove === 'function') { + clone.remove() + } + } else { + box = { + x: element.node.clientLeft, + y: element.node.clientTop, + width: element.node.clientWidth, + height: element.node.clientHeight + } + } + } + + SVG.Box.call(this, box) + } + }, + + // Define ancestor + inherit: SVG.Box, + + // Define Parent + parent: SVG.Element, + + // Constructor + construct: { + // Get bounding box + bbox: function () { + return new SVG.BBox(this) + } + } + + }) + + SVG.BBox.prototype.constructor = SVG.BBox + + + SVG.Matrix = SVG.invent({ + // Initialize + create: function (source) { + var base = arrayToMatrix([1, 0, 0, 1, 0, 0]) + + // ensure source as object + source = source === null ? base : source instanceof SVG.Element + ? source.matrixify() + : typeof source === 'string' + ? arrayToMatrix(source.split(SVG.regex.delimiter).map(parseFloat)) + : arguments.length == 6 + ? arrayToMatrix([].slice.call(arguments)) + : Array.isArray(source) + ? arrayToMatrix(source) + : source && typeof source === 'object' + ? source : base + + // merge source + for (var i = abcdef.length - 1; i >= 0; --i) { + this[abcdef[i]] = source[abcdef[i]] != null + ? source[abcdef[i]] : base[abcdef[i]] + } + }, + + // Add methods + extend: { + // Extract individual transformations + extract: function () { + // find delta transform points + var px = deltaTransformPoint(this, 0, 1), + py = deltaTransformPoint(this, 1, 0), + skewX = 180 / Math.PI * Math.atan2(px.y, px.x) - 90 + + return { + // translation + x: this.e, + y: this.f, + transformedX: (this.e * Math.cos(skewX * Math.PI / 180) + this.f * Math.sin(skewX * Math.PI / 180)) / Math.sqrt(this.a * this.a + this.b * this.b), + transformedY: (this.f * Math.cos(skewX * Math.PI / 180) + this.e * Math.sin(-skewX * Math.PI / 180)) / Math.sqrt(this.c * this.c + this.d * this.d), + + // rotation + rotation: skewX, + a: this.a, + b: this.b, + c: this.c, + d: this.d, + e: this.e, + f: this.f, + matrix: new SVG.Matrix(this) + } + }, + // Clone matrix + clone: function () { + return new SVG.Matrix(this) + }, + // Morph one matrix into another + morph: function (matrix) { + // store new destination + this.destination = new SVG.Matrix(matrix) + + return this + }, + + // Multiplies by given matrix + multiply: function (matrix) { + return new SVG.Matrix(this.native().multiply(parseMatrix(matrix).native())) + }, + // Inverses matrix + inverse: function () { + return new SVG.Matrix(this.native().inverse()) + }, + // Translate matrix + translate: function (x, y) { + return new SVG.Matrix(this.native().translate(x || 0, y || 0)) + }, + + + // Convert to native SVGMatrix + native: function () { + // create new matrix + var matrix = SVG.parser.native.createSVGMatrix() + + // update with current values + for (var i = abcdef.length - 1; i >= 0; i--) { matrix[abcdef[i]] = this[abcdef[i]] } + + return matrix + }, + // Convert matrix to string + toString: function () { + // Construct the matrix directly, avoid values that are too small + return 'matrix(' + float32String(this.a) + ',' + float32String(this.b) + + ',' + float32String(this.c) + ',' + float32String(this.d) + + ',' + float32String(this.e) + ',' + float32String(this.f) + + ')' + } + }, + + // Define parent + parent: SVG.Element, + + // Add parent method + construct: { + // Get current matrix + ctm: function () { + return new SVG.Matrix(this.node.getCTM()) + }, + // Get current screen matrix + screenCTM: function () { + /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537 + This is needed because FF does not return the transformation matrix + for the inner coordinate system when getScreenCTM() is called on nested svgs. + However all other Browsers do that */ + if (this instanceof SVG.Nested) { + var rect = this.rect(1, 1) + var m = rect.node.getScreenCTM() + rect.remove() + return new SVG.Matrix(m) + } + return new SVG.Matrix(this.node.getScreenCTM()) + } + + } + + }) + + SVG.Point = SVG.invent({ + // Initialize + create: function (x, y) { + var i, source, base = {x: 0, y: 0} + + // ensure source as object + source = Array.isArray(x) + ? {x: x[0], y: x[1]} + : typeof x === 'object' + ? {x: x.x, y: x.y} + : x != null + ? {x: x, y: (y != null ? y : x)} : base // If y has no value, then x is used has its value + + // merge source + this.x = source.x + this.y = source.y + }, + + // Add methods + extend: { + // Clone point + clone: function () { + return new SVG.Point(this) + }, + // Morph one point into another + morph: function (x, y) { + // store new destination + this.destination = new SVG.Point(x, y) + + return this + }, + + + + } + + }) + + SVG.extend(SVG.Element, { + + // Get point + point: function (x, y) { + return new SVG.Point(x, y).transform(this.screenCTM().inverse()) + } + + }) + + SVG.extend(SVG.Element, { + // Set svg element attribute + attr: function (a, v, n) { + // act as full getter + if (a == null) { + // get an object of attributes + a = {} + v = this.node.attributes + for (var n = v.length - 1; n >= 0; n--) { a[v[n].nodeName] = SVG.regex.isNumber.test(v[n].nodeValue) ? parseFloat(v[n].nodeValue) : v[n].nodeValue } + + return a + } else if (typeof a === 'object') { + // apply every attribute individually if an object is passed + for (var v_ in a) this.attr(v_, a[v_]) + } else if (v === null) { + // remove value + this.node.removeAttribute(a) + } else if (v == null) { + // act as a getter if the first and only argument is not an object + v = this.node.getAttribute(a) + return v == null + ? SVG.defaults.attrs[a] + : SVG.regex.isNumber.test(v) + ? parseFloat(v) : v + } else { + // BUG FIX: some browsers will render a stroke if a color is given even though stroke width is 0 + if (a == 'stroke-width') { this.attr('stroke', parseFloat(v) > 0 ? this._stroke : null) } else if (a == 'stroke') { this._stroke = v } + + // convert image fill and stroke to patterns + if (a == 'fill' || a == 'stroke') { + if (SVG.regex.isImage.test(v)) { v = this.doc().defs().image(v, 0, 0) } + + if (v instanceof SVG.Image) { + v = this.doc().defs().pattern(0, 0, function () { + this.add(v) + }) + } + } + + // ensure correct numeric values (also accepts NaN and Infinity) + if (typeof v === 'number') { v = new SVG.Number(v) } + + // ensure full hex color + else if (SVG.Color.isColor(v)) { v = new SVG.Color(v) } + + // parse array values + else if (Array.isArray(v)) { v = new SVG.Array(v) } + + // if the passed attribute is leading... + if (a == 'leading') { + // ... call the leading method instead + if (this.leading) { this.leading(v) } + } else { + // set given attribute on node + typeof n === 'string' + ? this.node.setAttributeNS(n, a, v.toString()) + : this.node.setAttribute(a, v.toString()) + } + + // rebuild if required + if (this.rebuild && (a == 'font-size' || a == 'x')) { this.rebuild(a, v) } + } + + return this + } + }) + + SVG.extend(SVG.Element, { + // Add transformations + transform: function (o, relative) { + // get target in case of the fx module, otherwise reference this + var target = this, + matrix, bbox + + // act as a getter + if (typeof o !== 'object') { + // get current matrix + matrix = new SVG.Matrix(target).extract() + + return typeof o === 'string' ? matrix[o] : matrix + } + + // get current matrix + matrix = new SVG.Matrix(target) + + // ensure relative flag + relative = !!relative || !!o.relative + + // act on matrix + if (o.a != null) { + matrix = relative + // relative + ? matrix.multiply(new SVG.Matrix(o)) + // absolute + : new SVG.Matrix(o) + } + + return this.attr('transform', matrix) + } + }) + + + + SVG.extend(SVG.Element, { + // Reset all transformations + untransform: function () { + return this.attr('transform', null) + }, + // merge the whole transformation chain into one matrix and returns it + matrixify: function () { + var matrix = (this.attr('transform') || '') + // split transformations + .split(SVG.regex.transforms).slice(0, -1).map(function (str) { + // generate key => value pairs + var kv = str.trim().split('(') + return [kv[0], kv[1].split(SVG.regex.delimiter).map(function (str) { return parseFloat(str) })] + }) + // merge every transformation into one matrix + .reduce(function (matrix, transform) { + if (transform[0] == 'matrix') return matrix.multiply(arrayToMatrix(transform[1])) + return matrix[transform[0]].apply(matrix, transform[1]) + }, new SVG.Matrix()) + + return matrix + }, + // add an element to another parent without changing the visual representation on the screen + toParent: function (parent) { + if (this == parent) return this + var ctm = this.screenCTM() + var pCtm = parent.screenCTM().inverse() + + this.addTo(parent).untransform().transform(pCtm.multiply(ctm)) + + return this + }, + // same as above with parent equals root-svg + toDoc: function () { + return this.toParent(this.doc()) + } + + }) + + SVG.Transformation = SVG.invent({ + + create: function (source, inversed) { + if (arguments.length > 1 && typeof inversed !== 'boolean') { + return this.constructor.call(this, [].slice.call(arguments)) + } + + if (Array.isArray(source)) { + for (var i = 0, len = this.arguments.length; i < len; ++i) { + this[this.arguments[i]] = source[i] + } + } else if (source && typeof source === 'object') { + for (var i = 0, len = this.arguments.length; i < len; ++i) { + this[this.arguments[i]] = source[this.arguments[i]] + } + } + + this.inversed = false + + if (inversed === true) { + this.inversed = true + } + }, + + }) + + SVG.Translate = SVG.invent({ + + parent: SVG.Matrix, + inherit: SVG.Transformation, + + create: function (source, inversed) { + this.constructor.apply(this, [].slice.call(arguments)) + }, + + extend: { + arguments: ['transformedX', 'transformedY'], + method: 'translate' + } + + }) + + + + + + SVG.extend(SVG.Element, { + // Dynamic style generator + style: function (s, v) { + if (arguments.length == 0) { + // get full style + return this.node.style.cssText || '' + } else if (arguments.length < 2) { + // apply every style individually if an object is passed + if (typeof s === 'object') { + for (var v_ in s) this.style(v_, s[v_]) + } else if (SVG.regex.isCss.test(s)) { + // parse css string + s = s.split(/\s*;\s*/) + // filter out suffix ; and stuff like ;; + .filter(function (e) { return !!e }) + .map(function (e) { return e.split(/\s*:\s*/) }) + + // apply every definition individually + while (v = s.pop()) { + this.style(v[0], v[1]) + } + } else { + // act as a getter if the first and only argument is not an object + return this.node.style[camelCase(s)] + } + } else { + this.node.style[camelCase(s)] = v === null || SVG.regex.isBlank.test(v) ? '' : v + } + + return this + } + }) + SVG.Parent = SVG.invent({ + // Initialize node + create: function (element) { + this.constructor.call(this, element) + }, + + // Inherit from + inherit: SVG.Element, + + // Add class methods + extend: { + // Returns all child elements + children: function () { + return SVG.utils.map(SVG.utils.filterSVGElements(this.node.childNodes), function (node) { + return SVG.adopt(node) + }) + }, + // Add given element at a position + add: function (element, i) { + if (i == null) { this.node.appendChild(element.node) } else if (element.node != this.node.childNodes[i]) { this.node.insertBefore(element.node, this.node.childNodes[i]) } + + return this + }, + // Basically does the same as `add()` but returns the added element instead + put: function (element, i) { + this.add(element, i) + return element + }, + // Checks if the given element is a child + has: function (element) { + return this.index(element) >= 0 + }, + // Gets index of given element + index: function (element) { + return [].slice.call(this.node.childNodes).indexOf(element.node) + }, + // Get a element at the given index + get: function (i) { + return SVG.adopt(this.node.childNodes[i]) + }, + // Get first child + first: function () { + return this.get(0) + }, + // Get the last child + last: function () { + return this.get(this.node.childNodes.length - 1) + }, + // Iterates over all children and invokes a given block + each: function (block, deep) { + var il, + children = this.children() + + for (var i = 0, il = children.length; i < il; i++) { + if (children[i] instanceof SVG.Element) { block.apply(children[i], [i, children]) } + + if (deep && (children[i] instanceof SVG.Container)) { children[i].each(block, deep) } + } + + return this + }, + // Remove a given child + removeElement: function (element) { + this.node.removeChild(element.node) + + return this + }, + // Remove all elements in this container + clear: function () { + // remove children + while (this.node.hasChildNodes()) { this.node.removeChild(this.node.lastChild) } + + // remove defs reference + delete this._defs + + return this + }, // Get defs + defs: function () { + return this.doc().defs() + } + } + + }) + + SVG.extend(SVG.Parent, { + + ungroup: function (parent, depth) { + if (depth === 0 || this instanceof SVG.Defs || this.node == SVG.parser.draw) return this + + parent = parent || (this instanceof SVG.Doc ? this : this.parent(SVG.Parent)) + depth = depth || Infinity + + this.each(function () { + if (this instanceof SVG.Defs) return this + if (this instanceof SVG.Parent) return this.ungroup(parent, depth - 1) + return this.toParent(parent) + }) + + this.node.firstChild || this.remove() + + return this + }, + + flatten: function (parent, depth) { + return this.ungroup(parent, depth) + } + + }) + SVG.Container = SVG.invent({ + // Initialize node + create: function (element) { + this.constructor.call(this, element) + }, + + // Inherit from + inherit: SVG.Parent + + }) + + SVG.ViewBox = SVG.invent({ + + // Define parent + parent: SVG.Container, + + // Add parent method + construct: { + + } + + }) + // Add events to elements + ;[ 'click', + 'dblclick', + 'mousedown', + 'mouseup', + 'mouseover', + 'mouseout', + 'mousemove', + // , 'mouseenter' -> not supported by IE + // , 'mouseleave' -> not supported by IE + 'touchstart', + 'touchmove', + 'touchleave', + 'touchend', + 'touchcancel' ].forEach(function (event) { + // add event to SVG.Element + SVG.Element.prototype[event] = function (f) { + // bind event to element rather than element node + SVG.on(this.node, event, f) + return this + } + }) + + // Initialize listeners stack + SVG.listeners = [] + SVG.handlerMap = [] + SVG.listenerId = 0 + + // Add event binder in the SVG namespace + SVG.on = function (node, event, listener, binding, options) { + // create listener, get object-index + var l = listener.bind(binding || node.instance || node), + index = (SVG.handlerMap.indexOf(node) + 1 || SVG.handlerMap.push(node)) - 1, + ev = event.split('.')[0], + ns = event.split('.')[1] || '*' + + // ensure valid object + SVG.listeners[index] = SVG.listeners[index] || {} + SVG.listeners[index][ev] = SVG.listeners[index][ev] || {} + SVG.listeners[index][ev][ns] = SVG.listeners[index][ev][ns] || {} + + if (!listener._svgjsListenerId) { listener._svgjsListenerId = ++SVG.listenerId } + + // reference listener + SVG.listeners[index][ev][ns][listener._svgjsListenerId] = l + + // add listener + node.addEventListener(ev, l, options || { passive: true }) + } + + // Add event unbinder in the SVG namespace + SVG.off = function (node, event, listener) { + var index = SVG.handlerMap.indexOf(node), + ev = event && event.split('.')[0], + ns = event && event.split('.')[1], + namespace = '' + + if (index == -1) return + + if (listener) { + if (typeof listener === 'function') listener = listener._svgjsListenerId + if (!listener) return + + // remove listener reference + if (SVG.listeners[index][ev] && SVG.listeners[index][ev][ns || '*']) { + // remove listener + node.removeEventListener(ev, SVG.listeners[index][ev][ns || '*'][listener], false) + + delete SVG.listeners[index][ev][ns || '*'][listener] + } + } else if (ns && ev) { + // remove all listeners for a namespaced event + if (SVG.listeners[index][ev] && SVG.listeners[index][ev][ns]) { + for (var listener_ in SVG.listeners[index][ev][ns]) { SVG.off(node, [ev, ns].join('.'), listener_) } + + delete SVG.listeners[index][ev][ns] + } + } else if (ns) { + // remove all listeners for a specific namespace + for (var event_ in SVG.listeners[index]) { + for (var namespace in SVG.listeners[index][event_]) { + if (ns === namespace) { + SVG.off(node, [event_, ns].join('.')) + } + } + } + } else if (ev) { + // remove all listeners for the event + if (SVG.listeners[index][ev]) { + for (var namespace in SVG.listeners[index][ev]) { SVG.off(node, [ev, namespace].join('.')) } + + delete SVG.listeners[index][ev] + } + } else { + // remove all listeners on a given node + for (var event_ in SVG.listeners[index]) { SVG.off(node, event_) } + + delete SVG.listeners[index] + delete SVG.handlerMap[index] + } + } + + // + SVG.extend(SVG.Element, { + // Bind given event to listener + on: function (event, listener, binding, options) { + SVG.on(this.node, event, listener, binding, options) + + return this + }, + // Unbind event from listener + off: function (event, listener) { + SVG.off(this.node, event, listener) + + return this + }, + // Fire given event + fire: function (event, data) { + // Dispatch event + if (event instanceof window.Event) { + this.node.dispatchEvent(event) + } else { + this.node.dispatchEvent(event = new SVG.CustomEvent(event, {detail: data, cancelable: true})) + } + + this._event = event + return this + }, + event: function () { + return this._event + } + }) + + SVG.Defs = SVG.invent({ + // Initialize node + create: 'defs', + + // Inherit from + inherit: SVG.Container + + }) + SVG.G = SVG.invent({ + // Initialize node + create: 'g', + + // Inherit from + inherit: SVG.Container, + + // Add class methods + extend: { + // Move over x-axis + x: function (x) { + return x == null ? this.transform('x') : this.transform({ x: x - this.x() }, true) + }, + }, + + // Add parent method + construct: { + // Create a group element + group: function () { + return this.put(new SVG.G()) + } + } + }) + + SVG.Doc = SVG.invent({ + // Initialize node + create: function (element) { + if (element) { + // ensure the presence of a dom element + element = typeof element === 'string' + ? document.getElementById(element) + : element + + // If the target is an svg element, use that element as the main wrapper. + // This allows svg.js to work with svg documents as well. + if (element.nodeName == 'svg') { + this.constructor.call(this, element) + } else { + this.constructor.call(this, SVG.create('svg')) + element.appendChild(this.node) + this.size('100%', '100%') + } + + // set svg element attributes and ensure defs node + this.namespace().defs() + } + }, + + // Inherit from + inherit: SVG.Container, + + // Add class methods + extend: { + // Add namespaces + namespace: function () { + return this + .attr({ xmlns: SVG.ns, version: '1.1' }) + .attr('xmlns:xlink', SVG.xlink, SVG.xmlns) + .attr('xmlns:svgjs', SVG.svgjs, SVG.xmlns) + }, + // Creates and returns defs element + defs: function () { + if (!this._defs) { + var defs + + // Find or create a defs element in this instance + if (defs = this.node.getElementsByTagName('defs')[0]) { this._defs = SVG.adopt(defs) } else { this._defs = new SVG.Defs() } + + // Make sure the defs node is at the end of the stack + this.node.appendChild(this._defs.node) + } + + return this._defs + }, + // custom parent method + parent: function () { + if (!this.node.parentNode || this.node.parentNode.nodeName == '#document') return null + return this.node.parentNode + }, + + + // Removes the doc from the DOM + remove: function () { + if (this.parent()) { + this.parent().removeChild(this.node) + } + + return this + }, + clear: function () { + // remove children + while (this.node.hasChildNodes()) { this.node.removeChild(this.node.lastChild) } + + // remove defs reference + delete this._defs + + // add back parser + if (SVG.parser.draw && !SVG.parser.draw.parentNode) { this.node.appendChild(SVG.parser.draw) } + + return this + }, + clone: function (parent) { + // write dom data to the dom so the clone can pickup the data + this.writeDataToDom() + + // get reference to node + var node = this.node + + // clone element and assign new id + var clone = assignNewId(node.cloneNode(true)) + + // insert the clone in the given parent or after myself + if (parent) { + (parent.node || parent).appendChild(clone.node) + } else { + node.parentNode.insertBefore(clone.node, node.nextSibling) + } + + return clone + } + } + + }) + + // ### This module adds backward / forward functionality to elements. + + // + SVG.extend(SVG.Element, { + // Get all siblings, including myself + + + }) + + + + SVG.Gradient = SVG.invent({ + // Initialize node + create: function (type) { + this.constructor.call(this, SVG.create(type + 'Gradient')) + + // store type + this.type = type + }, + + // Inherit from + inherit: SVG.Container, + + // Add class methods + extend: { + // Add a color stop + at: function (offset, color, opacity) { + return this.put(new SVG.Stop()).update(offset, color, opacity) + }, + // Update gradient + update: function (block) { + // remove all stops + this.clear() + + // invoke passed block + if (typeof block === 'function') { block.call(this, this) } + + return this + }, + // Return the fill id + fill: function () { + return 'url(#' + this.id() + ')' + }, + // Alias string convertion to fill + toString: function () { + return this.fill() + }, + // custom attr to handle transform + attr: function (a, b, c) { + if (a == 'transform') a = 'gradientTransform' + return SVG.Container.prototype.attr.call(this, a, b, c) + } + }, + + // Add parent method + construct: { + // Create gradient element in defs + gradient: function (type, block) { + return this.defs().gradient(type, block) + } + } + }) + + // Add animatable methods to both gradient and fx module + SVG.extend(SVG.Gradient, SVG.FX, { + // From position + from: function (x, y) { + return (this._target || this).type == 'radial' + ? this.attr({ fx: new SVG.Number(x), fy: new SVG.Number(y) }) + : this.attr({ x1: new SVG.Number(x), y1: new SVG.Number(y) }) + }, + // To position + to: function (x, y) { + return (this._target || this).type == 'radial' + ? this.attr({ cx: new SVG.Number(x), cy: new SVG.Number(y) }) + : this.attr({ x2: new SVG.Number(x), y2: new SVG.Number(y) }) + } + }) + + // Base gradient generation + SVG.extend(SVG.Defs, { + // define gradient + gradient: function (type, block) { + return this.put(new SVG.Gradient(type)).update(block) + } + + }) + + SVG.Stop = SVG.invent({ + // Initialize node + create: 'stop', + + // Inherit from + inherit: SVG.Element, + + // Add class methods + extend: { + // add color stops + update: function (o) { + if (typeof o === 'number' || o instanceof SVG.Number) { + o = { + offset: arguments[0], + color: arguments[1], + opacity: arguments[2] + } + } + + // set attributes + if (o.opacity != null) this.attr('stop-opacity', o.opacity) + if (o.color != null) this.attr('stop-color', o.color) + if (o.offset != null) this.attr('offset', new SVG.Number(o.offset)) + + return this + } + } + + }) + + SVG.Pattern = SVG.invent({ + // Initialize node + create: 'pattern', + + // Inherit from + inherit: SVG.Container, + + // Add class methods + extend: { + // Return the fill id + fill: function () { + return 'url(#' + this.id() + ')' + }, + // Update pattern by rebuilding + update: function (block) { + // remove content + this.clear() + + // invoke passed block + if (typeof block === 'function') { block.call(this, this) } + + return this + }, + // Alias string convertion to fill + toString: function () { + return this.fill() + }, + // custom attr to handle transform + attr: function (a, b, c) { + if (a == 'transform') a = 'patternTransform' + return SVG.Container.prototype.attr.call(this, a, b, c) + } + + }, + + // Add parent method + construct: { + // Create pattern element in defs + pattern: function (width, height, block) { + return this.defs().pattern(width, height, block) + } + } + }) + + SVG.extend(SVG.Defs, { + // Define gradient + pattern: function (width, height, block) { + return this.put(new SVG.Pattern()).update(block).attr({ + x: 0, + y: 0, + width: width, + height: height, + patternUnits: 'userSpaceOnUse' + }) + } + + }) + SVG.Shape = SVG.invent({ + // Initialize node + create: function (element) { + this.constructor.call(this, element) + }, + + // Inherit from + inherit: SVG.Element + + }) + + SVG.Symbol = SVG.invent({ + // Initialize node + create: 'symbol', + + // Inherit from + inherit: SVG.Container, + + construct: { + // create symbol + symbol: function () { + return this.put(new SVG.Symbol()) + } + } + }) + + SVG.Use = SVG.invent({ + // Initialize node + create: 'use', + + // Inherit from + inherit: SVG.Shape, + + // Add class methods + extend: { + // Use element as a reference + element: function (element, file) { + // Set lined element + return this.attr('href', (file || '') + '#' + element, SVG.xlink) + } + }, + + // Add parent method + construct: { + // Create a use element + use: function (element, file) { + return this.put(new SVG.Use()).element(element, file) + } + } + }) + SVG.Rect = SVG.invent({ + // Initialize node + create: 'rect', + + // Inherit from + inherit: SVG.Shape, + + // Add parent method + construct: { + // Create a rect element + rect: function (width, height) { + return this.put(new SVG.Rect()).size(width, height) + } + } + }) + SVG.Circle = SVG.invent({ + // Initialize node + create: 'circle', + + // Inherit from + inherit: SVG.Shape, + + // Add parent method + construct: { + // Create circle element, based on ellipse + circle: function (size) { + return this.put(new SVG.Circle()).rx(new SVG.Number(size).divide(2)).move(0, 0) + } + } + }) + + SVG.extend(SVG.Circle, SVG.FX, { + // Radius x value + rx: function (rx) { + return this.attr('r', rx) + }, + // Alias radius x value + ry: function (ry) { + return this.rx(ry) + } + }) + + SVG.Ellipse = SVG.invent({ + // Initialize node + create: 'ellipse', + + // Inherit from + inherit: SVG.Shape, + + // Add parent method + construct: { + // Create an ellipse + ellipse: function (width, height) { + return this.put(new SVG.Ellipse()).size(width, height).move(0, 0) + } + } + }) + + SVG.extend(SVG.Ellipse, SVG.Rect, SVG.FX, { + // Radius x value + rx: function (rx) { + return this.attr('rx', rx) + }, + // Radius y value + ry: function (ry) { + return this.attr('ry', ry) + } + }) + + // Add common method + SVG.extend(SVG.Circle, SVG.Ellipse, { + // Move over x-axis + x: function (x) { + return x == null ? this.cx() - this.rx() : this.cx(x + this.rx()) + }, + // Move over y-axis + y: function (y) { + return y == null ? this.cy() - this.ry() : this.cy(y + this.ry()) + }, + // Move by center over x-axis + cx: function (x) { + return x == null ? this.attr('cx') : this.attr('cx', x) + }, + // Move by center over y-axis + cy: function (y) { + return y == null ? this.attr('cy') : this.attr('cy', y) + }, + // Set width of element + width: function (width) { + return width == null ? this.rx() * 2 : this.rx(new SVG.Number(width).divide(2)) + }, + // Set height of element + height: function (height) { + return height == null ? this.ry() * 2 : this.ry(new SVG.Number(height).divide(2)) + }, + // Custom size function + size: function (width, height) { + var p = proportionalSize(this, width, height) + + return this + .rx(new SVG.Number(p.width).divide(2)) + .ry(new SVG.Number(p.height).divide(2)) + } + }) + SVG.Line = SVG.invent({ + // Initialize node + create: 'line', + + // Inherit from + inherit: SVG.Shape, + + // Add class methods + extend: { + // Get array + array: function () { + return new SVG.PointArray([ + [ this.attr('x1'), this.attr('y1') ], + [ this.attr('x2'), this.attr('y2') ] + ]) + }, + // Overwrite native plot() method + plot: function (x1, y1, x2, y2) { + if (x1 == null) { return this.array() } else if (typeof y1 !== 'undefined') { x1 = { x1: x1, y1: y1, x2: x2, y2: y2 } } else { x1 = new SVG.PointArray(x1).toLine() } + + return this.attr(x1) + }, + // Move by left top corner + move: function (x, y) { + return this.attr(this.array().move(x, y).toLine()) + }, + // Set element size to given width and height + size: function (width, height) { + var p = proportionalSize(this, width, height) + + return this.attr(this.array().size(p.width, p.height).toLine()) + } + }, + + // Add parent method + construct: { + // Create a line element + line: function (x1, y1, x2, y2) { + // make sure plot is called as a setter + // x1 is not necessarily a number, it can also be an array, a string and a SVG.PointArray + return SVG.Line.prototype.plot.apply( + this.put(new SVG.Line()) + , x1 != null ? [x1, y1, x2, y2] : [0, 0, 0, 0] + ) + } + } + }) + + SVG.Polyline = SVG.invent({ + // Initialize node + create: 'polyline', + + // Inherit from + inherit: SVG.Shape, + + // Add parent method + construct: { + // Create a wrapped polyline element + polyline: function (p) { + // make sure plot is called as a setter + return this.put(new SVG.Polyline()).plot(p || new SVG.PointArray()) + } + } + }) + + SVG.Polygon = SVG.invent({ + // Initialize node + create: 'polygon', + + // Inherit from + inherit: SVG.Shape, + + // Add parent method + construct: { + // Create a wrapped polygon element + polygon: function (p) { + // make sure plot is called as a setter + return this.put(new SVG.Polygon()).plot(p || new SVG.PointArray()) + } + } + }) + + // Add polygon-specific functions + SVG.extend(SVG.Polyline, SVG.Polygon, { + // Get array + array: function () { + return this._array || (this._array = new SVG.PointArray(this.attr('points'))) + }, + // Plot new path + plot: function (p) { + return (p == null) + ? this.array() + : this.clear().attr('points', typeof p === 'string' ? p : (this._array = new SVG.PointArray(p))) + }, + // Clear array cache + clear: function () { + delete this._array + return this + }, + // Move by left top corner + move: function (x, y) { + return this.attr('points', this.array().move(x, y)) + }, + // Set element size to given width and height + size: function (width, height) { + var p = proportionalSize(this, width, height) + + return this.attr('points', this.array().size(p.width, p.height)) + } + + }) + + // unify all point to point elements + SVG.extend(SVG.Line, SVG.Polyline, SVG.Polygon, { + // Define morphable array + morphArray: SVG.PointArray, + // Move by left top corner over x-axis + x: function (x) { + return x == null ? this.bbox().x : this.move(x, this.bbox().y) + }, + // Move by left top corner over y-axis + y: function (y) { + return y == null ? this.bbox().y : this.move(this.bbox().x, y) + }, + // Set width of element + width: function (width) { + var b = this.bbox() + + return width == null ? b.width : this.size(width, b.height) + }, + // Set height of element + height: function (height) { + var b = this.bbox() + + return height == null ? b.height : this.size(b.width, height) + } + }) + SVG.Path = SVG.invent({ + // Initialize node + create: 'path', + + // Inherit from + inherit: SVG.Shape, + + // Add class methods + extend: { + // Define morphable array + morphArray: SVG.PathArray, + // Get array + array: function () { + return this._array || (this._array = new SVG.PathArray(this.attr('d'))) + }, + // Plot new path + plot: function (d) { + return (d == null) + ? this.array() + : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new SVG.PathArray(d))) + }, + // Clear array cache + clear: function () { + delete this._array + return this + }, + + }, + + // Add parent method + construct: { + // Create a wrapped path element + path: function (d) { + // make sure plot is called as a setter + return this.put(new SVG.Path()).plot(d || new SVG.PathArray()) + } + } + }) + + SVG.Image = SVG.invent({ + // Initialize node + create: 'image', + + // Inherit from + inherit: SVG.Shape, + + // Add class methods + extend: { + // (re)load image + load: function (url) { + if (!url) return this + + var self = this, + img = new window.Image() + + // preload image + SVG.on(img, 'load', function () { + SVG.off(img) + + var p = self.parent(SVG.Pattern) + + if (p === null) return + + // ensure image size + if (self.width() == 0 && self.height() == 0) { self.size(img.width, img.height) } + + // ensure pattern size if not set + if (p && p.width() == 0 && p.height() == 0) { p.size(self.width(), self.height()) } + + // callback + if (typeof self._loaded === 'function') { + self._loaded.call(self, { + width: img.width, + height: img.height, + ratio: img.width / img.height, + url: url + }) + } + }) + + SVG.on(img, 'error', function (e) { + SVG.off(img) + + if (typeof self._error === 'function') { + self._error.call(self, e) + } + }) + + return this.attr('href', (img.src = this.src = url), SVG.xlink) + }, + // Add loaded callback + loaded: function (loaded) { + this._loaded = loaded + return this + }, + + error: function (error) { + this._error = error + return this + } + }, + + // Add parent method + construct: { + // create image element, load image and set its size + image: function (source, width, height) { + return this.put(new SVG.Image()).load(source).size(width || 0, height || width || 0) + } + } + + }) + SVG.Text = SVG.invent({ + // Initialize node + create: function () { + this.constructor.call(this, SVG.create('text')) + + this.dom.leading = new SVG.Number(1.3) // store leading value for rebuilding + this._rebuild = true // enable automatic updating of dy values + this._build = false // disable build mode for adding multiple lines + + // set default font + this.attr('font-family', SVG.defaults.attrs['font-family']) + }, + + // Inherit from + inherit: SVG.Shape, + + // Add class methods + extend: { + // Move over x-axis + x: function (x) { + // act as getter + if (x == null) { return this.attr('x') } + + return this.attr('x', x) + }, + // Set the text content + text: function (text) { + // act as getter + if (typeof text === 'undefined') { + var text = '' + var children = this.node.childNodes + for (var i = 0, len = children.length; i < len; ++i) { + // add newline if its not the first child and newLined is set to true + if (i != 0 && children[i].nodeType != 3 && SVG.adopt(children[i]).dom.newLined == true) { + text += '\n' + } + + // add content of this node + text += children[i].textContent + } + + return text + } + + // remove existing content + this.clear().build(true) + + if (typeof text === 'function') { + // call block + text.call(this, this) + } else { + // store text and make sure text is not blank + text = text.split('\n') + + // build new lines + for (var i = 0, il = text.length; i < il; i++) { this.tspan(text[i]).newLine() } + } + + // disable build mode and rebuild lines + return this.build(false).rebuild() + }, + // Set font size + size: function (size) { + return this.attr('font-size', size).rebuild() + }, + // Set / get leading + leading: function (value) { + // act as getter + if (value == null) { return this.dom.leading } + + // act as setter + this.dom.leading = new SVG.Number(value) + + return this.rebuild() + }, + // Get all the first level lines + lines: function () { + var node = (this.textPath && this.textPath() || this).node + + // filter tspans and map them to SVG.js instances + var lines = SVG.utils.map(SVG.utils.filterSVGElements(node.childNodes), function (el) { + return SVG.adopt(el) + }) + + // return an instance of SVG.set + return new SVG.Set(lines) + }, + // Rebuild appearance type + rebuild: function (rebuild) { + // store new rebuild flag if given + if (typeof rebuild === 'boolean') { this._rebuild = rebuild } + + // define position of all lines + if (this._rebuild) { + var self = this, + blankLineOffset = 0, + dy = this.dom.leading * new SVG.Number(this.attr('font-size')) + + this.lines().each(function () { + if (this.dom.newLined) { + if (!self.textPath()) { this.attr('x', self.attr('x')) } + if (this.text() == '\n') { + blankLineOffset += dy + } else { + this.attr('dy', dy + blankLineOffset) + blankLineOffset = 0 + } + } + }) + + this.fire('rebuild') + } + + return this + }, + // Enable / disable build mode + build: function (build) { + this._build = !!build + return this + }, + // overwrite method from parent to set data properly + setData: function (o) { + this.dom = o + this.dom.leading = new SVG.Number(o.leading || 1.3) + return this + } + }, + + // Add parent method + construct: { + // Create text element + text: function (text) { + return this.put(new SVG.Text()).text(text) + }, + // Create plain text element + plain: function (text) { + return this.put(new SVG.Text()).plain(text) + } + } + + }) + + SVG.Tspan = SVG.invent({ + // Initialize node + create: 'tspan', + + // Inherit from + inherit: SVG.Shape, + + // Add class methods + extend: { + // Set text content + text: function (text) { + if (text == null) return this.node.textContent + (this.dom.newLined ? '\n' : '') + + typeof text === 'function' ? text.call(this, this) : this.plain(text) + + return this + }, + // Shortcut dx + dx: function (dx) { + return this.attr('dx', dx) + }, + // Shortcut dy + dy: function (dy) { + return this.attr('dy', dy) + }, + // Create new line + newLine: function () { + // fetch text parent + var t = this.parent(SVG.Text) + + // mark new line + this.dom.newLined = true + + // apply new hy¡n + return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x()) + } + } + + }) + + SVG.extend(SVG.Text, SVG.Tspan, { + // Create plain text node + plain: function (text) { + // clear if build mode is disabled + if (this._build === false) { this.clear() } + + // create text node + this.node.appendChild(document.createTextNode(text)) + + return this + }, + // Create a tspan + tspan: function (text) { + var node = (this.textPath && this.textPath() || this).node, + tspan = new SVG.Tspan() + + // clear if build mode is disabled + if (this._build === false) { this.clear() } + + // add new tspan + node.appendChild(tspan.node) + + return tspan.text(text) + }, + // Clear all lines + clear: function () { + var node = (this.textPath && this.textPath() || this).node + + // remove existing child nodes + while (node.hasChildNodes()) { node.removeChild(node.lastChild) } + + return this + }, + // Get length of text element + length: function () { + return this.node.getComputedTextLength() + } + }) + + SVG.TextPath = SVG.invent({ + // Initialize node + create: 'textPath', + + // Inherit from + inherit: SVG.Parent, + + // Define parent class + parent: SVG.Text, + + // Add parent method + construct: { + morphArray: SVG.PathArray, + // return the array of the path track element + array: function () { + var track = this.track() + + return track ? track.array() : null + }, + // Plot path if any + plot: function (d) { + var track = this.track(), + pathArray = null + + if (track) { + pathArray = track.plot(d) + } + + return (d == null) ? pathArray : this + }, + // Get the path track element + track: function () { + var path = this.textPath() + + if (path) { return path.reference('href') } + }, + // Get the textPath child + textPath: function () { + if (this.node.firstChild && this.node.firstChild.nodeName == 'textPath') { return SVG.adopt(this.node.firstChild) } + } + } + }) + + SVG.Nested = SVG.invent({ + // Initialize node + create: function () { + this.constructor.call(this, SVG.create('svg')) + + this.style('overflow', 'visible') + }, + + // Inherit from + inherit: SVG.Container, + + // Add parent method + construct: { + // Create nested svg document + nested: function () { + return this.put(new SVG.Nested()) + } + } + }) + + + + // Define list of available attributes for stroke and fill + var sugar = { + stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'], + fill: ['color', 'opacity', 'rule'], + prefix: function (t, a) { + return a == 'color' ? t : t + '-' + a + } + } + +// Add sugar for fill and stroke +;['fill', 'stroke'].forEach(function (m) { + var extension = {} + + extension[m] = function (o) { + if (typeof o === 'undefined') { return this } + if (typeof o === 'string' || SVG.Color.isRgb(o) || (o && typeof o.fill === 'function')) { this.attr(m, o) } else + // set all attributes from sugar.fill and sugar.stroke list + { + for (var i = sugar[m].length - 1; i >= 0; i--) { + if (o[sugar[m][i]] != null) { this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]]) } + } + } + + return this + } + + SVG.extend(SVG.Element, SVG.FX, extension) + }) + + SVG.extend(SVG.Element, SVG.FX, { + + // Map translate to transform + translate: function (x, y) { + return this.transform({ x: x, y: y }) + }, + // Map matrix to transform + matrix: function (m) { + return this.attr('transform', new SVG.Matrix(arguments.length == 6 ? [].slice.call(arguments) : m)) + }, + // Opacity + opacity: function (value) { + return this.attr('opacity', value) + }, + // Relative move over x axis + dx: function (x) { + return this.x(new SVG.Number(x).plus(this instanceof SVG.FX ? 0 : this.x()), true) + }, + // Relative move over y axis + dy: function (y) { + return this.y(new SVG.Number(y).plus(this instanceof SVG.FX ? 0 : this.y()), true) + }, + + }) + + + SVG.extend(SVG.Path, { + // Get path length + length: function () { + return this.node.getTotalLength() + }, + // Get point at length + pointAt: function (length) { + return this.node.getPointAtLength(length) + } + }) + + + SVG.Set = SVG.invent({ + // Initialize + create: function (members) { + // Set initial state + Array.isArray(members) ? this.members = members : this.clear() + }, + + // Add class methods + extend: { + // Add element to set + add: function () { + var il, elements = [].slice.call(arguments) + + for (var i = 0, il = elements.length; i < il; i++) { this.members.push(elements[i]) } + + return this + }, + // Remove element from set + remove: function (element) { + var i = this.index(element) + + // remove given child + if (i > -1) { this.members.splice(i, 1) } + + return this + }, + // Iterate over all members + each: function (block) { + for (var i = 0, il = this.members.length; i < il; i++) { block.apply(this.members[i], [i, this.members]) } + + return this + }, + // Restore to defaults + clear: function () { + // initialize store + this.members = [] + + return this + }, + // Get the length of a set + length: function () { + return this.members.length + }, + // Checks if a given element is present in set + has: function (element) { + return this.index(element) >= 0 + }, + // retuns index of given element in set + index: function (element) { + return this.members.indexOf(element) + }, + // Get member at given index + get: function (i) { + return this.members[i] + }, + // Get first member + first: function () { + return this.get(0) + }, + // Get last member + last: function () { + return this.get(this.members.length - 1) + }, + // Default value + valueOf: function () { + return this.members + }, + + }, + + // Add parent method + construct: { + // Create a new set + set: function (members) { + return new SVG.Set(members) + } + } + }) + + SVG.FX.Set = SVG.invent({ + // Initialize node + create: function (set) { + // store reference to set + this.set = set + } + + }) + + // Alias methods + SVG.Set.inherit = function () { + var methods = [] + + // gather shape methods + for (var m in SVG.Shape.prototype) { + if (typeof SVG.Shape.prototype[m] === 'function' && typeof SVG.Set.prototype[m] !== 'function') { methods.push(m) } + } + + // apply shape aliasses + methods.forEach(function (method) { + SVG.Set.prototype[method] = function () { + for (var i = 0, il = this.members.length; i < il; i++) { + if (this.members[i] && typeof this.members[i][method] === 'function') { this.members[i][method].apply(this.members[i], arguments) } + } + + return method == 'animate' ? (this.fx || (this.fx = new SVG.FX.Set(this))) : this + } + }) + + // clear methods for the next round + methods = [] + + // gather fx methods + for (var m in SVG.FX.prototype) { + if (typeof SVG.FX.prototype[m] === 'function' && typeof SVG.FX.Set.prototype[m] !== 'function') { methods.push(m) } + } + + // apply fx aliasses + methods.forEach(function (method) { + SVG.FX.Set.prototype[method] = function () { + for (var i = 0, il = this.set.members.length; i < il; i++) { this.set.members[i].fx[method].apply(this.set.members[i].fx, arguments) } + + return this + } + }) + } + + SVG.extend(SVG.Element, { + + }) + SVG.extend(SVG.Element, { + // Remember arbitrary data + remember: function (k, v) { + // remember every item in an object individually + if (typeof arguments[0] === 'object') { + for (var v_ in k) { this.remember(v_, k[v_]) } + } + + // retrieve memory + else if (arguments.length == 1) { return this.memory()[k] } + + // store memory + else { this.memory()[k] = v } + + return this + }, + + // Erase a given memory + forget: function () { + if (arguments.length == 0) { this._memory = {} } else { + for (var i = arguments.length - 1; i >= 0; i--) { delete this.memory()[arguments[i]] } + } + + return this + }, + + // Initialize or return local memory object + memory: function () { + return this._memory || (this._memory = {}) + } + + }) + // Method for getting an element by id + SVG.get = function (id) { + var node = document.getElementById(idFromReference(id) || id) + return SVG.adopt(node) + } + + // Select elements by query string + SVG.select = function (query, parent) { + return new SVG.Set( + SVG.utils.map((parent || document).querySelectorAll(query), function (node) { + return SVG.adopt(node) + }) + ) + } + + SVG.extend(SVG.Parent, { + // Scoped select method + select: function (query) { + return SVG.select(query, this.node) + } + + }) + function pathRegReplace (a, b, c, d) { + return c + d.replace(SVG.regex.dots, ' .') + } + + // creates deep clone of array + function array_clone (arr) { + var clone = arr.slice(0) + for (var i = clone.length; i--;) { + if (Array.isArray(clone[i])) { + clone[i] = array_clone(clone[i]) + } + } + return clone + } + + // tests if a given element is instance of an object + function is (el, obj) { + return el instanceof obj + } + + // tests if a given selector matches an element + function matches (el, selector) { + return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector) + } + + // Convert dash-separated-string to camelCase + function camelCase (s) { + return s.toLowerCase().replace(/-(.)/g, function (m, g) { + return g.toUpperCase() + }) + } + + // Capitalize first letter of a string + function capitalize (s) { + return s.charAt(0).toUpperCase() + s.slice(1) + } + + // Ensure to six-based hex + function fullHex (hex) { + return hex.length == 4 + ? [ '#', + hex.substring(1, 2), hex.substring(1, 2), + hex.substring(2, 3), hex.substring(2, 3), + hex.substring(3, 4), hex.substring(3, 4) + ].join('') : hex + } + + // Component to hex value + function compToHex (comp) { + var hex = comp.toString(16) + return hex.length == 1 ? '0' + hex : hex + } + + // Calculate proportional width and height values when necessary + function proportionalSize (element, width, height) { + if (width == null || height == null) { + var box = element.bbox() + + if (width == null) { width = box.width / box.height * height } else if (height == null) { height = box.height / box.width * width } + } + + return { + width: width, + height: height + } + } + + // Delta transform point + function deltaTransformPoint (matrix, x, y) { + return { + x: x * matrix.a + y * matrix.c + 0, + y: x * matrix.b + y * matrix.d + 0 + } + } + + // Map matrix array to object + function arrayToMatrix (a) { + return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] } + } + + // Parse matrix if required + function parseMatrix (matrix) { + if (!(matrix instanceof SVG.Matrix)) { matrix = new SVG.Matrix(matrix) } + + return matrix + } + + // Add centre point to transform object + function ensureCentre (o, target) { + o.cx = o.cx == null ? target.bbox().cx : o.cx + o.cy = o.cy == null ? target.bbox().cy : o.cy + } + + // PathArray Helpers + function arrayToString (a) { + for (var i = 0, il = a.length, s = ''; i < il; i++) { + s += a[i][0] + + if (a[i][1] != null) { + s += a[i][1] + + if (a[i][2] != null) { + s += ' ' + s += a[i][2] + + if (a[i][3] != null) { + s += ' ' + s += a[i][3] + s += ' ' + s += a[i][4] + + if (a[i][5] != null) { + s += ' ' + s += a[i][5] + s += ' ' + s += a[i][6] + + if (a[i][7] != null) { + s += ' ' + s += a[i][7] + } + } + } + } + } + } + + return s + ' ' + } + + // Deep new id assignment + function assignNewId (node) { + // do the same for SVG child nodes as well + for (var i = node.childNodes.length - 1; i >= 0; i--) { + if (node.childNodes[i] instanceof window.SVGElement) { assignNewId(node.childNodes[i]) } + } + + return SVG.adopt(node).id(SVG.eid(node.nodeName)) + } + + // Add more bounding box properties + function fullBox (b) { + if (b.x == null) { + b.x = 0 + b.y = 0 + b.width = 0 + b.height = 0 + } + + b.w = b.width + b.h = b.height + b.x2 = b.x + b.width + b.y2 = b.y + b.height + b.cx = b.x + b.width / 2 + b.cy = b.y + b.height / 2 + + return b + } + + // Get id from reference string + function idFromReference (url) { + var m = (url || '').toString().match(SVG.regex.reference) + + if (m) return m[1] + } + + // If values like 1e-88 are passed, this is not a valid 32 bit float, + // but in those cases, we are so close to 0 that 0 works well! + function float32String (v) { + return Math.abs(v) > 1e-37 ? v : 0 + } + + // Create matrix array for looping + var abcdef = 'abcdef'.split('') + + + // Add CustomEvent to IE9 and IE10 + if (typeof window.CustomEvent !== 'function') { + // Code from: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent + var CustomEventPoly = function (event, options) { + options = options || { bubbles: false, cancelable: false, detail: undefined } + var e = document.createEvent('CustomEvent') + e.initCustomEvent(event, options.bubbles, options.cancelable, options.detail) + return e + } + + CustomEventPoly.prototype = window.Event.prototype + + SVG.CustomEvent = CustomEventPoly + } else { + SVG.CustomEvent = window.CustomEvent + } + + return SVG +})) diff --git a/cao_sunyata/static/libs/apexcharts/src/utils/DateTime.js b/cao_sunyata/static/libs/apexcharts/src/utils/DateTime.js new file mode 100644 index 0000000..4b7e821 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/utils/DateTime.js @@ -0,0 +1,240 @@ +import Utils from './Utils' + +/** + * DateTime Class to manipulate datetime values. + * + * @module DateTime + **/ + +class DateTime { + constructor(ctx) { + this.ctx = ctx + this.w = ctx.w + + this.months31 = [1, 3, 5, 7, 8, 10, 12] + this.months30 = [2, 4, 6, 9, 11] + + this.daysCntOfYear = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] + } + + isValidDate(date) { + return !isNaN(this.parseDate(date)) + } + + getTimeStamp(dateStr) { + if (!Date.parse(dateStr)) { + return dateStr + } + const utc = this.w.config.xaxis.labels.datetimeUTC + return !utc + ? new Date(dateStr).getTime() + : new Date(new Date(dateStr).toISOString().substr(0, 25)).getTime() + } + + getDate(timestamp) { + const utc = this.w.config.xaxis.labels.datetimeUTC + + return utc + ? new Date(new Date(timestamp).toUTCString()) + : new Date(timestamp) + } + + parseDate(dateStr) { + const parsed = Date.parse(dateStr) + if (!isNaN(parsed)) { + return this.getTimeStamp(dateStr) + } + + let output = Date.parse(dateStr.replace(/-/g, '/').replace(/[a-z]+/gi, ' ')) + output = this.getTimeStamp(output) + return output + } + + // This fixes the difference of x-axis labels between chrome/safari + // Fixes #1726, #1544, #1485, #1255 + parseDateWithTimezone(dateStr) { + return Date.parse(dateStr.replace(/-/g, '/').replace(/[a-z]+/gi, ' ')) + } + + // http://stackoverflow.com/questions/14638018/current-time-formatting-with-javascript#answer-14638191 + formatDate(date, format) { + const locale = this.w.globals.locale + + const utc = this.w.config.xaxis.labels.datetimeUTC + + let MMMM = ['\x00', ...locale.months] + let MMM = ['\x01', ...locale.shortMonths] + let dddd = ['\x02', ...locale.days] + let ddd = ['\x03', ...locale.shortDays] + + function ii(i, len) { + let s = i + '' + len = len || 2 + while (s.length < len) s = '0' + s + return s + } + + let y = utc ? date.getUTCFullYear() : date.getFullYear() + format = format.replace(/(^|[^\\])yyyy+/g, '$1' + y) + format = format.replace(/(^|[^\\])yy/g, '$1' + y.toString().substr(2, 2)) + format = format.replace(/(^|[^\\])y/g, '$1' + y) + + let M = (utc ? date.getUTCMonth() : date.getMonth()) + 1 + format = format.replace(/(^|[^\\])MMMM+/g, '$1' + MMMM[0]) + format = format.replace(/(^|[^\\])MMM/g, '$1' + MMM[0]) + format = format.replace(/(^|[^\\])MM/g, '$1' + ii(M)) + format = format.replace(/(^|[^\\])M/g, '$1' + M) + + let d = utc ? date.getUTCDate() : date.getDate() + format = format.replace(/(^|[^\\])dddd+/g, '$1' + dddd[0]) + format = format.replace(/(^|[^\\])ddd/g, '$1' + ddd[0]) + format = format.replace(/(^|[^\\])dd/g, '$1' + ii(d)) + format = format.replace(/(^|[^\\])d/g, '$1' + d) + + let H = utc ? date.getUTCHours() : date.getHours() + format = format.replace(/(^|[^\\])HH+/g, '$1' + ii(H)) + format = format.replace(/(^|[^\\])H/g, '$1' + H) + + let h = H > 12 ? H - 12 : H === 0 ? 12 : H + format = format.replace(/(^|[^\\])hh+/g, '$1' + ii(h)) + format = format.replace(/(^|[^\\])h/g, '$1' + h) + + let m = utc ? date.getUTCMinutes() : date.getMinutes() + format = format.replace(/(^|[^\\])mm+/g, '$1' + ii(m)) + format = format.replace(/(^|[^\\])m/g, '$1' + m) + + let s = utc ? date.getUTCSeconds() : date.getSeconds() + format = format.replace(/(^|[^\\])ss+/g, '$1' + ii(s)) + format = format.replace(/(^|[^\\])s/g, '$1' + s) + + let f = utc ? date.getUTCMilliseconds() : date.getMilliseconds() + format = format.replace(/(^|[^\\])fff+/g, '$1' + ii(f, 3)) + f = Math.round(f / 10) + format = format.replace(/(^|[^\\])ff/g, '$1' + ii(f)) + f = Math.round(f / 10) + format = format.replace(/(^|[^\\])f/g, '$1' + f) + + let T = H < 12 ? 'AM' : 'PM' + format = format.replace(/(^|[^\\])TT+/g, '$1' + T) + format = format.replace(/(^|[^\\])T/g, '$1' + T.charAt(0)) + + let t = T.toLowerCase() + format = format.replace(/(^|[^\\])tt+/g, '$1' + t) + format = format.replace(/(^|[^\\])t/g, '$1' + t.charAt(0)) + + let tz = -date.getTimezoneOffset() + let K = utc || !tz ? 'Z' : tz > 0 ? '+' : '-' + + if (!utc) { + tz = Math.abs(tz) + let tzHrs = Math.floor(tz / 60) + let tzMin = tz % 60 + K += ii(tzHrs) + ':' + ii(tzMin) + } + + format = format.replace(/(^|[^\\])K/g, '$1' + K) + + let day = (utc ? date.getUTCDay() : date.getDay()) + 1 + format = format.replace(new RegExp(dddd[0], 'g'), dddd[day]) + format = format.replace(new RegExp(ddd[0], 'g'), ddd[day]) + + format = format.replace(new RegExp(MMMM[0], 'g'), MMMM[M]) + format = format.replace(new RegExp(MMM[0], 'g'), MMM[M]) + + format = format.replace(/\\(.)/g, '$1') + + return format + } + + getTimeUnitsfromTimestamp(minX, maxX, utc) { + let w = this.w + + if (w.config.xaxis.min !== undefined) { + minX = w.config.xaxis.min + } + if (w.config.xaxis.max !== undefined) { + maxX = w.config.xaxis.max + } + + const tsMin = this.getDate(minX) + const tsMax = this.getDate(maxX) + + const minD = this.formatDate(tsMin, 'yyyy MM dd HH mm ss fff').split(' ') + const maxD = this.formatDate(tsMax, 'yyyy MM dd HH mm ss fff').split(' ') + + return { + minMillisecond: parseInt(minD[6], 10), + maxMillisecond: parseInt(maxD[6], 10), + minSecond: parseInt(minD[5], 10), + maxSecond: parseInt(maxD[5], 10), + minMinute: parseInt(minD[4], 10), + maxMinute: parseInt(maxD[4], 10), + minHour: parseInt(minD[3], 10), + maxHour: parseInt(maxD[3], 10), + minDate: parseInt(minD[2], 10), + maxDate: parseInt(maxD[2], 10), + minMonth: parseInt(minD[1], 10) - 1, + maxMonth: parseInt(maxD[1], 10) - 1, + minYear: parseInt(minD[0], 10), + maxYear: parseInt(maxD[0], 10) + } + } + + isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0 + } + + calculcateLastDaysOfMonth(month, year, subtract) { + const days = this.determineDaysOfMonths(month, year) + + // whatever days we get, subtract the number of days asked + return days - subtract + } + + determineDaysOfYear(year) { + let days = 365 + + if (this.isLeapYear(year)) { + days = 366 + } + + return days + } + + determineRemainingDaysOfYear(year, month, date) { + let dayOfYear = this.daysCntOfYear[month] + date + if (month > 1 && this.isLeapYear()) dayOfYear++ + return dayOfYear + } + + determineDaysOfMonths(month, year) { + let days = 30 + + month = Utils.monthMod(month) + + switch (true) { + case this.months30.indexOf(month) > -1: + if (month === 2) { + if (this.isLeapYear(year)) { + days = 29 + } else { + days = 28 + } + } + + break + + case this.months31.indexOf(month) > -1: + days = 31 + break + + default: + days = 31 + break + } + + return days + } +} + +export default DateTime diff --git a/cao_sunyata/static/libs/apexcharts/src/utils/Resize.js b/cao_sunyata/static/libs/apexcharts/src/utils/Resize.js new file mode 100644 index 0000000..5865410 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/utils/Resize.js @@ -0,0 +1,45 @@ +// Helpers to react to element resizes, regardless of what caused them +// TODO Currently this creates a new ResizeObserver every time we want to observe an element for resizes +// Ideally, we should be able to use a single observer for all elements +let ros = new WeakMap() // Map callbacks to ResizeObserver instances for easy removal + +export function addResizeListener(el, fn) { + let called = false + + const elRect = el.getBoundingClientRect() + if (el.style.display === 'none' || elRect.width === 0) { + // if elRect.width=0, the chart is not rendered at all + // (it has either display none or hidden in a different tab) + // fixes https://github.com/apexcharts/apexcharts.js/issues/2825 + // fixes https://github.com/apexcharts/apexcharts.js/issues/2991 + // fixes https://github.com/apexcharts/apexcharts.js/issues/2992 + called = true + } + + let ro = new ResizeObserver((r) => { + // ROs fire immediately after being created, + // per spec: https://drafts.csswg.org/resize-observer/#ref-for-element%E2%91%A3 + // we don't want that so we just discard the first run + if (called) { + fn.call(el, r) + } + called = true + }) + + if (el.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + // Document fragment, observe children instead (needed for Shadow DOM, see #1332) + Array.from(el.children).forEach((c) => ro.observe(c)) + } else { + ro.observe(el) + } + + ros.set(fn, ro) +} + +export function removeResizeListener(el, fn) { + let ro = ros.get(fn) + if (ro) { + ro.disconnect() + ros.delete(fn) + } +} diff --git a/cao_sunyata/static/libs/apexcharts/src/utils/Utils.js b/cao_sunyata/static/libs/apexcharts/src/utils/Utils.js new file mode 100644 index 0000000..53c7991 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/src/utils/Utils.js @@ -0,0 +1,402 @@ +/* + ** Generic functions which are not dependent on ApexCharts + */ + +class Utils { + static bind(fn, me) { + return function () { + return fn.apply(me, arguments) + } + } + + static isObject(item) { + return ( + item && typeof item === 'object' && !Array.isArray(item) && item != null + ) + } + + // Type checking that works across different window objects + static is(type, val) { + return Object.prototype.toString.call(val) === '[object ' + type + ']'; + } + + static listToArray(list) { + let i, + array = [] + for (i = 0; i < list.length; i++) { + array[i] = list[i] + } + return array + } + + // to extend defaults with user options + // credit: http://stackoverflow.com/questions/27936772/deep-object-merging-in-es6-es7#answer-34749873 + static extend(target, source) { + if (typeof Object.assign !== 'function') { + ; (function () { + Object.assign = function (target) { + 'use strict' + // We must check against these specific cases. + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object') + } + + let output = Object(target) + for (let index = 1; index < arguments.length; index++) { + let source = arguments[index] + if (source !== undefined && source !== null) { + for (let nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey] + } + } + } + } + return output + } + })() + } + + let output = Object.assign({}, target) + if (this.isObject(target) && this.isObject(source)) { + Object.keys(source).forEach((key) => { + if (this.isObject(source[key])) { + if (!(key in target)) { + Object.assign(output, { + [key]: source[key] + }) + } else { + output[key] = this.extend(target[key], source[key]) + } + } else { + Object.assign(output, { + [key]: source[key] + }) + } + }) + } + return output + } + + static extendArray(arrToExtend, resultArr) { + let extendedArr = [] + arrToExtend.map((item) => { + extendedArr.push(Utils.extend(resultArr, item)) + }) + arrToExtend = extendedArr + return arrToExtend + } + + // If month counter exceeds 12, it starts again from 1 + static monthMod(month) { + return month % 12 + } + + static clone(source) { + if (Utils.is('Array', source)) { + let cloneResult = [] + for (let i = 0; i < source.length; i++) { + cloneResult[i] = this.clone(source[i]) + } + return cloneResult + } else if (Utils.is('Null', source)) { + // fixes an issue where null values were converted to {} + return null + } else if (Utils.is('Date', source)) { + return source + } else if (typeof source === 'object') { + let cloneResult = {} + for (let prop in source) { + if (source.hasOwnProperty(prop)) { + cloneResult[prop] = this.clone(source[prop]) + } + } + return cloneResult + } else { + return source + } + } + + static log10(x) { + return Math.log(x) / Math.LN10 + } + + static roundToBase10(x) { + return Math.pow(10, Math.floor(Math.log10(x))) + } + + static roundToBase(x, base) { + return Math.pow(base, Math.floor(Math.log(x) / Math.log(base))) + } + + static parseNumber(val) { + if (val === null) return val + return parseFloat(val) + } + + static randomId() { + return (Math.random() + 1).toString(36).substring(4) + } + + static noExponents(val) { + let data = String(val).split(/[eE]/) + if (data.length === 1) return data[0] + + let z = '', + sign = val < 0 ? '-' : '', + str = data[0].replace('.', ''), + mag = Number(data[1]) + 1 + + if (mag < 0) { + z = sign + '0.' + while (mag++) z += '0' + return z + str.replace(/^-/, '') + } + mag -= str.length + while (mag--) z += '0' + return str + z + } + + static getDimensions(el) { + const computedStyle = getComputedStyle(el, null) + + let elementHeight = el.clientHeight + let elementWidth = el.clientWidth + elementHeight -= + parseFloat(computedStyle.paddingTop) + + parseFloat(computedStyle.paddingBottom) + elementWidth -= + parseFloat(computedStyle.paddingLeft) + + parseFloat(computedStyle.paddingRight) + + return [elementWidth, elementHeight] + } + + static getBoundingClientRect(element) { + const rect = element.getBoundingClientRect() + return { + top: rect.top, + right: rect.right, + bottom: rect.bottom, + left: rect.left, + width: element.clientWidth, + height: element.clientHeight, + x: rect.left, + y: rect.top + } + } + + static getLargestStringFromArr(arr) { + return arr.reduce((a, b) => { + if (Array.isArray(b)) { + b = b.reduce((aa, bb) => (aa.length > bb.length ? aa : bb)) + } + return a.length > b.length ? a : b + }, 0) + } + + // http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-12342275 + static hexToRgba(hex = '#999999', opacity = 0.6) { + if (hex.substring(0, 1) !== '#') { + hex = '#999999' + } + + let h = hex.replace('#', '') + h = h.match(new RegExp('(.{' + h.length / 3 + '})', 'g')) + + for (let i = 0; i < h.length; i++) { + h[i] = parseInt(h[i].length === 1 ? h[i] + h[i] : h[i], 16) + } + + if (typeof opacity !== 'undefined') h.push(opacity) + + return 'rgba(' + h.join(',') + ')' + } + + static getOpacityFromRGBA(rgba) { + return parseFloat(rgba.replace(/^.*,(.+)\)/, '$1')) + } + + static rgb2hex(rgb) { + rgb = rgb.match( + /^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i + ) + return rgb && rgb.length === 4 + ? '#' + + ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) + + ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2) + + ('0' + parseInt(rgb[3], 10).toString(16)).slice(-2) + : '' + } + + shadeRGBColor(percent, color) { + let f = color.split(','), + t = percent < 0 ? 0 : 255, + p = percent < 0 ? percent * -1 : percent, + R = parseInt(f[0].slice(4), 10), + G = parseInt(f[1], 10), + B = parseInt(f[2], 10) + return ( + 'rgb(' + + (Math.round((t - R) * p) + R) + + ',' + + (Math.round((t - G) * p) + G) + + ',' + + (Math.round((t - B) * p) + B) + + ')' + ) + } + + shadeHexColor(percent, color) { + let f = parseInt(color.slice(1), 16), + t = percent < 0 ? 0 : 255, + p = percent < 0 ? percent * -1 : percent, + R = f >> 16, + G = (f >> 8) & 0x00ff, + B = f & 0x0000ff + return ( + '#' + + ( + 0x1000000 + + (Math.round((t - R) * p) + R) * 0x10000 + + (Math.round((t - G) * p) + G) * 0x100 + + (Math.round((t - B) * p) + B) + ) + .toString(16) + .slice(1) + ) + } + + // beautiful color shading blending code + // http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors + shadeColor(p, color) { + if (Utils.isColorHex(color)) { + return this.shadeHexColor(p, color) + } else { + return this.shadeRGBColor(p, color) + } + } + + static isColorHex(color) { + return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(color) + } + + static getPolygonPos(size, dataPointsLen) { + let dotsArray = [] + let angle = (Math.PI * 2) / dataPointsLen + for (let i = 0; i < dataPointsLen; i++) { + let curPos = {} + curPos.x = size * Math.sin(i * angle) + curPos.y = -size * Math.cos(i * angle) + dotsArray.push(curPos) + } + return dotsArray + } + + static polarToCartesian(centerX, centerY, radius, angleInDegrees) { + let angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0 + + return { + x: centerX + radius * Math.cos(angleInRadians), + y: centerY + radius * Math.sin(angleInRadians) + } + } + + static escapeString(str, escapeWith = 'x') { + let newStr = str.toString().slice() + newStr = newStr.replace( + /[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi, + escapeWith + ) + return newStr + } + + static negToZero(val) { + return val < 0 ? 0 : val + } + + static moveIndexInArray(arr, old_index, new_index) { + if (new_index >= arr.length) { + let k = new_index - arr.length + 1 + while (k--) { + arr.push(undefined) + } + } + arr.splice(new_index, 0, arr.splice(old_index, 1)[0]) + return arr + } + + static extractNumber(s) { + return parseFloat(s.replace(/[^\d.]*/g, '')) + } + + static findAncestor(el, cls) { + while ((el = el.parentElement) && !el.classList.contains(cls)); + return el + } + + static setELstyles(el, styles) { + for (let key in styles) { + if (styles.hasOwnProperty(key)) { + el.style.key = styles[key] + } + } + } + + static isNumber(value) { + return ( + !isNaN(value) && + parseFloat(Number(value)) === value && + !isNaN(parseInt(value, 10)) + ) + } + + static isFloat(n) { + return Number(n) === n && n % 1 !== 0 + } + + static isSafari() { + return /^((?!chrome|android).)*safari/i.test(navigator.userAgent) + } + + static isFirefox() { + return navigator.userAgent.toLowerCase().indexOf('firefox') > -1 + } + + static isIE11() { + if ( + window.navigator.userAgent.indexOf('MSIE') !== -1 || + window.navigator.appVersion.indexOf('Trident/') > -1 + ) { + return true + } + } + + static isIE() { + let ua = window.navigator.userAgent + + let msie = ua.indexOf('MSIE ') + if (msie > 0) { + // IE 10 or older => return version number + return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10) + } + + let trident = ua.indexOf('Trident/') + if (trident > 0) { + // IE 11 => return version number + let rv = ua.indexOf('rv:') + return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10) + } + + let edge = ua.indexOf('Edge/') + if (edge > 0) { + // Edge (IE 12+) => return version number + return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10) + } + + // other browser + return false + } +} + +export default Utils diff --git a/cao_sunyata/static/libs/apexcharts/types/apexcharts.d.ts b/cao_sunyata/static/libs/apexcharts/types/apexcharts.d.ts new file mode 100644 index 0000000..af81bc8 --- /dev/null +++ b/cao_sunyata/static/libs/apexcharts/types/apexcharts.d.ts @@ -0,0 +1,1198 @@ +// Typescript declarations for Apex class and module. +// Note: When you have a class and a module with the same name; the module is merged +// with the class. This is necessary since apexcharts exports the main ApexCharts class only. +// +// This is a sparse typed declarations of chart interfaces. See Apex Chart documentation +// for comprehensive API: https://apexcharts.com/docs/options +// +// There is on-going work to provide a comprehensive typed definition for this component. +// See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/28733 + +declare class ApexCharts { + constructor(el: any, options: any) + render(): Promise + updateOptions( + options: any, + redrawPaths?: boolean, + animate?: boolean, + updateSyncedCharts?: boolean + ): Promise + updateSeries( + newSeries: ApexAxisChartSeries | ApexNonAxisChartSeries, + animate?: boolean + ): Promise + appendSeries( + newSeries: ApexAxisChartSeries | ApexNonAxisChartSeries, + animate?: boolean + ): Promise + appendData(data: any[], overwriteInitialSeries?: boolean): void + toggleSeries(seriesName: string): any + showSeries(seriesName: string): void + hideSeries(seriesName: string): void + resetSeries(): void + zoomX(min: number, max: number): void + toggleDataPointSelection(seriesIndex: number, dataPointIndex?: number): any + destroy(): void + setLocale(localeName: string): void + paper(): void + addXaxisAnnotation(options: any, pushToMemory?: boolean, context?: any): void + addYaxisAnnotation(options: any, pushToMemory?: boolean, context?: any): void + addPointAnnotation(options: any, pushToMemory?: boolean, context?: any): void + removeAnnotation(id: string, options?: any): void + clearAnnotations(options?: any): void + dataURI(options?: { scale?: number, width?: number }): Promise<{ imgURI: string } | { blob: Blob }> + static exec(chartID: string, fn: string, ...args: Array): any + static getChartByID(chartID: string): ApexCharts|undefined + static initOnLoad(): void + exports: { + cleanup(): string + svgUrl(): string + dataURI(options?: { scale?: number, width?: number }): Promise<{ imgURI: string } | { blob: Blob }> + exportToSVG(): void + exportToPng(): void + exportToCSV(options?: { series?: any, columnDelimiter?: string, lineDelimiter?: string }): void + getSvgString(scale?: number): void + triggerDownload(href: string, filename?: string, ext?: string): void + } +} + +declare module ApexCharts { + export interface ApexOptions { + annotations?: ApexAnnotations + chart?: ApexChart + colors?: any[] + dataLabels?: ApexDataLabels + fill?: ApexFill + forecastDataPoints?: ApexForecastDataPoints; + grid?: ApexGrid + labels?: string[] + legend?: ApexLegend + markers?: ApexMarkers + noData?: ApexNoData + plotOptions?: ApexPlotOptions + responsive?: ApexResponsive[] + series?: ApexAxisChartSeries | ApexNonAxisChartSeries + states?: ApexStates + stroke?: ApexStroke + subtitle?: ApexTitleSubtitle + theme?: ApexTheme + title?: ApexTitleSubtitle + tooltip?: ApexTooltip + xaxis?: ApexXAxis + yaxis?: ApexYAxis | ApexYAxis[] + } +} + +type ApexDropShadow = { + enabled?: boolean + top?: number + left?: number + blur?: number + opacity?: number + color?: string +} + +/** + * Main Chart options + * See https://apexcharts.com/docs/options/chart/ + */ +type ApexChart = { + width?: string | number + height?: string | number + type?: + | 'line' + | 'area' + | 'bar' + | 'histogram' + | 'pie' + | 'donut' + | 'radialBar' + | 'scatter' + | 'bubble' + | 'heatmap' + | 'candlestick' + | 'boxPlot' + | 'radar' + | 'polarArea' + | 'rangeBar' + | 'treemap' + foreColor?: string + fontFamily?: string + background?: string + offsetX?: number + offsetY?: number + dropShadow?: ApexDropShadow & { + enabledOnSeries?: undefined | number[] + color?: string | string[] + } + events?: { + animationEnd?(chart: any, options?: any): void + beforeMount?(chart: any, options?: any): void + mounted?(chart: any, options?: any): void + updated?(chart: any, options?: any): void + mouseMove?(e: any, chart?: any, options?: any): void + mouseLeave?(e: any, chart?: any, options?: any): void + click?(e: any, chart?: any, options?: any): void + legendClick?(chart: any, seriesIndex?: number, options?: any): void + markerClick?(e: any, chart?: any, options?: any): void + selection?(chart: any, options?: any): void + dataPointSelection?(e: any, chart?: any, options?: any): void + dataPointMouseEnter?(e: any, chart?: any, options?: any): void + dataPointMouseLeave?(e: any, chart?: any, options?: any): void + beforeZoom?(chart: any, options?: any): void + beforeResetZoom?(chart: any, options?: any): void + zoomed?(chart: any, options?: any): void + scrolled?(chart: any, options?: any): void + brushScrolled?(chart: any, options?: any): void + } + brush?: { + enabled?: boolean + autoScaleYaxis?: boolean + target?: string + } + id?: string + group?: string + locales?: ApexLocale[] + defaultLocale?: string + parentHeightOffset?: number + redrawOnParentResize?: boolean + redrawOnWindowResize?: boolean | Function + sparkline?: { + enabled?: boolean + } + stacked?: boolean + stackType?: 'normal' | '100%' + toolbar?: { + show?: boolean + offsetX?: number + offsetY?: number + tools?: { + download?: boolean | string + selection?: boolean | string + zoom?: boolean | string + zoomin?: boolean | string + zoomout?: boolean | string + pan?: boolean | string + reset?: boolean | string + customIcons?: { + icon?: string + title?: string + index?: number + class?: string + click?(chart?: any, options?: any, e?: any): any + }[] + } + export?: { + csv?: { + filename?: undefined | string + columnDelimiter?: string + headerCategory?: string + headerValue?: string + dateFormatter?(timestamp?: number): any + }, + svg?: { + filename?: undefined | string + } + png?: { + filename?: undefined | string + } + } + autoSelected?: 'zoom' | 'selection' | 'pan' + } + zoom?: { + enabled?: boolean + type?: 'x' | 'y' | 'xy' + autoScaleYaxis?: boolean + zoomedArea?: { + fill?: { + color?: string + opacity?: number + } + stroke?: { + color?: string + opacity?: number + width?: number + } + } + } + selection?: { + enabled?: boolean + type?: string + fill?: { + color?: string + opacity?: number + } + stroke?: { + width?: number + color?: string + opacity?: number + dashArray?: number + } + xaxis?: { + min?: number + max?: number + } + yaxis?: { + min?: number + max?: number + } + } + animations?: { + enabled?: boolean + easing?: 'linear' | 'easein' | 'easeout' | 'easeinout' + speed?: number + animateGradually?: { + enabled?: boolean + delay?: number + } + dynamicAnimation?: { + enabled?: boolean + speed?: number + } + } +} + +type ApexStates = { + normal?: { + filter?: { + type?: string + value?: number + } + } + hover?: { + filter?: { + type?: string + value?: number + } + } + active?: { + allowMultipleDataPointsSelection?: boolean + filter?: { + type?: string + value?: number + } + } +} + +/** + * Chart Title options + * See https://apexcharts.com/docs/options/title/ + */ +type ApexTitleSubtitle = { + text?: string + align?: 'left' | 'center' | 'right' + margin?: number + offsetX?: number + offsetY?: number + floating?: boolean + style?: { + fontSize?: string + fontFamily?: string + fontWeight?: string | number + color?: string + } +} + +/** + * Chart Series options. + * Use ApexNonAxisChartSeries for Pie and Donut charts. + * See https://apexcharts.com/docs/options/series/ + * + * According to the documentation at + * https://apexcharts.com/docs/series/ + * Section 1: data can be a list of single numbers + * Sections 2.1 and 3.1: data can be a list of tuples of two numbers + * Sections 2.2 and 3.2: data can be a list of objects where x is a string + * and y is a number + * And according to the demos, data can contain null. + * https://apexcharts.com/javascript-chart-demos/line-charts/null-values/ + */ +type ApexAxisChartSeries = { + name?: string + type?: string + color?: string + data: + | (number | null)[] + | { + x: any; + y: any; + fillColor?: string; + strokeColor?: string; + meta?: any; + goals?: any; + }[] + | [number, number | null][] + | [number, (number | null)[]][]; +}[] + +type ApexNonAxisChartSeries = number[] + +/** + * Options for the line drawn on line and area charts. + * See https://apexcharts.com/docs/options/stroke/ + */ +type ApexStroke = { + show?: boolean + curve?: 'smooth' | 'straight' | 'stepline' | ('smooth' | 'straight' | 'stepline')[] + lineCap?: 'butt' | 'square' | 'round' + colors?: string[] + width?: number | number[] + dashArray?: number | number[] + fill?: ApexFill +} + +type ApexAnnotations = { + position?: string + yaxis?: YAxisAnnotations[] + xaxis?: XAxisAnnotations[] + points?: PointAnnotations[] + texts?: TextAnnotations[] + images?: ImageAnnotations[] +} + +type AnnotationLabel = { + borderColor?: string + borderWidth?: number + borderRadius?: number + text?: string + textAnchor?: string + offsetX?: number + offsetY?: number + style?: AnnotationStyle + position?: string + orientation?: string + mouseEnter?: Function + mouseLeave?: Function +} + +type AnnotationStyle = { + background?: string + color?: string + fontFamily?: string + fontWeight?: string | number + fontSize?: string + cssClass?: string + padding?: { + left?: number + right?: number + top?: number + bottom?: number + } +} + +type XAxisAnnotations = { + id?: number | string + x?: null | number | string + x2?: null | number | string + strokeDashArray?: number + fillColor?: string + borderColor?: string + borderWidth?: number + opacity?: number + offsetX?: number + offsetY?: number + label?: AnnotationLabel +} + +type YAxisAnnotations = { + id?: number | string + y?: null | number | string + y2?: null | number | string + strokeDashArray?: number + fillColor?: string + borderColor?: string + borderWidth?: number + opacity?: number + offsetX?: number + offsetY?: number + width?: number | string + yAxisIndex?: number + label?: AnnotationLabel +} + +type PointAnnotations = { + id?: number | string + x?: number | string + y?: null | number + yAxisIndex?: number + seriesIndex?: number + mouseEnter?: Function + mouseLeave?: Function + marker?: { + size?: number + fillColor?: string + strokeColor?: string + strokeWidth?: number + shape?: string + offsetX?: number + offsetY?: number + radius?: number + cssClass?: string + } + label?: AnnotationLabel + image?: { + path?: string + width?: number + height?: number + offsetX?: number + offsetY?: number + } +} + + +type TextAnnotations = { + x?: number + y?: number + text?: string + textAnchor?: string + foreColor?: string + fontSize?: string | number + fontFamily?: undefined | string + fontWeight?: string | number + backgroundColor?: string + borderColor?: string + borderRadius?: number + borderWidth?: number + paddingLeft?: number + paddingRight?: number + paddingTop?: number + paddingBottom?: number +} + +type ImageAnnotations = { + path?: string + x?: number, + y?: number, + width?: number, + height?: number, +} + +/** + * Options for localization. + * See https://apexcharts.com/docs/options/chart/locales + */ +type ApexLocale = { + name?: string + options?: { + months?: string[] + shortMonths?: string[] + days?: string[] + shortDays?: string[] + toolbar?: { + download?: string + selection?: string + selectionZoom?: string + zoomIn?: string + zoomOut?: string + pan?: string + reset?: string + exportToSVG?: string + exportToPNG?: string + exportToCSV: string + } + } +} + +/** + * PlotOptions for specifying chart-type-specific configuration. + * See https://apexcharts.com/docs/options/plotoptions/bar/ + */ +type ApexPlotOptions = { + area?: { + fillTo?: 'origin' | 'end' + } + bar?: { + horizontal?: boolean + columnWidth?: string + barHeight?: string + distributed?: boolean + borderRadius?: number | number[] + rangeBarOverlap?: boolean + rangeBarGroupRows?: boolean + colors?: { + ranges?: { + from?: number + to?: number + color?: string + }[] + backgroundBarColors?: string[] + backgroundBarOpacity?: number + backgroundBarRadius?: number + } + dataLabels?: { + maxItems?: number + hideOverflowingLabels?: boolean + position?: string + orientation?: 'horizontal' | 'vertical' + } + } + bubble?: { + minBubbleRadius?: number + maxBubbleRadius?: number + } + candlestick?: { + colors?: { + upward?: string + downward?: string + } + wick?: { + useFillColor?: boolean + } + } + boxPlot?: { + colors?: { + upper?: string, + lower?: string + } + } + heatmap?: { + radius?: number + enableShades?: boolean + shadeIntensity?: number + reverseNegativeShade?: boolean + distributed?: boolean + useFillColorAsStroke?: boolean + colorScale?: { + ranges?: { + from?: number + to?: number + color?: string + foreColor?: string + name?: string + }[] + inverse?: boolean + min?: number + max?: number + } + } + treemap?: { + enableShades?: boolean + shadeIntensity?: number + distributed?: boolean + reverseNegativeShade?: boolean + useFillColorAsStroke?: boolean + colorScale?: { + inverse?: boolean + ranges?: { + from?: number + to?: number + color?: string + foreColor?: string + name?: string + }[]; + min?: number + max?: number + }; + } + pie?: { + startAngle?: number + endAngle?: number + customScale?: number + offsetX?: number + offsetY?: number + expandOnClick?: boolean + dataLabels?: { + offset?: number + minAngleToShowLabel?: number + } + donut?: { + size?: string + background?: string + labels?: { + show?: boolean + name?: { + show?: boolean + fontSize?: string + fontFamily?: string + fontWeight?: string | number + color?: string + offsetY?: number, + formatter?(val: string): string + } + value?: { + show?: boolean + fontSize?: string + fontFamily?: string + fontWeight?: string | number + color?: string + offsetY?: number + formatter?(val: string): string + } + total?: { + show?: boolean + showAlways?: boolean + fontFamily?: string + fontWeight?: string | number + fontSize?: string + label?: string + color?: string + formatter?(w: any): string + } + } + } + } + polarArea?: { + rings?: { + strokeWidth?: number + strokeColor?: string + } + spokes?: { + strokeWidth?: number; + connectorColors?: string | string[]; + }; + } + radar?: { + size?: number + offsetX?: number + offsetY?: number + polygons?: { + strokeColors?: string | string[] + strokeWidth?: string | string[] + connectorColors?: string | string[] + fill?: { + colors?: string[] + } + } + } + radialBar?: { + inverseOrder?: boolean + startAngle?: number + endAngle?: number + offsetX?: number + offsetY?: number + hollow?: { + margin?: number + size?: string + background?: string + image?: string + imageWidth?: number + imageHeight?: number + imageOffsetX?: number + imageOffsetY?: number + imageClipped?: boolean + position?: 'front' | 'back' + dropShadow?: ApexDropShadow + } + track?: { + show?: boolean + startAngle?: number + endAngle?: number + background?: string + strokeWidth?: string + opacity?: number + margin?: number + dropShadow?: ApexDropShadow + } + dataLabels?: { + show?: boolean + name?: { + show?: boolean + fontFamily?: string + fontWeight?: string | number + fontSize?: string + color?: string + offsetY?: number + } + value?: { + show?: boolean + fontFamily?: string + fontSize?: string + fontWeight?: string | number + color?: string + offsetY?: number + formatter?(val: number): string + } + total?: { + show?: boolean + label?: string + color?: string + fontFamily?: string + fontWeight?: string | number + fontSize?: string + formatter?(opts: any): string + } + } + } +} + +type ApexFill = { + colors?: any[] + opacity?: number | number[] + type?: string | string[] + gradient?: { + shade?: string + type?: string + shadeIntensity?: number + gradientToColors?: string[] + inverseColors?: boolean + opacityFrom?: number + opacityTo?: number + stops?: number[], + colorStops?: any[] + } + image?: { + src?: string | string[] + width?: number + height?: number + } + pattern?: { + style?: string | string[] + width?: number + height?: number + strokeWidth?: number + } +} + +/** + * Chart Legend configuration options. + * See https://apexcharts.com/docs/options/legend/ + */ +type ApexLegend = { + show?: boolean + showForSingleSeries?: boolean + showForNullSeries?: boolean + showForZeroSeries?: boolean + floating?: boolean + inverseOrder?: boolean + position?: 'top' | 'right' | 'bottom' | 'left' + horizontalAlign?: 'left' | 'center' | 'right' + fontSize?: string + fontFamily?: string + fontWeight?: string | number + width?: number + height?: number + offsetX?: number + offsetY?: number + formatter?(legendName: string, opts?: any): string + tooltipHoverFormatter?(legendName: string, opts?: any): string + textAnchor?: string + customLegendItems?: string[] + labels?: { + colors?: string | string[] + useSeriesColors?: boolean + } + markers?: { + width?: number + height?: number + strokeColor?: string + strokeWidth?: number + fillColors?: string[] + offsetX?: number + offsetY?: number + radius?: number + customHTML?(): any + onClick?(): void + } + itemMargin?: { + horizontal?: number + vertical?: number + } + containerMargin?: { + left?: number + top?: number + } + onItemClick?: { + toggleDataSeries?: boolean + } + onItemHover?: { + highlightDataSeries?: boolean + } +} + +type ApexMarkerShape = "circle" | "square" | "rect" | string[] + +type ApexDiscretePoint = { + seriesIndex?: number + dataPointIndex?: number + fillColor?: string + strokeColor?: string + size?: number + shape?: ApexMarkerShape +} + +type ApexMarkers = { + size?: number | number[] + colors?: string | string[] + strokeColors?: string | string[] + strokeWidth?: number | number[] + strokeOpacity?: number | number[] + strokeDashArray?: number | number[] + fillOpacity?: number | number[] + discrete?: ApexDiscretePoint[] + shape?: ApexMarkerShape + width?: number | number[] + height?: number | number[] + radius?: number + offsetX?: number + offsetY?: number + showNullDataPoints?: boolean + onClick?(e?: any): void + onDblClick?(e?: any): void + hover?: { + size?: number + sizeOffset?: number + } +} + +type ApexNoData = { + text?: string + align?: 'left' | 'right' | 'center' + verticalAlign?: 'top' | 'middle' | 'bottom' + offsetX?: number + offsetY?: number + style?: { + color?: string + fontSize?: string + fontFamily?: string + } +} + +/** + * Chart Datalabels options + * See https://apexcharts.com/docs/options/datalabels/ + */ +type ApexDataLabels = { + enabled?: boolean + enabledOnSeries?: undefined | number[] + textAnchor?: 'start' | 'middle' | 'end' + distributed?: boolean + offsetX?: number + offsetY?: number + style?: { + fontSize?: string + fontFamily?: string + fontWeight?: string | number + colors?: any[] + } + background?: { + enabled?: boolean + foreColor?: string + borderRadius?: number + padding?: number + opacity?: number + borderWidth?: number + borderColor?: string + dropShadow: ApexDropShadow + } + dropShadow?: ApexDropShadow + formatter?(val: string | number | number[], opts?: any): string | number +} + +type ApexResponsive = { + breakpoint?: number + options?: any +} + +type ApexTooltipY = { + title?: { + formatter?(seriesName: string): string + } + formatter?(val: number, opts?: any): string +} + +/** + * Chart Tooltip options + * See https://apexcharts.com/docs/options/tooltip/ + */ +type ApexTooltip = { + enabled?: boolean + enabledOnSeries?: undefined | number[] + shared?: boolean + followCursor?: boolean + intersect?: boolean + inverseOrder?: boolean + custom?: ((options: any) => any) | ((options: any) => any)[] + fillSeriesColor?: boolean + theme?: string + cssClass?: string + style?: { + fontSize?: string + fontFamily?: string + } + onDatasetHover?: { + highlightDataSeries?: boolean + } + x?: { + show?: boolean + format?: string + formatter?(val: number, opts?: any): string + } + y?: ApexTooltipY | ApexTooltipY[] + z?: { + title?: string + formatter?(val: number): string + } + marker?: { + show?: boolean + fillColors?: string[] + } + items?: { + display?: string + } + fixed?: { + enabled?: boolean + position?: string // topRight; topLeft; bottomRight; bottomLeft + offsetX?: number + offsetY?: number + } +} + +/** + * X Axis options + * See https://apexcharts.com/docs/options/xaxis/ + */ +type ApexXAxis = { + type?: 'category' | 'datetime' | 'numeric' + categories?: any; + overwriteCategories?: number[] | string[] | undefined; + offsetX?: number; + offsetY?: number; + sorted?: boolean; + labels?: { + show?: boolean + rotate?: number + rotateAlways?: boolean + hideOverlappingLabels?: boolean + showDuplicates?: boolean + trim?: boolean + minHeight?: number + maxHeight?: number + style?: { + colors?: string | string[] + fontSize?: string + fontFamily?: string + fontWeight?: string | number + cssClass?: string + } + offsetX?: number + offsetY?: number + format?: string + formatter?(value: string, timestamp?: number, opts?:any): string | string[] + datetimeUTC?: boolean + datetimeFormatter?: { + year?: string + month?: string + day?: string + hour?: string + minute?: string + } + } + group?: { + groups?: { title: string, cols: number }[], + style?: { + colors?: string | string[] + fontSize?: string + fontFamily?: string + fontWeight?: string | number + cssClass?: string + } + } + axisBorder?: { + show?: boolean + color?: string + offsetX?: number + offsetY?: number + strokeWidth?: number + } + axisTicks?: { + show?: boolean + borderType?: string + color?: string + height?: number + offsetX?: number + offsetY?: number + } + tickPlacement?: string + tickAmount?: number | 'dataPoints' + min?: number + max?: number + range?: number + floating?: boolean + decimalsInFloat?: number + position?: string + title?: { + text?: string + offsetX?: number + offsetY?: number + style?: { + color?: string + fontFamily?: string + fontWeight?: string | number + fontSize?: string + cssClass?: string + } + } + crosshairs?: { + show?: boolean + width?: number | string + position?: string + opacity?: number + stroke?: { + color?: string + width?: number + dashArray?: number + } + fill?: { + type?: string + color?: string + gradient?: { + colorFrom?: string + colorTo?: string + stops?: number[] + opacityFrom?: number + opacityTo?: number + } + } + dropShadow?: ApexDropShadow + } + tooltip?: { + enabled?: boolean + offsetY?: number + formatter?(value: string, opts?: object): string + style?: { + fontSize?: string + fontFamily?: string + } + } +} + +/** + * Y Axis options + * See https://apexcharts.com/docs/options/yaxis/ + */ + +type ApexYAxis = { + show?: boolean + showAlways?: boolean + showForNullSeries?: boolean + seriesName?: string + opposite?: boolean + reversed?: boolean + logarithmic?: boolean, + logBase?: number, + tickAmount?: number + forceNiceScale?: boolean + min?: number | ((min: number) => number) + max?: number | ((max: number) => number) + floating?: boolean + decimalsInFloat?: number + labels?: { + show?: boolean + minWidth?: number + maxWidth?: number + offsetX?: number + offsetY?: number + rotate?: number + align?: 'left' | 'center' | 'right' + padding?: number + style?: { + colors?: string | string[] + fontSize?: string + fontWeight?: string | number + fontFamily?: string + cssClass?: string + } + formatter?(val: number, opts?: any): string | string[] + } + axisBorder?: { + show?: boolean + color?: string + width?: number + offsetX?: number + offsetY?: number + } + axisTicks?: { + show?: boolean + color?: string + width?: number + offsetX?: number + offsetY?: number + } + title?: { + text?: string + rotate?: number + offsetX?: number + offsetY?: number + style?: { + color?: string + fontSize?: string + fontWeight?: string | number + fontFamily?: string + cssClass?: string + } + } + crosshairs?: { + show?: boolean + position?: string + stroke?: { + color?: string + width?: number + dashArray?: number + } + } + tooltip?: { + enabled?: boolean + offsetX?: number + } +} + +type ApexForecastDataPoints = { + count?: number + fillOpacity?: number + strokeWidth?: undefined | number + dashArray: number +} + +/** + * Plot X and Y grid options + * See https://apexcharts.com/docs/options/grid/ + */ +type ApexGrid = { + show?: boolean + borderColor?: string + strokeDashArray?: number + position?: 'front' | 'back' + xaxis?: { + lines?: { + show?: boolean + offsetX?: number + offsetY?: number + } + } + yaxis?: { + lines?: { + show?: boolean + offsetX?: number + offsetY?: number + } + } + row?: { + colors?: string[] + opacity?: number + } + column?: { + colors?: string[] + opacity?: number + } + padding?: { + top?: number + right?: number + bottom?: number + left?: number + } +} + +type ApexTheme = { + mode?: 'light' | 'dark' + palette?: string + monochrome?: { + enabled?: boolean + color?: string + shadeTo?: 'light' | 'dark' + shadeIntensity?: number + } +} + +declare module 'apexcharts' { + export = ApexCharts +} diff --git a/cao_sunyata/static/libs/bootstrap/LICENSE b/cao_sunyata/static/libs/bootstrap/LICENSE new file mode 100644 index 0000000..dda75ca --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011-2022 Twitter, Inc. +Copyright (c) 2011-2022 The Bootstrap Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/cao_sunyata/static/libs/bootstrap/README.md b/cao_sunyata/static/libs/bootstrap/README.md new file mode 100644 index 0000000..4821c17 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/README.md @@ -0,0 +1,247 @@ +

+ + Bootstrap logo + +

+ +

Bootstrap

+ +

+ Sleek, intuitive, and powerful front-end framework for faster and easier web development. +
+ Explore Bootstrap docs » +
+
+ Report bug + · + Request feature + · + Themes + · + Blog +

+ + +## Bootstrap 5 + +Our default branch is for development of our Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4. + + +## Table of contents + +- [Quick start](#quick-start) +- [Status](#status) +- [What's included](#whats-included) +- [Bugs and feature requests](#bugs-and-feature-requests) +- [Documentation](#documentation) +- [Contributing](#contributing) +- [Community](#community) +- [Versioning](#versioning) +- [Creators](#creators) +- [Thanks](#thanks) +- [Copyright and license](#copyright-and-license) + + +## Quick start + +Several quick start options are available: + +- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.2.0-beta1.zip) +- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` +- Install with [npm](https://www.npmjs.com/): `npm install bootstrap` +- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap` +- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.2.0-beta1` +- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` + +Read the [Getting started page](https://getbootstrap.com/docs/5.2/getting-started/introduction/) for information on the framework contents, templates, examples, and more. + + +## Status + +[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/) +[![Build Status](https://img.shields.io/github/workflow/status/twbs/bootstrap/JS%20Tests/main?label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain) +[![npm version](https://img.shields.io/npm/v/bootstrap)](https://www.npmjs.com/package/bootstrap) +[![Gem version](https://img.shields.io/gem/v/bootstrap)](https://rubygems.org/gems/bootstrap) +[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue)](https://atmospherejs.com/twbs/bootstrap) +[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap)](https://packagist.org/packages/twbs/bootstrap) +[![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest) +[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/main)](https://coveralls.io/github/twbs/bootstrap?branch=main) +[![CSS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css) +[![CSS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=brotli&label=CSS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css) +[![JS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=gzip&label=JS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js) +[![JS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=brotli&label=JS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js) +[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229) +[![Backers on Open Collective](https://img.shields.io/opencollective/backers/bootstrap)](#backers) +[![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap)](#sponsors) + + +## What's included + +Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. + +
+ Download contents + + ```text + bootstrap/ + ├── css/ + │ ├── bootstrap-grid.css + │ ├── bootstrap-grid.css.map + │ ├── bootstrap-grid.min.css + │ ├── bootstrap-grid.min.css.map + │ ├── bootstrap-grid.rtl.css + │ ├── bootstrap-grid.rtl.css.map + │ ├── bootstrap-grid.rtl.min.css + │ ├── bootstrap-grid.rtl.min.css.map + │ ├── bootstrap-reboot.css + │ ├── bootstrap-reboot.css.map + │ ├── bootstrap-reboot.min.css + │ ├── bootstrap-reboot.min.css.map + │ ├── bootstrap-reboot.rtl.css + │ ├── bootstrap-reboot.rtl.css.map + │ ├── bootstrap-reboot.rtl.min.css + │ ├── bootstrap-reboot.rtl.min.css.map + │ ├── bootstrap-utilities.css + │ ├── bootstrap-utilities.css.map + │ ├── bootstrap-utilities.min.css + │ ├── bootstrap-utilities.min.css.map + │ ├── bootstrap-utilities.rtl.css + │ ├── bootstrap-utilities.rtl.css.map + │ ├── bootstrap-utilities.rtl.min.css + │ ├── bootstrap-utilities.rtl.min.css.map + │ ├── bootstrap.css + │ ├── bootstrap.css.map + │ ├── bootstrap.min.css + │ ├── bootstrap.min.css.map + │ ├── bootstrap.rtl.css + │ ├── bootstrap.rtl.css.map + │ ├── bootstrap.rtl.min.css + │ └── bootstrap.rtl.min.css.map + └── js/ + ├── bootstrap.bundle.js + ├── bootstrap.bundle.js.map + ├── bootstrap.bundle.min.js + ├── bootstrap.bundle.min.js.map + ├── bootstrap.esm.js + ├── bootstrap.esm.js.map + ├── bootstrap.esm.min.js + ├── bootstrap.esm.min.js.map + ├── bootstrap.js + ├── bootstrap.js.map + ├── bootstrap.min.js + └── bootstrap.min.js.map + ``` +
+ +We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/). + + +## Bugs and feature requests + +Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). + + +## Documentation + +Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at . The docs may also be run locally. + +Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`. + +### Running documentation locally + +1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder). +2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets. +3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line. +4. Open `http://localhost:9001/` in your browser, and voilà. + +Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/). + +### Documentation for previous releases + +You can find all our previous releases docs on . + +[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. + + +## Contributing + +Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. + +Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/main/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo). + +Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/main/.editorconfig) for easy use in common text editors. Read more and download plugins at . + + +## Community + +Get updates on Bootstrap's development and chat with the project maintainers and community members. + +- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). +- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/). +- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). +- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel. +- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)). +- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability. + + +## Versioning + +For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we adhere to those rules whenever possible. + +See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release. + + +## Creators + +**Mark Otto** + +- +- + +**Jacob Thornton** + +- +- + + +## Thanks + + + BrowserStack + + +Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers! + + + Netlify + + +Thanks to [Netlify](https://www.netlify.com/) for providing us with Deploy Previews! + + +## Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)] + +[![OC sponsor 0](https://opencollective.com/bootstrap/sponsor/0/avatar.svg)](https://opencollective.com/bootstrap/sponsor/0/website) +[![OC sponsor 1](https://opencollective.com/bootstrap/sponsor/1/avatar.svg)](https://opencollective.com/bootstrap/sponsor/1/website) +[![OC sponsor 2](https://opencollective.com/bootstrap/sponsor/2/avatar.svg)](https://opencollective.com/bootstrap/sponsor/2/website) +[![OC sponsor 3](https://opencollective.com/bootstrap/sponsor/3/avatar.svg)](https://opencollective.com/bootstrap/sponsor/3/website) +[![OC sponsor 4](https://opencollective.com/bootstrap/sponsor/4/avatar.svg)](https://opencollective.com/bootstrap/sponsor/4/website) +[![OC sponsor 5](https://opencollective.com/bootstrap/sponsor/5/avatar.svg)](https://opencollective.com/bootstrap/sponsor/5/website) +[![OC sponsor 6](https://opencollective.com/bootstrap/sponsor/6/avatar.svg)](https://opencollective.com/bootstrap/sponsor/6/website) +[![OC sponsor 7](https://opencollective.com/bootstrap/sponsor/7/avatar.svg)](https://opencollective.com/bootstrap/sponsor/7/website) +[![OC sponsor 8](https://opencollective.com/bootstrap/sponsor/8/avatar.svg)](https://opencollective.com/bootstrap/sponsor/8/website) +[![OC sponsor 9](https://opencollective.com/bootstrap/sponsor/9/avatar.svg)](https://opencollective.com/bootstrap/sponsor/9/website) + + +## Backers + +Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)] + +[![Backers](https://opencollective.com/bootstrap/backers.svg?width=890)](https://opencollective.com/bootstrap#backers) + + +## Copyright and license + +Code and documentation copyright 2011–2022 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/). diff --git a/cao_sunyata/static/libs/bootstrap/js/index.esm.js b/cao_sunyata/static/libs/bootstrap/js/index.esm.js new file mode 100644 index 0000000..b837649 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/index.esm.js @@ -0,0 +1,19 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): index.esm.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +export { default as Alert } from './src/alert' +export { default as Button } from './src/button' +export { default as Carousel } from './src/carousel' +export { default as Collapse } from './src/collapse' +export { default as Dropdown } from './src/dropdown' +export { default as Modal } from './src/modal' +export { default as Offcanvas } from './src/offcanvas' +export { default as Popover } from './src/popover' +export { default as ScrollSpy } from './src/scrollspy' +export { default as Tab } from './src/tab' +export { default as Toast } from './src/toast' +export { default as Tooltip } from './src/tooltip' diff --git a/cao_sunyata/static/libs/bootstrap/js/index.umd.js b/cao_sunyata/static/libs/bootstrap/js/index.umd.js new file mode 100644 index 0000000..5abe8db --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/index.umd.js @@ -0,0 +1,34 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): index.umd.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import Alert from './src/alert' +import Button from './src/button' +import Carousel from './src/carousel' +import Collapse from './src/collapse' +import Dropdown from './src/dropdown' +import Modal from './src/modal' +import Offcanvas from './src/offcanvas' +import Popover from './src/popover' +import ScrollSpy from './src/scrollspy' +import Tab from './src/tab' +import Toast from './src/toast' +import Tooltip from './src/tooltip' + +export default { + Alert, + Button, + Carousel, + Collapse, + Dropdown, + Modal, + Offcanvas, + Popover, + ScrollSpy, + Tab, + Toast, + Tooltip +} diff --git a/cao_sunyata/static/libs/bootstrap/js/src/alert.js b/cao_sunyata/static/libs/bootstrap/js/src/alert.js new file mode 100644 index 0000000..59de828 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/alert.js @@ -0,0 +1,87 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): alert.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { defineJQueryPlugin } from './util/index' +import EventHandler from './dom/event-handler' +import BaseComponent from './base-component' +import { enableDismissTrigger } from './util/component-functions' + +/** + * Constants + */ + +const NAME = 'alert' +const DATA_KEY = 'bs.alert' +const EVENT_KEY = `.${DATA_KEY}` + +const EVENT_CLOSE = `close${EVENT_KEY}` +const EVENT_CLOSED = `closed${EVENT_KEY}` +const CLASS_NAME_FADE = 'fade' +const CLASS_NAME_SHOW = 'show' + +/** + * Class definition + */ + +class Alert extends BaseComponent { + // Getters + static get NAME() { + return NAME + } + + // Public + close() { + const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE) + + if (closeEvent.defaultPrevented) { + return + } + + this._element.classList.remove(CLASS_NAME_SHOW) + + const isAnimated = this._element.classList.contains(CLASS_NAME_FADE) + this._queueCallback(() => this._destroyElement(), this._element, isAnimated) + } + + // Private + _destroyElement() { + this._element.remove() + EventHandler.trigger(this._element, EVENT_CLOSED) + this.dispose() + } + + // Static + static jQueryInterface(config) { + return this.each(function () { + const data = Alert.getOrCreateInstance(this) + + if (typeof config !== 'string') { + return + } + + if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { + throw new TypeError(`No method named "${config}"`) + } + + data[config](this) + }) + } +} + +/** + * Data API implementation + */ + +enableDismissTrigger(Alert, 'close') + +/** + * jQuery + */ + +defineJQueryPlugin(Alert) + +export default Alert diff --git a/cao_sunyata/static/libs/bootstrap/js/src/base-component.js b/cao_sunyata/static/libs/bootstrap/js/src/base-component.js new file mode 100644 index 0000000..0c1a259 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/base-component.js @@ -0,0 +1,85 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): base-component.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import Data from './dom/data' +import { executeAfterTransition, getElement } from './util/index' +import EventHandler from './dom/event-handler' +import Config from './util/config' + +/** + * Constants + */ + +const VERSION = '5.2.3' + +/** + * Class definition + */ + +class BaseComponent extends Config { + constructor(element, config) { + super() + + element = getElement(element) + if (!element) { + return + } + + this._element = element + this._config = this._getConfig(config) + + Data.set(this._element, this.constructor.DATA_KEY, this) + } + + // Public + dispose() { + Data.remove(this._element, this.constructor.DATA_KEY) + EventHandler.off(this._element, this.constructor.EVENT_KEY) + + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null + } + } + + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated) + } + + _getConfig(config) { + config = this._mergeConfigObj(config, this._element) + config = this._configAfterMerge(config) + this._typeCheckConfig(config) + return config + } + + // Static + static getInstance(element) { + return Data.get(getElement(element), this.DATA_KEY) + } + + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null) + } + + static get VERSION() { + return VERSION + } + + static get DATA_KEY() { + return `bs.${this.NAME}` + } + + static get EVENT_KEY() { + return `.${this.DATA_KEY}` + } + + static eventName(name) { + return `${name}${this.EVENT_KEY}` + } +} + +export default BaseComponent diff --git a/cao_sunyata/static/libs/bootstrap/js/src/button.js b/cao_sunyata/static/libs/bootstrap/js/src/button.js new file mode 100644 index 0000000..03e7604 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/button.js @@ -0,0 +1,72 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): button.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { defineJQueryPlugin } from './util/index' +import EventHandler from './dom/event-handler' +import BaseComponent from './base-component' + +/** + * Constants + */ + +const NAME = 'button' +const DATA_KEY = 'bs.button' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' + +const CLASS_NAME_ACTIVE = 'active' +const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]' +const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` + +/** + * Class definition + */ + +class Button extends BaseComponent { + // Getters + static get NAME() { + return NAME + } + + // Public + toggle() { + // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method + this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE)) + } + + // Static + static jQueryInterface(config) { + return this.each(function () { + const data = Button.getOrCreateInstance(this) + + if (config === 'toggle') { + data[config]() + } + }) + } +} + +/** + * Data API implementation + */ + +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => { + event.preventDefault() + + const button = event.target.closest(SELECTOR_DATA_TOGGLE) + const data = Button.getOrCreateInstance(button) + + data.toggle() +}) + +/** + * jQuery + */ + +defineJQueryPlugin(Button) + +export default Button diff --git a/cao_sunyata/static/libs/bootstrap/js/src/carousel.js b/cao_sunyata/static/libs/bootstrap/js/src/carousel.js new file mode 100644 index 0000000..24bbe39 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/carousel.js @@ -0,0 +1,475 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { + defineJQueryPlugin, + getElementFromSelector, + getNextActiveElement, + isRTL, + isVisible, + reflow, + triggerTransitionEnd +} from './util/index' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' +import SelectorEngine from './dom/selector-engine' +import Swipe from './util/swipe' +import BaseComponent from './base-component' + +/** + * Constants + */ + +const NAME = 'carousel' +const DATA_KEY = 'bs.carousel' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' + +const ARROW_LEFT_KEY = 'ArrowLeft' +const ARROW_RIGHT_KEY = 'ArrowRight' +const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch + +const ORDER_NEXT = 'next' +const ORDER_PREV = 'prev' +const DIRECTION_LEFT = 'left' +const DIRECTION_RIGHT = 'right' + +const EVENT_SLIDE = `slide${EVENT_KEY}` +const EVENT_SLID = `slid${EVENT_KEY}` +const EVENT_KEYDOWN = `keydown${EVENT_KEY}` +const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}` +const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}` +const EVENT_DRAG_START = `dragstart${EVENT_KEY}` +const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}` +const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` + +const CLASS_NAME_CAROUSEL = 'carousel' +const CLASS_NAME_ACTIVE = 'active' +const CLASS_NAME_SLIDE = 'slide' +const CLASS_NAME_END = 'carousel-item-end' +const CLASS_NAME_START = 'carousel-item-start' +const CLASS_NAME_NEXT = 'carousel-item-next' +const CLASS_NAME_PREV = 'carousel-item-prev' + +const SELECTOR_ACTIVE = '.active' +const SELECTOR_ITEM = '.carousel-item' +const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM +const SELECTOR_ITEM_IMG = '.carousel-item img' +const SELECTOR_INDICATORS = '.carousel-indicators' +const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]' +const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]' + +const KEY_TO_DIRECTION = { + [ARROW_LEFT_KEY]: DIRECTION_RIGHT, + [ARROW_RIGHT_KEY]: DIRECTION_LEFT +} + +const Default = { + interval: 5000, + keyboard: true, + pause: 'hover', + ride: false, + touch: true, + wrap: true +} + +const DefaultType = { + interval: '(number|boolean)', // TODO:v6 remove boolean support + keyboard: 'boolean', + pause: '(string|boolean)', + ride: '(boolean|string)', + touch: 'boolean', + wrap: 'boolean' +} + +/** + * Class definition + */ + +class Carousel extends BaseComponent { + constructor(element, config) { + super(element, config) + + this._interval = null + this._activeElement = null + this._isSliding = false + this.touchTimeout = null + this._swipeHelper = null + + this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element) + this._addEventListeners() + + if (this._config.ride === CLASS_NAME_CAROUSEL) { + this.cycle() + } + } + + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Public + next() { + this._slide(ORDER_NEXT) + } + + nextWhenVisible() { + // FIXME TODO use `document.visibilityState` + // Don't call next when the page isn't visible + // or the carousel or its parent isn't visible + if (!document.hidden && isVisible(this._element)) { + this.next() + } + } + + prev() { + this._slide(ORDER_PREV) + } + + pause() { + if (this._isSliding) { + triggerTransitionEnd(this._element) + } + + this._clearInterval() + } + + cycle() { + this._clearInterval() + this._updateInterval() + + this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval) + } + + _maybeEnableCycle() { + if (!this._config.ride) { + return + } + + if (this._isSliding) { + EventHandler.one(this._element, EVENT_SLID, () => this.cycle()) + return + } + + this.cycle() + } + + to(index) { + const items = this._getItems() + if (index > items.length - 1 || index < 0) { + return + } + + if (this._isSliding) { + EventHandler.one(this._element, EVENT_SLID, () => this.to(index)) + return + } + + const activeIndex = this._getItemIndex(this._getActive()) + if (activeIndex === index) { + return + } + + const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV + + this._slide(order, items[index]) + } + + dispose() { + if (this._swipeHelper) { + this._swipeHelper.dispose() + } + + super.dispose() + } + + // Private + _configAfterMerge(config) { + config.defaultInterval = config.interval + return config + } + + _addEventListeners() { + if (this._config.keyboard) { + EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event)) + } + + if (this._config.pause === 'hover') { + EventHandler.on(this._element, EVENT_MOUSEENTER, () => this.pause()) + EventHandler.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle()) + } + + if (this._config.touch && Swipe.isSupported()) { + this._addTouchEventListeners() + } + } + + _addTouchEventListeners() { + for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) { + EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault()) + } + + const endCallBack = () => { + if (this._config.pause !== 'hover') { + return + } + + // If it's a touch-enabled device, mouseenter/leave are fired as + // part of the mouse compatibility events on first tap - the carousel + // would stop cycling until user tapped out of it; + // here, we listen for touchend, explicitly pause the carousel + // (as if it's the second time we tap on it, mouseenter compat event + // is NOT fired) and after a timeout (to allow for mouse compatibility + // events to fire) we explicitly restart cycling + + this.pause() + if (this.touchTimeout) { + clearTimeout(this.touchTimeout) + } + + this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval) + } + + const swipeConfig = { + leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)), + rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)), + endCallback: endCallBack + } + + this._swipeHelper = new Swipe(this._element, swipeConfig) + } + + _keydown(event) { + if (/input|textarea/i.test(event.target.tagName)) { + return + } + + const direction = KEY_TO_DIRECTION[event.key] + if (direction) { + event.preventDefault() + this._slide(this._directionToOrder(direction)) + } + } + + _getItemIndex(element) { + return this._getItems().indexOf(element) + } + + _setActiveIndicatorElement(index) { + if (!this._indicatorsElement) { + return + } + + const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement) + + activeIndicator.classList.remove(CLASS_NAME_ACTIVE) + activeIndicator.removeAttribute('aria-current') + + const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement) + + if (newActiveIndicator) { + newActiveIndicator.classList.add(CLASS_NAME_ACTIVE) + newActiveIndicator.setAttribute('aria-current', 'true') + } + } + + _updateInterval() { + const element = this._activeElement || this._getActive() + + if (!element) { + return + } + + const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10) + + this._config.interval = elementInterval || this._config.defaultInterval + } + + _slide(order, element = null) { + if (this._isSliding) { + return + } + + const activeElement = this._getActive() + const isNext = order === ORDER_NEXT + const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap) + + if (nextElement === activeElement) { + return + } + + const nextElementIndex = this._getItemIndex(nextElement) + + const triggerEvent = eventName => { + return EventHandler.trigger(this._element, eventName, { + relatedTarget: nextElement, + direction: this._orderToDirection(order), + from: this._getItemIndex(activeElement), + to: nextElementIndex + }) + } + + const slideEvent = triggerEvent(EVENT_SLIDE) + + if (slideEvent.defaultPrevented) { + return + } + + if (!activeElement || !nextElement) { + // Some weirdness is happening, so we bail + // todo: change tests that use empty divs to avoid this check + return + } + + const isCycling = Boolean(this._interval) + this.pause() + + this._isSliding = true + + this._setActiveIndicatorElement(nextElementIndex) + this._activeElement = nextElement + + const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END + const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV + + nextElement.classList.add(orderClassName) + + reflow(nextElement) + + activeElement.classList.add(directionalClassName) + nextElement.classList.add(directionalClassName) + + const completeCallBack = () => { + nextElement.classList.remove(directionalClassName, orderClassName) + nextElement.classList.add(CLASS_NAME_ACTIVE) + + activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName) + + this._isSliding = false + + triggerEvent(EVENT_SLID) + } + + this._queueCallback(completeCallBack, activeElement, this._isAnimated()) + + if (isCycling) { + this.cycle() + } + } + + _isAnimated() { + return this._element.classList.contains(CLASS_NAME_SLIDE) + } + + _getActive() { + return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element) + } + + _getItems() { + return SelectorEngine.find(SELECTOR_ITEM, this._element) + } + + _clearInterval() { + if (this._interval) { + clearInterval(this._interval) + this._interval = null + } + } + + _directionToOrder(direction) { + if (isRTL()) { + return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT + } + + return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV + } + + _orderToDirection(order) { + if (isRTL()) { + return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT + } + + return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT + } + + // Static + static jQueryInterface(config) { + return this.each(function () { + const data = Carousel.getOrCreateInstance(this, config) + + if (typeof config === 'number') { + data.to(config) + return + } + + if (typeof config === 'string') { + if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { + throw new TypeError(`No method named "${config}"`) + } + + data[config]() + } + }) + } +} + +/** + * Data API implementation + */ + +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) { + const target = getElementFromSelector(this) + + if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) { + return + } + + event.preventDefault() + + const carousel = Carousel.getOrCreateInstance(target) + const slideIndex = this.getAttribute('data-bs-slide-to') + + if (slideIndex) { + carousel.to(slideIndex) + carousel._maybeEnableCycle() + return + } + + if (Manipulator.getDataAttribute(this, 'slide') === 'next') { + carousel.next() + carousel._maybeEnableCycle() + return + } + + carousel.prev() + carousel._maybeEnableCycle() +}) + +EventHandler.on(window, EVENT_LOAD_DATA_API, () => { + const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE) + + for (const carousel of carousels) { + Carousel.getOrCreateInstance(carousel) + } +}) + +/** + * jQuery + */ + +defineJQueryPlugin(Carousel) + +export default Carousel diff --git a/cao_sunyata/static/libs/bootstrap/js/src/collapse.js b/cao_sunyata/static/libs/bootstrap/js/src/collapse.js new file mode 100644 index 0000000..204d180 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/collapse.js @@ -0,0 +1,302 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { + defineJQueryPlugin, + getElement, + getElementFromSelector, + getSelectorFromElement, + reflow +} from './util/index' +import EventHandler from './dom/event-handler' +import SelectorEngine from './dom/selector-engine' +import BaseComponent from './base-component' + +/** + * Constants + */ + +const NAME = 'collapse' +const DATA_KEY = 'bs.collapse' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' + +const EVENT_SHOW = `show${EVENT_KEY}` +const EVENT_SHOWN = `shown${EVENT_KEY}` +const EVENT_HIDE = `hide${EVENT_KEY}` +const EVENT_HIDDEN = `hidden${EVENT_KEY}` +const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` + +const CLASS_NAME_SHOW = 'show' +const CLASS_NAME_COLLAPSE = 'collapse' +const CLASS_NAME_COLLAPSING = 'collapsing' +const CLASS_NAME_COLLAPSED = 'collapsed' +const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}` +const CLASS_NAME_HORIZONTAL = 'collapse-horizontal' + +const WIDTH = 'width' +const HEIGHT = 'height' + +const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing' +const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]' + +const Default = { + parent: null, + toggle: true +} + +const DefaultType = { + parent: '(null|element)', + toggle: 'boolean' +} + +/** + * Class definition + */ + +class Collapse extends BaseComponent { + constructor(element, config) { + super(element, config) + + this._isTransitioning = false + this._triggerArray = [] + + const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE) + + for (const elem of toggleList) { + const selector = getSelectorFromElement(elem) + const filterElement = SelectorEngine.find(selector) + .filter(foundElement => foundElement === this._element) + + if (selector !== null && filterElement.length) { + this._triggerArray.push(elem) + } + } + + this._initializeChildren() + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()) + } + + if (this._config.toggle) { + this.toggle() + } + } + + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Public + toggle() { + if (this._isShown()) { + this.hide() + } else { + this.show() + } + } + + show() { + if (this._isTransitioning || this._isShown()) { + return + } + + let activeChildren = [] + + // find active children + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES) + .filter(element => element !== this._element) + .map(element => Collapse.getOrCreateInstance(element, { toggle: false })) + } + + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return + } + + const startEvent = EventHandler.trigger(this._element, EVENT_SHOW) + if (startEvent.defaultPrevented) { + return + } + + for (const activeInstance of activeChildren) { + activeInstance.hide() + } + + const dimension = this._getDimension() + + this._element.classList.remove(CLASS_NAME_COLLAPSE) + this._element.classList.add(CLASS_NAME_COLLAPSING) + + this._element.style[dimension] = 0 + + this._addAriaAndCollapsedClass(this._triggerArray, true) + this._isTransitioning = true + + const complete = () => { + this._isTransitioning = false + + this._element.classList.remove(CLASS_NAME_COLLAPSING) + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW) + + this._element.style[dimension] = '' + + EventHandler.trigger(this._element, EVENT_SHOWN) + } + + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1) + const scrollSize = `scroll${capitalizedDimension}` + + this._queueCallback(complete, this._element, true) + this._element.style[dimension] = `${this._element[scrollSize]}px` + } + + hide() { + if (this._isTransitioning || !this._isShown()) { + return + } + + const startEvent = EventHandler.trigger(this._element, EVENT_HIDE) + if (startEvent.defaultPrevented) { + return + } + + const dimension = this._getDimension() + + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px` + + reflow(this._element) + + this._element.classList.add(CLASS_NAME_COLLAPSING) + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW) + + for (const trigger of this._triggerArray) { + const element = getElementFromSelector(trigger) + + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false) + } + } + + this._isTransitioning = true + + const complete = () => { + this._isTransitioning = false + this._element.classList.remove(CLASS_NAME_COLLAPSING) + this._element.classList.add(CLASS_NAME_COLLAPSE) + EventHandler.trigger(this._element, EVENT_HIDDEN) + } + + this._element.style[dimension] = '' + + this._queueCallback(complete, this._element, true) + } + + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW) + } + + // Private + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle) // Coerce string values + config.parent = getElement(config.parent) + return config + } + + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT + } + + _initializeChildren() { + if (!this._config.parent) { + return + } + + const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE) + + for (const element of children) { + const selected = getElementFromSelector(element) + + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)) + } + } + } + + _getFirstLevelChildren(selector) { + const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent) + // remove children if greater depth + return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element)) + } + + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return + } + + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen) + element.setAttribute('aria-expanded', isOpen) + } + } + + // Static + static jQueryInterface(config) { + const _config = {} + if (typeof config === 'string' && /show|hide/.test(config)) { + _config.toggle = false + } + + return this.each(function () { + const data = Collapse.getOrCreateInstance(this, _config) + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + + data[config]() + } + }) + } +} + +/** + * Data API implementation + */ + +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { + // preventDefault only for elements (which change the URL) not inside the collapsible element + if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) { + event.preventDefault() + } + + const selector = getSelectorFromElement(this) + const selectorElements = SelectorEngine.find(selector) + + for (const element of selectorElements) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle() + } +}) + +/** + * jQuery + */ + +defineJQueryPlugin(Collapse) + +export default Collapse diff --git a/cao_sunyata/static/libs/bootstrap/js/src/dom/data.js b/cao_sunyata/static/libs/bootstrap/js/src/dom/data.js new file mode 100644 index 0000000..2c6a46e --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/dom/data.js @@ -0,0 +1,55 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): dom/data.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +/** + * Constants + */ + +const elementMap = new Map() + +export default { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, new Map()) + } + + const instanceMap = elementMap.get(element) + + // make it clear we only want one instance per element + // can be removed later when multiple key/instances are fine to be used + if (!instanceMap.has(key) && instanceMap.size !== 0) { + // eslint-disable-next-line no-console + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`) + return + } + + instanceMap.set(key, instance) + }, + + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null + } + + return null + }, + + remove(element, key) { + if (!elementMap.has(element)) { + return + } + + const instanceMap = elementMap.get(element) + + instanceMap.delete(key) + + // free up element references if there are no instances left for an element + if (instanceMap.size === 0) { + elementMap.delete(element) + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/js/src/dom/event-handler.js b/cao_sunyata/static/libs/bootstrap/js/src/dom/event-handler.js new file mode 100644 index 0000000..9876d77 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/dom/event-handler.js @@ -0,0 +1,320 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): dom/event-handler.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { getjQuery } from '../util/index' + +/** + * Constants + */ + +const namespaceRegex = /[^.]*(?=\..*)\.|.*/ +const stripNameRegex = /\..*/ +const stripUidRegex = /::\d+$/ +const eventRegistry = {} // Events storage +let uidEvent = 1 +const customEvents = { + mouseenter: 'mouseover', + mouseleave: 'mouseout' +} + +const nativeEvents = 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' +]) + +/** + * Private methods + */ + +function makeEventUid(element, uid) { + return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++ +} + +function getElementEvents(element) { + const uid = makeEventUid(element) + + element.uidEvent = uid + eventRegistry[uid] = eventRegistry[uid] || {} + + return eventRegistry[uid] +} + +function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }) + + if (handler.oneOff) { + EventHandler.off(element, event.type, fn) + } + + return fn.apply(element, [event]) + } +} + +function bootstrapDelegationHandler(element, selector, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector) + + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue + } + + hydrateObj(event, { delegateTarget: target }) + + if (handler.oneOff) { + EventHandler.off(element, event.type, selector, fn) + } + + return fn.apply(target, [event]) + } + } + } +} + +function findHandler(events, callable, delegationSelector = null) { + return Object.values(events) + .find(event => event.callable === callable && event.delegationSelector === delegationSelector) +} + +function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === 'string' + // todo: tooltip passes `false` instead of selector, so we need to check + const callable = isDelegated ? delegationFunction : (handler || delegationFunction) + let typeEvent = getTypeEvent(originalTypeEvent) + + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent + } + + return [isDelegated, callable, typeEvent] +} + +function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== 'string' || !element) { + return + } + + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction) + + // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position + // this prevents the handler from being dispatched the same way as mouseover or mouseout does + if (originalTypeEvent in customEvents) { + const wrapFunction = fn => { + return function (event) { + if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) { + return fn.call(this, event) + } + } + } + + callable = wrapFunction(callable) + } + + const events = getElementEvents(element) + const handlers = events[typeEvent] || (events[typeEvent] = {}) + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null) + + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff + + return + } + + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, '')) + const fn = isDelegated ? + bootstrapDelegationHandler(element, handler, callable) : + bootstrapHandler(element, callable) + + fn.delegationSelector = isDelegated ? handler : null + fn.callable = callable + fn.oneOff = oneOff + fn.uidEvent = uid + handlers[uid] = fn + + element.addEventListener(typeEvent, fn, isDelegated) +} + +function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector) + + if (!fn) { + return + } + + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)) + delete events[typeEvent][fn.uidEvent] +} + +function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {} + + for (const handlerKey of Object.keys(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + const event = storeElementEvent[handlerKey] + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector) + } + } +} + +function getTypeEvent(event) { + // allow to get the native events from namespaced events ('click.bs.button' --> 'click') + event = event.replace(stripNameRegex, '') + return customEvents[event] || event +} + +const EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false) + }, + + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true) + }, + + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== 'string' || !element) { + return + } + + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction) + const inNamespace = typeEvent !== originalTypeEvent + const events = getElementEvents(element) + const storeElementEvent = events[typeEvent] || {} + const isNamespace = originalTypeEvent.startsWith('.') + + if (typeof callable !== 'undefined') { + // Simplest case: handler is passed, remove that listener ONLY. + if (!Object.keys(storeElementEvent).length) { + return + } + + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null) + return + } + + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)) + } + } + + for (const keyHandlers of Object.keys(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, '') + + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + const event = storeElementEvent[keyHandlers] + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector) + } + } + }, + + trigger(element, event, args) { + if (typeof event !== 'string' || !element) { + return null + } + + const $ = getjQuery() + const typeEvent = getTypeEvent(event) + const inNamespace = event !== typeEvent + + let jQueryEvent = null + let bubbles = true + let nativeDispatch = true + let defaultPrevented = false + + if (inNamespace && $) { + jQueryEvent = $.Event(event, args) + + $(element).trigger(jQueryEvent) + bubbles = !jQueryEvent.isPropagationStopped() + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped() + defaultPrevented = jQueryEvent.isDefaultPrevented() + } + + let evt = new Event(event, { bubbles, cancelable: true }) + evt = hydrateObj(evt, args) + + if (defaultPrevented) { + evt.preventDefault() + } + + if (nativeDispatch) { + element.dispatchEvent(evt) + } + + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault() + } + + return evt + } +} + +function hydrateObj(obj, meta) { + for (const [key, value] of Object.entries(meta || {})) { + try { + obj[key] = value + } catch { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value + } + }) + } + } + + return obj +} + +export default EventHandler diff --git a/cao_sunyata/static/libs/bootstrap/js/src/dom/manipulator.js b/cao_sunyata/static/libs/bootstrap/js/src/dom/manipulator.js new file mode 100644 index 0000000..38ecfe4 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/dom/manipulator.js @@ -0,0 +1,71 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): dom/manipulator.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +function normalizeData(value) { + if (value === 'true') { + return true + } + + if (value === 'false') { + return false + } + + if (value === Number(value).toString()) { + return Number(value) + } + + if (value === '' || value === 'null') { + return null + } + + if (typeof value !== 'string') { + return value + } + + try { + return JSON.parse(decodeURIComponent(value)) + } catch { + return value + } +} + +function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`) +} + +const Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value) + }, + + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`) + }, + + getDataAttributes(element) { + if (!element) { + return {} + } + + const attributes = {} + const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig')) + + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, '') + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length) + attributes[pureKey] = normalizeData(element.dataset[key]) + } + + return attributes + }, + + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)) + } +} + +export default Manipulator diff --git a/cao_sunyata/static/libs/bootstrap/js/src/dom/selector-engine.js b/cao_sunyata/static/libs/bootstrap/js/src/dom/selector-engine.js new file mode 100644 index 0000000..1ba104f --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/dom/selector-engine.js @@ -0,0 +1,83 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): dom/selector-engine.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { isDisabled, isVisible } from '../util/index' + +/** + * Constants + */ + +const SelectorEngine = { + find(selector, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector)) + }, + + findOne(selector, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector) + }, + + children(element, selector) { + return [].concat(...element.children).filter(child => child.matches(selector)) + }, + + parents(element, selector) { + const parents = [] + let ancestor = element.parentNode.closest(selector) + + while (ancestor) { + parents.push(ancestor) + ancestor = ancestor.parentNode.closest(selector) + } + + return parents + }, + + prev(element, selector) { + let previous = element.previousElementSibling + + while (previous) { + if (previous.matches(selector)) { + return [previous] + } + + previous = previous.previousElementSibling + } + + return [] + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector) { + let next = element.nextElementSibling + + while (next) { + if (next.matches(selector)) { + return [next] + } + + next = next.nextElementSibling + } + + return [] + }, + + focusableChildren(element) { + const focusables = [ + 'a', + 'button', + 'input', + 'textarea', + 'select', + 'details', + '[tabindex]', + '[contenteditable="true"]' + ].map(selector => `${selector}:not([tabindex^="-"])`).join(',') + + return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el)) + } +} + +export default SelectorEngine diff --git a/cao_sunyata/static/libs/bootstrap/js/src/dropdown.js b/cao_sunyata/static/libs/bootstrap/js/src/dropdown.js new file mode 100644 index 0000000..9596baa --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/dropdown.js @@ -0,0 +1,454 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): dropdown.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import * as Popper from '@popperjs/core' +import { + defineJQueryPlugin, + getElement, + getNextActiveElement, + isDisabled, + isElement, + isRTL, + isVisible, + noop +} from './util/index' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' +import SelectorEngine from './dom/selector-engine' +import BaseComponent from './base-component' + +/** + * Constants + */ + +const NAME = 'dropdown' +const DATA_KEY = 'bs.dropdown' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' + +const ESCAPE_KEY = 'Escape' +const TAB_KEY = 'Tab' +const ARROW_UP_KEY = 'ArrowUp' +const ARROW_DOWN_KEY = 'ArrowDown' +const RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button + +const EVENT_HIDE = `hide${EVENT_KEY}` +const EVENT_HIDDEN = `hidden${EVENT_KEY}` +const EVENT_SHOW = `show${EVENT_KEY}` +const EVENT_SHOWN = `shown${EVENT_KEY}` +const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` +const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}` +const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}` + +const CLASS_NAME_SHOW = 'show' +const CLASS_NAME_DROPUP = 'dropup' +const CLASS_NAME_DROPEND = 'dropend' +const CLASS_NAME_DROPSTART = 'dropstart' +const CLASS_NAME_DROPUP_CENTER = 'dropup-center' +const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center' + +const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)' +const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE}.${CLASS_NAME_SHOW}` +const SELECTOR_MENU = '.dropdown-menu' +const SELECTOR_NAVBAR = '.navbar' +const SELECTOR_NAVBAR_NAV = '.navbar-nav' +const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' + +const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start' +const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end' +const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start' +const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end' +const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start' +const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start' +const PLACEMENT_TOPCENTER = 'top' +const PLACEMENT_BOTTOMCENTER = 'bottom' + +const Default = { + autoClose: true, + boundary: 'clippingParents', + display: 'dynamic', + offset: [0, 2], + popperConfig: null, + reference: 'toggle' +} + +const DefaultType = { + autoClose: '(boolean|string)', + boundary: '(string|element)', + display: 'string', + offset: '(array|string|function)', + popperConfig: '(null|object|function)', + reference: '(string|element|object)' +} + +/** + * Class definition + */ + +class Dropdown extends BaseComponent { + constructor(element, config) { + super(element, config) + + this._popper = null + this._parent = this._element.parentNode // dropdown wrapper + // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/ + this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || + SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || + SelectorEngine.findOne(SELECTOR_MENU, this._parent) + this._inNavbar = this._detectNavbar() + } + + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Public + toggle() { + return this._isShown() ? this.hide() : this.show() + } + + show() { + if (isDisabled(this._element) || this._isShown()) { + return + } + + const relatedTarget = { + relatedTarget: this._element + } + + const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget) + + if (showEvent.defaultPrevented) { + return + } + + this._createPopper() + + // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) { + for (const element of [].concat(...document.body.children)) { + EventHandler.on(element, 'mouseover', noop) + } + } + + this._element.focus() + this._element.setAttribute('aria-expanded', true) + + this._menu.classList.add(CLASS_NAME_SHOW) + this._element.classList.add(CLASS_NAME_SHOW) + EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget) + } + + hide() { + if (isDisabled(this._element) || !this._isShown()) { + return + } + + const relatedTarget = { + relatedTarget: this._element + } + + this._completeHide(relatedTarget) + } + + dispose() { + if (this._popper) { + this._popper.destroy() + } + + super.dispose() + } + + update() { + this._inNavbar = this._detectNavbar() + if (this._popper) { + this._popper.update() + } + } + + // Private + _completeHide(relatedTarget) { + const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget) + if (hideEvent.defaultPrevented) { + return + } + + // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support + if ('ontouchstart' in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + EventHandler.off(element, 'mouseover', noop) + } + } + + if (this._popper) { + this._popper.destroy() + } + + this._menu.classList.remove(CLASS_NAME_SHOW) + this._element.classList.remove(CLASS_NAME_SHOW) + this._element.setAttribute('aria-expanded', 'false') + Manipulator.removeDataAttribute(this._menu, 'popper') + EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget) + } + + _getConfig(config) { + config = super._getConfig(config) + + if (typeof config.reference === 'object' && !isElement(config.reference) && + typeof config.reference.getBoundingClientRect !== 'function' + ) { + // Popper virtual elements require a getBoundingClientRect method + throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`) + } + + return config + } + + _createPopper() { + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)') + } + + let referenceElement = this._element + + if (this._config.reference === 'parent') { + referenceElement = this._parent + } else if (isElement(this._config.reference)) { + referenceElement = getElement(this._config.reference) + } else if (typeof this._config.reference === 'object') { + referenceElement = this._config.reference + } + + const popperConfig = this._getPopperConfig() + this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig) + } + + _isShown() { + return this._menu.classList.contains(CLASS_NAME_SHOW) + } + + _getPlacement() { + const parentDropdown = this._parent + + if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) { + return PLACEMENT_RIGHT + } + + if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) { + return PLACEMENT_LEFT + } + + if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) { + return PLACEMENT_TOPCENTER + } + + if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) { + return PLACEMENT_BOTTOMCENTER + } + + // We need to trim the value because custom properties can also include spaces + const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end' + + if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) { + return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP + } + + return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM + } + + _detectNavbar() { + return this._element.closest(SELECTOR_NAVBAR) !== null + } + + _getOffset() { + const { offset } = this._config + + if (typeof offset === 'string') { + return offset.split(',').map(value => Number.parseInt(value, 10)) + } + + if (typeof offset === 'function') { + return popperData => offset(popperData, this._element) + } + + return offset + } + + _getPopperConfig() { + const defaultBsPopperConfig = { + placement: this._getPlacement(), + modifiers: [{ + name: 'preventOverflow', + options: { + boundary: this._config.boundary + } + }, + { + name: 'offset', + options: { + offset: this._getOffset() + } + }] + } + + // Disable Popper if we have a static display or Dropdown is in Navbar + if (this._inNavbar || this._config.display === 'static') { + Manipulator.setDataAttribute(this._menu, 'popper', 'static') // todo:v6 remove + defaultBsPopperConfig.modifiers = [{ + name: 'applyStyles', + enabled: false + }] + } + + return { + ...defaultBsPopperConfig, + ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) + } + } + + _selectMenuItem({ key, target }) { + const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element)) + + if (!items.length) { + return + } + + // if target isn't included in items (e.g. when expanding the dropdown) + // allow cycling to get the last item in case key equals ARROW_UP_KEY + getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus() + } + + // Static + static jQueryInterface(config) { + return this.each(function () { + const data = Dropdown.getOrCreateInstance(this, config) + + if (typeof config !== 'string') { + return + } + + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + + data[config]() + }) + } + + static clearMenus(event) { + if (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY)) { + return + } + + const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN) + + for (const toggle of openToggles) { + const context = Dropdown.getInstance(toggle) + if (!context || context._config.autoClose === false) { + continue + } + + const composedPath = event.composedPath() + const isMenuTarget = composedPath.includes(context._menu) + if ( + composedPath.includes(context._element) || + (context._config.autoClose === 'inside' && !isMenuTarget) || + (context._config.autoClose === 'outside' && isMenuTarget) + ) { + continue + } + + // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu + if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) { + continue + } + + const relatedTarget = { relatedTarget: context._element } + + if (event.type === 'click') { + relatedTarget.clickEvent = event + } + + context._completeHide(relatedTarget) + } + } + + static dataApiKeydownHandler(event) { + // If not an UP | DOWN | ESCAPE key => not a dropdown command + // If input/textarea && if key is other than ESCAPE => not a dropdown command + + const isInput = /input|textarea/i.test(event.target.tagName) + const isEscapeEvent = event.key === ESCAPE_KEY + const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key) + + if (!isUpOrDownEvent && !isEscapeEvent) { + return + } + + if (isInput && !isEscapeEvent) { + return + } + + event.preventDefault() + + // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/ + const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? + this : + (SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] || + SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] || + SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode)) + + const instance = Dropdown.getOrCreateInstance(getToggleButton) + + if (isUpOrDownEvent) { + event.stopPropagation() + instance.show() + instance._selectMenuItem(event) + return + } + + if (instance._isShown()) { // else is escape and we check if it is shown + event.stopPropagation() + instance.hide() + getToggleButton.focus() + } + } +} + +/** + * Data API implementation + */ + +EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler) +EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler) +EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus) +EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus) +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { + event.preventDefault() + Dropdown.getOrCreateInstance(this).toggle() +}) + +/** + * jQuery + */ + +defineJQueryPlugin(Dropdown) + +export default Dropdown diff --git a/cao_sunyata/static/libs/bootstrap/js/src/modal.js b/cao_sunyata/static/libs/bootstrap/js/src/modal.js new file mode 100644 index 0000000..26c7e8c --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/modal.js @@ -0,0 +1,377 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { defineJQueryPlugin, getElementFromSelector, isRTL, isVisible, reflow } from './util/index' +import EventHandler from './dom/event-handler' +import SelectorEngine from './dom/selector-engine' +import ScrollBarHelper from './util/scrollbar' +import BaseComponent from './base-component' +import Backdrop from './util/backdrop' +import FocusTrap from './util/focustrap' +import { enableDismissTrigger } from './util/component-functions' + +/** + * Constants + */ + +const NAME = 'modal' +const DATA_KEY = 'bs.modal' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' +const ESCAPE_KEY = 'Escape' + +const EVENT_HIDE = `hide${EVENT_KEY}` +const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}` +const EVENT_HIDDEN = `hidden${EVENT_KEY}` +const EVENT_SHOW = `show${EVENT_KEY}` +const EVENT_SHOWN = `shown${EVENT_KEY}` +const EVENT_RESIZE = `resize${EVENT_KEY}` +const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}` +const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}` +const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}` +const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` + +const CLASS_NAME_OPEN = 'modal-open' +const CLASS_NAME_FADE = 'fade' +const CLASS_NAME_SHOW = 'show' +const CLASS_NAME_STATIC = 'modal-static' + +const OPEN_SELECTOR = '.modal.show' +const SELECTOR_DIALOG = '.modal-dialog' +const SELECTOR_MODAL_BODY = '.modal-body' +const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]' + +const Default = { + backdrop: true, + focus: true, + keyboard: true +} + +const DefaultType = { + backdrop: '(boolean|string)', + focus: 'boolean', + keyboard: 'boolean' +} + +/** + * Class definition + */ + +class Modal extends BaseComponent { + constructor(element, config) { + super(element, config) + + this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element) + this._backdrop = this._initializeBackDrop() + this._focustrap = this._initializeFocusTrap() + this._isShown = false + this._isTransitioning = false + this._scrollBar = new ScrollBarHelper() + + this._addEventListeners() + } + + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Public + toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget) + } + + show(relatedTarget) { + if (this._isShown || this._isTransitioning) { + return + } + + const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { + relatedTarget + }) + + if (showEvent.defaultPrevented) { + return + } + + this._isShown = true + this._isTransitioning = true + + this._scrollBar.hide() + + document.body.classList.add(CLASS_NAME_OPEN) + + this._adjustDialog() + + this._backdrop.show(() => this._showElement(relatedTarget)) + } + + hide() { + if (!this._isShown || this._isTransitioning) { + return + } + + const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE) + + if (hideEvent.defaultPrevented) { + return + } + + this._isShown = false + this._isTransitioning = true + this._focustrap.deactivate() + + this._element.classList.remove(CLASS_NAME_SHOW) + + this._queueCallback(() => this._hideModal(), this._element, this._isAnimated()) + } + + dispose() { + for (const htmlElement of [window, this._dialog]) { + EventHandler.off(htmlElement, EVENT_KEY) + } + + this._backdrop.dispose() + this._focustrap.deactivate() + super.dispose() + } + + handleUpdate() { + this._adjustDialog() + } + + // Private + _initializeBackDrop() { + return new Backdrop({ + isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value, + isAnimated: this._isAnimated() + }) + } + + _initializeFocusTrap() { + return new FocusTrap({ + trapElement: this._element + }) + } + + _showElement(relatedTarget) { + // try to append dynamic modal + if (!document.body.contains(this._element)) { + document.body.append(this._element) + } + + this._element.style.display = 'block' + this._element.removeAttribute('aria-hidden') + this._element.setAttribute('aria-modal', true) + this._element.setAttribute('role', 'dialog') + this._element.scrollTop = 0 + + const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog) + if (modalBody) { + modalBody.scrollTop = 0 + } + + reflow(this._element) + + this._element.classList.add(CLASS_NAME_SHOW) + + const transitionComplete = () => { + if (this._config.focus) { + this._focustrap.activate() + } + + this._isTransitioning = false + EventHandler.trigger(this._element, EVENT_SHOWN, { + relatedTarget + }) + } + + this._queueCallback(transitionComplete, this._dialog, this._isAnimated()) + } + + _addEventListeners() { + EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { + if (event.key !== ESCAPE_KEY) { + return + } + + if (this._config.keyboard) { + event.preventDefault() + this.hide() + return + } + + this._triggerBackdropTransition() + }) + + EventHandler.on(window, EVENT_RESIZE, () => { + if (this._isShown && !this._isTransitioning) { + this._adjustDialog() + } + }) + + EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => { + // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks + EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => { + if (this._element !== event.target || this._element !== event2.target) { + return + } + + if (this._config.backdrop === 'static') { + this._triggerBackdropTransition() + return + } + + if (this._config.backdrop) { + this.hide() + } + }) + }) + } + + _hideModal() { + this._element.style.display = 'none' + this._element.setAttribute('aria-hidden', true) + this._element.removeAttribute('aria-modal') + this._element.removeAttribute('role') + this._isTransitioning = false + + this._backdrop.hide(() => { + document.body.classList.remove(CLASS_NAME_OPEN) + this._resetAdjustments() + this._scrollBar.reset() + EventHandler.trigger(this._element, EVENT_HIDDEN) + }) + } + + _isAnimated() { + return this._element.classList.contains(CLASS_NAME_FADE) + } + + _triggerBackdropTransition() { + const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED) + if (hideEvent.defaultPrevented) { + return + } + + const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight + const initialOverflowY = this._element.style.overflowY + // return if the following background transition hasn't yet completed + if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) { + return + } + + if (!isModalOverflowing) { + this._element.style.overflowY = 'hidden' + } + + this._element.classList.add(CLASS_NAME_STATIC) + this._queueCallback(() => { + this._element.classList.remove(CLASS_NAME_STATIC) + this._queueCallback(() => { + this._element.style.overflowY = initialOverflowY + }, this._dialog) + }, this._dialog) + + this._element.focus() + } + + /** + * The following methods are used to handle overflowing modals + */ + + _adjustDialog() { + const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight + const scrollbarWidth = this._scrollBar.getWidth() + const isBodyOverflowing = scrollbarWidth > 0 + + if (isBodyOverflowing && !isModalOverflowing) { + const property = isRTL() ? 'paddingLeft' : 'paddingRight' + this._element.style[property] = `${scrollbarWidth}px` + } + + if (!isBodyOverflowing && isModalOverflowing) { + const property = isRTL() ? 'paddingRight' : 'paddingLeft' + this._element.style[property] = `${scrollbarWidth}px` + } + } + + _resetAdjustments() { + this._element.style.paddingLeft = '' + this._element.style.paddingRight = '' + } + + // Static + static jQueryInterface(config, relatedTarget) { + return this.each(function () { + const data = Modal.getOrCreateInstance(this, config) + + if (typeof config !== 'string') { + return + } + + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + + data[config](relatedTarget) + }) + } +} + +/** + * Data API implementation + */ + +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { + const target = getElementFromSelector(this) + + if (['A', 'AREA'].includes(this.tagName)) { + event.preventDefault() + } + + EventHandler.one(target, EVENT_SHOW, showEvent => { + if (showEvent.defaultPrevented) { + // only register focus restorer if modal will actually get shown + return + } + + EventHandler.one(target, EVENT_HIDDEN, () => { + if (isVisible(this)) { + this.focus() + } + }) + }) + + // avoid conflict when clicking modal toggler while another one is open + const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR) + if (alreadyOpen) { + Modal.getInstance(alreadyOpen).hide() + } + + const data = Modal.getOrCreateInstance(target) + + data.toggle(this) +}) + +enableDismissTrigger(Modal) + +/** + * jQuery + */ + +defineJQueryPlugin(Modal) + +export default Modal diff --git a/cao_sunyata/static/libs/bootstrap/js/src/offcanvas.js b/cao_sunyata/static/libs/bootstrap/js/src/offcanvas.js new file mode 100644 index 0000000..7dd06fd --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/offcanvas.js @@ -0,0 +1,283 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): offcanvas.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { + defineJQueryPlugin, + getElementFromSelector, + isDisabled, + isVisible +} from './util/index' +import ScrollBarHelper from './util/scrollbar' +import EventHandler from './dom/event-handler' +import BaseComponent from './base-component' +import SelectorEngine from './dom/selector-engine' +import Backdrop from './util/backdrop' +import FocusTrap from './util/focustrap' +import { enableDismissTrigger } from './util/component-functions' + +/** + * Constants + */ + +const NAME = 'offcanvas' +const DATA_KEY = 'bs.offcanvas' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' +const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}` +const ESCAPE_KEY = 'Escape' + +const CLASS_NAME_SHOW = 'show' +const CLASS_NAME_SHOWING = 'showing' +const CLASS_NAME_HIDING = 'hiding' +const CLASS_NAME_BACKDROP = 'offcanvas-backdrop' +const OPEN_SELECTOR = '.offcanvas.show' + +const EVENT_SHOW = `show${EVENT_KEY}` +const EVENT_SHOWN = `shown${EVENT_KEY}` +const EVENT_HIDE = `hide${EVENT_KEY}` +const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}` +const EVENT_HIDDEN = `hidden${EVENT_KEY}` +const EVENT_RESIZE = `resize${EVENT_KEY}` +const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` +const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}` + +const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="offcanvas"]' + +const Default = { + backdrop: true, + keyboard: true, + scroll: false +} + +const DefaultType = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + scroll: 'boolean' +} + +/** + * Class definition + */ + +class Offcanvas extends BaseComponent { + constructor(element, config) { + super(element, config) + + this._isShown = false + this._backdrop = this._initializeBackDrop() + this._focustrap = this._initializeFocusTrap() + this._addEventListeners() + } + + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Public + toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget) + } + + show(relatedTarget) { + if (this._isShown) { + return + } + + const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { relatedTarget }) + + if (showEvent.defaultPrevented) { + return + } + + this._isShown = true + this._backdrop.show() + + if (!this._config.scroll) { + new ScrollBarHelper().hide() + } + + this._element.setAttribute('aria-modal', true) + this._element.setAttribute('role', 'dialog') + this._element.classList.add(CLASS_NAME_SHOWING) + + const completeCallBack = () => { + if (!this._config.scroll || this._config.backdrop) { + this._focustrap.activate() + } + + this._element.classList.add(CLASS_NAME_SHOW) + this._element.classList.remove(CLASS_NAME_SHOWING) + EventHandler.trigger(this._element, EVENT_SHOWN, { relatedTarget }) + } + + this._queueCallback(completeCallBack, this._element, true) + } + + hide() { + if (!this._isShown) { + return + } + + const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE) + + if (hideEvent.defaultPrevented) { + return + } + + this._focustrap.deactivate() + this._element.blur() + this._isShown = false + this._element.classList.add(CLASS_NAME_HIDING) + this._backdrop.hide() + + const completeCallback = () => { + this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING) + this._element.removeAttribute('aria-modal') + this._element.removeAttribute('role') + + if (!this._config.scroll) { + new ScrollBarHelper().reset() + } + + EventHandler.trigger(this._element, EVENT_HIDDEN) + } + + this._queueCallback(completeCallback, this._element, true) + } + + dispose() { + this._backdrop.dispose() + this._focustrap.deactivate() + super.dispose() + } + + // Private + _initializeBackDrop() { + const clickCallback = () => { + if (this._config.backdrop === 'static') { + EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED) + return + } + + this.hide() + } + + // 'static' option will be translated to true, and booleans will keep their value + const isVisible = Boolean(this._config.backdrop) + + return new Backdrop({ + className: CLASS_NAME_BACKDROP, + isVisible, + isAnimated: true, + rootElement: this._element.parentNode, + clickCallback: isVisible ? clickCallback : null + }) + } + + _initializeFocusTrap() { + return new FocusTrap({ + trapElement: this._element + }) + } + + _addEventListeners() { + EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { + if (event.key !== ESCAPE_KEY) { + return + } + + if (!this._config.keyboard) { + EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED) + return + } + + this.hide() + }) + } + + // Static + static jQueryInterface(config) { + return this.each(function () { + const data = Offcanvas.getOrCreateInstance(this, config) + + if (typeof config !== 'string') { + return + } + + if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { + throw new TypeError(`No method named "${config}"`) + } + + data[config](this) + }) + } +} + +/** + * Data API implementation + */ + +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { + const target = getElementFromSelector(this) + + if (['A', 'AREA'].includes(this.tagName)) { + event.preventDefault() + } + + if (isDisabled(this)) { + return + } + + EventHandler.one(target, EVENT_HIDDEN, () => { + // focus on trigger when it is closed + if (isVisible(this)) { + this.focus() + } + }) + + // avoid conflict when clicking a toggler of an offcanvas, while another is open + const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR) + if (alreadyOpen && alreadyOpen !== target) { + Offcanvas.getInstance(alreadyOpen).hide() + } + + const data = Offcanvas.getOrCreateInstance(target) + data.toggle(this) +}) + +EventHandler.on(window, EVENT_LOAD_DATA_API, () => { + for (const selector of SelectorEngine.find(OPEN_SELECTOR)) { + Offcanvas.getOrCreateInstance(selector).show() + } +}) + +EventHandler.on(window, EVENT_RESIZE, () => { + for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) { + if (getComputedStyle(element).position !== 'fixed') { + Offcanvas.getOrCreateInstance(element).hide() + } + } +}) + +enableDismissTrigger(Offcanvas) + +/** + * jQuery + */ + +defineJQueryPlugin(Offcanvas) + +export default Offcanvas diff --git a/cao_sunyata/static/libs/bootstrap/js/src/popover.js b/cao_sunyata/static/libs/bootstrap/js/src/popover.js new file mode 100644 index 0000000..1b09dd4 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/popover.js @@ -0,0 +1,97 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { defineJQueryPlugin } from './util/index' +import Tooltip from './tooltip' + +/** + * Constants + */ + +const NAME = 'popover' + +const SELECTOR_TITLE = '.popover-header' +const SELECTOR_CONTENT = '.popover-body' + +const Default = { + ...Tooltip.Default, + content: '', + offset: [0, 8], + placement: 'right', + template: '', + trigger: 'click' +} + +const DefaultType = { + ...Tooltip.DefaultType, + content: '(null|string|element|function)' +} + +/** + * Class definition + */ + +class Popover extends Tooltip { + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Overrides + _isWithContent() { + return this._getTitle() || this._getContent() + } + + // Private + _getContentForTemplate() { + return { + [SELECTOR_TITLE]: this._getTitle(), + [SELECTOR_CONTENT]: this._getContent() + } + } + + _getContent() { + return this._resolvePossibleFunction(this._config.content) + } + + // Static + static jQueryInterface(config) { + return this.each(function () { + const data = Popover.getOrCreateInstance(this, config) + + if (typeof config !== 'string') { + return + } + + if (typeof data[config] === 'undefined') { + throw new TypeError(`No method named "${config}"`) + } + + data[config]() + }) + } +} + +/** + * jQuery + */ + +defineJQueryPlugin(Popover) + +export default Popover diff --git a/cao_sunyata/static/libs/bootstrap/js/src/scrollspy.js b/cao_sunyata/static/libs/bootstrap/js/src/scrollspy.js new file mode 100644 index 0000000..01aba99 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/src/scrollspy.js @@ -0,0 +1,294 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v5.2.3): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * -------------------------------------------------------------------------- + */ + +import { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index' +import EventHandler from './dom/event-handler' +import SelectorEngine from './dom/selector-engine' +import BaseComponent from './base-component' + +/** + * Constants + */ + +const NAME = 'scrollspy' +const DATA_KEY = 'bs.scrollspy' +const EVENT_KEY = `.${DATA_KEY}` +const DATA_API_KEY = '.data-api' + +const EVENT_ACTIVATE = `activate${EVENT_KEY}` +const EVENT_CLICK = `click${EVENT_KEY}` +const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}` + +const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item' +const CLASS_NAME_ACTIVE = 'active' + +const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]' +const SELECTOR_TARGET_LINKS = '[href]' +const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group' +const SELECTOR_NAV_LINKS = '.nav-link' +const SELECTOR_NAV_ITEMS = '.nav-item' +const SELECTOR_LIST_ITEMS = '.list-group-item' +const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}` +const SELECTOR_DROPDOWN = '.dropdown' +const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle' + +const Default = { + offset: null, // TODO: v6 @deprecated, keep it for backwards compatibility reasons + rootMargin: '0px 0px -25%', + smoothScroll: false, + target: null, + threshold: [0.1, 0.5, 1] +} + +const DefaultType = { + offset: '(number|null)', // TODO v6 @deprecated, keep it for backwards compatibility reasons + rootMargin: 'string', + smoothScroll: 'boolean', + target: 'element', + threshold: 'array' +} + +/** + * Class definition + */ + +class ScrollSpy extends BaseComponent { + constructor(element, config) { + super(element, config) + + // this._element is the observablesContainer and config.target the menu links wrapper + this._targetLinks = new Map() + this._observableSections = new Map() + this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element + this._activeTarget = null + this._observer = null + this._previousScrollData = { + visibleEntryTop: 0, + parentScrollTop: 0 + } + this.refresh() // initialize + } + + // Getters + static get Default() { + return Default + } + + static get DefaultType() { + return DefaultType + } + + static get NAME() { + return NAME + } + + // Public + refresh() { + this._initializeTargetsAndObservables() + this._maybeEnableSmoothScroll() + + if (this._observer) { + this._observer.disconnect() + } else { + this._observer = this._getNewObserver() + } + + for (const section of this._observableSections.values()) { + this._observer.observe(section) + } + } + + dispose() { + this._observer.disconnect() + super.dispose() + } + + // Private + _configAfterMerge(config) { + // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case + config.target = getElement(config.target) || document.body + + // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only + config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin + + if (typeof config.threshold === 'string') { + config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value)) + } + + return config + } + + _maybeEnableSmoothScroll() { + if (!this._config.smoothScroll) { + return + } + + // unregister any previous listeners + EventHandler.off(this._config.target, EVENT_CLICK) + + EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => { + const observableSection = this._observableSections.get(event.target.hash) + if (observableSection) { + event.preventDefault() + const root = this._rootElement || window + const height = observableSection.offsetTop - this._element.offsetTop + if (root.scrollTo) { + root.scrollTo({ top: height, behavior: 'smooth' }) + return + } + + // Chrome 60 doesn't support `scrollTo` + root.scrollTop = height + } + }) + } + + _getNewObserver() { + const options = { + root: this._rootElement, + threshold: this._config.threshold, + rootMargin: this._config.rootMargin + } + + return new IntersectionObserver(entries => this._observerCallback(entries), options) + } + + // The logic of selection + _observerCallback(entries) { + const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`) + const activate = entry => { + this._previousScrollData.visibleEntryTop = entry.target.offsetTop + this._process(targetElement(entry)) + } + + const parentScrollTop = (this._rootElement || document.documentElement).scrollTop + const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop + this._previousScrollData.parentScrollTop = parentScrollTop + + for (const entry of entries) { + if (!entry.isIntersecting) { + this._activeTarget = null + this._clearActiveClass(targetElement(entry)) + + continue + } + + const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop + // if we are scrolling down, pick the bigger offsetTop + if (userScrollsDown && entryIsLowerThanPrevious) { + activate(entry) + // if parent isn't scrolled, let's keep the first visible item, breaking the iteration + if (!parentScrollTop) { + return + } + + continue + } + + // if we are scrolling up, pick the smallest offsetTop + if (!userScrollsDown && !entryIsLowerThanPrevious) { + activate(entry) + } + } + } + + _initializeTargetsAndObservables() { + this._targetLinks = new Map() + this._observableSections = new Map() + + const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target) + + for (const anchor of targetLinks) { + // ensure that the anchor has an id and is not disabled + if (!anchor.hash || isDisabled(anchor)) { + continue + } + + const observableSection = SelectorEngine.findOne(anchor.hash, this._element) + + // ensure that the observableSection exists & is visible + if (isVisible(observableSection)) { + this._targetLinks.set(anchor.hash, anchor) + this._observableSections.set(anchor.hash, observableSection) + } + } + } + + _process(target) { + if (this._activeTarget === target) { + return + } + + this._clearActiveClass(this._config.target) + this._activeTarget = target + target.classList.add(CLASS_NAME_ACTIVE) + this._activateParents(target) + + EventHandler.trigger(this._element, EVENT_ACTIVATE, { relatedTarget: target }) + } + + _activateParents(target) { + // Activate dropdown parents + if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { + SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN)) + .classList.add(CLASS_NAME_ACTIVE) + return + } + + for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) { + // Set triggered links parents as active + // With both
', + ' ', + ' ', + ' ', + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const input = fixtureEl.querySelector('input') + const textarea = fixtureEl.querySelector('textarea') + const carousel = new Carousel(carouselEl, { + keyboard: true + }) + + const spyKeydown = spyOn(carousel, '_keydown').and.callThrough() + const spySlide = spyOn(carousel, '_slide') + + const keydown = createEvent('keydown', { bubbles: true, cancelable: true }) + keydown.key = 'ArrowRight' + Object.defineProperty(keydown, 'target', { + value: input, + writable: true, + configurable: true + }) + + input.dispatchEvent(keydown) + + expect(spyKeydown).toHaveBeenCalled() + expect(spySlide).not.toHaveBeenCalled() + + spyKeydown.calls.reset() + spySlide.calls.reset() + + Object.defineProperty(keydown, 'target', { + value: textarea + }) + textarea.dispatchEvent(keydown) + + expect(spyKeydown).toHaveBeenCalled() + expect(spySlide).not.toHaveBeenCalled() + }) + + it('should not slide if arrow key is pressed and carousel is sliding', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + + const spy = spyOn(EventHandler, 'trigger') + + carousel._isSliding = true + + for (const key of ['ArrowLeft', 'ArrowRight']) { + const keydown = createEvent('keydown') + keydown.key = key + + carouselEl.dispatchEvent(keydown) + } + + expect(spy).not.toHaveBeenCalled() + }) + + it('should wrap around from end to start when wrap option is true', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, { wrap: true }) + const getActiveId = () => carouselEl.querySelector('.carousel-item.active').getAttribute('id') + + carouselEl.addEventListener('slid.bs.carousel', event => { + const activeId = getActiveId() + + if (activeId === 'two') { + carousel.next() + return + } + + if (activeId === 'three') { + carousel.next() + return + } + + if (activeId === 'one') { + // carousel wrapped around and slid from 3rd to 1st slide + expect(activeId).toEqual('one') + expect(event.from + 1).toEqual(3) + resolve() + } + }) + + carousel.next() + }) + }) + + it('should stay at the start when the prev method is called and wrap is false', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const firstElement = fixtureEl.querySelector('#one') + const carousel = new Carousel(carouselEl, { wrap: false }) + + carouselEl.addEventListener('slid.bs.carousel', () => { + reject(new Error('carousel slid when it should not have slid')) + }) + + carousel.prev() + + setTimeout(() => { + expect(firstElement).toHaveClass('active') + resolve() + }, 10) + }) + }) + + it('should not add touch event listeners if touch = false', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + + const spy = spyOn(Carousel.prototype, '_addTouchEventListeners') + + const carousel = new Carousel(carouselEl, { + touch: false + }) + + expect(spy).not.toHaveBeenCalled() + expect(carousel._swipeHelper).toBeNull() + }) + + it('should not add touch event listeners if touch supported = false', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + spyOn(Swipe, 'isSupported').and.returnValue(false) + + const carousel = new Carousel(carouselEl) + EventHandler.off(carouselEl, Carousel.EVENT_KEY) + + const spy = spyOn(carousel, '_addTouchEventListeners') + + carousel._addEventListeners() + + expect(spy).not.toHaveBeenCalled() + expect(carousel._swipeHelper).toBeNull() + }) + + it('should add touch event listeners by default', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + + spyOn(Carousel.prototype, '_addTouchEventListeners') + + // Headless browser does not support touch events, so need to fake it + // to test that touch events are add properly. + document.documentElement.ontouchstart = noop + const carousel = new Carousel(carouselEl) + + expect(carousel._addTouchEventListeners).toHaveBeenCalled() + }) + + it('should allow swiperight and call _slide (prev) with pointer events', () => { + return new Promise(resolve => { + if (!supportPointerEvent) { + expect().nothing() + resolve() + return + } + + document.documentElement.ontouchstart = noop + document.head.append(stylesCarousel) + Simulator.setType('pointer') + + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('.carousel') + const item = fixtureEl.querySelector('#item') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(carousel, '_slide').and.callThrough() + + carouselEl.addEventListener('slid.bs.carousel', event => { + expect(item).toHaveClass('active') + expect(spy).toHaveBeenCalledWith('prev') + expect(event.direction).toEqual('right') + stylesCarousel.remove() + delete document.documentElement.ontouchstart + resolve() + }) + + Simulator.gestures.swipe(carouselEl, { + deltaX: 300, + deltaY: 0 + }) + }) + }) + + it('should allow swipeleft and call next with pointer events', () => { + return new Promise(resolve => { + if (!supportPointerEvent) { + expect().nothing() + resolve() + return + } + + document.documentElement.ontouchstart = noop + document.head.append(stylesCarousel) + Simulator.setType('pointer') + + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('.carousel') + const item = fixtureEl.querySelector('#item') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(carousel, '_slide').and.callThrough() + + carouselEl.addEventListener('slid.bs.carousel', event => { + expect(item).not.toHaveClass('active') + expect(spy).toHaveBeenCalledWith('next') + expect(event.direction).toEqual('left') + stylesCarousel.remove() + delete document.documentElement.ontouchstart + resolve() + }) + + Simulator.gestures.swipe(carouselEl, { + pos: [300, 10], + deltaX: -300, + deltaY: 0 + }) + }) + }) + + it('should allow swiperight and call _slide (prev) with touch events', () => { + return new Promise(resolve => { + Simulator.setType('touch') + clearPointerEvents() + document.documentElement.ontouchstart = noop + + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('.carousel') + const item = fixtureEl.querySelector('#item') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(carousel, '_slide').and.callThrough() + + carouselEl.addEventListener('slid.bs.carousel', event => { + expect(item).toHaveClass('active') + expect(spy).toHaveBeenCalledWith('prev') + expect(event.direction).toEqual('right') + delete document.documentElement.ontouchstart + restorePointerEvents() + resolve() + }) + + Simulator.gestures.swipe(carouselEl, { + deltaX: 300, + deltaY: 0 + }) + }) + }) + + it('should allow swipeleft and call _slide (next) with touch events', () => { + return new Promise(resolve => { + Simulator.setType('touch') + clearPointerEvents() + document.documentElement.ontouchstart = noop + + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('.carousel') + const item = fixtureEl.querySelector('#item') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(carousel, '_slide').and.callThrough() + + carouselEl.addEventListener('slid.bs.carousel', event => { + expect(item).not.toHaveClass('active') + expect(spy).toHaveBeenCalledWith('next') + expect(event.direction).toEqual('left') + delete document.documentElement.ontouchstart + restorePointerEvents() + resolve() + }) + + Simulator.gestures.swipe(carouselEl, { + pos: [300, 10], + deltaX: -300, + deltaY: 0 + }) + }) + }) + + it('should not slide when swiping and carousel is sliding', () => { + return new Promise(resolve => { + Simulator.setType('touch') + clearPointerEvents() + document.documentElement.ontouchstart = noop + + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('.carousel') + const carousel = new Carousel(carouselEl) + carousel._isSliding = true + + const spy = spyOn(EventHandler, 'trigger') + + Simulator.gestures.swipe(carouselEl, { + deltaX: 300, + deltaY: 0 + }) + + Simulator.gestures.swipe(carouselEl, { + pos: [300, 10], + deltaX: -300, + deltaY: 0 + }) + + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + delete document.documentElement.ontouchstart + restorePointerEvents() + resolve() + }, 300) + }) + }) + + it('should not allow pinch with touch events', () => { + return new Promise(resolve => { + Simulator.setType('touch') + clearPointerEvents() + document.documentElement.ontouchstart = noop + + fixtureEl.innerHTML = '' + + const carouselEl = fixtureEl.querySelector('.carousel') + const carousel = new Carousel(carouselEl) + + Simulator.gestures.swipe(carouselEl, { + pos: [300, 10], + deltaX: -300, + deltaY: 0, + touches: 2 + }, () => { + restorePointerEvents() + delete document.documentElement.ontouchstart + expect(carousel._swipeHelper._deltaX).toEqual(0) + resolve() + }) + }) + }) + + it('should call pause method on mouse over with pause equal to hover', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const carouselEl = fixtureEl.querySelector('.carousel') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(carousel, 'pause') + + const mouseOverEvent = createEvent('mouseover') + carouselEl.dispatchEvent(mouseOverEvent) + + setTimeout(() => { + expect(spy).toHaveBeenCalled() + resolve() + }, 10) + }) + }) + + it('should call `maybeEnableCycle` on mouse out with pause equal to hover', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const carouselEl = fixtureEl.querySelector('.carousel') + const carousel = new Carousel(carouselEl) + + const spyEnable = spyOn(carousel, '_maybeEnableCycle').and.callThrough() + const spyCycle = spyOn(carousel, 'cycle') + + const mouseOutEvent = createEvent('mouseout') + carouselEl.dispatchEvent(mouseOutEvent) + + setTimeout(() => { + expect(spyEnable).toHaveBeenCalled() + expect(spyCycle).toHaveBeenCalled() + resolve() + }, 10) + }) + }) + }) + + describe('next', () => { + it('should not slide if the carousel is sliding', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + + const spy = spyOn(EventHandler, 'trigger') + + carousel._isSliding = true + carousel.next() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should not fire slid when slide is prevented', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + let slidEvent = false + + const doneTest = () => { + setTimeout(() => { + expect(slidEvent).toBeFalse() + resolve() + }, 20) + } + + carouselEl.addEventListener('slide.bs.carousel', event => { + event.preventDefault() + doneTest() + }) + + carouselEl.addEventListener('slid.bs.carousel', () => { + slidEvent = true + }) + + carousel.next() + }) + }) + + it('should fire slide event with: direction, relatedTarget, from and to', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + const onSlide = event => { + expect(event.direction).toEqual('left') + expect(event.relatedTarget).toHaveClass('carousel-item') + expect(event.from).toEqual(0) + expect(event.to).toEqual(1) + + carouselEl.removeEventListener('slide.bs.carousel', onSlide) + carouselEl.addEventListener('slide.bs.carousel', onSlide2) + + carousel.prev() + } + + const onSlide2 = event => { + expect(event.direction).toEqual('right') + resolve() + } + + carouselEl.addEventListener('slide.bs.carousel', onSlide) + carousel.next() + }) + }) + + it('should fire slid event with: direction, relatedTarget, from and to', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + const onSlid = event => { + expect(event.direction).toEqual('left') + expect(event.relatedTarget).toHaveClass('carousel-item') + expect(event.from).toEqual(0) + expect(event.to).toEqual(1) + + carouselEl.removeEventListener('slid.bs.carousel', onSlid) + carouselEl.addEventListener('slid.bs.carousel', onSlid2) + + carousel.prev() + } + + const onSlid2 = event => { + expect(event.direction).toEqual('right') + resolve() + } + + carouselEl.addEventListener('slid.bs.carousel', onSlid) + carousel.next() + }) + }) + + it('should update the active element to the next item before sliding', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const secondItemEl = fixtureEl.querySelector('#secondItem') + const carousel = new Carousel(carouselEl) + + carousel.next() + + expect(carousel._activeElement).toEqual(secondItemEl) + }) + + it('should continue cycling if it was already', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl) + const spy = spyOn(carousel, 'cycle') + + carousel.next() + expect(spy).not.toHaveBeenCalled() + + carousel.cycle() + carousel.next() + expect(spy).toHaveBeenCalledTimes(1) + }) + + it('should update indicators if present', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const firstIndicator = fixtureEl.querySelector('#firstIndicator') + const secondIndicator = fixtureEl.querySelector('#secondIndicator') + const carousel = new Carousel(carouselEl) + + carouselEl.addEventListener('slid.bs.carousel', () => { + expect(firstIndicator).not.toHaveClass('active') + expect(firstIndicator.hasAttribute('aria-current')).toBeFalse() + expect(secondIndicator).toHaveClass('active') + expect(secondIndicator.getAttribute('aria-current')).toEqual('true') + resolve() + }) + + carousel.next() + }) + }) + + it('should call next()/prev() instance methods when clicking the respective direction buttons', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#carousel') + const prevBtnEl = fixtureEl.querySelector('.carousel-control-prev') + const nextBtnEl = fixtureEl.querySelector('.carousel-control-next') + + const carousel = new Carousel(carouselEl) + const nextSpy = spyOn(carousel, 'next') + const prevSpy = spyOn(carousel, 'prev') + const spyEnable = spyOn(carousel, '_maybeEnableCycle') + + nextBtnEl.click() + prevBtnEl.click() + + expect(nextSpy).toHaveBeenCalled() + expect(prevSpy).toHaveBeenCalled() + expect(spyEnable).toHaveBeenCalled() + }) + }) + + describe('nextWhenVisible', () => { + it('should not call next when the page is not visible', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const carouselEl = fixtureEl.querySelector('.carousel') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(carousel, 'next') + + carousel.nextWhenVisible() + + expect(spy).not.toHaveBeenCalled() + }) + }) + + describe('prev', () => { + it('should not slide if the carousel is sliding', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + + const spy = spyOn(EventHandler, 'trigger') + + carousel._isSliding = true + carousel.prev() + + expect(spy).not.toHaveBeenCalled() + }) + }) + + describe('pause', () => { + it('should trigger transitionend if the carousel have carousel-item-next or carousel-item-prev class, cause is sliding', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl) + const spy = spyOn(carousel, '_clearInterval') + + carouselEl.addEventListener('transitionend', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + carousel._slide('next') + carousel.pause() + }) + }) + }) + + describe('cycle', () => { + it('should set an interval', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl) + + const spy = spyOn(window, 'setInterval').and.callThrough() + + carousel.cycle() + + expect(spy).toHaveBeenCalled() + }) + + it('should clear interval if there is one', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl) + + carousel._interval = setInterval(noop, 10) + + const spySet = spyOn(window, 'setInterval').and.callThrough() + const spyClear = spyOn(window, 'clearInterval').and.callThrough() + + carousel.cycle() + + expect(spySet).toHaveBeenCalled() + expect(spyClear).toHaveBeenCalled() + }) + + it('should get interval from data attribute on the active item element', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const secondItemEl = fixtureEl.querySelector('#secondItem') + const carousel = new Carousel(carouselEl, { + interval: 1814 + }) + + expect(carousel._config.interval).toEqual(1814) + + carousel.cycle() + + expect(carousel._config.interval).toEqual(7) + + carousel._activeElement = secondItemEl + carousel.cycle() + + expect(carousel._config.interval).toEqual(9385) + }) + }) + + describe('to', () => { + it('should go directly to the provided index', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + expect(fixtureEl.querySelector('.active')).toEqual(fixtureEl.querySelector('#item1')) + + carousel.to(2) + + carouselEl.addEventListener('slid.bs.carousel', () => { + expect(fixtureEl.querySelector('.active')).toEqual(fixtureEl.querySelector('#item3')) + resolve() + }) + }) + }) + + it('should return to a previous slide if the provided index is lower than the current', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + expect(fixtureEl.querySelector('.active')).toEqual(fixtureEl.querySelector('#item3')) + + carousel.to(1) + + carouselEl.addEventListener('slid.bs.carousel', () => { + expect(fixtureEl.querySelector('.active')).toEqual(fixtureEl.querySelector('#item2')) + resolve() + }) + }) + }) + + it('should do nothing if a wrong index is provided', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + const spy = spyOn(carousel, '_slide') + + carousel.to(25) + + expect(spy).not.toHaveBeenCalled() + + spy.calls.reset() + + carousel.to(-5) + + expect(spy).not.toHaveBeenCalled() + }) + + it('should not continue if the provided is the same compare to the current one', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + const spy = spyOn(carousel, '_slide') + + carousel.to(0) + + expect(spy).not.toHaveBeenCalled() + }) + + it('should wait before performing to if a slide is sliding', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const carousel = new Carousel(carouselEl, {}) + + const spyOne = spyOn(EventHandler, 'one').and.callThrough() + const spySlide = spyOn(carousel, '_slide') + + carousel._isSliding = true + carousel.to(1) + + expect(spySlide).not.toHaveBeenCalled() + expect(spyOne).toHaveBeenCalled() + + const spyTo = spyOn(carousel, 'to') + + EventHandler.trigger(carouselEl, 'slid.bs.carousel') + + setTimeout(() => { + expect(spyTo).toHaveBeenCalledWith(1) + resolve() + }) + }) + }) + }) + + describe('rtl function', () => { + it('"_directionToOrder" and "_orderToDirection" must return the right results', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + + expect(carousel._directionToOrder('left')).toEqual('next') + expect(carousel._directionToOrder('right')).toEqual('prev') + + expect(carousel._orderToDirection('next')).toEqual('left') + expect(carousel._orderToDirection('prev')).toEqual('right') + }) + + it('"_directionToOrder" and "_orderToDirection" must return the right results when rtl=true', () => { + document.documentElement.dir = 'rtl' + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + expect(isRTL()).toBeTrue() + + expect(carousel._directionToOrder('left')).toEqual('prev') + expect(carousel._directionToOrder('right')).toEqual('next') + + expect(carousel._orderToDirection('next')).toEqual('right') + expect(carousel._orderToDirection('prev')).toEqual('left') + document.documentElement.dir = 'ltl' + }) + + it('"_slide" has to call _directionToOrder and "_orderToDirection"', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + + const spy = spyOn(carousel, '_orderToDirection').and.callThrough() + + carousel._slide(carousel._directionToOrder('left')) + expect(spy).toHaveBeenCalledWith('next') + + carousel._slide(carousel._directionToOrder('right')) + expect(spy).toHaveBeenCalledWith('prev') + }) + + it('"_slide" has to call "_directionToOrder" and "_orderToDirection" when rtl=true', () => { + document.documentElement.dir = 'rtl' + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const carousel = new Carousel(carouselEl, {}) + const spy = spyOn(carousel, '_orderToDirection').and.callThrough() + + carousel._slide(carousel._directionToOrder('left')) + expect(spy).toHaveBeenCalledWith('prev') + + carousel._slide(carousel._directionToOrder('right')) + expect(spy).toHaveBeenCalledWith('next') + + document.documentElement.dir = 'ltl' + }) + }) + + describe('dispose', () => { + it('should destroy a carousel', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const carouselEl = fixtureEl.querySelector('#myCarousel') + const addEventSpy = spyOn(carouselEl, 'addEventListener').and.callThrough() + const removeEventSpy = spyOn(EventHandler, 'off').and.callThrough() + + // Headless browser does not support touch events, so need to fake it + // to test that touch events are add/removed properly. + document.documentElement.ontouchstart = noop + + const carousel = new Carousel(carouselEl) + const swipeHelperSpy = spyOn(carousel._swipeHelper, 'dispose').and.callThrough() + + const expectedArgs = [ + ['keydown', jasmine.any(Function), jasmine.any(Boolean)], + ['mouseover', jasmine.any(Function), jasmine.any(Boolean)], + ['mouseout', jasmine.any(Function), jasmine.any(Boolean)], + ...(carousel._swipeHelper._supportPointerEvents ? + [ + ['pointerdown', jasmine.any(Function), jasmine.any(Boolean)], + ['pointerup', jasmine.any(Function), jasmine.any(Boolean)] + ] : + [ + ['touchstart', jasmine.any(Function), jasmine.any(Boolean)], + ['touchmove', jasmine.any(Function), jasmine.any(Boolean)], + ['touchend', jasmine.any(Function), jasmine.any(Boolean)] + ]) + ] + + expect(addEventSpy.calls.allArgs()).toEqual(expectedArgs) + + carousel.dispose() + + expect(carousel._swipeHelper).toBeNull() + expect(removeEventSpy).toHaveBeenCalledWith(carouselEl, Carousel.EVENT_KEY) + expect(swipeHelperSpy).toHaveBeenCalled() + + delete document.documentElement.ontouchstart + }) + }) + + describe('getInstance', () => { + it('should return carousel instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const carousel = new Carousel(div) + + expect(Carousel.getInstance(div)).toEqual(carousel) + expect(Carousel.getInstance(div)).toBeInstanceOf(Carousel) + }) + + it('should return null when there is no carousel instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Carousel.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return carousel instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const carousel = new Carousel(div) + + expect(Carousel.getOrCreateInstance(div)).toEqual(carousel) + expect(Carousel.getInstance(div)).toEqual(Carousel.getOrCreateInstance(div, {})) + expect(Carousel.getOrCreateInstance(div)).toBeInstanceOf(Carousel) + }) + + it('should return new instance when there is no carousel instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Carousel.getInstance(div)).toBeNull() + expect(Carousel.getOrCreateInstance(div)).toBeInstanceOf(Carousel) + }) + + it('should return new instance when there is no carousel instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Carousel.getInstance(div)).toBeNull() + const carousel = Carousel.getOrCreateInstance(div, { + interval: 1 + }) + expect(carousel).toBeInstanceOf(Carousel) + + expect(carousel._config.interval).toEqual(1) + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const carousel = new Carousel(div, { + interval: 1 + }) + expect(Carousel.getInstance(div)).toEqual(carousel) + + const carousel2 = Carousel.getOrCreateInstance(div, { + interval: 2 + }) + expect(carousel).toBeInstanceOf(Carousel) + expect(carousel2).toEqual(carousel) + + expect(carousel2._config.interval).toEqual(1) + }) + }) + + describe('jQueryInterface', () => { + it('should create a carousel', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.carousel = Carousel.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.carousel.call(jQueryMock) + + expect(Carousel.getInstance(div)).not.toBeNull() + }) + + it('should not re create a carousel', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const carousel = new Carousel(div) + + jQueryMock.fn.carousel = Carousel.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.carousel.call(jQueryMock) + + expect(Carousel.getInstance(div)).toEqual(carousel) + }) + + it('should call to if the config is a number', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const carousel = new Carousel(div) + const slideTo = 2 + + const spy = spyOn(carousel, 'to') + + jQueryMock.fn.carousel = Carousel.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.carousel.call(jQueryMock, slideTo) + + expect(spy).toHaveBeenCalledWith(slideTo) + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.carousel = Carousel.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.carousel.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) + + describe('data-api', () => { + it('should init carousels with data-bs-ride="carousel" on load', () => { + fixtureEl.innerHTML = '
' + + const carouselEl = fixtureEl.querySelector('div') + const loadEvent = createEvent('load') + + window.dispatchEvent(loadEvent) + const carousel = Carousel.getInstance(carouselEl) + expect(carousel._interval).not.toBeNull() + }) + + it('should create carousel and go to the next slide on click (with real button controls)', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const next = fixtureEl.querySelector('#next') + const item2 = fixtureEl.querySelector('#item2') + + next.click() + + setTimeout(() => { + expect(item2).toHaveClass('active') + resolve() + }, 10) + }) + }) + + it('should create carousel and go to the next slide on click (using links as controls)', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const next = fixtureEl.querySelector('#next') + const item2 = fixtureEl.querySelector('#item2') + + next.click() + + setTimeout(() => { + expect(item2).toHaveClass('active') + resolve() + }, 10) + }) + }) + + it('should create carousel and go to the next slide on click with data-bs-slide-to', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const next = fixtureEl.querySelector('#next') + const item2 = fixtureEl.querySelector('#item2') + + next.click() + + setTimeout(() => { + expect(item2).toHaveClass('active') + expect(Carousel.getInstance('#myCarousel')._interval).not.toBeNull() + resolve() + }, 10) + }) + }) + + it('should do nothing if no selector on click on arrows', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const next = fixtureEl.querySelector('#next') + + next.click() + + expect().nothing() + }) + + it('should do nothing if no carousel class on click on arrows', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + ' ', + '
' + ].join('') + + const next = fixtureEl.querySelector('#next') + + next.click() + + expect().nothing() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/collapse.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/collapse.spec.js new file mode 100644 index 0000000..9c86719 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/collapse.spec.js @@ -0,0 +1,1062 @@ +import Collapse from '../../src/collapse' +import EventHandler from '../../src/dom/event-handler' +import { clearFixture, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Collapse', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Collapse.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(Collapse.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Collapse.DATA_KEY).toEqual('bs.collapse') + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div.my-collapse') + const collapseBySelector = new Collapse('div.my-collapse') + const collapseByElement = new Collapse(collapseEl) + + expect(collapseBySelector._element).toEqual(collapseEl) + expect(collapseByElement._element).toEqual(collapseEl) + }) + + it('should allow jquery object in parent config', () => { + fixtureEl.innerHTML = [ + '
', + '
', + ' Toggle item', + '
Lorem ipsum
', + '
', + '
' + ].join('') + + const collapseEl = fixtureEl.querySelector('div.collapse') + const myCollapseEl = fixtureEl.querySelector('.my-collapse') + const fakejQueryObject = { + 0: myCollapseEl, + jquery: 'foo' + } + const collapse = new Collapse(collapseEl, { + parent: fakejQueryObject + }) + + expect(collapse._config.parent).toEqual(myCollapseEl) + }) + + it('should allow non jquery object in parent config', () => { + fixtureEl.innerHTML = [ + '
', + '
', + ' Toggle item', + '
Lorem ipsum
', + '
', + '
' + ].join('') + + const collapseEl = fixtureEl.querySelector('div.collapse') + const myCollapseEl = fixtureEl.querySelector('.my-collapse') + const collapse = new Collapse(collapseEl, { + parent: myCollapseEl + }) + + expect(collapse._config.parent).toEqual(myCollapseEl) + }) + + it('should allow string selector in parent config', () => { + fixtureEl.innerHTML = [ + '
', + '
', + ' Toggle item', + '
Lorem ipsum
', + '
', + '
' + ].join('') + + const collapseEl = fixtureEl.querySelector('div.collapse') + const myCollapseEl = fixtureEl.querySelector('.my-collapse') + const collapse = new Collapse(collapseEl, { + parent: 'div.my-collapse' + }) + + expect(collapse._config.parent).toEqual(myCollapseEl) + }) + }) + + describe('toggle', () => { + it('should call show method if show class is not present', () => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl) + + const spy = spyOn(collapse, 'show') + + collapse.toggle() + + expect(spy).toHaveBeenCalled() + }) + + it('should call hide method if show class is present', () => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('.show') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + const spy = spyOn(collapse, 'hide') + + collapse.toggle() + + expect(spy).toHaveBeenCalled() + }) + + it('should find collapse children if they have collapse class too not only data-bs-parent', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' Toggle item 1', + '
Lorem ipsum 1
', + '
', + '
', + ' Toggle item 2', + '
Lorem ipsum 2
', + '
', + '
' + ].join('') + + const parent = fixtureEl.querySelector('.my-collapse') + const collapseEl1 = fixtureEl.querySelector('#collapse1') + const collapseEl2 = fixtureEl.querySelector('#collapse2') + + const collapseList = [].concat(...fixtureEl.querySelectorAll('.collapse')) + .map(el => new Collapse(el, { + parent, + toggle: false + })) + + collapseEl2.addEventListener('shown.bs.collapse', () => { + expect(collapseEl2).toHaveClass('show') + expect(collapseEl1).not.toHaveClass('show') + resolve() + }) + + collapseList[1].toggle() + }) + }) + }) + + describe('show', () => { + it('should do nothing if is transitioning', () => { + fixtureEl.innerHTML = '
' + + const spy = spyOn(EventHandler, 'trigger') + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapse._isTransitioning = true + collapse.show() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should do nothing if already shown', () => { + fixtureEl.innerHTML = '
' + + const spy = spyOn(EventHandler, 'trigger') + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapse.show() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should show a collapsed element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapseEl.addEventListener('show.bs.collapse', () => { + expect(collapseEl.style.height).toEqual('0px') + }) + collapseEl.addEventListener('shown.bs.collapse', () => { + expect(collapseEl).toHaveClass('show') + expect(collapseEl.style.height).toEqual('') + resolve() + }) + + collapse.show() + }) + }) + + it('should show a collapsed element on width', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapseEl.addEventListener('show.bs.collapse', () => { + expect(collapseEl.style.width).toEqual('0px') + }) + collapseEl.addEventListener('shown.bs.collapse', () => { + expect(collapseEl).toHaveClass('show') + expect(collapseEl.style.width).toEqual('') + resolve() + }) + + collapse.show() + }) + }) + + it('should collapse only the first collapse', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const el1 = fixtureEl.querySelector('#collapse1') + const el2 = fixtureEl.querySelector('#collapse2') + const collapse = new Collapse(el1, { + toggle: false + }) + + el1.addEventListener('shown.bs.collapse', () => { + expect(el1).toHaveClass('show') + expect(el2).toHaveClass('show') + resolve() + }) + + collapse.show() + }) + }) + + it('should be able to handle toggling of other children siblings', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' ', + '
', + '
', + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
content
', + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
content
', + '
', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const el = selector => fixtureEl.querySelector(selector) + + const parentBtn = el('[data-bs-target="#parentContent"]') + const childBtn1 = el('[data-bs-target="#childContent1"]') + const childBtn2 = el('[data-bs-target="#childContent2"]') + + const parentCollapseEl = el('#parentContent') + const childCollapseEl1 = el('#childContent1') + const childCollapseEl2 = el('#childContent2') + + parentCollapseEl.addEventListener('shown.bs.collapse', () => { + expect(parentCollapseEl).toHaveClass('show') + childBtn1.click() + }) + childCollapseEl1.addEventListener('shown.bs.collapse', () => { + expect(childCollapseEl1).toHaveClass('show') + childBtn2.click() + }) + childCollapseEl2.addEventListener('shown.bs.collapse', () => { + expect(childCollapseEl2).toHaveClass('show') + expect(childCollapseEl1).not.toHaveClass('show') + resolve() + }) + + parentBtn.click() + }) + }) + + it('should not change tab tabpanels descendants on accordion', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '

', + ' ', + '

', + '
', + '
', + ' ', + ' ', + '
', + '
', + '
', + '
' + ].join('') + + const el = fixtureEl.querySelector('#collapseOne') + const activeTabPane = fixtureEl.querySelector('#nav-home') + const collapse = new Collapse(el) + let times = 1 + + el.addEventListener('hidden.bs.collapse', () => { + collapse.show() + }) + + el.addEventListener('shown.bs.collapse', () => { + expect(activeTabPane).toHaveClass('show') + times++ + if (times === 2) { + resolve() + } + + collapse.hide() + }) + + collapse.show() + }) + }) + + it('should not fire shown when show is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + const expectEnd = () => { + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + } + + collapseEl.addEventListener('show.bs.collapse', event => { + event.preventDefault() + expectEnd() + }) + + collapseEl.addEventListener('shown.bs.collapse', () => { + reject(new Error('should not fire shown event')) + }) + + collapse.show() + }) + }) + }) + + describe('hide', () => { + it('should do nothing if is transitioning', () => { + fixtureEl.innerHTML = '
' + + const spy = spyOn(EventHandler, 'trigger') + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapse._isTransitioning = true + collapse.hide() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should do nothing if already shown', () => { + fixtureEl.innerHTML = '
' + + const spy = spyOn(EventHandler, 'trigger') + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapse.hide() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should hide a collapsed element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + collapseEl.addEventListener('hidden.bs.collapse', () => { + expect(collapseEl).not.toHaveClass('show') + expect(collapseEl.style.height).toEqual('') + resolve() + }) + + collapse.hide() + }) + }) + + it('should not fire hidden when hide is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + const expectEnd = () => { + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + } + + collapseEl.addEventListener('hide.bs.collapse', event => { + event.preventDefault() + expectEnd() + }) + + collapseEl.addEventListener('hidden.bs.collapse', () => { + reject(new Error('should not fire hidden event')) + }) + + collapse.hide() + }) + }) + }) + + describe('dispose', () => { + it('should destroy a collapse', () => { + fixtureEl.innerHTML = '
' + + const collapseEl = fixtureEl.querySelector('div') + const collapse = new Collapse(collapseEl, { + toggle: false + }) + + expect(Collapse.getInstance(collapseEl)).toEqual(collapse) + + collapse.dispose() + + expect(Collapse.getInstance(collapseEl)).toBeNull() + }) + }) + + describe('data-api', () => { + it('should prevent url change if click on nested elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const triggerEl = fixtureEl.querySelector('a') + const nestedTriggerEl = fixtureEl.querySelector('#nested') + + const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + triggerEl.addEventListener('click', event => { + expect(event.target.isEqualNode(nestedTriggerEl)).toBeTrue() + expect(event.delegateTarget.isEqualNode(triggerEl)).toBeTrue() + expect(spy).toHaveBeenCalled() + resolve() + }) + + nestedTriggerEl.click() + }) + }) + + it('should show multiple collapsed elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('a') + const collapse1 = fixtureEl.querySelector('#collapse1') + const collapse2 = fixtureEl.querySelector('#collapse2') + + collapse2.addEventListener('shown.bs.collapse', () => { + expect(trigger.getAttribute('aria-expanded')).toEqual('true') + expect(trigger).not.toHaveClass('collapsed') + expect(collapse1).toHaveClass('show') + expect(collapse1).toHaveClass('show') + resolve() + }) + + trigger.click() + }) + }) + + it('should hide multiple collapsed elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('a') + const collapse1 = fixtureEl.querySelector('#collapse1') + const collapse2 = fixtureEl.querySelector('#collapse2') + + collapse2.addEventListener('hidden.bs.collapse', () => { + expect(trigger.getAttribute('aria-expanded')).toEqual('false') + expect(trigger).toHaveClass('collapsed') + expect(collapse1).not.toHaveClass('show') + expect(collapse1).not.toHaveClass('show') + resolve() + }) + + trigger.click() + }) + }) + + it('should remove "collapsed" class from target when collapse is shown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '', + '
' + ].join('') + + const link1 = fixtureEl.querySelector('#link1') + const link2 = fixtureEl.querySelector('#link2') + const collapseTest1 = fixtureEl.querySelector('#test1') + + collapseTest1.addEventListener('shown.bs.collapse', () => { + expect(link1.getAttribute('aria-expanded')).toEqual('true') + expect(link2.getAttribute('aria-expanded')).toEqual('true') + expect(link1).not.toHaveClass('collapsed') + expect(link2).not.toHaveClass('collapsed') + resolve() + }) + + link1.click() + }) + }) + + it('should add "collapsed" class to target when collapse is hidden', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '', + '
' + ].join('') + + const link1 = fixtureEl.querySelector('#link1') + const link2 = fixtureEl.querySelector('#link2') + const collapseTest1 = fixtureEl.querySelector('#test1') + + collapseTest1.addEventListener('hidden.bs.collapse', () => { + expect(link1.getAttribute('aria-expanded')).toEqual('false') + expect(link2.getAttribute('aria-expanded')).toEqual('false') + expect(link1).toHaveClass('collapsed') + expect(link2).toHaveClass('collapsed') + resolve() + }) + + link1.click() + }) + }) + + it('should allow accordion to use children other than card', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' ', + '
', + '
', + '
', + ' ', + '
', + '
', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('#linkTrigger') + const triggerTwo = fixtureEl.querySelector('#linkTriggerTwo') + const collapseOne = fixtureEl.querySelector('#collapseOne') + const collapseTwo = fixtureEl.querySelector('#collapseTwo') + + collapseOne.addEventListener('shown.bs.collapse', () => { + expect(collapseOne).toHaveClass('show') + expect(collapseTwo).not.toHaveClass('show') + + collapseTwo.addEventListener('shown.bs.collapse', () => { + expect(collapseOne).not.toHaveClass('show') + expect(collapseTwo).toHaveClass('show') + resolve() + }) + + triggerTwo.click() + }) + + trigger.click() + }) + }) + + it('should not prevent event for input', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const target = fixtureEl.querySelector('input') + const collapseEl = fixtureEl.querySelector('#collapsediv1') + + collapseEl.addEventListener('shown.bs.collapse', () => { + expect(collapseEl).toHaveClass('show') + expect(target.checked).toBeTrue() + resolve() + }) + + target.click() + }) + }) + + it('should allow accordion to contain nested elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const triggerEl = fixtureEl.querySelector('#linkTrigger') + const triggerTwoEl = fixtureEl.querySelector('#linkTriggerTwo') + const collapseOneEl = fixtureEl.querySelector('#collapseOne') + const collapseTwoEl = fixtureEl.querySelector('#collapseTwo') + + collapseOneEl.addEventListener('shown.bs.collapse', () => { + expect(collapseOneEl).toHaveClass('show') + expect(triggerEl).not.toHaveClass('collapsed') + expect(triggerEl.getAttribute('aria-expanded')).toEqual('true') + + expect(collapseTwoEl).not.toHaveClass('show') + expect(triggerTwoEl).toHaveClass('collapsed') + expect(triggerTwoEl.getAttribute('aria-expanded')).toEqual('false') + + collapseTwoEl.addEventListener('shown.bs.collapse', () => { + expect(collapseOneEl).not.toHaveClass('show') + expect(triggerEl).toHaveClass('collapsed') + expect(triggerEl.getAttribute('aria-expanded')).toEqual('false') + + expect(collapseTwoEl).toHaveClass('show') + expect(triggerTwoEl).not.toHaveClass('collapsed') + expect(triggerTwoEl.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + triggerTwoEl.click() + }) + + triggerEl.click() + }) + }) + + it('should allow accordion to target multiple elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('#linkTriggerOne') + const triggerTwo = fixtureEl.querySelector('#linkTriggerTwo') + const collapseOneOne = fixtureEl.querySelector('#collapseOneOne') + const collapseOneTwo = fixtureEl.querySelector('#collapseOneTwo') + const collapseTwoOne = fixtureEl.querySelector('#collapseTwoOne') + const collapseTwoTwo = fixtureEl.querySelector('#collapseTwoTwo') + const collapsedElements = { + one: false, + two: false + } + + function firstTest() { + expect(collapseOneOne).toHaveClass('show') + expect(collapseOneTwo).toHaveClass('show') + + expect(collapseTwoOne).not.toHaveClass('show') + expect(collapseTwoTwo).not.toHaveClass('show') + + triggerTwo.click() + } + + function secondTest() { + expect(collapseOneOne).not.toHaveClass('show') + expect(collapseOneTwo).not.toHaveClass('show') + + expect(collapseTwoOne).toHaveClass('show') + expect(collapseTwoTwo).toHaveClass('show') + resolve() + } + + collapseOneOne.addEventListener('shown.bs.collapse', () => { + if (collapsedElements.one) { + firstTest() + } else { + collapsedElements.one = true + } + }) + + collapseOneTwo.addEventListener('shown.bs.collapse', () => { + if (collapsedElements.one) { + firstTest() + } else { + collapsedElements.one = true + } + }) + + collapseTwoOne.addEventListener('shown.bs.collapse', () => { + if (collapsedElements.two) { + secondTest() + } else { + collapsedElements.two = true + } + }) + + collapseTwoTwo.addEventListener('shown.bs.collapse', () => { + if (collapsedElements.two) { + secondTest() + } else { + collapsedElements.two = true + } + }) + + trigger.click() + }) + }) + + it('should collapse accordion children but not nested accordion children', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' ', + '
', + '
', + '
', + ' ', + '
', + '
', + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('#linkTrigger') + const triggerTwo = fixtureEl.querySelector('#linkTriggerTwo') + const nestedTrigger = fixtureEl.querySelector('#nestedLinkTrigger') + const collapseOne = fixtureEl.querySelector('#collapseOne') + const collapseTwo = fixtureEl.querySelector('#collapseTwo') + const nestedCollapseOne = fixtureEl.querySelector('#nestedCollapseOne') + + function handlerCollapseOne() { + expect(collapseOne).toHaveClass('show') + expect(collapseTwo).not.toHaveClass('show') + expect(nestedCollapseOne).not.toHaveClass('show') + + nestedCollapseOne.addEventListener('shown.bs.collapse', handlerNestedCollapseOne) + nestedTrigger.click() + collapseOne.removeEventListener('shown.bs.collapse', handlerCollapseOne) + } + + function handlerNestedCollapseOne() { + expect(collapseOne).toHaveClass('show') + expect(collapseTwo).not.toHaveClass('show') + expect(nestedCollapseOne).toHaveClass('show') + + collapseTwo.addEventListener('shown.bs.collapse', () => { + expect(collapseOne).not.toHaveClass('show') + expect(collapseTwo).toHaveClass('show') + expect(nestedCollapseOne).toHaveClass('show') + resolve() + }) + + triggerTwo.click() + nestedCollapseOne.removeEventListener('shown.bs.collapse', handlerNestedCollapseOne) + } + + collapseOne.addEventListener('shown.bs.collapse', handlerCollapseOne) + trigger.click() + }) + }) + + it('should add "collapsed" class and set aria-expanded to triggers only when all the targeted collapse are hidden', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '', + '', + '
', + '
' + ].join('') + + const trigger1 = fixtureEl.querySelector('#trigger1') + const trigger2 = fixtureEl.querySelector('#trigger2') + const trigger3 = fixtureEl.querySelector('#trigger3') + const target1 = fixtureEl.querySelector('#test1') + const target2 = fixtureEl.querySelector('#test2') + + const target2Shown = () => { + expect(trigger1).not.toHaveClass('collapsed') + expect(trigger1.getAttribute('aria-expanded')).toEqual('true') + + expect(trigger2).not.toHaveClass('collapsed') + expect(trigger2.getAttribute('aria-expanded')).toEqual('true') + + expect(trigger3).not.toHaveClass('collapsed') + expect(trigger3.getAttribute('aria-expanded')).toEqual('true') + + target2.addEventListener('hidden.bs.collapse', () => { + expect(trigger1).not.toHaveClass('collapsed') + expect(trigger1.getAttribute('aria-expanded')).toEqual('true') + + expect(trigger2).toHaveClass('collapsed') + expect(trigger2.getAttribute('aria-expanded')).toEqual('false') + + expect(trigger3).not.toHaveClass('collapsed') + expect(trigger3.getAttribute('aria-expanded')).toEqual('true') + + target1.addEventListener('hidden.bs.collapse', () => { + expect(trigger1).toHaveClass('collapsed') + expect(trigger1.getAttribute('aria-expanded')).toEqual('false') + + expect(trigger2).toHaveClass('collapsed') + expect(trigger2.getAttribute('aria-expanded')).toEqual('false') + + expect(trigger3).toHaveClass('collapsed') + expect(trigger3.getAttribute('aria-expanded')).toEqual('false') + resolve() + }) + + trigger1.click() + }) + + trigger2.click() + } + + target2.addEventListener('shown.bs.collapse', target2Shown) + trigger3.click() + }) + }) + }) + + describe('jQueryInterface', () => { + it('should create a collapse', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.collapse = Collapse.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.collapse.call(jQueryMock) + + expect(Collapse.getInstance(div)).not.toBeNull() + }) + + it('should not re create a collapse', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const collapse = new Collapse(div) + + jQueryMock.fn.collapse = Collapse.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.collapse.call(jQueryMock) + + expect(Collapse.getInstance(div)).toEqual(collapse) + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.collapse = Collapse.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.collapse.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) + + describe('getInstance', () => { + it('should return collapse instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const collapse = new Collapse(div) + + expect(Collapse.getInstance(div)).toEqual(collapse) + expect(Collapse.getInstance(div)).toBeInstanceOf(Collapse) + }) + + it('should return null when there is no collapse instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Collapse.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return collapse instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const collapse = new Collapse(div) + + expect(Collapse.getOrCreateInstance(div)).toEqual(collapse) + expect(Collapse.getInstance(div)).toEqual(Collapse.getOrCreateInstance(div, {})) + expect(Collapse.getOrCreateInstance(div)).toBeInstanceOf(Collapse) + }) + + it('should return new instance when there is no collapse instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Collapse.getInstance(div)).toBeNull() + expect(Collapse.getOrCreateInstance(div)).toBeInstanceOf(Collapse) + }) + + it('should return new instance when there is no collapse instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Collapse.getInstance(div)).toBeNull() + const collapse = Collapse.getOrCreateInstance(div, { + toggle: false + }) + expect(collapse).toBeInstanceOf(Collapse) + + expect(collapse._config.toggle).toBeFalse() + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const collapse = new Collapse(div, { + toggle: false + }) + expect(Collapse.getInstance(div)).toEqual(collapse) + + const collapse2 = Collapse.getOrCreateInstance(div, { + toggle: true + }) + expect(collapse).toBeInstanceOf(Collapse) + expect(collapse2).toEqual(collapse) + + expect(collapse2._config.toggle).toBeFalse() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/data.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/data.spec.js new file mode 100644 index 0000000..e898cbb --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/data.spec.js @@ -0,0 +1,106 @@ +import Data from '../../../src/dom/data' +import { getFixture, clearFixture } from '../../helpers/fixture' + +describe('Data', () => { + const TEST_KEY = 'bs.test' + const UNKNOWN_KEY = 'bs.unknown' + const TEST_DATA = { + test: 'bsData' + } + + let fixtureEl + let div + + beforeAll(() => { + fixtureEl = getFixture() + }) + + beforeEach(() => { + fixtureEl.innerHTML = '
' + div = fixtureEl.querySelector('div') + }) + + afterEach(() => { + Data.remove(div, TEST_KEY) + clearFixture() + }) + + it('should return null for unknown elements', () => { + const data = { ...TEST_DATA } + + Data.set(div, TEST_KEY, data) + + expect(Data.get(null)).toBeNull() + expect(Data.get(undefined)).toBeNull() + expect(Data.get(document.createElement('div'), TEST_KEY)).toBeNull() + }) + + it('should return null for unknown keys', () => { + const data = { ...TEST_DATA } + + Data.set(div, TEST_KEY, data) + + expect(Data.get(div, null)).toBeNull() + expect(Data.get(div, undefined)).toBeNull() + expect(Data.get(div, UNKNOWN_KEY)).toBeNull() + }) + + it('should store data for an element with a given key and return it', () => { + const data = { ...TEST_DATA } + + Data.set(div, TEST_KEY, data) + + expect(Data.get(div, TEST_KEY)).toEqual(data) + }) + + it('should overwrite data if something is already stored', () => { + const data = { ...TEST_DATA } + const copy = { ...data } + + Data.set(div, TEST_KEY, data) + Data.set(div, TEST_KEY, copy) + + // Using `toBe` since spread creates a shallow copy + expect(Data.get(div, TEST_KEY)).not.toBe(data) + expect(Data.get(div, TEST_KEY)).toBe(copy) + }) + + it('should do nothing when an element has nothing stored', () => { + Data.remove(div, TEST_KEY) + + expect().nothing() + }) + + it('should remove nothing for an unknown key', () => { + const data = { ...TEST_DATA } + + Data.set(div, TEST_KEY, data) + Data.remove(div, UNKNOWN_KEY) + + expect(Data.get(div, TEST_KEY)).toEqual(data) + }) + + it('should remove data for a given key', () => { + const data = { ...TEST_DATA } + + Data.set(div, TEST_KEY, data) + Data.remove(div, TEST_KEY) + + expect(Data.get(div, TEST_KEY)).toBeNull() + }) + + /* eslint-disable no-console */ + it('should console.error a message if called with multiple keys', () => { + console.error = jasmine.createSpy('console.error') + + const data = { ...TEST_DATA } + const copy = { ...data } + + Data.set(div, TEST_KEY, data) + Data.set(div, UNKNOWN_KEY, copy) + + expect(console.error).toHaveBeenCalled() + expect(Data.get(div, UNKNOWN_KEY)).toBeNull() + }) + /* eslint-enable no-console */ +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/event-handler.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/event-handler.spec.js new file mode 100644 index 0000000..623b9c1 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/event-handler.spec.js @@ -0,0 +1,480 @@ +import EventHandler from '../../../src/dom/event-handler' +import { clearFixture, getFixture } from '../../helpers/fixture' +import { noop } from '../../../src/util' + +describe('EventHandler', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('on', () => { + it('should not add event listener if the event is not a string', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + EventHandler.on(div, null, noop) + EventHandler.on(null, 'click', noop) + + expect().nothing() + }) + + it('should add event listener', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + EventHandler.on(div, 'click', () => { + expect().nothing() + resolve() + }) + + div.click() + }) + }) + + it('should add namespaced event listener', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + EventHandler.on(div, 'bs.namespace', () => { + expect().nothing() + resolve() + }) + + EventHandler.trigger(div, 'bs.namespace') + }) + }) + + it('should add native namespaced event listener', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + EventHandler.on(div, 'click.namespace', () => { + expect().nothing() + resolve() + }) + + EventHandler.trigger(div, 'click') + }) + }) + + it('should handle event delegation', () => { + return new Promise(resolve => { + EventHandler.on(document, 'click', '.test', () => { + expect().nothing() + resolve() + }) + + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + div.click() + }) + }) + + it('should handle mouseenter/mouseleave like the native counterpart', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const outer = fixtureEl.querySelector('.outer') + const inner = fixtureEl.querySelector('.inner') + const nested = fixtureEl.querySelector('.nested') + const deep = fixtureEl.querySelector('.deep') + const sibling = fixtureEl.querySelector('.sibling') + + const enterSpy = jasmine.createSpy('mouseenter') + const leaveSpy = jasmine.createSpy('mouseleave') + const delegateEnterSpy = jasmine.createSpy('mouseenter') + const delegateLeaveSpy = jasmine.createSpy('mouseleave') + + EventHandler.on(inner, 'mouseenter', enterSpy) + EventHandler.on(inner, 'mouseleave', leaveSpy) + EventHandler.on(outer, 'mouseenter', '.inner', delegateEnterSpy) + EventHandler.on(outer, 'mouseleave', '.inner', delegateLeaveSpy) + + EventHandler.on(sibling, 'mouseenter', () => { + expect(enterSpy.calls.count()).toEqual(2) + expect(leaveSpy.calls.count()).toEqual(2) + expect(delegateEnterSpy.calls.count()).toEqual(2) + expect(delegateLeaveSpy.calls.count()).toEqual(2) + resolve() + }) + + const moveMouse = (from, to) => { + from.dispatchEvent(new MouseEvent('mouseout', { + bubbles: true, + relatedTarget: to + })) + + to.dispatchEvent(new MouseEvent('mouseover', { + bubbles: true, + relatedTarget: from + })) + } + + // from outer to deep and back to outer (nested) + moveMouse(outer, inner) + moveMouse(inner, nested) + moveMouse(nested, deep) + moveMouse(deep, nested) + moveMouse(nested, inner) + moveMouse(inner, outer) + + setTimeout(() => { + expect(enterSpy.calls.count()).toEqual(1) + expect(leaveSpy.calls.count()).toEqual(1) + expect(delegateEnterSpy.calls.count()).toEqual(1) + expect(delegateLeaveSpy.calls.count()).toEqual(1) + + // from outer to inner to sibling (adjacent) + moveMouse(outer, inner) + moveMouse(inner, sibling) + }, 20) + }) + }) + }) + + describe('one', () => { + it('should call listener just once', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + let called = 0 + const div = fixtureEl.querySelector('div') + const obj = { + oneListener() { + called++ + } + } + + EventHandler.one(div, 'bootstrap', obj.oneListener) + + EventHandler.trigger(div, 'bootstrap') + EventHandler.trigger(div, 'bootstrap') + + setTimeout(() => { + expect(called).toEqual(1) + resolve() + }, 20) + }) + }) + + it('should call delegated listener just once', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + let called = 0 + const div = fixtureEl.querySelector('div') + const obj = { + oneListener() { + called++ + } + } + + EventHandler.one(fixtureEl, 'bootstrap', 'div', obj.oneListener) + + EventHandler.trigger(div, 'bootstrap') + EventHandler.trigger(div, 'bootstrap') + + setTimeout(() => { + expect(called).toEqual(1) + resolve() + }, 20) + }) + }) + }) + + describe('off', () => { + it('should not remove a listener', () => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + EventHandler.off(div, null, noop) + EventHandler.off(null, 'click', noop) + expect().nothing() + }) + + it('should remove a listener', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + let called = 0 + const handler = () => { + called++ + } + + EventHandler.on(div, 'foobar', handler) + EventHandler.trigger(div, 'foobar') + + EventHandler.off(div, 'foobar', handler) + EventHandler.trigger(div, 'foobar') + + setTimeout(() => { + expect(called).toEqual(1) + resolve() + }, 20) + }) + }) + + it('should remove all the events', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + let called = 0 + + EventHandler.on(div, 'foobar', () => { + called++ + }) + EventHandler.on(div, 'foobar', () => { + called++ + }) + EventHandler.trigger(div, 'foobar') + + EventHandler.off(div, 'foobar') + EventHandler.trigger(div, 'foobar') + + setTimeout(() => { + expect(called).toEqual(2) + resolve() + }, 20) + }) + }) + + it('should remove all the namespaced listeners if namespace is passed', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + let called = 0 + + EventHandler.on(div, 'foobar.namespace', () => { + called++ + }) + EventHandler.on(div, 'foofoo.namespace', () => { + called++ + }) + EventHandler.trigger(div, 'foobar.namespace') + EventHandler.trigger(div, 'foofoo.namespace') + + EventHandler.off(div, '.namespace') + EventHandler.trigger(div, 'foobar.namespace') + EventHandler.trigger(div, 'foofoo.namespace') + + setTimeout(() => { + expect(called).toEqual(2) + resolve() + }, 20) + }) + }) + + it('should remove the namespaced listeners', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + let calledCallback1 = 0 + let calledCallback2 = 0 + + EventHandler.on(div, 'foobar.namespace', () => { + calledCallback1++ + }) + EventHandler.on(div, 'foofoo.namespace', () => { + calledCallback2++ + }) + + EventHandler.trigger(div, 'foobar.namespace') + EventHandler.off(div, 'foobar.namespace') + EventHandler.trigger(div, 'foobar.namespace') + + EventHandler.trigger(div, 'foofoo.namespace') + + setTimeout(() => { + expect(calledCallback1).toEqual(1) + expect(calledCallback2).toEqual(1) + resolve() + }, 20) + }) + }) + + it('should remove the all the namespaced listeners for native events', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + let called = 0 + + EventHandler.on(div, 'click.namespace', () => { + called++ + }) + EventHandler.on(div, 'click.namespace2', () => { + called++ + }) + + EventHandler.trigger(div, 'click') + EventHandler.off(div, 'click') + EventHandler.trigger(div, 'click') + + setTimeout(() => { + expect(called).toEqual(2) + resolve() + }, 20) + }) + }) + + it('should remove the specified namespaced listeners for native events', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const div = fixtureEl.querySelector('div') + + let called1 = 0 + let called2 = 0 + + EventHandler.on(div, 'click.namespace', () => { + called1++ + }) + EventHandler.on(div, 'click.namespace2', () => { + called2++ + }) + EventHandler.trigger(div, 'click') + + EventHandler.off(div, 'click.namespace') + EventHandler.trigger(div, 'click') + + setTimeout(() => { + expect(called1).toEqual(1) + expect(called2).toEqual(2) + resolve() + }, 20) + }) + }) + + it('should remove a listener registered by .one', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const handler = () => { + reject(new Error('called')) + } + + EventHandler.one(div, 'foobar', handler) + EventHandler.off(div, 'foobar', handler) + + EventHandler.trigger(div, 'foobar') + setTimeout(() => { + expect().nothing() + resolve() + }, 20) + }) + }) + + it('should remove the correct delegated event listener', () => { + const element = document.createElement('div') + const subelement = document.createElement('span') + element.append(subelement) + + const anchor = document.createElement('a') + element.append(anchor) + + let i = 0 + const handler = () => { + i++ + } + + EventHandler.on(element, 'click', 'a', handler) + EventHandler.on(element, 'click', 'span', handler) + + fixtureEl.append(element) + + EventHandler.trigger(anchor, 'click') + EventHandler.trigger(subelement, 'click') + + // first listeners called + expect(i).toEqual(2) + + EventHandler.off(element, 'click', 'span', handler) + EventHandler.trigger(subelement, 'click') + + // removed listener not called + expect(i).toEqual(2) + + EventHandler.trigger(anchor, 'click') + + // not removed listener called + expect(i).toEqual(3) + + EventHandler.on(element, 'click', 'span', handler) + EventHandler.trigger(anchor, 'click') + EventHandler.trigger(subelement, 'click') + + // listener re-registered + expect(i).toEqual(5) + + EventHandler.off(element, 'click', 'span') + EventHandler.trigger(subelement, 'click') + + // listener removed again + expect(i).toEqual(5) + }) + }) + + describe('general functionality', () => { + it('should hydrate properties, and make them configurable', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
' + ].join('') + + const div1 = fixtureEl.querySelector('#div1') + const div2 = fixtureEl.querySelector('#div2') + + EventHandler.on(div1, 'click', event => { + expect(event.currentTarget).toBe(div2) + expect(event.delegateTarget).toBe(div1) + expect(event.originalTarget).toBeNull() + + Object.defineProperty(event, 'currentTarget', { + configurable: true, + get() { + return div1 + } + }) + + expect(event.currentTarget).toBe(div1) + resolve() + }) + + expect(() => { + EventHandler.trigger(div1, 'click', { originalTarget: null, currentTarget: div2 }) + }).not.toThrowError(TypeError) + }) + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/manipulator.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/manipulator.spec.js new file mode 100644 index 0000000..4561e2e --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/manipulator.spec.js @@ -0,0 +1,135 @@ +import Manipulator from '../../../src/dom/manipulator' +import { clearFixture, getFixture } from '../../helpers/fixture' + +describe('Manipulator', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('setDataAttribute', () => { + it('should set data attribute prefixed with bs', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + Manipulator.setDataAttribute(div, 'key', 'value') + expect(div.getAttribute('data-bs-key')).toEqual('value') + }) + + it('should set data attribute in kebab case', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + Manipulator.setDataAttribute(div, 'testKey', 'value') + expect(div.getAttribute('data-bs-test-key')).toEqual('value') + }) + }) + + describe('removeDataAttribute', () => { + it('should only remove bs-prefixed data attribute', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + Manipulator.removeDataAttribute(div, 'key') + expect(div.getAttribute('data-bs-key')).toBeNull() + expect(div.getAttribute('data-key-bs')).toEqual('postfixed') + expect(div.getAttribute('data-key')).toEqual('value') + }) + + it('should remove data attribute in kebab case', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + Manipulator.removeDataAttribute(div, 'testKey') + expect(div.getAttribute('data-bs-test-key')).toBeNull() + }) + }) + + describe('getDataAttributes', () => { + it('should return an empty object for null', () => { + expect(Manipulator.getDataAttributes(null)).toEqual({}) + expect().nothing() + }) + + it('should get only bs-prefixed data attributes without bs namespace', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Manipulator.getDataAttributes(div)).toEqual({ + toggle: 'tabs', + target: '#element' + }) + }) + + it('should omit `bs-config` data attribute', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Manipulator.getDataAttributes(div)).toEqual({ + toggle: 'tabs', + target: '#element' + }) + }) + }) + + describe('getDataAttribute', () => { + it('should only get bs-prefixed data attribute', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Manipulator.getDataAttribute(div, 'key')).toEqual('value') + expect(Manipulator.getDataAttribute(div, 'test')).toBeNull() + expect(Manipulator.getDataAttribute(div, 'toggle')).toBeNull() + }) + + it('should get data attribute in kebab case', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Manipulator.getDataAttribute(div, 'testKey')).toEqual('value') + }) + + it('should normalize data', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Manipulator.getDataAttribute(div, 'test')).toBeFalse() + + div.setAttribute('data-bs-test', 'true') + expect(Manipulator.getDataAttribute(div, 'test')).toBeTrue() + + div.setAttribute('data-bs-test', '1') + expect(Manipulator.getDataAttribute(div, 'test')).toEqual(1) + }) + + it('should normalize json data', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Manipulator.getDataAttribute(div, 'test')).toEqual({ delay: { show: 100, hide: 10 } }) + + const objectData = { 'Super Hero': ['Iron Man', 'Super Man'], testNum: 90, url: 'http://localhost:8080/test?foo=bar' } + const dataStr = JSON.stringify(objectData) + div.setAttribute('data-bs-test', encodeURIComponent(dataStr)) + expect(Manipulator.getDataAttribute(div, 'test')).toEqual(objectData) + + div.setAttribute('data-bs-test', dataStr) + expect(Manipulator.getDataAttribute(div, 'test')).toEqual(objectData) + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/selector-engine.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/selector-engine.spec.js new file mode 100644 index 0000000..0245896 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dom/selector-engine.spec.js @@ -0,0 +1,236 @@ +import SelectorEngine from '../../../src/dom/selector-engine' +import { getFixture, clearFixture } from '../../helpers/fixture' + +describe('SelectorEngine', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('find', () => { + it('should find elements', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(SelectorEngine.find('div', fixtureEl)).toEqual([div]) + }) + + it('should find elements globally', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('#test') + + expect(SelectorEngine.find('#test')).toEqual([div]) + }) + + it('should handle :scope selectors', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const listEl = fixtureEl.querySelector('ul') + const aActive = fixtureEl.querySelector('.active') + + expect(SelectorEngine.find(':scope > li > .active', listEl)).toEqual([aActive]) + }) + }) + + describe('findOne', () => { + it('should return one element', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('#test') + + expect(SelectorEngine.findOne('#test')).toEqual(div) + }) + }) + + describe('children', () => { + it('should find children', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const list = fixtureEl.querySelector('ul') + const liList = [].concat(...fixtureEl.querySelectorAll('li')) + const result = SelectorEngine.children(list, 'li') + + expect(result).toEqual(liList) + }) + }) + + describe('parents', () => { + it('should return parents', () => { + expect(SelectorEngine.parents(fixtureEl, 'body')).toHaveSize(1) + }) + }) + + describe('prev', () => { + it('should return previous element', () => { + fixtureEl.innerHTML = '
' + + const btn = fixtureEl.querySelector('.btn') + const divTest = fixtureEl.querySelector('.test') + + expect(SelectorEngine.prev(btn, '.test')).toEqual([divTest]) + }) + + it('should return previous element with an extra element between', () => { + fixtureEl.innerHTML = [ + '
', + '', + '' + ].join('') + + const btn = fixtureEl.querySelector('.btn') + const divTest = fixtureEl.querySelector('.test') + + expect(SelectorEngine.prev(btn, '.test')).toEqual([divTest]) + }) + + it('should return previous element with comments or text nodes between', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '', + 'Text', + '' + ].join('') + + const btn = fixtureEl.querySelector('.btn') + const divTest = fixtureEl.querySelectorAll('.test')[1] + + expect(SelectorEngine.prev(btn, '.test')).toEqual([divTest]) + }) + }) + + describe('next', () => { + it('should return next element', () => { + fixtureEl.innerHTML = '
' + + const btn = fixtureEl.querySelector('.btn') + const divTest = fixtureEl.querySelector('.test') + + expect(SelectorEngine.next(divTest, '.btn')).toEqual([btn]) + }) + + it('should return next element with an extra element between', () => { + fixtureEl.innerHTML = [ + '
', + '', + '' + ].join('') + + const btn = fixtureEl.querySelector('.btn') + const divTest = fixtureEl.querySelector('.test') + + expect(SelectorEngine.next(divTest, '.btn')).toEqual([btn]) + }) + + it('should return next element with comments or text nodes between', () => { + fixtureEl.innerHTML = [ + '
', + '', + 'Text', + '', + '' + ].join('') + + const btn = fixtureEl.querySelector('.btn') + const divTest = fixtureEl.querySelector('.test') + + expect(SelectorEngine.next(divTest, '.btn')).toEqual([btn]) + }) + }) + + describe('focusableChildren', () => { + it('should return only elements with specific tag names', () => { + fixtureEl.innerHTML = [ + '
lorem
', + 'lorem', + 'lorem', + '', + '', + '', + '', + '
lorem
' + ].join('') + + const expectedElements = [ + fixtureEl.querySelector('a'), + fixtureEl.querySelector('button'), + fixtureEl.querySelector('input'), + fixtureEl.querySelector('textarea'), + fixtureEl.querySelector('select'), + fixtureEl.querySelector('details') + ] + + expect(SelectorEngine.focusableChildren(fixtureEl)).toEqual(expectedElements) + }) + + it('should return any element with non negative tab index', () => { + fixtureEl.innerHTML = [ + '
lorem
', + '
lorem
', + '
lorem
' + ].join('') + + const expectedElements = [ + fixtureEl.querySelector('[tabindex]'), + fixtureEl.querySelector('[tabindex="0"]'), + fixtureEl.querySelector('[tabindex="10"]') + ] + + expect(SelectorEngine.focusableChildren(fixtureEl)).toEqual(expectedElements) + }) + + it('should return not return elements with negative tab index', () => { + fixtureEl.innerHTML = '' + + const expectedElements = [] + + expect(SelectorEngine.focusableChildren(fixtureEl)).toEqual(expectedElements) + }) + + it('should return contenteditable elements', () => { + fixtureEl.innerHTML = '
lorem
' + + const expectedElements = [fixtureEl.querySelector('[contenteditable="true"]')] + + expect(SelectorEngine.focusableChildren(fixtureEl)).toEqual(expectedElements) + }) + + it('should not return disabled elements', () => { + fixtureEl.innerHTML = '' + + const expectedElements = [] + + expect(SelectorEngine.focusableChildren(fixtureEl)).toEqual(expectedElements) + }) + + it('should not return invisible elements', () => { + fixtureEl.innerHTML = '' + + const expectedElements = [] + + expect(SelectorEngine.focusableChildren(fixtureEl)).toEqual(expectedElements) + }) + }) +}) + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/dropdown.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dropdown.spec.js new file mode 100644 index 0000000..2bbd7c0 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/dropdown.spec.js @@ -0,0 +1,2430 @@ +import Dropdown from '../../src/dropdown' +import EventHandler from '../../src/dom/event-handler' +import { noop } from '../../src/util/index' +import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Dropdown', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Dropdown.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(Dropdown.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('DefaultType', () => { + it('should return plugin default type config', () => { + expect(Dropdown.DefaultType).toEqual(jasmine.any(Object)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Dropdown.DATA_KEY).toEqual('bs.dropdown') + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownBySelector = new Dropdown('[data-bs-toggle="dropdown"]') + const dropdownByElement = new Dropdown(btnDropdown) + + expect(dropdownBySelector._element).toEqual(btnDropdown) + expect(dropdownByElement._element).toEqual(btnDropdown) + }) + + it('should work on invalid markup', () => { + return new Promise(resolve => { + // TODO: REMOVE in v6 + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownElem = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(dropdownElem) + + dropdownElem.addEventListener('shown.bs.dropdown', () => { + resolve() + }) + + dropdown.show() + }) + }) + + it('should create offset modifier correctly when offset option is a function', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const getOffset = jasmine.createSpy('getOffset').and.returnValue([10, 20]) + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown, { + offset: getOffset, + popperConfig: { + onFirstUpdate(state) { + expect(getOffset).toHaveBeenCalledWith({ + popper: state.rects.popper, + reference: state.rects.reference, + placement: state.placement + }, btnDropdown) + resolve() + } + } + }) + const offset = dropdown._getOffset() + + expect(typeof offset).toEqual('function') + + dropdown.show() + }) + }) + + it('should create offset modifier correctly when offset option is a string into data attribute', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + expect(dropdown._getOffset()).toEqual([10, 20]) + }) + + it('should allow to pass config to Popper with `popperConfig`', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown, { + popperConfig: { + placement: 'left' + } + }) + + const popperConfig = dropdown._getPopperConfig() + + expect(popperConfig.placement).toEqual('left') + }) + + it('should allow to pass config to Popper with `popperConfig` as a function', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const getPopperConfig = jasmine.createSpy('getPopperConfig').and.returnValue({ placement: 'left' }) + const dropdown = new Dropdown(btnDropdown, { + popperConfig: getPopperConfig + }) + + const popperConfig = dropdown._getPopperConfig() + + expect(getPopperConfig).toHaveBeenCalled() + expect(popperConfig.placement).toEqual('left') + }) + }) + + describe('toggle', () => { + it('should toggle a dropdown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should destroy old popper references on toggle', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const btnDropdown1 = fixtureEl.querySelector('.firstBtn') + const btnDropdown2 = fixtureEl.querySelector('.secondBtn') + const firstDropdownEl = fixtureEl.querySelector('.first') + const secondDropdownEl = fixtureEl.querySelector('.second') + const dropdown1 = new Dropdown(btnDropdown1) + + firstDropdownEl.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown1).toHaveClass('show') + spyOn(dropdown1._popper, 'destroy') + btnDropdown2.click() + }) + + secondDropdownEl.addEventListener('shown.bs.dropdown', () => setTimeout(() => { + expect(dropdown1._popper.destroy).toHaveBeenCalled() + resolve() + })) + + dropdown1.toggle() + }) + }) + + it('should toggle a dropdown and add/remove event listener on mobile', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const defaultValueOnTouchStart = document.documentElement.ontouchstart + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + document.documentElement.ontouchstart = noop + const spy = spyOn(EventHandler, 'on') + const spyOff = spyOn(EventHandler, 'off') + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + expect(spy).toHaveBeenCalledWith(jasmine.any(Object), 'mouseover', noop) + + dropdown.toggle() + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(btnDropdown).not.toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('false') + expect(spyOff).toHaveBeenCalledWith(jasmine.any(Object), 'mouseover', noop) + + document.documentElement.ontouchstart = defaultValueOnTouchStart + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropdown at the right', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a centered dropdown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropup', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropupEl = fixtureEl.querySelector('.dropup') + const dropdown = new Dropdown(btnDropdown) + + dropupEl.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropup centered', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropupEl = fixtureEl.querySelector('.dropup-center') + const dropdown = new Dropdown(btnDropdown) + + dropupEl.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropup at the right', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropupEl = fixtureEl.querySelector('.dropup') + const dropdown = new Dropdown(btnDropdown) + + dropupEl.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropend', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropendEl = fixtureEl.querySelector('.dropend') + const dropdown = new Dropdown(btnDropdown) + + dropendEl.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropstart', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropstartEl = fixtureEl.querySelector('.dropstart') + const dropdown = new Dropdown(btnDropdown) + + dropstartEl.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropdown with parent reference', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown, { + reference: 'parent' + }) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropdown with a dom node reference', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown, { + reference: fixtureEl + }) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropdown with a jquery object reference', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown, { + reference: { 0: fixtureEl, jquery: 'jQuery' } + }) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + }) + + dropdown.toggle() + }) + }) + + it('should toggle a dropdown with a valid virtual element reference', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const virtualElement = { + nodeType: 1, + getBoundingClientRect() { + return { + width: 0, + height: 0, + top: 0, + right: 0, + bottom: 0, + left: 0 + } + } + } + + expect(() => new Dropdown(btnDropdown, { + reference: {} + })).toThrowError(TypeError, 'DROPDOWN: Option "reference" provided type "object" without a required "getBoundingClientRect" method.') + + expect(() => new Dropdown(btnDropdown, { + reference: { + getBoundingClientRect: 'not-a-function' + } + })).toThrowError(TypeError, 'DROPDOWN: Option "reference" provided type "object" without a required "getBoundingClientRect" method.') + + // use onFirstUpdate as Poppers internal update is executed async + const dropdown = new Dropdown(btnDropdown, { + reference: virtualElement, + popperConfig: { + onFirstUpdate() { + expect(spy).toHaveBeenCalled() + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + } + } + }) + + const spy = spyOn(virtualElement, 'getBoundingClientRect').and.callThrough() + + dropdown.toggle() + }) + }) + + it('should not toggle a dropdown if the element is disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.toggle() + + setTimeout(() => { + expect().nothing() + resolve() + }) + }) + }) + + it('should not toggle a dropdown if the element contains .disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.toggle() + + setTimeout(() => { + expect().nothing() + resolve() + }) + }) + }) + + it('should not toggle a dropdown if the menu is shown', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.toggle() + + setTimeout(() => { + expect().nothing() + resolve() + }) + }) + }) + + it('should not toggle a dropdown if show event is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('show.bs.dropdown', event => { + event.preventDefault() + }) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.toggle() + + setTimeout(() => { + expect().nothing() + resolve() + }) + }) + }) + }) + + describe('show', () => { + it('should show a dropdown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + resolve() + }) + + dropdown.show() + }) + }) + + it('should not show a dropdown if the element is disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.show() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + + it('should not show a dropdown if the element contains .disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.show() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + + it('should not show a dropdown if the menu is shown', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.show() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + + it('should not show a dropdown if show event is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('show.bs.dropdown', event => { + event.preventDefault() + }) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + reject(new Error('should not throw shown.bs.dropdown event')) + }) + + dropdown.show() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + }) + + describe('hide', () => { + it('should hide a dropdown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(dropdownMenu).not.toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('false') + resolve() + }) + + dropdown.hide() + }) + }) + + it('should hide a dropdown and destroy popper', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + spyOn(dropdown._popper, 'destroy') + dropdown.hide() + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(dropdown._popper.destroy).toHaveBeenCalled() + resolve() + }) + + dropdown.show() + }) + }) + + it('should not hide a dropdown if the element is disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + reject(new Error('should not throw hidden.bs.dropdown event')) + }) + + dropdown.hide() + + setTimeout(() => { + expect(dropdownMenu).toHaveClass('show') + resolve() + }, 10) + }) + }) + + it('should not hide a dropdown if the element contains .disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + reject(new Error('should not throw hidden.bs.dropdown event')) + }) + + dropdown.hide() + + setTimeout(() => { + expect(dropdownMenu).toHaveClass('show') + resolve() + }, 10) + }) + }) + + it('should not hide a dropdown if the menu is not shown', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + reject(new Error('should not throw hidden.bs.dropdown event')) + }) + + dropdown.hide() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + + it('should not hide a dropdown if hide event is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('hide.bs.dropdown', event => { + event.preventDefault() + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + reject(new Error('should not throw hidden.bs.dropdown event')) + }) + + dropdown.hide() + + setTimeout(() => { + expect(dropdownMenu).toHaveClass('show') + resolve() + }) + }) + }) + + it('should remove event listener on touch-enabled device that was added in show method', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const defaultValueOnTouchStart = document.documentElement.ontouchstart + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + document.documentElement.ontouchstart = noop + const spy = spyOn(EventHandler, 'off') + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + dropdown.hide() + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(btnDropdown).not.toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('false') + expect(spy).toHaveBeenCalled() + + document.documentElement.ontouchstart = defaultValueOnTouchStart + resolve() + }) + + dropdown.show() + }) + }) + }) + + describe('dispose', () => { + it('should dispose dropdown', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + const dropdown = new Dropdown(btnDropdown) + + expect(dropdown._popper).toBeNull() + expect(dropdown._menu).not.toBeNull() + expect(dropdown._element).not.toBeNull() + const spy = spyOn(EventHandler, 'off') + + dropdown.dispose() + + expect(dropdown._menu).toBeNull() + expect(dropdown._element).toBeNull() + expect(spy).toHaveBeenCalledWith(btnDropdown, Dropdown.EVENT_KEY) + }) + + it('should dispose dropdown with Popper', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + dropdown.toggle() + + expect(dropdown._popper).not.toBeNull() + expect(dropdown._menu).not.toBeNull() + expect(dropdown._element).not.toBeNull() + + dropdown.dispose() + + expect(dropdown._popper).toBeNull() + expect(dropdown._menu).toBeNull() + expect(dropdown._element).toBeNull() + }) + }) + + describe('update', () => { + it('should call Popper and detect navbar on update', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + dropdown.toggle() + + expect(dropdown._popper).not.toBeNull() + + const spyUpdate = spyOn(dropdown._popper, 'update') + const spyDetect = spyOn(dropdown, '_detectNavbar') + + dropdown.update() + + expect(spyUpdate).toHaveBeenCalled() + expect(spyDetect).toHaveBeenCalled() + }) + + it('should just detect navbar on update', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(btnDropdown) + + const spy = spyOn(dropdown, '_detectNavbar') + + dropdown.update() + + expect(dropdown._popper).toBeNull() + expect(spy).toHaveBeenCalled() + }) + }) + + describe('data-api', () => { + it('should show and hide a dropdown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + let showEventTriggered = false + let hideEventTriggered = false + + btnDropdown.addEventListener('show.bs.dropdown', () => { + showEventTriggered = true + }) + + btnDropdown.addEventListener('shown.bs.dropdown', event => setTimeout(() => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + expect(showEventTriggered).toBeTrue() + expect(event.relatedTarget).toEqual(btnDropdown) + document.body.click() + })) + + btnDropdown.addEventListener('hide.bs.dropdown', () => { + hideEventTriggered = true + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', event => { + expect(btnDropdown).not.toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('false') + expect(hideEventTriggered).toBeTrue() + expect(event.relatedTarget).toEqual(btnDropdown) + resolve() + }) + + btnDropdown.click() + }) + }) + + it('should not use "static" Popper in navbar', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(dropdown._popper).not.toBeNull() + expect(dropdownMenu.getAttribute('data-bs-popper')).toEqual('static') + resolve() + }) + + dropdown.show() + }) + }) + + it('should not collapse the dropdown when clicking a select option nested in the dropdown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + const hideSpy = spyOn(dropdown, '_completeHide') + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + const clickEvent = new MouseEvent('click', { + bubbles: true + }) + + dropdownMenu.querySelector('option').dispatchEvent(clickEvent) + }) + + dropdownMenu.addEventListener('click', event => { + expect(event.target.tagName).toMatch(/select|option/i) + + Dropdown.clearMenus(event) + + setTimeout(() => { + expect(hideSpy).not.toHaveBeenCalled() + resolve() + }, 10) + }) + + dropdown.show() + }) + }) + + it('should manage bs attribute `data-bs-popper`="static" when dropdown is in navbar', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(dropdownMenu.getAttribute('data-bs-popper')).toEqual('static') + dropdown.hide() + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(dropdownMenu.getAttribute('data-bs-popper')).toBeNull() + resolve() + }) + + dropdown.show() + }) + }) + + it('should not use Popper if display set to static', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + // Popper adds this attribute when we use it + expect(dropdownMenu.getAttribute('data-popper-placement')).toBeNull() + resolve() + }) + + btnDropdown.click() + }) + }) + + it('should manage bs attribute `data-bs-popper`="static" when display set to static', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const dropdown = new Dropdown(btnDropdown) + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(dropdownMenu.getAttribute('data-bs-popper')).toEqual('static') + dropdown.hide() + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(dropdownMenu.getAttribute('data-bs-popper')).toBeNull() + resolve() + }) + + dropdown.show() + }) + }) + + it('should remove "show" class if tabbing outside of menu', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + btnDropdown.addEventListener('shown.bs.dropdown', () => { + expect(btnDropdown).toHaveClass('show') + + const keyup = createEvent('keyup') + + keyup.key = 'Tab' + document.dispatchEvent(keyup) + }) + + btnDropdown.addEventListener('hidden.bs.dropdown', () => { + expect(btnDropdown).not.toHaveClass('show') + resolve() + }) + + btnDropdown.click() + }) + }) + + it('should remove "show" class if body is clicked, with multiple dropdowns', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + ' ', + ' ', + ' ', + '
' + ].join('') + + const triggerDropdownList = fixtureEl.querySelectorAll('[data-bs-toggle="dropdown"]') + + expect(triggerDropdownList).toHaveSize(2) + + const [triggerDropdownFirst, triggerDropdownLast] = triggerDropdownList + + triggerDropdownFirst.addEventListener('shown.bs.dropdown', () => { + expect(triggerDropdownFirst).toHaveClass('show') + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(1) + document.body.click() + }) + + triggerDropdownFirst.addEventListener('hidden.bs.dropdown', () => { + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(0) + triggerDropdownLast.click() + }) + + triggerDropdownLast.addEventListener('shown.bs.dropdown', () => { + expect(triggerDropdownLast).toHaveClass('show') + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(1) + document.body.click() + }) + + triggerDropdownLast.addEventListener('hidden.bs.dropdown', () => { + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(0) + resolve() + }) + + triggerDropdownFirst.click() + }) + }) + + it('should remove "show" class if body if tabbing outside of menu, with multiple dropdowns', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + ' ', + ' ', + ' ', + '
' + ].join('') + + const triggerDropdownList = fixtureEl.querySelectorAll('[data-bs-toggle="dropdown"]') + + expect(triggerDropdownList).toHaveSize(2) + + const [triggerDropdownFirst, triggerDropdownLast] = triggerDropdownList + + triggerDropdownFirst.addEventListener('shown.bs.dropdown', () => { + expect(triggerDropdownFirst).toHaveClass('show') + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(1) + + const keyup = createEvent('keyup') + keyup.key = 'Tab' + + document.dispatchEvent(keyup) + }) + + triggerDropdownFirst.addEventListener('hidden.bs.dropdown', () => { + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(0) + triggerDropdownLast.click() + }) + + triggerDropdownLast.addEventListener('shown.bs.dropdown', () => { + expect(triggerDropdownLast).toHaveClass('show') + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(1) + + const keyup = createEvent('keyup') + keyup.key = 'Tab' + + document.dispatchEvent(keyup) + }) + + triggerDropdownLast.addEventListener('hidden.bs.dropdown', () => { + expect(fixtureEl.querySelectorAll('.dropdown-menu.show')).toHaveSize(0) + resolve() + }) + + triggerDropdownFirst.click() + }) + }) + + it('should be able to identify clicked dropdown, even with multiple dropdowns in the same tag', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownToggle1 = fixtureEl.querySelector('#dropdown1') + const dropdownToggle2 = fixtureEl.querySelector('#dropdown2') + const dropdownMenu1 = fixtureEl.querySelector('#menu1') + const dropdownMenu2 = fixtureEl.querySelector('#menu2') + const spy = spyOn(Dropdown, 'getOrCreateInstance').and.callThrough() + + dropdownToggle1.click() + expect(spy).toHaveBeenCalledWith(dropdownToggle1) + + dropdownToggle2.click() + expect(spy).toHaveBeenCalledWith(dropdownToggle2) + + dropdownMenu1.click() + expect(spy).toHaveBeenCalledWith(dropdownToggle1) + + dropdownMenu2.click() + expect(spy).toHaveBeenCalledWith(dropdownToggle2) + }) + + it('should be able to show the proper menu, even with multiple dropdowns in the same tag', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownToggle1 = fixtureEl.querySelector('#dropdown1') + const dropdownToggle2 = fixtureEl.querySelector('#dropdown2') + const dropdownMenu1 = fixtureEl.querySelector('#menu1') + const dropdownMenu2 = fixtureEl.querySelector('#menu2') + + dropdownToggle1.click() + expect(dropdownMenu1).toHaveClass('show') + expect(dropdownMenu2).not.toHaveClass('show') + + dropdownToggle2.click() + expect(dropdownMenu1).not.toHaveClass('show') + expect(dropdownMenu2).toHaveClass('show') + }) + + it('should fire hide and hidden event without a clickEvent if event type is not click', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + triggerDropdown.addEventListener('hide.bs.dropdown', event => { + expect(event.clickEvent).toBeUndefined() + }) + + triggerDropdown.addEventListener('hidden.bs.dropdown', event => { + expect(event.clickEvent).toBeUndefined() + resolve() + }) + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + const keydown = createEvent('keydown') + + keydown.key = 'Escape' + triggerDropdown.dispatchEvent(keydown) + }) + + triggerDropdown.click() + }) + }) + + it('should bubble up the events to the parent elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownParent = fixtureEl.querySelector('.dropdown') + const dropdown = new Dropdown(triggerDropdown) + + const showFunction = jasmine.createSpy('showFunction') + dropdownParent.addEventListener('show.bs.dropdown', showFunction) + + const shownFunction = jasmine.createSpy('shownFunction') + dropdownParent.addEventListener('shown.bs.dropdown', () => { + shownFunction() + dropdown.hide() + }) + + const hideFunction = jasmine.createSpy('hideFunction') + dropdownParent.addEventListener('hide.bs.dropdown', hideFunction) + + dropdownParent.addEventListener('hidden.bs.dropdown', () => { + expect(showFunction).toHaveBeenCalled() + expect(shownFunction).toHaveBeenCalled() + expect(hideFunction).toHaveBeenCalled() + resolve() + }) + + dropdown.show() + }) + }) + + it('should ignore keyboard events within s and ', + ' ', + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const input = fixtureEl.querySelector('input') + const textarea = fixtureEl.querySelector('textarea') + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + input.focus() + const keydown = createEvent('keydown') + + keydown.key = 'ArrowUp' + input.dispatchEvent(keydown) + + expect(document.activeElement).toEqual(input, 'input still focused') + + textarea.focus() + textarea.dispatchEvent(keydown) + + expect(document.activeElement).toEqual(textarea, 'textarea still focused') + resolve() + }) + + triggerDropdown.click() + }) + }) + + it('should skip disabled element when using keyboard navigation', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + const keydown = createEvent('keydown') + keydown.key = 'ArrowDown' + + triggerDropdown.dispatchEvent(keydown) + triggerDropdown.dispatchEvent(keydown) + + expect(document.activeElement).not.toHaveClass('disabled') + expect(document.activeElement.hasAttribute('disabled')).toBeFalse() + resolve() + }) + + triggerDropdown.click() + }) + }) + + it('should skip hidden element when using keyboard navigation', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + const keydown = createEvent('keydown') + keydown.key = 'ArrowDown' + + triggerDropdown.dispatchEvent(keydown) + + expect(document.activeElement).not.toHaveClass('d-none') + expect(document.activeElement.style.display).not.toEqual('none') + expect(document.activeElement.style.visibility).not.toEqual('hidden') + + resolve() + }) + + triggerDropdown.click() + }) + }) + + it('should focus next/previous element when using keyboard navigation', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const item1 = fixtureEl.querySelector('#item1') + const item2 = fixtureEl.querySelector('#item2') + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + const keydownArrowDown = createEvent('keydown') + keydownArrowDown.key = 'ArrowDown' + + triggerDropdown.dispatchEvent(keydownArrowDown) + expect(document.activeElement).toEqual(item1, 'item1 is focused') + + document.activeElement.dispatchEvent(keydownArrowDown) + expect(document.activeElement).toEqual(item2, 'item2 is focused') + + const keydownArrowUp = createEvent('keydown') + keydownArrowUp.key = 'ArrowUp' + + document.activeElement.dispatchEvent(keydownArrowUp) + expect(document.activeElement).toEqual(item1, 'item1 is focused') + + resolve() + }) + + triggerDropdown.click() + }) + }) + + it('should open the dropdown and focus on the last item when using ArrowUp for the first time', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const lastItem = fixtureEl.querySelector('#item2') + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + setTimeout(() => { + expect(document.activeElement).toEqual(lastItem, 'item2 is focused') + resolve() + }) + }) + + const keydown = createEvent('keydown') + keydown.key = 'ArrowUp' + triggerDropdown.dispatchEvent(keydown) + }) + }) + + it('should open the dropdown and focus on the first item when using ArrowDown for the first time', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const firstItem = fixtureEl.querySelector('#item1') + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + setTimeout(() => { + expect(document.activeElement).toEqual(firstItem, 'item1 is focused') + resolve() + }) + }) + + const keydown = createEvent('keydown') + keydown.key = 'ArrowDown' + triggerDropdown.dispatchEvent(keydown) + }) + }) + + it('should not close the dropdown if the user clicks on a text field within dropdown-menu', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const input = fixtureEl.querySelector('input') + + input.addEventListener('click', () => { + expect(triggerDropdown).toHaveClass('show') + resolve() + }) + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + expect(triggerDropdown).toHaveClass('show') + input.dispatchEvent(createEvent('click')) + }) + + triggerDropdown.click() + }) + }) + + it('should not close the dropdown if the user clicks on a textarea within dropdown-menu', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const textarea = fixtureEl.querySelector('textarea') + + textarea.addEventListener('click', () => { + expect(triggerDropdown).toHaveClass('show') + resolve() + }) + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + expect(triggerDropdown).toHaveClass('show') + textarea.dispatchEvent(createEvent('click')) + }) + + triggerDropdown.click() + }) + }) + + it('should close the dropdown if the user clicks on a text field that is not contained within dropdown-menu', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const input = fixtureEl.querySelector('input') + + triggerDropdown.addEventListener('hidden.bs.dropdown', () => { + expect().nothing() + resolve() + }) + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + input.dispatchEvent(createEvent('click', { + bubbles: true + })) + }) + + triggerDropdown.click() + }) + }) + + it('should ignore keyboard events for s and ', + ' ', + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const input = fixtureEl.querySelector('input') + const textarea = fixtureEl.querySelector('textarea') + + const test = (eventKey, elementToDispatch) => { + const event = createEvent('keydown') + event.key = eventKey + elementToDispatch.focus() + elementToDispatch.dispatchEvent(event) + expect(document.activeElement).toEqual(elementToDispatch, `${elementToDispatch.tagName} still focused`) + } + + const keydownEscape = createEvent('keydown') + keydownEscape.key = 'Escape' + + triggerDropdown.addEventListener('shown.bs.dropdown', () => { + // Key Space + test('Space', input) + + test('Space', textarea) + + // Key ArrowUp + test('ArrowUp', input) + + test('ArrowUp', textarea) + + // Key ArrowDown + test('ArrowDown', input) + + test('ArrowDown', textarea) + + // Key Escape + input.focus() + input.dispatchEvent(keydownEscape) + + expect(triggerDropdown).not.toHaveClass('show') + resolve() + }) + + triggerDropdown.click() + }) + }) + + it('should not open dropdown if escape key was pressed on the toggle', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = new Dropdown(triggerDropdown) + const button = fixtureEl.querySelector('button[data-bs-toggle="dropdown"]') + + const spy = spyOn(dropdown, 'toggle') + + // Key escape + button.focus() + // Key escape + const keydownEscape = createEvent('keydown') + keydownEscape.key = 'Escape' + button.dispatchEvent(keydownEscape) + + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + expect(triggerDropdown).not.toHaveClass('show') + resolve() + }, 20) + }) + }) + + it('should propagate escape key events if dropdown is closed', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const parent = fixtureEl.querySelector('.parent') + const toggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + const parentKeyHandler = jasmine.createSpy('parentKeyHandler') + + parent.addEventListener('keydown', parentKeyHandler) + parent.addEventListener('keyup', () => { + expect(parentKeyHandler).toHaveBeenCalled() + resolve() + }) + + const keydownEscape = createEvent('keydown', { bubbles: true }) + keydownEscape.key = 'Escape' + const keyupEscape = createEvent('keyup', { bubbles: true }) + keyupEscape.key = 'Escape' + + toggle.focus() + toggle.dispatchEvent(keydownEscape) + toggle.dispatchEvent(keyupEscape) + }) + }) + + it('should not propagate escape key events if dropdown is open', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const parent = fixtureEl.querySelector('.parent') + const toggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + const parentKeyHandler = jasmine.createSpy('parentKeyHandler') + + parent.addEventListener('keydown', parentKeyHandler) + parent.addEventListener('keyup', () => { + expect(parentKeyHandler).not.toHaveBeenCalled() + resolve() + }) + + const keydownEscape = createEvent('keydown', { bubbles: true }) + keydownEscape.key = 'Escape' + const keyupEscape = createEvent('keyup', { bubbles: true }) + keyupEscape.key = 'Escape' + + toggle.click() + toggle.dispatchEvent(keydownEscape) + toggle.dispatchEvent(keyupEscape) + }) + }) + + it('should close dropdown using `escape` button, and return focus to its trigger', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const toggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + + toggle.addEventListener('shown.bs.dropdown', () => { + const keydownEvent = createEvent('keydown', { bubbles: true }) + keydownEvent.key = 'ArrowDown' + toggle.dispatchEvent(keydownEvent) + keydownEvent.key = 'Escape' + toggle.dispatchEvent(keydownEvent) + }) + + toggle.addEventListener('hidden.bs.dropdown', () => setTimeout(() => { + expect(document.activeElement).toEqual(toggle) + resolve() + })) + + toggle.click() + }) + }) + + it('should close dropdown (only) by clicking inside the dropdown menu when it has data-attribute `data-bs-auto-close="inside"`', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownToggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + + const expectDropdownToBeOpened = () => setTimeout(() => { + expect(dropdownToggle).toHaveClass('show') + dropdownMenu.click() + }, 150) + + dropdownToggle.addEventListener('shown.bs.dropdown', () => { + document.documentElement.click() + expectDropdownToBeOpened() + }) + + dropdownToggle.addEventListener('hidden.bs.dropdown', () => setTimeout(() => { + expect(dropdownToggle).not.toHaveClass('show') + resolve() + })) + + dropdownToggle.click() + }) + }) + + it('should close dropdown (only) by clicking outside the dropdown menu when it has data-attribute `data-bs-auto-close="outside"`', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownToggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + + const expectDropdownToBeOpened = () => setTimeout(() => { + expect(dropdownToggle).toHaveClass('show') + document.documentElement.click() + }, 150) + + dropdownToggle.addEventListener('shown.bs.dropdown', () => { + dropdownMenu.click() + expectDropdownToBeOpened() + }) + + dropdownToggle.addEventListener('hidden.bs.dropdown', () => { + expect(dropdownToggle).not.toHaveClass('show') + resolve() + }) + + dropdownToggle.click() + }) + }) + + it('should not close dropdown by clicking inside or outside the dropdown menu when it has data-attribute `data-bs-auto-close="false"`', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownToggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + + const expectDropdownToBeOpened = (shouldTriggerClick = true) => setTimeout(() => { + expect(dropdownToggle).toHaveClass('show') + if (shouldTriggerClick) { + document.documentElement.click() + } else { + resolve() + } + + expectDropdownToBeOpened(false) + }, 150) + + dropdownToggle.addEventListener('shown.bs.dropdown', () => { + dropdownMenu.click() + expectDropdownToBeOpened() + }) + + dropdownToggle.click() + }) + }) + + it('should be able to identify clicked dropdown, no matter the markup order', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropdownToggle = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdownMenu = fixtureEl.querySelector('.dropdown-menu') + const spy = spyOn(Dropdown, 'getOrCreateInstance').and.callThrough() + + dropdownToggle.click() + expect(spy).toHaveBeenCalledWith(dropdownToggle) + dropdownMenu.click() + expect(spy).toHaveBeenCalledWith(dropdownToggle) + }) + }) + + describe('jQueryInterface', () => { + it('should create a dropdown', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.dropdown = Dropdown.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.dropdown.call(jQueryMock) + + expect(Dropdown.getInstance(div)).not.toBeNull() + }) + + it('should not re create a dropdown', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const dropdown = new Dropdown(div) + + jQueryMock.fn.dropdown = Dropdown.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.dropdown.call(jQueryMock) + + expect(Dropdown.getInstance(div)).toEqual(dropdown) + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.dropdown = Dropdown.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.dropdown.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) + + describe('getInstance', () => { + it('should return dropdown instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const dropdown = new Dropdown(div) + + expect(Dropdown.getInstance(div)).toEqual(dropdown) + expect(Dropdown.getInstance(div)).toBeInstanceOf(Dropdown) + }) + + it('should return null when there is no dropdown instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Dropdown.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return dropdown instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const dropdown = new Dropdown(div) + + expect(Dropdown.getOrCreateInstance(div)).toEqual(dropdown) + expect(Dropdown.getInstance(div)).toEqual(Dropdown.getOrCreateInstance(div, {})) + expect(Dropdown.getOrCreateInstance(div)).toBeInstanceOf(Dropdown) + }) + + it('should return new instance when there is no dropdown instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Dropdown.getInstance(div)).toBeNull() + expect(Dropdown.getOrCreateInstance(div)).toBeInstanceOf(Dropdown) + }) + + it('should return new instance when there is no dropdown instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Dropdown.getInstance(div)).toBeNull() + const dropdown = Dropdown.getOrCreateInstance(div, { + display: 'dynamic' + }) + expect(dropdown).toBeInstanceOf(Dropdown) + + expect(dropdown._config.display).toEqual('dynamic') + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const dropdown = new Dropdown(div, { + display: 'dynamic' + }) + expect(Dropdown.getInstance(div)).toEqual(dropdown) + + const dropdown2 = Dropdown.getOrCreateInstance(div, { + display: 'static' + }) + expect(dropdown).toBeInstanceOf(Dropdown) + expect(dropdown2).toEqual(dropdown) + + expect(dropdown2._config.display).toEqual('dynamic') + }) + }) + + it('should open dropdown when pressing keydown or keyup', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const dropdown = fixtureEl.querySelector('.dropdown') + + const keydown = createEvent('keydown') + keydown.key = 'ArrowDown' + + const keyup = createEvent('keyup') + keyup.key = 'ArrowUp' + + const handleArrowDown = () => { + expect(triggerDropdown).toHaveClass('show') + expect(triggerDropdown.getAttribute('aria-expanded')).toEqual('true') + setTimeout(() => { + dropdown.hide() + keydown.key = 'ArrowUp' + triggerDropdown.dispatchEvent(keyup) + }, 20) + } + + const handleArrowUp = () => { + expect(triggerDropdown).toHaveClass('show') + expect(triggerDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + } + + dropdown.addEventListener('shown.bs.dropdown', event => { + if (event.target.key === 'ArrowDown') { + handleArrowDown() + } else { + handleArrowUp() + } + }) + + triggerDropdown.dispatchEvent(keydown) + }) + }) + + it('should allow `data-bs-toggle="dropdown"` click events to bubble up', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const clickListener = jasmine.createSpy('clickListener') + const delegatedClickListener = jasmine.createSpy('delegatedClickListener') + + btnDropdown.addEventListener('click', clickListener) + document.addEventListener('click', delegatedClickListener) + + btnDropdown.click() + + expect(clickListener).toHaveBeenCalled() + expect(delegatedClickListener).toHaveBeenCalled() + }) + + it('should open the dropdown when clicking the child element inside `data-bs-toggle="dropdown"`', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const btnDropdown = fixtureEl.querySelector('[data-bs-toggle="dropdown"]') + const childElement = fixtureEl.querySelector('#childElement') + + btnDropdown.addEventListener('shown.bs.dropdown', () => setTimeout(() => { + expect(btnDropdown).toHaveClass('show') + expect(btnDropdown.getAttribute('aria-expanded')).toEqual('true') + resolve() + })) + + childElement.click() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/jquery.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/jquery.spec.js new file mode 100644 index 0000000..7da39d6 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/jquery.spec.js @@ -0,0 +1,60 @@ +/* eslint-env jquery */ + +import Alert from '../../src/alert' +import Button from '../../src/button' +import Carousel from '../../src/carousel' +import Collapse from '../../src/collapse' +import Dropdown from '../../src/dropdown' +import Modal from '../../src/modal' +import Offcanvas from '../../src/offcanvas' +import Popover from '../../src/popover' +import ScrollSpy from '../../src/scrollspy' +import Tab from '../../src/tab' +import Toast from '../../src/toast' +import Tooltip from '../../src/tooltip' +import { clearFixture, getFixture } from '../helpers/fixture' + +describe('jQuery', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + it('should add all plugins in jQuery', () => { + expect(Alert.jQueryInterface).toEqual(jQuery.fn.alert) + expect(Button.jQueryInterface).toEqual(jQuery.fn.button) + expect(Carousel.jQueryInterface).toEqual(jQuery.fn.carousel) + expect(Collapse.jQueryInterface).toEqual(jQuery.fn.collapse) + expect(Dropdown.jQueryInterface).toEqual(jQuery.fn.dropdown) + expect(Modal.jQueryInterface).toEqual(jQuery.fn.modal) + expect(Offcanvas.jQueryInterface).toEqual(jQuery.fn.offcanvas) + expect(Popover.jQueryInterface).toEqual(jQuery.fn.popover) + expect(ScrollSpy.jQueryInterface).toEqual(jQuery.fn.scrollspy) + expect(Tab.jQueryInterface).toEqual(jQuery.fn.tab) + expect(Toast.jQueryInterface).toEqual(jQuery.fn.toast) + expect(Tooltip.jQueryInterface).toEqual(jQuery.fn.tooltip) + }) + + it('should use jQuery event system', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + $(fixtureEl).find('.alert') + .one('closed.bs.alert', () => { + expect($(fixtureEl).find('.alert')).toHaveSize(0) + resolve() + }) + + $(fixtureEl).find('button').trigger('click') + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/modal.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/modal.spec.js new file mode 100644 index 0000000..fdee29e --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/modal.spec.js @@ -0,0 +1,1298 @@ +import Modal from '../../src/modal' +import EventHandler from '../../src/dom/event-handler' +import ScrollBarHelper from '../../src/util/scrollbar' +import { clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Modal', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + clearBodyAndDocument() + document.body.classList.remove('modal-open') + + for (const backdrop of document.querySelectorAll('.modal-backdrop')) { + backdrop.remove() + } + }) + + beforeEach(() => { + clearBodyAndDocument() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Modal.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(Modal.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Modal.DATA_KEY).toEqual('bs.modal') + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modalBySelector = new Modal('.modal') + const modalByElement = new Modal(modalEl) + + expect(modalBySelector._element).toEqual(modalEl) + expect(modalByElement._element).toEqual(modalEl) + }) + }) + + describe('toggle', () => { + it('should call ScrollBarHelper to handle scrollBar on body', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const spyHide = spyOn(ScrollBarHelper.prototype, 'hide').and.callThrough() + const spyReset = spyOn(ScrollBarHelper.prototype, 'reset').and.callThrough() + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(spyHide).toHaveBeenCalled() + modal.toggle() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spyReset).toHaveBeenCalled() + resolve() + }) + + modal.toggle() + }) + }) + }) + + describe('show', () => { + it('should show a modal', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modalEl.addEventListener('show.bs.modal', event => { + expect(event).toBeDefined() + }) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modalEl.getAttribute('aria-modal')).toEqual('true') + expect(modalEl.getAttribute('role')).toEqual('dialog') + expect(modalEl.getAttribute('aria-hidden')).toBeNull() + expect(modalEl.style.display).toEqual('block') + expect(document.querySelector('.modal-backdrop')).not.toBeNull() + resolve() + }) + + modal.show() + }) + }) + + it('should show a modal without backdrop', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + backdrop: false + }) + + modalEl.addEventListener('show.bs.modal', event => { + expect(event).toBeDefined() + }) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modalEl.getAttribute('aria-modal')).toEqual('true') + expect(modalEl.getAttribute('role')).toEqual('dialog') + expect(modalEl.getAttribute('aria-hidden')).toBeNull() + expect(modalEl.style.display).toEqual('block') + expect(document.querySelector('.modal-backdrop')).toBeNull() + resolve() + }) + + modal.show() + }) + }) + + it('should show a modal and append the element', () => { + return new Promise(resolve => { + const modalEl = document.createElement('div') + const id = 'dynamicModal' + + modalEl.setAttribute('id', id) + modalEl.classList.add('modal') + modalEl.innerHTML = '' + + const modal = new Modal(modalEl) + + modalEl.addEventListener('shown.bs.modal', () => { + const dynamicModal = document.getElementById(id) + expect(dynamicModal).not.toBeNull() + dynamicModal.remove() + resolve() + }) + + modal.show() + }) + }) + + it('should do nothing if a modal is shown', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(EventHandler, 'trigger') + modal._isShown = true + + modal.show() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should do nothing if a modal is transitioning', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(EventHandler, 'trigger') + modal._isTransitioning = true + + modal.show() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should not fire shown event when show is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modalEl.addEventListener('show.bs.modal', event => { + event.preventDefault() + + const expectedDone = () => { + expect().nothing() + resolve() + } + + setTimeout(expectedDone, 10) + }) + + modalEl.addEventListener('shown.bs.modal', () => { + reject(new Error('shown event triggered')) + }) + + modal.show() + }) + }) + + it('should be shown after the first call to show() has been prevented while fading is enabled ', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + let prevented = false + modalEl.addEventListener('show.bs.modal', event => { + if (!prevented) { + event.preventDefault() + prevented = true + + setTimeout(() => { + modal.show() + }) + } + }) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(prevented).toBeTrue() + expect(modal._isAnimated()).toBeTrue() + resolve() + }) + + modal.show() + }) + }) + it('should set is transitioning if fade class is present', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modalEl.addEventListener('show.bs.modal', () => { + setTimeout(() => { + expect(modal._isTransitioning).toBeTrue() + }) + }) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modal._isTransitioning).toBeFalse() + resolve() + }) + + modal.show() + }) + }) + + it('should close modal when a click occurred on data-bs-dismiss="modal" inside modal', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const btnClose = fixtureEl.querySelector('[data-bs-dismiss="modal"]') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, 'hide').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + btnClose.click() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should close modal when a click occurred on a data-bs-dismiss="modal" with "bs-target" outside of modal element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const btnClose = fixtureEl.querySelector('[data-bs-dismiss="modal"]') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, 'hide').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + btnClose.click() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should set .modal\'s scroll top to 0', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modalEl.scrollTop).toEqual(0) + resolve() + }) + + modal.show() + }) + }) + + it('should set modal body scroll top to 0 if modal body do not exists', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const modalBody = modalEl.querySelector('.modal-body') + const modal = new Modal(modalEl) + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modalBody.scrollTop).toEqual(0) + resolve() + }) + + modal.show() + }) + }) + + it('should not trap focus if focus equal to false', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + focus: false + }) + + const spy = spyOn(modal._focustrap, 'activate').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + expect(spy).not.toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should add listener when escape touch is pressed', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, 'hide').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + const keydownEscape = createEvent('keydown') + keydownEscape.key = 'Escape' + + modalEl.dispatchEvent(keydownEscape) + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should do nothing when the pressed key is not escape', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, 'hide') + + const expectDone = () => { + expect(spy).not.toHaveBeenCalled() + + resolve() + } + + modalEl.addEventListener('shown.bs.modal', () => { + const keydownTab = createEvent('keydown') + keydownTab.key = 'Tab' + + modalEl.dispatchEvent(keydownTab) + setTimeout(expectDone, 30) + }) + + modal.show() + }) + }) + + it('should adjust dialog on resize', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, '_adjustDialog').and.callThrough() + + const expectDone = () => { + expect(spy).toHaveBeenCalled() + + resolve() + } + + modalEl.addEventListener('shown.bs.modal', () => { + const resizeEvent = createEvent('resize') + + window.dispatchEvent(resizeEvent) + setTimeout(expectDone, 10) + }) + + modal.show() + }) + }) + + it('should not close modal when clicking on modal-content', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const shownCallback = () => { + setTimeout(() => { + expect(modal._isShown).toEqual(true) + resolve() + }, 10) + } + + modalEl.addEventListener('shown.bs.modal', () => { + fixtureEl.querySelector('.modal-dialog').click() + fixtureEl.querySelector('.modal-content').click() + shownCallback() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + reject(new Error('Should not hide a modal')) + }) + + modal.show() + }) + }) + + it('should not close modal when clicking outside of modal-content if backdrop = false', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + backdrop: false + }) + + const shownCallback = () => { + setTimeout(() => { + expect(modal._isShown).toBeTrue() + resolve() + }, 10) + } + + modalEl.addEventListener('shown.bs.modal', () => { + modalEl.click() + shownCallback() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + reject(new Error('Should not hide a modal')) + }) + + modal.show() + }) + }) + + it('should not close modal when clicking outside of modal-content if backdrop = static', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + backdrop: 'static' + }) + + const shownCallback = () => { + setTimeout(() => { + expect(modal._isShown).toBeTrue() + resolve() + }, 10) + } + + modalEl.addEventListener('shown.bs.modal', () => { + modalEl.click() + shownCallback() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + reject(new Error('Should not hide a modal')) + }) + + modal.show() + }) + }) + it('should close modal when escape key is pressed with keyboard = true and backdrop is static', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + backdrop: 'static', + keyboard: true + }) + + const shownCallback = () => { + setTimeout(() => { + expect(modal._isShown).toBeFalse() + resolve() + }, 10) + } + + modalEl.addEventListener('shown.bs.modal', () => { + const keydownEscape = createEvent('keydown') + keydownEscape.key = 'Escape' + + modalEl.dispatchEvent(keydownEscape) + shownCallback() + }) + + modal.show() + }) + }) + + it('should not close modal when escape key is pressed with keyboard = false', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + keyboard: false + }) + + const shownCallback = () => { + setTimeout(() => { + expect(modal._isShown).toBeTrue() + resolve() + }, 10) + } + + modalEl.addEventListener('shown.bs.modal', () => { + const keydownEscape = createEvent('keydown') + keydownEscape.key = 'Escape' + + modalEl.dispatchEvent(keydownEscape) + shownCallback() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + reject(new Error('Should not hide a modal')) + }) + + modal.show() + }) + }) + + it('should not overflow when clicking outside of modal-content if backdrop = static', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + backdrop: 'static' + }) + + modalEl.addEventListener('shown.bs.modal', () => { + modalEl.click() + setTimeout(() => { + expect(modalEl.clientHeight).toEqual(modalEl.scrollHeight) + resolve() + }, 20) + }) + + modal.show() + }) + }) + + it('should not queue multiple callbacks when clicking outside of modal-content and backdrop = static', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl, { + backdrop: 'static' + }) + + modalEl.addEventListener('shown.bs.modal', () => { + const spy = spyOn(modal, '_queueCallback').and.callThrough() + const mouseDown = createEvent('mousedown') + + modalEl.dispatchEvent(mouseDown) + modalEl.click() + modalEl.dispatchEvent(mouseDown) + modalEl.click() + + setTimeout(() => { + expect(spy).toHaveBeenCalledTimes(1) + resolve() + }, 20) + }) + + modal.show() + }) + }) + + it('should trap focus', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(modal._focustrap, 'activate').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + }) + + describe('hide', () => { + it('should hide a modal', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + const backdropSpy = spyOn(modal._backdrop, 'hide').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + modal.hide() + }) + + modalEl.addEventListener('hide.bs.modal', event => { + expect(event).toBeDefined() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(modalEl.getAttribute('aria-modal')).toBeNull() + expect(modalEl.getAttribute('role')).toBeNull() + expect(modalEl.getAttribute('aria-hidden')).toEqual('true') + expect(modalEl.style.display).toEqual('none') + expect(backdropSpy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should close modal when clicking outside of modal-content', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const dialogEl = modalEl.querySelector('.modal-dialog') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, 'hide') + + modalEl.addEventListener('shown.bs.modal', () => { + const mouseDown = createEvent('mousedown') + + dialogEl.dispatchEvent(mouseDown) + modalEl.click() + expect(spy).not.toHaveBeenCalled() + + modalEl.dispatchEvent(mouseDown) + modalEl.click() + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should not close modal when clicking on an element removed from modal content', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const buttonEl = modalEl.querySelector('.btn') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, 'hide') + buttonEl.addEventListener('click', () => { + buttonEl.remove() + }) + + modalEl.addEventListener('shown.bs.modal', () => { + modalEl.dispatchEvent(createEvent('mousedown')) + buttonEl.click() + expect(spy).not.toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should do nothing is the modal is not shown', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modal.hide() + + expect().nothing() + }) + + it('should do nothing is the modal is transitioning', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modal._isTransitioning = true + modal.hide() + + expect().nothing() + }) + + it('should not hide a modal if hide is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + modalEl.addEventListener('shown.bs.modal', () => { + modal.hide() + }) + + const hideCallback = () => { + setTimeout(() => { + expect(modal._isShown).toBeTrue() + resolve() + }, 10) + } + + modalEl.addEventListener('hide.bs.modal', event => { + event.preventDefault() + hideCallback() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + reject(new Error('should not trigger hidden')) + }) + + modal.show() + }) + }) + + it('should release focus trap', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + const spy = spyOn(modal._focustrap, 'deactivate').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + modal.hide() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + }) + + describe('dispose', () => { + it('should dispose a modal', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + const focustrap = modal._focustrap + const spyDeactivate = spyOn(focustrap, 'deactivate').and.callThrough() + + expect(Modal.getInstance(modalEl)).toEqual(modal) + + const spyOff = spyOn(EventHandler, 'off') + + modal.dispose() + + expect(Modal.getInstance(modalEl)).toBeNull() + expect(spyOff).toHaveBeenCalledTimes(3) + expect(spyDeactivate).toHaveBeenCalled() + }) + }) + + describe('handleUpdate', () => { + it('should call adjust dialog', () => { + fixtureEl.innerHTML = '' + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + + const spy = spyOn(modal, '_adjustDialog') + + modal.handleUpdate() + + expect(spy).toHaveBeenCalled() + }) + }) + + describe('data-api', () => { + it('should toggle modal', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]') + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modalEl.getAttribute('aria-modal')).toEqual('true') + expect(modalEl.getAttribute('role')).toEqual('dialog') + expect(modalEl.getAttribute('aria-hidden')).toBeNull() + expect(modalEl.style.display).toEqual('block') + expect(document.querySelector('.modal-backdrop')).not.toBeNull() + setTimeout(() => trigger.click(), 10) + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(modalEl.getAttribute('aria-modal')).toBeNull() + expect(modalEl.getAttribute('role')).toBeNull() + expect(modalEl.getAttribute('aria-hidden')).toEqual('true') + expect(modalEl.style.display).toEqual('none') + expect(document.querySelector('.modal-backdrop')).toBeNull() + resolve() + }) + + trigger.click() + }) + }) + + it('should not recreate a new modal', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const modal = new Modal(modalEl) + const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]') + + const spy = spyOn(modal, 'show').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + trigger.click() + }) + }) + + it('should prevent default when the trigger is or ', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]') + + const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + expect(modalEl.getAttribute('aria-modal')).toEqual('true') + expect(modalEl.getAttribute('role')).toEqual('dialog') + expect(modalEl.getAttribute('aria-hidden')).toBeNull() + expect(modalEl.style.display).toEqual('block') + expect(document.querySelector('.modal-backdrop')).not.toBeNull() + expect(spy).toHaveBeenCalled() + resolve() + }) + + trigger.click() + }) + }) + + it('should focus the trigger on hide', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]') + + const spy = spyOn(trigger, 'focus') + + modalEl.addEventListener('shown.bs.modal', () => { + const modal = Modal.getInstance(modalEl) + + modal.hide() + }) + + const hideListener = () => { + setTimeout(() => { + expect(spy).toHaveBeenCalled() + resolve() + }, 20) + } + + modalEl.addEventListener('hidden.bs.modal', () => { + hideListener() + }) + + trigger.click() + }) + }) + it('should not prevent default when a click occurred on data-bs-dismiss="modal" where tagName is DIFFERENT than or ', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const btnClose = fixtureEl.querySelector('button[data-bs-dismiss="modal"]') + const modal = new Modal(modalEl) + + const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + btnClose.click() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spy).not.toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + + it('should prevent default when a click occurred on data-bs-dismiss="modal" where tagName is or ', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const btnClose = fixtureEl.querySelector('a[data-bs-dismiss="modal"]') + const modal = new Modal(modalEl) + + const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + modalEl.addEventListener('shown.bs.modal', () => { + btnClose.click() + }) + + modalEl.addEventListener('hidden.bs.modal', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + modal.show() + }) + }) + it('should not focus the trigger if the modal is not visible', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]') + + const spy = spyOn(trigger, 'focus') + + modalEl.addEventListener('shown.bs.modal', () => { + const modal = Modal.getInstance(modalEl) + + modal.hide() + }) + + const hideListener = () => { + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + resolve() + }, 20) + } + + modalEl.addEventListener('hidden.bs.modal', () => { + hideListener() + }) + + trigger.click() + }) + }) + it('should not focus the trigger if the modal is not shown', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const modalEl = fixtureEl.querySelector('.modal') + const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]') + + const spy = spyOn(trigger, 'focus') + + const showListener = () => { + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + resolve() + }, 10) + } + + modalEl.addEventListener('show.bs.modal', event => { + event.preventDefault() + showListener() + }) + + trigger.click() + }) + }) + + it('should call hide first, if another modal is open', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '', + '' + ].join('') + + const trigger2 = fixtureEl.querySelector('button') + const modalEl1 = document.querySelector('#modal1') + const modalEl2 = document.querySelector('#modal2') + const modal1 = new Modal(modalEl1) + + modalEl1.addEventListener('shown.bs.modal', () => { + trigger2.click() + }) + modalEl1.addEventListener('hidden.bs.modal', () => { + expect(Modal.getInstance(modalEl2)).not.toBeNull() + expect(modalEl2).toHaveClass('show') + resolve() + }) + modal1.show() + }) + }) + }) + describe('jQueryInterface', () => { + it('should create a modal', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.modal = Modal.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.modal.call(jQueryMock) + + expect(Modal.getInstance(div)).not.toBeNull() + }) + + it('should create a modal with given config', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.modal = Modal.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.modal.call(jQueryMock, { keyboard: false }) + const spy = spyOn(Modal.prototype, 'constructor') + expect(spy).not.toHaveBeenCalledWith(div, { keyboard: false }) + + const modal = Modal.getInstance(div) + expect(modal).not.toBeNull() + expect(modal._config.keyboard).toBeFalse() + }) + + it('should not re create a modal', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + const modal = new Modal(div) + + jQueryMock.fn.modal = Modal.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.modal.call(jQueryMock) + + expect(Modal.getInstance(div)).toEqual(modal) + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.modal = Modal.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.modal.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should call show method', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + const modal = new Modal(div) + + jQueryMock.fn.modal = Modal.jQueryInterface + jQueryMock.elements = [div] + + const spy = spyOn(modal, 'show') + + jQueryMock.fn.modal.call(jQueryMock, 'show') + + expect(spy).toHaveBeenCalled() + }) + + it('should not call show method', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.modal = Modal.jQueryInterface + jQueryMock.elements = [div] + + const spy = spyOn(Modal.prototype, 'show') + + jQueryMock.fn.modal.call(jQueryMock) + + expect(spy).not.toHaveBeenCalled() + }) + }) + + describe('getInstance', () => { + it('should return modal instance', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + const modal = new Modal(div) + + expect(Modal.getInstance(div)).toEqual(modal) + expect(Modal.getInstance(div)).toBeInstanceOf(Modal) + }) + + it('should return null when there is no modal instance', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + + expect(Modal.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return modal instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const modal = new Modal(div) + + expect(Modal.getOrCreateInstance(div)).toEqual(modal) + expect(Modal.getInstance(div)).toEqual(Modal.getOrCreateInstance(div, {})) + expect(Modal.getOrCreateInstance(div)).toBeInstanceOf(Modal) + }) + + it('should return new instance when there is no modal instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Modal.getInstance(div)).toBeNull() + expect(Modal.getOrCreateInstance(div)).toBeInstanceOf(Modal) + }) + + it('should return new instance when there is no modal instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Modal.getInstance(div)).toBeNull() + const modal = Modal.getOrCreateInstance(div, { + backdrop: true + }) + expect(modal).toBeInstanceOf(Modal) + + expect(modal._config.backdrop).toBeTrue() + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const modal = new Modal(div, { + backdrop: true + }) + expect(Modal.getInstance(div)).toEqual(modal) + + const modal2 = Modal.getOrCreateInstance(div, { + backdrop: false + }) + expect(modal).toBeInstanceOf(Modal) + expect(modal2).toEqual(modal) + + expect(modal2._config.backdrop).toBeTrue() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/offcanvas.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/offcanvas.spec.js new file mode 100644 index 0000000..da2fb97 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/offcanvas.spec.js @@ -0,0 +1,912 @@ +import Offcanvas from '../../src/offcanvas' +import EventHandler from '../../src/dom/event-handler' +import { clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' +import { isVisible } from '../../src/util/index' +import ScrollBarHelper from '../../src/util/scrollbar' + +describe('Offcanvas', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + document.body.classList.remove('offcanvas-open') + clearBodyAndDocument() + }) + + beforeEach(() => { + clearBodyAndDocument() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Offcanvas.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(Offcanvas.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Offcanvas.DATA_KEY).toEqual('bs.offcanvas') + }) + }) + + describe('constructor', () => { + it('should call hide when a element with data-bs-dismiss="offcanvas" is clicked', () => { + fixtureEl.innerHTML = [ + '
', + ' Close', + '
' + ].join('') + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const closeEl = fixtureEl.querySelector('a') + const offCanvas = new Offcanvas(offCanvasEl) + + const spy = spyOn(offCanvas, 'hide') + + closeEl.click() + + expect(offCanvas._config.keyboard).toBeTrue() + expect(spy).toHaveBeenCalled() + }) + + it('should hide if esc is pressed', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + const keyDownEsc = createEvent('keydown') + keyDownEsc.key = 'Escape' + + const spy = spyOn(offCanvas, 'hide') + + offCanvasEl.dispatchEvent(keyDownEsc) + + expect(spy).toHaveBeenCalled() + }) + + it('should hide if esc is pressed and backdrop is static', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { backdrop: 'static' }) + const keyDownEsc = createEvent('keydown') + keyDownEsc.key = 'Escape' + + const spy = spyOn(offCanvas, 'hide') + + offCanvasEl.dispatchEvent(keyDownEsc) + + expect(spy).toHaveBeenCalled() + }) + + it('should not hide if esc is not pressed', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + const keydownTab = createEvent('keydown') + keydownTab.key = 'Tab' + + const spy = spyOn(offCanvas, 'hide') + + offCanvasEl.dispatchEvent(keydownTab) + + expect(spy).not.toHaveBeenCalled() + }) + + it('should not hide if esc is pressed but with keyboard = false', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { keyboard: false }) + const keyDownEsc = createEvent('keydown') + keyDownEsc.key = 'Escape' + + const spy = spyOn(offCanvas, 'hide') + const hidePreventedSpy = jasmine.createSpy('hidePrevented') + offCanvasEl.addEventListener('hidePrevented.bs.offcanvas', hidePreventedSpy) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(offCanvas._config.keyboard).toBeFalse() + offCanvasEl.dispatchEvent(keyDownEsc) + + expect(hidePreventedSpy).toHaveBeenCalled() + expect(spy).not.toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + + it('should not hide if user clicks on static backdrop', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl, { backdrop: 'static' }) + + const clickEvent = new Event('mousedown', { bubbles: true, cancelable: true }) + const spyClick = spyOn(offCanvas._backdrop._config, 'clickCallback').and.callThrough() + const spyHide = spyOn(offCanvas._backdrop, 'hide').and.callThrough() + const hidePreventedSpy = jasmine.createSpy('hidePrevented') + offCanvasEl.addEventListener('hidePrevented.bs.offcanvas', hidePreventedSpy) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(spyClick).toEqual(jasmine.any(Function)) + + offCanvas._backdrop._getElement().dispatchEvent(clickEvent) + expect(hidePreventedSpy).toHaveBeenCalled() + expect(spyHide).not.toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + + it('should call `hide` on resize, if element\'s position is not fixed any more', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + + const spy = spyOn(offCanvas, 'hide').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + const resizeEvent = createEvent('resize') + offCanvasEl.style.removeProperty('position') + + window.dispatchEvent(resizeEvent) + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + }) + + describe('config', () => { + it('should have default values', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + expect(offCanvas._config.backdrop).toBeTrue() + expect(offCanvas._backdrop._config.isVisible).toBeTrue() + expect(offCanvas._config.keyboard).toBeTrue() + expect(offCanvas._config.scroll).toBeFalse() + }) + + it('should read data attributes and override default config', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + expect(offCanvas._config.backdrop).toBeFalse() + expect(offCanvas._backdrop._config.isVisible).toBeFalse() + expect(offCanvas._config.keyboard).toBeFalse() + expect(offCanvas._config.scroll).toBeTrue() + }) + + it('given a config object must override data attributes', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { + backdrop: true, + keyboard: true, + scroll: false + }) + expect(offCanvas._config.backdrop).toBeTrue() + expect(offCanvas._config.keyboard).toBeTrue() + expect(offCanvas._config.scroll).toBeFalse() + }) + }) + + describe('options', () => { + it('if scroll is enabled, should allow body to scroll while offcanvas is open', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const spyHide = spyOn(ScrollBarHelper.prototype, 'hide').and.callThrough() + const spyReset = spyOn(ScrollBarHelper.prototype, 'reset').and.callThrough() + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { scroll: true }) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(spyHide).not.toHaveBeenCalled() + offCanvas.hide() + }) + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + expect(spyReset).not.toHaveBeenCalled() + resolve() + }) + offCanvas.show() + }) + }) + + it('if scroll is disabled, should call ScrollBarHelper to handle scrollBar on body', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const spyHide = spyOn(ScrollBarHelper.prototype, 'hide').and.callThrough() + const spyReset = spyOn(ScrollBarHelper.prototype, 'reset').and.callThrough() + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { scroll: false }) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(spyHide).toHaveBeenCalled() + offCanvas.hide() + }) + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + expect(spyReset).toHaveBeenCalled() + resolve() + }) + offCanvas.show() + }) + }) + + it('should hide a shown element if user click on backdrop', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl, { backdrop: true }) + + const clickEvent = new Event('mousedown', { bubbles: true, cancelable: true }) + const spy = spyOn(offCanvas._backdrop._config, 'clickCallback').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(offCanvas._backdrop._config.clickCallback).toEqual(jasmine.any(Function)) + + offCanvas._backdrop._getElement().dispatchEvent(clickEvent) + }) + + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + + it('should not trap focus if scroll is allowed', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { + scroll: true, + backdrop: false + }) + + const spy = spyOn(offCanvas._focustrap, 'activate').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(spy).not.toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + + it('should trap focus if scroll is allowed OR backdrop is enabled', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl, { + scroll: true, + backdrop: true + }) + + const spy = spyOn(offCanvas._focustrap, 'activate').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + }) + + describe('toggle', () => { + it('should call show method if show class is not present', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + const spy = spyOn(offCanvas, 'show') + + offCanvas.toggle() + + expect(spy).toHaveBeenCalled() + }) + + it('should call hide method if show class is present', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(offCanvasEl).toHaveClass('show') + const spy = spyOn(offCanvas, 'hide') + + offCanvas.toggle() + + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + }) + + describe('show', () => { + it('should add `showing` class during opening and `show` class on end', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + offCanvasEl.addEventListener('show.bs.offcanvas', () => { + expect(offCanvasEl).not.toHaveClass('show') + }) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(offCanvasEl).not.toHaveClass('showing') + expect(offCanvasEl).toHaveClass('show') + resolve() + }) + + offCanvas.show() + expect(offCanvasEl).toHaveClass('showing') + }) + }) + + it('should do nothing if already shown', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + offCanvas.show() + + expect(offCanvasEl).toHaveClass('show') + + const spyShow = spyOn(offCanvas._backdrop, 'show').and.callThrough() + const spyTrigger = spyOn(EventHandler, 'trigger').and.callThrough() + offCanvas.show() + + expect(spyTrigger).not.toHaveBeenCalled() + expect(spyShow).not.toHaveBeenCalled() + }) + + it('should show a hidden element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const spy = spyOn(offCanvas._backdrop, 'show').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(offCanvasEl).toHaveClass('show') + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + + it('should not fire shown when show is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const spy = spyOn(offCanvas._backdrop, 'show').and.callThrough() + + const expectEnd = () => { + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + resolve() + }, 10) + } + + offCanvasEl.addEventListener('show.bs.offcanvas', event => { + event.preventDefault() + expectEnd() + }) + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + reject(new Error('should not fire shown event')) + }) + + offCanvas.show() + }) + }) + + it('on window load, should make visible an offcanvas element, if its markup contains class "show"', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const spy = spyOn(Offcanvas.prototype, 'show').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + resolve() + }) + + window.dispatchEvent(createEvent('load')) + + const instance = Offcanvas.getInstance(offCanvasEl) + expect(instance).not.toBeNull() + expect(spy).toHaveBeenCalled() + }) + }) + + it('should trap focus', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + const spy = spyOn(offCanvas._focustrap, 'activate').and.callThrough() + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.show() + }) + }) + }) + + describe('hide', () => { + it('should add `hiding` class during closing and remover `show` & `hiding` classes on end', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + const offCanvasEl = fixtureEl.querySelector('.offcanvas') + const offCanvas = new Offcanvas(offCanvasEl) + + offCanvasEl.addEventListener('hide.bs.offcanvas', () => { + expect(offCanvasEl).not.toHaveClass('showing') + expect(offCanvasEl).toHaveClass('show') + }) + + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + expect(offCanvasEl).not.toHaveClass('hiding') + expect(offCanvasEl).not.toHaveClass('show') + resolve() + }) + + offCanvas.show() + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + offCanvas.hide() + expect(offCanvasEl).not.toHaveClass('showing') + expect(offCanvasEl).toHaveClass('hiding') + }) + }) + }) + + it('should do nothing if already shown', () => { + fixtureEl.innerHTML = '
' + + const spyTrigger = spyOn(EventHandler, 'trigger').and.callThrough() + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const spyHide = spyOn(offCanvas._backdrop, 'hide').and.callThrough() + + offCanvas.hide() + expect(spyHide).not.toHaveBeenCalled() + expect(spyTrigger).not.toHaveBeenCalled() + }) + + it('should hide a shown element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const spy = spyOn(offCanvas._backdrop, 'hide').and.callThrough() + offCanvas.show() + + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + expect(offCanvasEl).not.toHaveClass('show') + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.hide() + }) + }) + + it('should not fire hidden when hide is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const spy = spyOn(offCanvas._backdrop, 'hide').and.callThrough() + + offCanvas.show() + + const expectEnd = () => { + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + resolve() + }, 10) + } + + offCanvasEl.addEventListener('hide.bs.offcanvas', event => { + event.preventDefault() + expectEnd() + }) + + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + reject(new Error('should not fire hidden event')) + }) + + offCanvas.hide() + }) + }) + + it('should release focus trap', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const spy = spyOn(offCanvas._focustrap, 'deactivate').and.callThrough() + offCanvas.show() + + offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + offCanvas.hide() + }) + }) + }) + + describe('dispose', () => { + it('should dispose an offcanvas', () => { + fixtureEl.innerHTML = '
' + + const offCanvasEl = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(offCanvasEl) + const backdrop = offCanvas._backdrop + const spyDispose = spyOn(backdrop, 'dispose').and.callThrough() + const focustrap = offCanvas._focustrap + const spyDeactivate = spyOn(focustrap, 'deactivate').and.callThrough() + + expect(Offcanvas.getInstance(offCanvasEl)).toEqual(offCanvas) + + offCanvas.dispose() + + expect(spyDispose).toHaveBeenCalled() + expect(offCanvas._backdrop).toBeNull() + expect(spyDeactivate).toHaveBeenCalled() + expect(offCanvas._focustrap).toBeNull() + expect(Offcanvas.getInstance(offCanvasEl)).toBeNull() + }) + }) + + describe('data-api', () => { + it('should not prevent event for input', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const target = fixtureEl.querySelector('input') + const offCanvasEl = fixtureEl.querySelector('#offcanvasdiv1') + + offCanvasEl.addEventListener('shown.bs.offcanvas', () => { + expect(offCanvasEl).toHaveClass('show') + expect(target.checked).toBeTrue() + resolve() + }) + + target.click() + }) + }) + + it('should not call toggle on disabled elements', () => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const target = fixtureEl.querySelector('a') + + const spy = spyOn(Offcanvas.prototype, 'toggle') + + target.click() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should call hide first, if another offcanvas is open', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
' + ].join('') + + const trigger2 = fixtureEl.querySelector('#btn2') + const offcanvasEl1 = document.querySelector('#offcanvas1') + const offcanvasEl2 = document.querySelector('#offcanvas2') + const offcanvas1 = new Offcanvas(offcanvasEl1) + + offcanvasEl1.addEventListener('shown.bs.offcanvas', () => { + trigger2.click() + }) + offcanvasEl1.addEventListener('hidden.bs.offcanvas', () => { + expect(Offcanvas.getInstance(offcanvasEl2)).not.toBeNull() + resolve() + }) + offcanvas1.show() + }) + }) + + it('should focus on trigger element after closing offcanvas', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('#btn') + const offcanvasEl = fixtureEl.querySelector('#offcanvas') + const offcanvas = new Offcanvas(offcanvasEl) + const spy = spyOn(trigger, 'focus') + + offcanvasEl.addEventListener('shown.bs.offcanvas', () => { + offcanvas.hide() + }) + offcanvasEl.addEventListener('hidden.bs.offcanvas', () => { + setTimeout(() => { + expect(spy).toHaveBeenCalled() + resolve() + }, 5) + }) + + trigger.click() + }) + }) + + it('should not focus on trigger element after closing offcanvas, if it is not visible', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const trigger = fixtureEl.querySelector('#btn') + const offcanvasEl = fixtureEl.querySelector('#offcanvas') + const offcanvas = new Offcanvas(offcanvasEl) + const spy = spyOn(trigger, 'focus') + + offcanvasEl.addEventListener('shown.bs.offcanvas', () => { + trigger.style.display = 'none' + offcanvas.hide() + }) + offcanvasEl.addEventListener('hidden.bs.offcanvas', () => { + setTimeout(() => { + expect(isVisible(trigger)).toBeFalse() + expect(spy).not.toHaveBeenCalled() + resolve() + }, 5) + }) + + trigger.click() + }) + }) + }) + + describe('jQueryInterface', () => { + it('should create an offcanvas', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.offcanvas.call(jQueryMock) + + expect(Offcanvas.getInstance(div)).not.toBeNull() + }) + + it('should not re create an offcanvas', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(div) + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.offcanvas.call(jQueryMock) + + expect(Offcanvas.getInstance(div)).toEqual(offCanvas) + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.offcanvas.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should throw error on protected method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = '_getConfig' + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.offcanvas.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should throw error if method "constructor" is being called', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'constructor' + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.offcanvas.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should call offcanvas method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + const spy = spyOn(Offcanvas.prototype, 'show') + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.offcanvas.call(jQueryMock, 'show') + expect(spy).toHaveBeenCalled() + }) + + it('should create a offcanvas with given config', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.offcanvas = Offcanvas.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.offcanvas.call(jQueryMock, { scroll: true }) + + const offcanvas = Offcanvas.getInstance(div) + expect(offcanvas).not.toBeNull() + expect(offcanvas._config.scroll).toBeTrue() + }) + }) + + describe('getInstance', () => { + it('should return offcanvas instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const offCanvas = new Offcanvas(div) + + expect(Offcanvas.getInstance(div)).toEqual(offCanvas) + expect(Offcanvas.getInstance(div)).toBeInstanceOf(Offcanvas) + }) + + it('should return null when there is no offcanvas instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Offcanvas.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return offcanvas instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const offcanvas = new Offcanvas(div) + + expect(Offcanvas.getOrCreateInstance(div)).toEqual(offcanvas) + expect(Offcanvas.getInstance(div)).toEqual(Offcanvas.getOrCreateInstance(div, {})) + expect(Offcanvas.getOrCreateInstance(div)).toBeInstanceOf(Offcanvas) + }) + + it('should return new instance when there is no Offcanvas instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Offcanvas.getInstance(div)).toBeNull() + expect(Offcanvas.getOrCreateInstance(div)).toBeInstanceOf(Offcanvas) + }) + + it('should return new instance when there is no offcanvas instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Offcanvas.getInstance(div)).toBeNull() + const offcanvas = Offcanvas.getOrCreateInstance(div, { + scroll: true + }) + expect(offcanvas).toBeInstanceOf(Offcanvas) + + expect(offcanvas._config.scroll).toBeTrue() + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const offcanvas = new Offcanvas(div, { + scroll: true + }) + expect(Offcanvas.getInstance(div)).toEqual(offcanvas) + + const offcanvas2 = Offcanvas.getOrCreateInstance(div, { + scroll: false + }) + expect(offcanvas).toBeInstanceOf(Offcanvas) + expect(offcanvas2).toEqual(offcanvas) + + expect(offcanvas2._config.scroll).toBeTrue() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/popover.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/popover.spec.js new file mode 100644 index 0000000..baf691c --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/popover.spec.js @@ -0,0 +1,413 @@ +import Popover from '../../src/popover' +import EventHandler from '../../src/dom/event-handler' +import { clearFixture, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Popover', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + + const popoverList = document.querySelectorAll('.popover') + + for (const popoverEl of popoverList) { + popoverEl.remove() + } + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Popover.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(Popover.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('NAME', () => { + it('should return plugin name', () => { + expect(Popover.NAME).toEqual(jasmine.any(String)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Popover.DATA_KEY).toEqual('bs.popover') + }) + }) + + describe('EVENT_KEY', () => { + it('should return plugin event key', () => { + expect(Popover.EVENT_KEY).toEqual('.bs.popover') + }) + }) + + describe('DefaultType', () => { + it('should return plugin default type', () => { + expect(Popover.DefaultType).toEqual(jasmine.any(Object)) + }) + }) + + describe('show', () => { + it('should show a popover', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + popoverEl.addEventListener('shown.bs.popover', () => { + expect(document.querySelector('.popover')).not.toBeNull() + resolve() + }) + + popover.show() + }) + }) + + it('should set title and content from functions', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl, { + title: () => 'Bootstrap', + content: () => 'loves writing tests (╯°□°)╯︵ ┻━┻' + }) + + popoverEl.addEventListener('shown.bs.popover', () => { + const popoverDisplayed = document.querySelector('.popover') + + expect(popoverDisplayed).not.toBeNull() + expect(popoverDisplayed.querySelector('.popover-header').textContent).toEqual('Bootstrap') + expect(popoverDisplayed.querySelector('.popover-body').textContent).toEqual('loves writing tests (╯°□°)╯︵ ┻━┻') + resolve() + }) + + popover.show() + }) + }) + + it('should show a popover with just content without having header', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'Nice link' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl, { + content: 'Some beautiful content :)' + }) + + popoverEl.addEventListener('shown.bs.popover', () => { + const popoverDisplayed = document.querySelector('.popover') + + expect(popoverDisplayed).not.toBeNull() + expect(popoverDisplayed.querySelector('.popover-header')).toBeNull() + expect(popoverDisplayed.querySelector('.popover-body').textContent).toEqual('Some beautiful content :)') + resolve() + }) + + popover.show() + }) + }) + + it('should show a popover with just title without having body', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'Nice link' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl, { + title: 'Title which does not require content' + }) + + popoverEl.addEventListener('shown.bs.popover', () => { + const popoverDisplayed = document.querySelector('.popover') + + expect(popoverDisplayed).not.toBeNull() + expect(popoverDisplayed.querySelector('.popover-body')).toBeNull() + expect(popoverDisplayed.querySelector('.popover-header').textContent).toEqual('Title which does not require content') + resolve() + }) + + popover.show() + }) + }) + + it('should show a popover with just title without having body using data-attribute to get config', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'Nice link' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + popoverEl.addEventListener('shown.bs.popover', () => { + const popoverDisplayed = document.querySelector('.popover') + + expect(popoverDisplayed).not.toBeNull() + expect(popoverDisplayed.querySelector('.popover-body')).toBeNull() + expect(popoverDisplayed.querySelector('.popover-header').textContent).toEqual('Title which does not require content') + resolve() + }) + + popover.show() + }) + }) + + it('should NOT show a popover without `title` and `content`', () => { + fixtureEl.innerHTML = 'Nice link' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl, { animation: false }) + const spy = spyOn(EventHandler, 'trigger').and.callThrough() + + popover.show() + + expect(spy).not.toHaveBeenCalledWith(popoverEl, Popover.eventName('show')) + expect(document.querySelector('.popover')).toBeNull() + }) + + it('"setContent" should keep the initial template', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + popover.setContent({ '.tooltip-inner': 'foo' }) + const tip = popover._getTipElement() + + expect(tip).toHaveClass('popover') + expect(tip).toHaveClass('bs-popover-auto') + expect(tip.querySelector('.popover-arrow')).not.toBeNull() + expect(tip.querySelector('.popover-header')).not.toBeNull() + expect(tip.querySelector('.popover-body')).not.toBeNull() + }) + + it('should call setContent once', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl, { + content: 'Popover content' + }) + expect(popover._templateFactory).toBeNull() + let spy = null + let times = 1 + + popoverEl.addEventListener('hidden.bs.popover', () => { + popover.show() + }) + + popoverEl.addEventListener('shown.bs.popover', () => { + spy = spy || spyOn(popover._templateFactory, 'constructor').and.callThrough() + const popoverDisplayed = document.querySelector('.popover') + + expect(popoverDisplayed).not.toBeNull() + expect(popoverDisplayed.querySelector('.popover-body').textContent).toEqual('Popover content') + expect(spy).toHaveBeenCalledTimes(0) + if (times > 1) { + resolve() + } + + times++ + popover.hide() + }) + popover.show() + }) + }) + + it('should show a popover with provided custom class', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + popoverEl.addEventListener('shown.bs.popover', () => { + const tip = document.querySelector('.popover') + expect(tip).not.toBeNull() + expect(tip).toHaveClass('custom-class') + resolve() + }) + + popover.show() + }) + }) + }) + + describe('hide', () => { + it('should hide a popover', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + popoverEl.addEventListener('shown.bs.popover', () => { + popover.hide() + }) + + popoverEl.addEventListener('hidden.bs.popover', () => { + expect(document.querySelector('.popover')).toBeNull() + resolve() + }) + + popover.show() + }) + }) + }) + + describe('jQueryInterface', () => { + it('should create a popover', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + + jQueryMock.fn.popover = Popover.jQueryInterface + jQueryMock.elements = [popoverEl] + + jQueryMock.fn.popover.call(jQueryMock) + + expect(Popover.getInstance(popoverEl)).not.toBeNull() + }) + + it('should create a popover with a config object', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + + jQueryMock.fn.popover = Popover.jQueryInterface + jQueryMock.elements = [popoverEl] + + jQueryMock.fn.popover.call(jQueryMock, { + content: 'Popover content' + }) + + expect(Popover.getInstance(popoverEl)).not.toBeNull() + }) + + it('should not re create a popover', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + jQueryMock.fn.popover = Popover.jQueryInterface + jQueryMock.elements = [popoverEl] + + jQueryMock.fn.popover.call(jQueryMock) + + expect(Popover.getInstance(popoverEl)).toEqual(popover) + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const action = 'undefinedMethod' + + jQueryMock.fn.popover = Popover.jQueryInterface + jQueryMock.elements = [popoverEl] + + expect(() => { + jQueryMock.fn.popover.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should should call show method', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + jQueryMock.fn.popover = Popover.jQueryInterface + jQueryMock.elements = [popoverEl] + + const spy = spyOn(popover, 'show') + + jQueryMock.fn.popover.call(jQueryMock, 'show') + + expect(spy).toHaveBeenCalled() + }) + }) + + describe('getInstance', () => { + it('should return popover instance', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + const popover = new Popover(popoverEl) + + expect(Popover.getInstance(popoverEl)).toEqual(popover) + expect(Popover.getInstance(popoverEl)).toBeInstanceOf(Popover) + }) + + it('should return null when there is no popover instance', () => { + fixtureEl.innerHTML = 'BS twitter' + + const popoverEl = fixtureEl.querySelector('a') + + expect(Popover.getInstance(popoverEl)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return popover instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const popover = new Popover(div) + + expect(Popover.getOrCreateInstance(div)).toEqual(popover) + expect(Popover.getInstance(div)).toEqual(Popover.getOrCreateInstance(div, {})) + expect(Popover.getOrCreateInstance(div)).toBeInstanceOf(Popover) + }) + + it('should return new instance when there is no popover instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Popover.getInstance(div)).toBeNull() + expect(Popover.getOrCreateInstance(div)).toBeInstanceOf(Popover) + }) + + it('should return new instance when there is no popover instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Popover.getInstance(div)).toBeNull() + const popover = Popover.getOrCreateInstance(div, { + placement: 'top' + }) + expect(popover).toBeInstanceOf(Popover) + + expect(popover._config.placement).toEqual('top') + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const popover = new Popover(div, { + placement: 'top' + }) + expect(Popover.getInstance(div)).toEqual(popover) + + const popover2 = Popover.getOrCreateInstance(div, { + placement: 'bottom' + }) + expect(popover).toBeInstanceOf(Popover) + expect(popover2).toEqual(popover) + + expect(popover2._config.placement).toEqual('top') + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/scrollspy.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/scrollspy.spec.js new file mode 100644 index 0000000..c7951e6 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/scrollspy.spec.js @@ -0,0 +1,946 @@ +import ScrollSpy from '../../src/scrollspy' + +/** Test helpers */ +import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' +import EventHandler from '../../src/dom/event-handler' + +describe('ScrollSpy', () => { + let fixtureEl + + const getElementScrollSpy = element => element.scrollTo ? + spyOn(element, 'scrollTo').and.callThrough() : + spyOnProperty(element, 'scrollTop', 'set').and.callThrough() + + const scrollTo = (el, height) => { + el.scrollTop = height + } + + const onScrollStop = (callback, element, timeout = 30) => { + let handle = null + const onScroll = function () { + if (handle) { + window.clearTimeout(handle) + } + + handle = setTimeout(() => { + element.removeEventListener('scroll', onScroll) + callback() + }, timeout + 1) + } + + element.addEventListener('scroll', onScroll) + } + + const getDummyFixture = () => { + return [ + '', + '
', + '
div 1
', + '
' + ].join('') + } + + const testElementIsActiveAfterScroll = ({ elementSelector, targetSelector, contentEl, scrollSpy, cb }) => { + const element = fixtureEl.querySelector(elementSelector) + const target = fixtureEl.querySelector(targetSelector) + // add top padding to fix Chrome on Android failures + const paddingTop = 0 + const parentOffset = getComputedStyle(contentEl).getPropertyValue('position') === 'relative' ? 0 : contentEl.offsetTop + const scrollHeight = (target.offsetTop - parentOffset) + paddingTop + + contentEl.addEventListener('activate.bs.scrollspy', event => { + if (scrollSpy._activeTarget !== element) { + return + } + + expect(element).toHaveClass('active') + expect(scrollSpy._activeTarget).toEqual(element) + expect(event.relatedTarget).toEqual(element) + cb() + }) + + setTimeout(() => { // in case we scroll something before the test + scrollTo(contentEl, scrollHeight) + }, 100) + } + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(ScrollSpy.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(ScrollSpy.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(ScrollSpy.DATA_KEY).toEqual('bs.scrollspy') + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = getDummyFixture() + + const sSpyEl = fixtureEl.querySelector('.content') + const sSpyBySelector = new ScrollSpy('.content') + const sSpyByElement = new ScrollSpy(sSpyEl) + + expect(sSpyBySelector._element).toEqual(sSpyEl) + expect(sSpyByElement._element).toEqual(sSpyEl) + }) + + it('should null, if element is not scrollable', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
test
', + '
' + ].join('') + + const scrollSpy = new ScrollSpy(fixtureEl.querySelector('#content'), { + target: '#navigation' + }) + + expect(scrollSpy._observer.root).toBeNull() + expect(scrollSpy._rootElement).toBeNull() + }) + + it('should respect threshold option', () => { + fixtureEl.innerHTML = [ + '', + '
', + ' ', + '
' + ].join('') + + const scrollSpy = new ScrollSpy('#content', { + target: '#navigation', + threshold: [1] + }) + + expect(scrollSpy._observer.thresholds).toEqual([1]) + }) + + it('should respect threshold option markup', () => { + fixtureEl.innerHTML = [ + '', + '
', + ' ', + '
' + ].join('') + + const scrollSpy = new ScrollSpy('#content', { + target: '#navigation' + }) + + // See https://stackoverflow.com/a/45592926 + const expectToBeCloseToArray = (actual, expected) => { + expect(actual.length).toBe(expected.length) + for (const x of actual) { + const i = actual.indexOf(x) + expect(x).withContext(`[${i}]`).toBeCloseTo(expected[i]) + } + } + + expectToBeCloseToArray(scrollSpy._observer.thresholds, [0, 0.2, 1]) + }) + + it('should not take count to not visible sections', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
test
', + ' ', + ' ', + '
' + ].join('') + + const scrollSpy = new ScrollSpy(fixtureEl.querySelector('#content'), { + target: '#navigation' + }) + + expect(scrollSpy._observableSections.size).toBe(1) + expect(scrollSpy._targetLinks.size).toBe(1) + }) + + it('should not process element without target', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
test
', + '
test2
', + '
' + ].join('') + + const scrollSpy = new ScrollSpy(fixtureEl.querySelector('#content'), { + target: '#navigation' + }) + + expect(scrollSpy._targetLinks).toHaveSize(2) + }) + + it('should only switch "active" class on current target', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
', + '
', + '
Overview
', + '
Detail
', + '
', + '
' + ].join('') + + const scrollSpyEl = fixtureEl.querySelector('#scrollspy-example') + const rootEl = fixtureEl.querySelector('#root') + const scrollSpy = new ScrollSpy(scrollSpyEl, { + target: 'ss-target' + }) + + const spy = spyOn(scrollSpy, '_process').and.callThrough() + + onScrollStop(() => { + expect(rootEl).toHaveClass('active') + expect(spy).toHaveBeenCalled() + resolve() + }, scrollSpyEl) + + scrollTo(scrollSpyEl, 350) + }) + }) + + it('should not process data if `activeTarget` is same as given target', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '', + '
', + '
div 1
', + '
div 2
', + '
' + ].join('') + + const contentEl = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(contentEl, { + offset: 0, + target: '.navbar' + }) + + const triggerSpy = spyOn(EventHandler, 'trigger').and.callThrough() + + scrollSpy._activeTarget = fixtureEl.querySelector('#a-1') + testElementIsActiveAfterScroll({ + elementSelector: '#a-1', + targetSelector: '#div-1', + contentEl, + scrollSpy, + cb: reject + }) + + setTimeout(() => { + expect(triggerSpy).not.toHaveBeenCalled() + resolve() + }, 100) + }) + }) + + it('should only switch "active" class on current target specified w element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + ' ', + '
', + '
', + '
', + '
', + '
Overview
', + '
Detail
', + '
', + '
' + ].join('') + + const scrollSpyEl = fixtureEl.querySelector('#scrollspy-example') + const rootEl = fixtureEl.querySelector('#root') + const scrollSpy = new ScrollSpy(scrollSpyEl, { + target: fixtureEl.querySelector('#ss-target') + }) + + const spy = spyOn(scrollSpy, '_process').and.callThrough() + + onScrollStop(() => { + expect(rootEl).toHaveClass('active') + expect(scrollSpy._activeTarget).toEqual(fixtureEl.querySelector('[href="#detail"]')) + expect(spy).toHaveBeenCalled() + resolve() + }, scrollSpyEl) + + scrollTo(scrollSpyEl, 350) + }) + }) + + it('should add the active class to the correct element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
div 1
', + '
div 2
', + '
' + ].join('') + + const contentEl = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(contentEl, { + offset: 0, + target: '.navbar' + }) + + testElementIsActiveAfterScroll({ + elementSelector: '#a-1', + targetSelector: '#div-1', + contentEl, + scrollSpy, + cb() { + testElementIsActiveAfterScroll({ + elementSelector: '#a-2', + targetSelector: '#div-2', + contentEl, + scrollSpy, + cb: resolve + }) + } + }) + }) + }) + + it('should add to nav the active class to the correct element (nav markup)', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
div 1
', + '
div 2
', + '
' + ].join('') + + const contentEl = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(contentEl, { + offset: 0, + target: '.navbar' + }) + + testElementIsActiveAfterScroll({ + elementSelector: '#a-1', + targetSelector: '#div-1', + contentEl, + scrollSpy, + cb() { + testElementIsActiveAfterScroll({ + elementSelector: '#a-2', + targetSelector: '#div-2', + contentEl, + scrollSpy, + cb: resolve + }) + } + }) + }) + }) + + it('should add to list-group, the active class to the correct element (list-group markup)', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
div 1
', + '
div 2
', + '
' + ].join('') + + const contentEl = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(contentEl, { + offset: 0, + target: '.navbar' + }) + + testElementIsActiveAfterScroll({ + elementSelector: '#a-1', + targetSelector: '#div-1', + contentEl, + scrollSpy, + cb() { + testElementIsActiveAfterScroll({ + elementSelector: '#a-2', + targetSelector: '#div-2', + contentEl, + scrollSpy, + cb: resolve + }) + } + }) + }) + }) + + it('should clear selection if above the first section', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '', + '
', + '
', + '
text
', + '
text
', + '
text
', + '
', + '
' + ].join('') + + const contentEl = fixtureEl.querySelector('#content') + const scrollSpy = new ScrollSpy(contentEl, { + target: '#navigation', + offset: contentEl.offsetTop + }) + const spy = spyOn(scrollSpy, '_process').and.callThrough() + + onScrollStop(() => { + const active = () => fixtureEl.querySelector('.active') + expect(spy).toHaveBeenCalled() + + expect(fixtureEl.querySelectorAll('.active')).toHaveSize(1) + expect(active().getAttribute('id')).toEqual('two-link') + onScrollStop(() => { + expect(active()).toBeNull() + resolve() + }, contentEl) + scrollTo(contentEl, 0) + }, contentEl) + + scrollTo(contentEl, 200) + }) + }) + + it('should not clear selection if above the first section and first section is at the top', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '', + '
', + '
test
', + '
test
', + '
test
', + '
test
', + '
' + ].join('') + + const negativeHeight = 0 + const startOfSectionTwo = 101 + const contentEl = fixtureEl.querySelector('#content') + // eslint-disable-next-line no-unused-vars + const scrollSpy = new ScrollSpy(contentEl, { + target: '#navigation', + rootMargin: '0px 0px -50%' + }) + + onScrollStop(() => { + const activeId = () => fixtureEl.querySelector('.active').getAttribute('id') + + expect(fixtureEl.querySelectorAll('.active')).toHaveSize(1) + expect(activeId()).toEqual('two-link') + scrollTo(contentEl, negativeHeight) + + onScrollStop(() => { + expect(fixtureEl.querySelectorAll('.active')).toHaveSize(1) + expect(activeId()).toEqual('one-link') + resolve() + }, contentEl) + + scrollTo(contentEl, 0) + }, contentEl) + + scrollTo(contentEl, startOfSectionTwo) + }) + }) + + it('should correctly select navigation element on backward scrolling when each target section height is 100%', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
div 1
', + '
div 2
', + '
div 3
', + '
div 4
', + '
div 5
', + '
' + ].join('') + + const contentEl = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(contentEl, { + offset: 0, + target: '.navbar' + }) + + scrollTo(contentEl, 0) + testElementIsActiveAfterScroll({ + elementSelector: '#li-100-5', + targetSelector: '#div-100-5', + contentEl, + scrollSpy, + cb() { + scrollTo(contentEl, 0) + testElementIsActiveAfterScroll({ + elementSelector: '#li-100-2', + targetSelector: '#div-100-2', + contentEl, + scrollSpy, + cb() { + scrollTo(contentEl, 0) + testElementIsActiveAfterScroll({ + elementSelector: '#li-100-3', + targetSelector: '#div-100-3', + contentEl, + scrollSpy, + cb() { + scrollTo(contentEl, 0) + testElementIsActiveAfterScroll({ + elementSelector: '#li-100-2', + targetSelector: '#div-100-2', + contentEl, + scrollSpy, + cb() { + scrollTo(contentEl, 0) + testElementIsActiveAfterScroll({ + elementSelector: '#li-100-1', + targetSelector: '#div-100-1', + contentEl, + scrollSpy, + cb: resolve + }) + } + }) + } + }) + } + }) + } + }) + }) + }) + }) + + describe('refresh', () => { + it('should disconnect existing observer', () => { + fixtureEl.innerHTML = getDummyFixture() + + const el = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(el) + + const spy = spyOn(scrollSpy._observer, 'disconnect') + + scrollSpy.refresh() + + expect(spy).toHaveBeenCalled() + }) + }) + + describe('dispose', () => { + it('should dispose a scrollspy', () => { + fixtureEl.innerHTML = getDummyFixture() + + const el = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(el) + + expect(ScrollSpy.getInstance(el)).not.toBeNull() + + scrollSpy.dispose() + + expect(ScrollSpy.getInstance(el)).toBeNull() + }) + }) + + describe('jQueryInterface', () => { + it('should create a scrollspy', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.scrollspy.call(jQueryMock, { target: '#navBar' }) + + expect(ScrollSpy.getInstance(div)).not.toBeNull() + }) + + it('should create a scrollspy with given config', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.scrollspy.call(jQueryMock, { rootMargin: '100px' }) + const spy = spyOn(ScrollSpy.prototype, 'constructor') + expect(spy).not.toHaveBeenCalledWith(div, { rootMargin: '100px' }) + + const scrollspy = ScrollSpy.getInstance(div) + expect(scrollspy).not.toBeNull() + expect(scrollspy._config.rootMargin).toEqual('100px') + }) + + it('should not re create a scrollspy', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(div) + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.scrollspy.call(jQueryMock) + + expect(ScrollSpy.getInstance(div)).toEqual(scrollSpy) + }) + + it('should call a scrollspy method', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(div) + + const spy = spyOn(scrollSpy, 'refresh') + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.scrollspy.call(jQueryMock, 'refresh') + + expect(ScrollSpy.getInstance(div)).toEqual(scrollSpy) + expect(spy).toHaveBeenCalled() + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const action = 'undefinedMethod' + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.scrollspy.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should throw error on protected method', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const action = '_getConfig' + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.scrollspy.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + + it('should throw error if method "constructor" is being called', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const action = 'constructor' + + jQueryMock.fn.scrollspy = ScrollSpy.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.scrollspy.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) + + describe('getInstance', () => { + it('should return scrollspy instance', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const scrollSpy = new ScrollSpy(div, { target: fixtureEl.querySelector('#navBar') }) + + expect(ScrollSpy.getInstance(div)).toEqual(scrollSpy) + expect(ScrollSpy.getInstance(div)).toBeInstanceOf(ScrollSpy) + }) + + it('should return null if there is no instance', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + expect(ScrollSpy.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return scrollspy instance', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const scrollspy = new ScrollSpy(div) + + expect(ScrollSpy.getOrCreateInstance(div)).toEqual(scrollspy) + expect(ScrollSpy.getInstance(div)).toEqual(ScrollSpy.getOrCreateInstance(div, {})) + expect(ScrollSpy.getOrCreateInstance(div)).toBeInstanceOf(ScrollSpy) + }) + + it('should return new instance when there is no scrollspy instance', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + + expect(ScrollSpy.getInstance(div)).toBeNull() + expect(ScrollSpy.getOrCreateInstance(div)).toBeInstanceOf(ScrollSpy) + }) + + it('should return new instance when there is no scrollspy instance with given configuration', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + + expect(ScrollSpy.getInstance(div)).toBeNull() + const scrollspy = ScrollSpy.getOrCreateInstance(div, { + offset: 1 + }) + expect(scrollspy).toBeInstanceOf(ScrollSpy) + + expect(scrollspy._config.offset).toEqual(1) + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const scrollspy = new ScrollSpy(div, { + offset: 1 + }) + expect(ScrollSpy.getInstance(div)).toEqual(scrollspy) + + const scrollspy2 = ScrollSpy.getOrCreateInstance(div, { + offset: 2 + }) + expect(scrollspy).toBeInstanceOf(ScrollSpy) + expect(scrollspy2).toEqual(scrollspy) + + expect(scrollspy2._config.offset).toEqual(1) + }) + }) + + describe('event handler', () => { + it('should create scrollspy on window load event', () => { + fixtureEl.innerHTML = [ + '' + + '
' + ].join('') + + const scrollSpyEl = fixtureEl.querySelector('#wrapper') + + window.dispatchEvent(createEvent('load')) + + expect(ScrollSpy.getInstance(scrollSpyEl)).not.toBeNull() + }) + }) + + describe('SmoothScroll', () => { + it('should not enable smoothScroll', () => { + fixtureEl.innerHTML = getDummyFixture() + const offSpy = spyOn(EventHandler, 'off').and.callThrough() + const onSpy = spyOn(EventHandler, 'on').and.callThrough() + + const div = fixtureEl.querySelector('.content') + const target = fixtureEl.querySelector('#navBar') + // eslint-disable-next-line no-new + new ScrollSpy(div, { + offset: 1 + }) + + expect(offSpy).not.toHaveBeenCalledWith(target, 'click.bs.scrollspy') + expect(onSpy).not.toHaveBeenCalledWith(target, 'click.bs.scrollspy') + }) + + it('should enable smoothScroll', () => { + fixtureEl.innerHTML = getDummyFixture() + const offSpy = spyOn(EventHandler, 'off').and.callThrough() + const onSpy = spyOn(EventHandler, 'on').and.callThrough() + + const div = fixtureEl.querySelector('.content') + const target = fixtureEl.querySelector('#navBar') + // eslint-disable-next-line no-new + new ScrollSpy(div, { + offset: 1, + smoothScroll: true + }) + + expect(offSpy).toHaveBeenCalledWith(target, 'click.bs.scrollspy') + expect(onSpy).toHaveBeenCalledWith(target, 'click.bs.scrollspy', '[href]', jasmine.any(Function)) + }) + + it('should not smoothScroll to element if it not handles a scrollspy section', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
div 1
', + '
' + ].join('') + + const div = fixtureEl.querySelector('.content') + // eslint-disable-next-line no-new + new ScrollSpy(div, { + offset: 1, + smoothScroll: true + }) + + const clickSpy = getElementScrollSpy(div) + + fixtureEl.querySelector('#anchor-2').click() + expect(clickSpy).not.toHaveBeenCalled() + }) + + it('should call `scrollTop` if element doesn\'t not support `scrollTo`', () => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const link = fixtureEl.querySelector('[href="#div-jsm-1"]') + delete div.scrollTo + const clickSpy = getElementScrollSpy(div) + // eslint-disable-next-line no-new + new ScrollSpy(div, { + offset: 1, + smoothScroll: true + }) + + link.click() + expect(clickSpy).toHaveBeenCalled() + }) + + it('should smoothScroll to the proper observable element on anchor click', done => { + fixtureEl.innerHTML = getDummyFixture() + + const div = fixtureEl.querySelector('.content') + const link = fixtureEl.querySelector('[href="#div-jsm-1"]') + const observable = fixtureEl.querySelector('#div-jsm-1') + const clickSpy = getElementScrollSpy(div) + // eslint-disable-next-line no-new + new ScrollSpy(div, { + offset: 1, + smoothScroll: true + }) + + setTimeout(() => { + if (div.scrollTo) { + expect(clickSpy).toHaveBeenCalledWith({ top: observable.offsetTop - div.offsetTop, behavior: 'smooth' }) + } else { + expect(clickSpy).toHaveBeenCalledWith(observable.offsetTop - div.offsetTop) + } + + done() + }, 100) + link.click() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/tab.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/tab.spec.js new file mode 100644 index 0000000..e0c7d86 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/tab.spec.js @@ -0,0 +1,1101 @@ +import Tab from '../../src/tab' +import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Tab', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Tab.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const tabEl = fixtureEl.querySelector('[href="#home"]') + const tabBySelector = new Tab('[href="#home"]') + const tabByElement = new Tab(tabEl) + + expect(tabBySelector._element).toEqual(tabEl) + expect(tabByElement._element).toEqual(tabEl) + }) + + it('Do not Throw exception if not parent', () => { + fixtureEl.innerHTML = [ + fixtureEl.innerHTML = '
' + ].join('') + const navEl = fixtureEl.querySelector('.nav-link') + + expect(() => { + new Tab(navEl) // eslint-disable-line no-new + }).not.toThrowError(TypeError) + }) + }) + + describe('show', () => { + it('should activate element by tab id (using buttons, the preferred semantic way)', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const profileTriggerEl = fixtureEl.querySelector('#triggerProfile') + const tab = new Tab(profileTriggerEl) + + profileTriggerEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelector('#profile')).toHaveClass('active') + expect(profileTriggerEl.getAttribute('aria-selected')).toEqual('true') + resolve() + }) + + tab.show() + }) + }) + + it('should activate element by tab id (using links for tabs - not ideal, but still supported)', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const profileTriggerEl = fixtureEl.querySelector('#triggerProfile') + const tab = new Tab(profileTriggerEl) + + profileTriggerEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelector('#profile')).toHaveClass('active') + expect(profileTriggerEl.getAttribute('aria-selected')).toEqual('true') + resolve() + }) + + tab.show() + }) + }) + + it('should activate element by tab id in ordered list', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
    ', + '
  1. ', + '
  2. ', + '
' + ].join('') + + const profileTriggerEl = fixtureEl.querySelector('#triggerProfile') + const tab = new Tab(profileTriggerEl) + + profileTriggerEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelector('#profile')).toHaveClass('active') + resolve() + }) + + tab.show() + }) + }) + + it('should activate element by tab id in nav list', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const profileTriggerEl = fixtureEl.querySelector('#triggerProfile') + const tab = new Tab(profileTriggerEl) + + profileTriggerEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelector('#profile')).toHaveClass('active') + resolve() + }) + + tab.show() + }) + }) + + it('should activate element by tab id in list group', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const profileTriggerEl = fixtureEl.querySelector('#triggerProfile') + const tab = new Tab(profileTriggerEl) + + profileTriggerEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelector('#profile')).toHaveClass('active') + resolve() + }) + + tab.show() + }) + }) + + it('should not fire shown when show is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const navEl = fixtureEl.querySelector('.nav > div') + const tab = new Tab(navEl) + const expectDone = () => { + setTimeout(() => { + expect().nothing() + resolve() + }, 30) + } + + navEl.addEventListener('show.bs.tab', ev => { + ev.preventDefault() + expectDone() + }) + + navEl.addEventListener('shown.bs.tab', () => { + reject(new Error('should not trigger shown event')) + }) + + tab.show() + }) + }) + + it('should not fire shown when tab is already active', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const triggerActive = fixtureEl.querySelector('button.active') + const tab = new Tab(triggerActive) + + triggerActive.addEventListener('shown.bs.tab', () => { + reject(new Error('should not trigger shown event')) + }) + + tab.show() + setTimeout(() => { + expect().nothing() + resolve() + }, 30) + }) + }) + + it('show and shown events should reference correct relatedTarget', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const secondTabTrigger = fixtureEl.querySelector('#triggerProfile') + const secondTab = new Tab(secondTabTrigger) + + secondTabTrigger.addEventListener('show.bs.tab', ev => { + expect(ev.relatedTarget.getAttribute('data-bs-target')).toEqual('#home') + }) + + secondTabTrigger.addEventListener('shown.bs.tab', ev => { + expect(ev.relatedTarget.getAttribute('data-bs-target')).toEqual('#home') + expect(secondTabTrigger.getAttribute('aria-selected')).toEqual('true') + expect(fixtureEl.querySelector('button:not(.active)').getAttribute('aria-selected')).toEqual('false') + resolve() + }) + + secondTab.show() + }) + }) + + it('should fire hide and hidden events', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerList = fixtureEl.querySelectorAll('button') + const firstTab = new Tab(triggerList[0]) + const secondTab = new Tab(triggerList[1]) + + let hideCalled = false + triggerList[0].addEventListener('shown.bs.tab', () => { + secondTab.show() + }) + + triggerList[0].addEventListener('hide.bs.tab', ev => { + hideCalled = true + expect(ev.relatedTarget.getAttribute('data-bs-target')).toEqual('#profile') + }) + + triggerList[0].addEventListener('hidden.bs.tab', ev => { + expect(hideCalled).toBeTrue() + expect(ev.relatedTarget.getAttribute('data-bs-target')).toEqual('#profile') + resolve() + }) + + firstTab.show() + }) + }) + + it('should not fire hidden when hide is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const triggerList = fixtureEl.querySelectorAll('button') + const firstTab = new Tab(triggerList[0]) + const secondTab = new Tab(triggerList[1]) + const expectDone = () => { + setTimeout(() => { + expect().nothing() + resolve() + }, 30) + } + + triggerList[0].addEventListener('shown.bs.tab', () => { + secondTab.show() + }) + + triggerList[0].addEventListener('hide.bs.tab', ev => { + ev.preventDefault() + expectDone() + }) + + triggerList[0].addEventListener('hidden.bs.tab', () => { + reject(new Error('should not trigger hidden')) + }) + + firstTab.show() + }) + }) + + it('should handle removed tabs', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
test 1
', + '
test 2
', + '
test 3
', + '
' + ].join('') + + const secondNavEl = fixtureEl.querySelector('#secondNav') + const btnCloseEl = fixtureEl.querySelector('#btnClose') + const secondNavTab = new Tab(secondNavEl) + + secondNavEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelectorAll('.nav-tab')).toHaveSize(2) + resolve() + }) + + btnCloseEl.addEventListener('click', () => { + const linkEl = btnCloseEl.parentNode + const liEl = linkEl.parentNode + const tabId = linkEl.getAttribute('href') + const tabIdEl = fixtureEl.querySelector(tabId) + + liEl.remove() + tabIdEl.remove() + secondNavTab.show() + }) + + btnCloseEl.click() + }) + }) + + it('should not focus on opened tab', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const firstTab = fixtureEl.querySelector('#home') + firstTab.focus() + + const profileTriggerEl = fixtureEl.querySelector('#triggerProfile') + const tab = new Tab(profileTriggerEl) + + profileTriggerEl.addEventListener('shown.bs.tab', () => { + expect(document.activeElement).toBe(firstTab) + expect(document.activeElement).not.toBe(profileTriggerEl) + resolve() + }) + + tab.show() + }) + }) + }) + + describe('dispose', () => { + it('should dispose a tab', () => { + fixtureEl.innerHTML = '' + + const el = fixtureEl.querySelector('.nav > div') + const tab = new Tab(fixtureEl.querySelector('.nav > div')) + + expect(Tab.getInstance(el)).not.toBeNull() + + tab.dispose() + + expect(Tab.getInstance(el)).toBeNull() + }) + }) + + describe('_activate', () => { + it('should not be called if element argument is null', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl = fixtureEl.querySelector('.nav-link') + const tab = new Tab(tabEl) + const spy = jasmine.createSpy('spy') + + const spyQueue = spyOn(tab, '_queueCallback') + tab._activate(null, spy) + expect(spyQueue).not.toHaveBeenCalled() + expect(spy).not.toHaveBeenCalled() + }) + }) + + describe('_setInitialAttributes', () => { + it('should put aria attributes', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
' + ].join('') + + const tabEl = fixtureEl.querySelector('.nav-link') + const parent = fixtureEl.querySelector('.nav') + const children = fixtureEl.querySelectorAll('.nav-link') + const tabPanel = fixtureEl.querySelector('#panel') + const tabPanel2 = fixtureEl.querySelector('#panel2') + + expect(parent.getAttribute('role')).toEqual(null) + expect(tabEl.getAttribute('role')).toEqual(null) + expect(tabPanel.getAttribute('role')).toEqual(null) + const tab = new Tab(tabEl) + tab._setInitialAttributes(parent, children) + + expect(parent.getAttribute('role')).toEqual('tablist') + expect(tabEl.getAttribute('role')).toEqual('tab') + + expect(tabPanel.getAttribute('role')).toEqual('tabpanel') + expect(tabPanel2.getAttribute('role')).toEqual('tabpanel') + expect(tabPanel.hasAttribute('tabindex')).toBeFalse() + expect(tabPanel.hasAttribute('tabindex2')).toBeFalse() + + expect(tabPanel.getAttribute('aria-labelledby')).toEqual('#foo') + expect(tabPanel2.hasAttribute('aria-labelledby')).toBeFalse() + }) + }) + + describe('_keydown', () => { + it('if event is not one of left/right/up/down arrow, ignore it', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl = fixtureEl.querySelector('.nav-link') + const tab = new Tab(tabEl) + + const keydown = createEvent('keydown') + keydown.key = 'Enter' + const spyStop = spyOn(Event.prototype, 'stopPropagation').and.callThrough() + const spyPrevent = spyOn(Event.prototype, 'preventDefault').and.callThrough() + const spyKeydown = spyOn(tab, '_keydown') + const spyGet = spyOn(tab, '_getChildren') + + tabEl.dispatchEvent(keydown) + expect(spyKeydown).toHaveBeenCalled() + expect(spyGet).not.toHaveBeenCalled() + + expect(spyStop).not.toHaveBeenCalled() + expect(spyPrevent).not.toHaveBeenCalled() + }) + + it('if keydown event is right/down arrow, handle it', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl1 = fixtureEl.querySelector('#tab1') + const tabEl2 = fixtureEl.querySelector('#tab2') + const tabEl3 = fixtureEl.querySelector('#tab3') + const tab1 = new Tab(tabEl1) + const tab2 = new Tab(tabEl2) + const tab3 = new Tab(tabEl3) + const spyShow1 = spyOn(tab1, 'show').and.callThrough() + const spyShow2 = spyOn(tab2, 'show').and.callThrough() + const spyShow3 = spyOn(tab3, 'show').and.callThrough() + const spyFocus1 = spyOn(tabEl1, 'focus').and.callThrough() + const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough() + const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough() + + const spyStop = spyOn(Event.prototype, 'stopPropagation').and.callThrough() + const spyPrevent = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + let keydown = createEvent('keydown') + keydown.key = 'ArrowRight' + + tabEl1.dispatchEvent(keydown) + expect(spyShow2).toHaveBeenCalled() + expect(spyFocus2).toHaveBeenCalled() + + keydown = createEvent('keydown') + keydown.key = 'ArrowDown' + + tabEl2.dispatchEvent(keydown) + expect(spyShow3).toHaveBeenCalled() + expect(spyFocus3).toHaveBeenCalled() + + tabEl3.dispatchEvent(keydown) + expect(spyShow1).toHaveBeenCalled() + expect(spyFocus1).toHaveBeenCalled() + + expect(spyStop).toHaveBeenCalledTimes(3) + expect(spyPrevent).toHaveBeenCalledTimes(3) + }) + + it('if keydown event is left arrow, handle it', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl1 = fixtureEl.querySelector('#tab1') + const tabEl2 = fixtureEl.querySelector('#tab2') + const tab1 = new Tab(tabEl1) + const tab2 = new Tab(tabEl2) + const spyShow1 = spyOn(tab1, 'show').and.callThrough() + const spyShow2 = spyOn(tab2, 'show').and.callThrough() + const spyFocus1 = spyOn(tabEl1, 'focus').and.callThrough() + const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough() + + const spyStop = spyOn(Event.prototype, 'stopPropagation').and.callThrough() + const spyPrevent = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + let keydown = createEvent('keydown') + keydown.key = 'ArrowLeft' + + tabEl2.dispatchEvent(keydown) + expect(spyShow1).toHaveBeenCalled() + expect(spyFocus1).toHaveBeenCalled() + + keydown = createEvent('keydown') + keydown.key = 'ArrowUp' + + tabEl1.dispatchEvent(keydown) + expect(spyShow2).toHaveBeenCalled() + expect(spyFocus2).toHaveBeenCalled() + + expect(spyStop).toHaveBeenCalledTimes(2) + expect(spyPrevent).toHaveBeenCalledTimes(2) + }) + + it('if keydown event is right arrow and next element is disabled', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl = fixtureEl.querySelector('#tab1') + const tabEl2 = fixtureEl.querySelector('#tab2') + const tabEl3 = fixtureEl.querySelector('#tab3') + const tabEl4 = fixtureEl.querySelector('#tab4') + const tab = new Tab(tabEl) + const tab2 = new Tab(tabEl2) + const tab3 = new Tab(tabEl3) + const tab4 = new Tab(tabEl4) + const spy1 = spyOn(tab, 'show').and.callThrough() + const spy2 = spyOn(tab2, 'show').and.callThrough() + const spy3 = spyOn(tab3, 'show').and.callThrough() + const spy4 = spyOn(tab4, 'show').and.callThrough() + const spyFocus1 = spyOn(tabEl, 'focus').and.callThrough() + const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough() + const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough() + const spyFocus4 = spyOn(tabEl4, 'focus').and.callThrough() + + const keydown = createEvent('keydown') + keydown.key = 'ArrowRight' + + tabEl.dispatchEvent(keydown) + expect(spy1).not.toHaveBeenCalled() + expect(spy2).not.toHaveBeenCalled() + expect(spy3).not.toHaveBeenCalled() + expect(spy4).toHaveBeenCalledTimes(1) + expect(spyFocus1).not.toHaveBeenCalled() + expect(spyFocus2).not.toHaveBeenCalled() + expect(spyFocus3).not.toHaveBeenCalled() + expect(spyFocus4).toHaveBeenCalledTimes(1) + }) + + it('if keydown event is left arrow and next element is disabled', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl = fixtureEl.querySelector('#tab1') + const tabEl2 = fixtureEl.querySelector('#tab2') + const tabEl3 = fixtureEl.querySelector('#tab3') + const tabEl4 = fixtureEl.querySelector('#tab4') + const tab = new Tab(tabEl) + const tab2 = new Tab(tabEl2) + const tab3 = new Tab(tabEl3) + const tab4 = new Tab(tabEl4) + const spy1 = spyOn(tab, 'show').and.callThrough() + const spy2 = spyOn(tab2, 'show').and.callThrough() + const spy3 = spyOn(tab3, 'show').and.callThrough() + const spy4 = spyOn(tab4, 'show').and.callThrough() + const spyFocus1 = spyOn(tabEl, 'focus').and.callThrough() + const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough() + const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough() + const spyFocus4 = spyOn(tabEl4, 'focus').and.callThrough() + + const keydown = createEvent('keydown') + keydown.key = 'ArrowLeft' + + tabEl4.dispatchEvent(keydown) + expect(spy4).not.toHaveBeenCalled() + expect(spy3).not.toHaveBeenCalled() + expect(spy2).not.toHaveBeenCalled() + expect(spy1).toHaveBeenCalledTimes(1) + expect(spyFocus4).not.toHaveBeenCalled() + expect(spyFocus3).not.toHaveBeenCalled() + expect(spyFocus2).not.toHaveBeenCalled() + expect(spyFocus1).toHaveBeenCalledTimes(1) + }) + }) + + describe('jQueryInterface', () => { + it('should create a tab', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('.nav > div') + + jQueryMock.fn.tab = Tab.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.tab.call(jQueryMock) + + expect(Tab.getInstance(div)).not.toBeNull() + }) + + it('should not re create a tab', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('.nav > div') + const tab = new Tab(div) + + jQueryMock.fn.tab = Tab.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.tab.call(jQueryMock) + + expect(Tab.getInstance(div)).toEqual(tab) + }) + + it('should call a tab method', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('.nav > div') + const tab = new Tab(div) + + const spy = spyOn(tab, 'show') + + jQueryMock.fn.tab = Tab.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.tab.call(jQueryMock, 'show') + + expect(Tab.getInstance(div)).toEqual(tab) + expect(spy).toHaveBeenCalled() + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('.nav > div') + const action = 'undefinedMethod' + + jQueryMock.fn.tab = Tab.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.tab.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) + + describe('getInstance', () => { + it('should return null if there is no instance', () => { + expect(Tab.getInstance(fixtureEl)).toBeNull() + }) + + it('should return this instance', () => { + fixtureEl.innerHTML = '' + + const divEl = fixtureEl.querySelector('.nav > div') + const tab = new Tab(divEl) + + expect(Tab.getInstance(divEl)).toEqual(tab) + expect(Tab.getInstance(divEl)).toBeInstanceOf(Tab) + }) + }) + + describe('getOrCreateInstance', () => { + it('should return tab instance', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + const tab = new Tab(div) + + expect(Tab.getOrCreateInstance(div)).toEqual(tab) + expect(Tab.getInstance(div)).toEqual(Tab.getOrCreateInstance(div, {})) + expect(Tab.getOrCreateInstance(div)).toBeInstanceOf(Tab) + }) + + it('should return new instance when there is no tab instance', () => { + fixtureEl.innerHTML = '' + + const div = fixtureEl.querySelector('div') + + expect(Tab.getInstance(div)).toBeNull() + expect(Tab.getOrCreateInstance(div)).toBeInstanceOf(Tab) + }) + }) + + describe('data-api', () => { + it('should create dynamically a tab', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const secondTabTrigger = fixtureEl.querySelector('#triggerProfile') + + secondTabTrigger.addEventListener('shown.bs.tab', () => { + expect(secondTabTrigger).toHaveClass('active') + expect(fixtureEl.querySelector('#profile')).toHaveClass('active') + resolve() + }) + + secondTabTrigger.click() + }) + }) + + it('selected tab should deactivate previous selected link in dropdown', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const firstLiLinkEl = fixtureEl.querySelector('li:first-child a') + + firstLiLinkEl.click() + expect(firstLiLinkEl).toHaveClass('active') + expect(fixtureEl.querySelector('li:last-child a')).not.toHaveClass('active') + expect(fixtureEl.querySelector('li:last-child .dropdown-menu a:first-child')).not.toHaveClass('active') + }) + + it('selecting a dropdown tab does not activate another', () => { + const nav1 = [ + '' + ].join('') + const nav2 = [ + '' + ].join('') + + fixtureEl.innerHTML = nav1 + nav2 + + const firstDropItem = fixtureEl.querySelector('#nav1 .dropdown-item') + + firstDropItem.click() + expect(firstDropItem).toHaveClass('active') + expect(fixtureEl.querySelector('#nav1 .dropdown-toggle')).toHaveClass('active') + expect(fixtureEl.querySelector('#nav2 .dropdown-toggle')).not.toHaveClass('active') + expect(fixtureEl.querySelector('#nav2 .dropdown-item')).not.toHaveClass('active') + }) + + it('should support li > .dropdown-item', () => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const dropItems = fixtureEl.querySelectorAll('.dropdown-item') + + dropItems[1].click() + expect(dropItems[0]).not.toHaveClass('active') + expect(dropItems[1]).toHaveClass('active') + expect(fixtureEl.querySelector('.nav-link')).not.toHaveClass('active') + }) + + it('should handle nested tabs', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + ' ', + '
', + '
Nested Tab1 Content
', + '
Nested Tab2 Content
', + '
', + '
', + '
Tab2 Content
', + '
Tab3 Content
', + '
' + ].join('') + + const tab1El = fixtureEl.querySelector('#tab1') + const tabNested2El = fixtureEl.querySelector('#tabNested2') + const xTab1El = fixtureEl.querySelector('#x-tab1') + + tabNested2El.addEventListener('shown.bs.tab', () => { + expect(xTab1El).toHaveClass('active') + resolve() + }) + + tab1El.addEventListener('shown.bs.tab', () => { + expect(xTab1El).toHaveClass('active') + tabNested2El.click() + }) + + tab1El.click() + }) + }) + + it('should not remove fade class if no active pane is present', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const triggerTabProfileEl = fixtureEl.querySelector('#tab-profile') + const triggerTabHomeEl = fixtureEl.querySelector('#tab-home') + const tabProfileEl = fixtureEl.querySelector('#profile') + const tabHomeEl = fixtureEl.querySelector('#home') + + triggerTabHomeEl.addEventListener('shown.bs.tab', () => { + setTimeout(() => { + expect(tabProfileEl).toHaveClass('fade') + expect(tabProfileEl).not.toHaveClass('show') + + expect(tabHomeEl).toHaveClass('fade') + expect(tabHomeEl).toHaveClass('show') + + resolve() + }, 10) + }) + + triggerTabProfileEl.addEventListener('shown.bs.tab', () => { + setTimeout(() => { + expect(tabProfileEl).toHaveClass('fade') + expect(tabProfileEl).toHaveClass('show') + triggerTabHomeEl.click() + }, 10) + }) + + triggerTabProfileEl.click() + }) + }) + + it('should add `show` class to tab panes if there is no `.fade` class', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
test 1
', + '
test 2
', + '
' + ].join('') + + const secondNavEl = fixtureEl.querySelector('#secondNav') + + secondNavEl.addEventListener('shown.bs.tab', () => { + expect(fixtureEl.querySelectorAll('.tab-content .show')).toHaveSize(1) + resolve() + }) + + secondNavEl.click() + }) + }) + + it('should add show class to tab panes if there is a `.fade` class', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
test 1
', + '
test 2
', + '
' + ].join('') + + const secondNavEl = fixtureEl.querySelector('#secondNav') + + secondNavEl.addEventListener('shown.bs.tab', () => { + setTimeout(() => { + expect(fixtureEl.querySelectorAll('.show')).toHaveSize(1) + resolve() + }, 10) + }) + + secondNavEl.click() + }) + }) + + it('should prevent default when the trigger is or ', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '' + ].join('') + + const tabEl = fixtureEl.querySelector('[href="#test2"]') + const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + tabEl.addEventListener('shown.bs.tab', () => { + expect(tabEl).toHaveClass('active') + expect(spy).toHaveBeenCalled() + resolve() + }) + + tabEl.click() + }) + }) + + it('should not fire shown when tab has disabled attribute', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const triggerDisabled = fixtureEl.querySelector('button[disabled]') + triggerDisabled.addEventListener('shown.bs.tab', () => { + reject(new Error('should not trigger shown event')) + }) + + triggerDisabled.click() + setTimeout(() => { + expect().nothing() + resolve() + }, 30) + }) + }) + + it('should not fire shown when tab has disabled class', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + '
', + '
' + ].join('') + + const triggerDisabled = fixtureEl.querySelector('a.disabled') + + triggerDisabled.addEventListener('shown.bs.tab', () => { + reject(new Error('should not trigger shown event')) + }) + + triggerDisabled.click() + setTimeout(() => { + expect().nothing() + resolve() + }, 30) + }) + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/toast.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/toast.spec.js new file mode 100644 index 0000000..42d2515 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/toast.spec.js @@ -0,0 +1,670 @@ +import Toast from '../../src/toast' +import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Toast', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Toast.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Toast.DATA_KEY).toEqual('bs.toast') + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = '
' + + const toastEl = fixtureEl.querySelector('.toast') + const toastBySelector = new Toast('.toast') + const toastByElement = new Toast(toastEl) + + expect(toastBySelector._element).toEqual(toastEl) + expect(toastByElement._element).toEqual(toastEl) + }) + + it('should allow to config in js', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('div') + const toast = new Toast(toastEl, { + delay: 1 + }) + + toastEl.addEventListener('shown.bs.toast', () => { + expect(toastEl).toHaveClass('show') + resolve() + }) + + toast.show() + }) + }) + + it('should close toast when close element with data-bs-dismiss attribute is set', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('div') + const toast = new Toast(toastEl) + + toastEl.addEventListener('shown.bs.toast', () => { + expect(toastEl).toHaveClass('show') + + const button = toastEl.querySelector('.btn-close') + + button.click() + }) + + toastEl.addEventListener('hidden.bs.toast', () => { + expect(toastEl).not.toHaveClass('show') + resolve() + }) + + toast.show() + }) + }) + }) + + describe('Default', () => { + it('should expose default setting to allow to override them', () => { + const defaultDelay = 1000 + + Toast.Default.delay = defaultDelay + + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('div') + const toast = new Toast(toastEl) + + expect(toast._config.delay).toEqual(defaultDelay) + }) + }) + + describe('DefaultType', () => { + it('should expose default setting types for read', () => { + expect(Toast.DefaultType).toEqual(jasmine.any(Object)) + }) + }) + + describe('show', () => { + it('should auto hide', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + toastEl.addEventListener('hidden.bs.toast', () => { + expect(toastEl).not.toHaveClass('show') + resolve() + }) + + toast.show() + }) + }) + + it('should not add fade class', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + toastEl.addEventListener('shown.bs.toast', () => { + expect(toastEl).not.toHaveClass('fade') + resolve() + }) + + toast.show() + }) + }) + + it('should not trigger shown if show is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + const assertDone = () => { + setTimeout(() => { + expect(toastEl).not.toHaveClass('show') + resolve() + }, 20) + } + + toastEl.addEventListener('show.bs.toast', event => { + event.preventDefault() + assertDone() + }) + + toastEl.addEventListener('shown.bs.toast', () => { + reject(new Error('shown event should not be triggered if show is prevented')) + }) + + toast.show() + }) + }) + + it('should clear timeout if toast is shown again before it is hidden', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + setTimeout(() => { + toast._config.autohide = false + toastEl.addEventListener('shown.bs.toast', () => { + expect(spy).toHaveBeenCalled() + expect(toast._timeout).toBeNull() + resolve() + }) + toast.show() + }, toast._config.delay / 2) + + const spy = spyOn(toast, '_clearTimeout').and.callThrough() + + toast.show() + }) + }) + + it('should clear timeout if toast is interacted with mouse', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + const spy = spyOn(toast, '_clearTimeout').and.callThrough() + + setTimeout(() => { + spy.calls.reset() + + toastEl.addEventListener('mouseover', () => { + expect(toast._clearTimeout).toHaveBeenCalledTimes(1) + expect(toast._timeout).toBeNull() + resolve() + }) + + const mouseOverEvent = createEvent('mouseover') + toastEl.dispatchEvent(mouseOverEvent) + }, toast._config.delay / 2) + + toast.show() + }) + }) + + it('should clear timeout if toast is interacted with keyboard', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + ' a simple toast', + ' ', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + const spy = spyOn(toast, '_clearTimeout').and.callThrough() + + setTimeout(() => { + spy.calls.reset() + + toastEl.addEventListener('focusin', () => { + expect(toast._clearTimeout).toHaveBeenCalledTimes(1) + expect(toast._timeout).toBeNull() + resolve() + }) + + const insideFocusable = toastEl.querySelector('button') + insideFocusable.focus() + }, toast._config.delay / 2) + + toast.show() + }) + }) + + it('should still auto hide after being interacted with mouse and keyboard', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + ' a simple toast', + ' ', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + setTimeout(() => { + toastEl.addEventListener('mouseover', () => { + const insideFocusable = toastEl.querySelector('button') + insideFocusable.focus() + }) + + toastEl.addEventListener('focusin', () => { + const mouseOutEvent = createEvent('mouseout') + toastEl.dispatchEvent(mouseOutEvent) + }) + + toastEl.addEventListener('mouseout', () => { + const outsideFocusable = document.getElementById('outside-focusable') + outsideFocusable.focus() + }) + + toastEl.addEventListener('focusout', () => { + expect(toast._timeout).not.toBeNull() + resolve() + }) + + const mouseOverEvent = createEvent('mouseover') + toastEl.dispatchEvent(mouseOverEvent) + }, toast._config.delay / 2) + + toast.show() + }) + }) + + it('should not auto hide if focus leaves but mouse pointer remains inside', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + ' a simple toast', + ' ', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + setTimeout(() => { + toastEl.addEventListener('mouseover', () => { + const insideFocusable = toastEl.querySelector('button') + insideFocusable.focus() + }) + + toastEl.addEventListener('focusin', () => { + const outsideFocusable = document.getElementById('outside-focusable') + outsideFocusable.focus() + }) + + toastEl.addEventListener('focusout', () => { + expect(toast._timeout).toBeNull() + resolve() + }) + + const mouseOverEvent = createEvent('mouseover') + toastEl.dispatchEvent(mouseOverEvent) + }, toast._config.delay / 2) + + toast.show() + }) + }) + + it('should not auto hide if mouse pointer leaves but focus remains inside', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + '
', + '
', + ' a simple toast', + ' ', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + setTimeout(() => { + toastEl.addEventListener('mouseover', () => { + const insideFocusable = toastEl.querySelector('button') + insideFocusable.focus() + }) + + toastEl.addEventListener('focusin', () => { + const mouseOutEvent = createEvent('mouseout') + toastEl.dispatchEvent(mouseOutEvent) + }) + + toastEl.addEventListener('mouseout', () => { + expect(toast._timeout).toBeNull() + resolve() + }) + + const mouseOverEvent = createEvent('mouseover') + toastEl.dispatchEvent(mouseOverEvent) + }, toast._config.delay / 2) + + toast.show() + }) + }) + }) + + describe('hide', () => { + it('should allow to hide toast manually', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + toastEl.addEventListener('shown.bs.toast', () => { + toast.hide() + }) + + toastEl.addEventListener('hidden.bs.toast', () => { + expect(toastEl).not.toHaveClass('show') + resolve() + }) + + toast.show() + }) + }) + + it('should do nothing when we call hide on a non shown toast', () => { + fixtureEl.innerHTML = '
' + + const toastEl = fixtureEl.querySelector('div') + const toast = new Toast(toastEl) + + const spy = spyOn(toastEl.classList, 'contains') + + toast.hide() + + expect(spy).toHaveBeenCalled() + }) + + it('should not trigger hidden if hide is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('.toast') + const toast = new Toast(toastEl) + + const assertDone = () => { + setTimeout(() => { + expect(toastEl).toHaveClass('show') + resolve() + }, 20) + } + + toastEl.addEventListener('shown.bs.toast', () => { + toast.hide() + }) + + toastEl.addEventListener('hide.bs.toast', event => { + event.preventDefault() + assertDone() + }) + + toastEl.addEventListener('hidden.bs.toast', () => { + reject(new Error('hidden event should not be triggered if hide is prevented')) + }) + + toast.show() + }) + }) + }) + + describe('dispose', () => { + it('should allow to destroy toast', () => { + fixtureEl.innerHTML = '
' + + const toastEl = fixtureEl.querySelector('div') + + const toast = new Toast(toastEl) + + expect(Toast.getInstance(toastEl)).not.toBeNull() + + toast.dispose() + + expect(Toast.getInstance(toastEl)).toBeNull() + }) + + it('should allow to destroy toast and hide it before that', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + ' a simple toast', + '
', + '
' + ].join('') + + const toastEl = fixtureEl.querySelector('div') + const toast = new Toast(toastEl) + const expected = () => { + expect(toastEl).toHaveClass('show') + expect(Toast.getInstance(toastEl)).not.toBeNull() + + toast.dispose() + + expect(Toast.getInstance(toastEl)).toBeNull() + expect(toastEl).not.toHaveClass('show') + + resolve() + } + + toastEl.addEventListener('shown.bs.toast', () => { + setTimeout(expected, 1) + }) + + toast.show() + }) + }) + }) + + describe('jQueryInterface', () => { + it('should create a toast', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.toast = Toast.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.toast.call(jQueryMock) + + expect(Toast.getInstance(div)).not.toBeNull() + }) + + it('should not re create a toast', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const toast = new Toast(div) + + jQueryMock.fn.toast = Toast.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.toast.call(jQueryMock) + + expect(Toast.getInstance(div)).toEqual(toast) + }) + + it('should call a toast method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const toast = new Toast(div) + + const spy = spyOn(toast, 'show') + + jQueryMock.fn.toast = Toast.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.toast.call(jQueryMock, 'show') + + expect(Toast.getInstance(div)).toEqual(toast) + expect(spy).toHaveBeenCalled() + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.toast = Toast.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.toast.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) + + describe('getInstance', () => { + it('should return a toast instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const toast = new Toast(div) + + expect(Toast.getInstance(div)).toEqual(toast) + expect(Toast.getInstance(div)).toBeInstanceOf(Toast) + }) + + it('should return null when there is no toast instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Toast.getInstance(div)).toBeNull() + }) + }) + + describe('getOrCreateInstance', () => { + it('should return toast instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const toast = new Toast(div) + + expect(Toast.getOrCreateInstance(div)).toEqual(toast) + expect(Toast.getInstance(div)).toEqual(Toast.getOrCreateInstance(div, {})) + expect(Toast.getOrCreateInstance(div)).toBeInstanceOf(Toast) + }) + + it('should return new instance when there is no toast instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Toast.getInstance(div)).toBeNull() + expect(Toast.getOrCreateInstance(div)).toBeInstanceOf(Toast) + }) + + it('should return new instance when there is no toast instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Toast.getInstance(div)).toBeNull() + const toast = Toast.getOrCreateInstance(div, { + delay: 1 + }) + expect(toast).toBeInstanceOf(Toast) + + expect(toast._config.delay).toEqual(1) + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const toast = new Toast(div, { + delay: 1 + }) + expect(Toast.getInstance(div)).toEqual(toast) + + const toast2 = Toast.getOrCreateInstance(div, { + delay: 2 + }) + expect(toast).toBeInstanceOf(Toast) + expect(toast2).toEqual(toast) + + expect(toast2._config.delay).toEqual(1) + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/tooltip.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/tooltip.spec.js new file mode 100644 index 0000000..4330571 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/tooltip.spec.js @@ -0,0 +1,1551 @@ +import Tooltip from '../../src/tooltip' +import EventHandler from '../../src/dom/event-handler' +import { noop } from '../../src/util/index' +import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture' + +describe('Tooltip', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + + for (const tooltipEl of document.querySelectorAll('.tooltip')) { + tooltipEl.remove() + } + }) + + describe('VERSION', () => { + it('should return plugin version', () => { + expect(Tooltip.VERSION).toEqual(jasmine.any(String)) + }) + }) + + describe('Default', () => { + it('should return plugin default config', () => { + expect(Tooltip.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('NAME', () => { + it('should return plugin name', () => { + expect(Tooltip.NAME).toEqual(jasmine.any(String)) + }) + }) + + describe('DATA_KEY', () => { + it('should return plugin data key', () => { + expect(Tooltip.DATA_KEY).toEqual('bs.tooltip') + }) + }) + + describe('EVENT_KEY', () => { + it('should return plugin event key', () => { + expect(Tooltip.EVENT_KEY).toEqual('.bs.tooltip') + }) + }) + + describe('DefaultType', () => { + it('should return plugin default type', () => { + expect(Tooltip.DefaultType).toEqual(jasmine.any(Object)) + }) + }) + + describe('constructor', () => { + it('should take care of element either passed as a CSS selector or DOM element', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('#tooltipEl') + const tooltipBySelector = new Tooltip('#tooltipEl') + const tooltipByElement = new Tooltip(tooltipEl) + + expect(tooltipBySelector._element).toEqual(tooltipEl) + expect(tooltipByElement._element).toEqual(tooltipEl) + }) + + it('should not take care of disallowed data attributes', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._config.sanitize).toBeTrue() + }) + + it('should convert title and content to string if numbers', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + title: 1, + content: 7 + }) + + expect(tooltip._config.title).toEqual('1') + expect(tooltip._config.content).toEqual('7') + }) + + it('should enable selector delegation', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const containerEl = fixtureEl.querySelector('div') + const tooltipContainer = new Tooltip(containerEl, { + selector: 'a[rel="tooltip"]', + trigger: 'click' + }) + + containerEl.innerHTML = '
' + + const tooltipInContainerEl = containerEl.querySelector('a') + + tooltipInContainerEl.addEventListener('shown.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).not.toBeNull() + tooltipContainer.dispose() + resolve() + }) + + tooltipInContainerEl.click() + }) + }) + + it('should create offset modifier when offset is passed as a function', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const getOffset = jasmine.createSpy('getOffset').and.returnValue([10, 20]) + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + offset: getOffset, + popperConfig: { + onFirstUpdate(state) { + expect(getOffset).toHaveBeenCalledWith({ + popper: state.rects.popper, + reference: state.rects.reference, + placement: state.placement + }, tooltipEl) + resolve() + } + } + }) + + const offset = tooltip._getOffset() + + expect(offset).toEqual(jasmine.any(Function)) + + tooltip.show() + }) + }) + + it('should create offset modifier when offset option is passed in data attribute', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._getOffset()).toEqual([10, 20]) + }) + + it('should allow to pass config to Popper with `popperConfig`', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + popperConfig: { + placement: 'left' + } + }) + + const popperConfig = tooltip._getPopperConfig('top') + + expect(popperConfig.placement).toEqual('left') + }) + + it('should allow to pass config to Popper with `popperConfig` as a function', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const getPopperConfig = jasmine.createSpy('getPopperConfig').and.returnValue({ placement: 'left' }) + const tooltip = new Tooltip(tooltipEl, { + popperConfig: getPopperConfig + }) + + const popperConfig = tooltip._getPopperConfig('top') + + expect(getPopperConfig).toHaveBeenCalled() + expect(popperConfig.placement).toEqual('left') + }) + + it('should use original title, if not "data-bs-title" is given', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._getTitle()).toEqual('Another tooltip') + }) + }) + + describe('enable', () => { + it('should enable a tooltip', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.enable() + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).not.toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + }) + + describe('disable', () => { + it('should disable tooltip', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.disable() + + tooltipEl.addEventListener('show.bs.tooltip', () => { + reject(new Error('should not show a disabled tooltip')) + }) + + tooltip.show() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + }) + + describe('toggleEnabled', () => { + it('should toggle enabled', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._isEnabled).toBeTrue() + + tooltip.toggleEnabled() + + expect(tooltip._isEnabled).toBeFalse() + }) + }) + + describe('toggle', () => { + it('should do nothing if disabled', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.disable() + + tooltipEl.addEventListener('show.bs.tooltip', () => { + reject(new Error('should not show a disabled tooltip')) + }) + + tooltip.toggle() + + setTimeout(() => { + expect().nothing() + resolve() + }, 10) + }) + }) + + it('should show a tooltip', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).not.toBeNull() + resolve() + }) + + tooltip.toggle() + }) + }) + + it('should call toggle and show the tooltip when trigger is "click"', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + trigger: 'click' + }) + + const spy = spyOn(tooltip, 'toggle').and.callThrough() + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + tooltipEl.click() + }) + }) + + it('should hide a tooltip', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + tooltip.toggle() + }) + + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).toBeNull() + resolve() + }) + + tooltip.toggle() + }) + }) + + it('should call toggle and hide the tooltip when trigger is "click"', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + trigger: 'click' + }) + + const spy = spyOn(tooltip, 'toggle').and.callThrough() + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + tooltipEl.click() + }) + + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + tooltipEl.click() + }) + }) + }) + + describe('dispose', () => { + it('should destroy a tooltip', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const addEventSpy = spyOn(tooltipEl, 'addEventListener').and.callThrough() + const removeEventSpy = spyOn(tooltipEl, 'removeEventListener').and.callThrough() + + const tooltip = new Tooltip(tooltipEl) + + expect(Tooltip.getInstance(tooltipEl)).toEqual(tooltip) + + const expectedArgs = [ + ['mouseover', jasmine.any(Function), jasmine.any(Boolean)], + ['mouseout', jasmine.any(Function), jasmine.any(Boolean)], + ['focusin', jasmine.any(Function), jasmine.any(Boolean)], + ['focusout', jasmine.any(Function), jasmine.any(Boolean)] + ] + + expect(addEventSpy.calls.allArgs()).toEqual(expectedArgs) + + tooltip.dispose() + + expect(Tooltip.getInstance(tooltipEl)).toBeNull() + expect(removeEventSpy.calls.allArgs()).toEqual(expectedArgs) + }) + + it('should destroy a tooltip after it is shown and hidden', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + tooltip.hide() + }) + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + tooltip.dispose() + expect(tooltip.tip).toBeNull() + expect(Tooltip.getInstance(tooltipEl)).toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should destroy a tooltip and remove it from the dom', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).not.toBeNull() + + tooltip.dispose() + + expect(document.querySelector('.tooltip')).toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should destroy a tooltip and reset it\'s initial title', () => { + fixtureEl.innerHTML = [ + '', + '' + ].join('') + + const tooltipWithTitleEl = fixtureEl.querySelector('#tooltipWithTitle') + const tooltip = new Tooltip('#tooltipWithTitle') + expect(tooltipWithTitleEl.getAttribute('title')).toBeNull() + tooltip.dispose() + expect(tooltipWithTitleEl.getAttribute('title')).toBe('tooltipTitle') + + const tooltipWithoutTitleEl = fixtureEl.querySelector('#tooltipWithoutTitle') + const tooltip2 = new Tooltip('#tooltipWithTitle') + expect(tooltipWithoutTitleEl.getAttribute('title')).toBeNull() + tooltip2.dispose() + expect(tooltipWithoutTitleEl.getAttribute('title')).toBeNull() + }) + }) + + describe('show', () => { + it('should show a tooltip', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tooltipShown = document.querySelector('.tooltip') + + expect(tooltipShown).not.toBeNull() + expect(tooltipEl.getAttribute('aria-describedby')).toEqual(tooltipShown.getAttribute('id')) + expect(tooltipShown.getAttribute('id')).toContain('tooltip') + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip when hovering a child element', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + ' ', + ' ', + ' ', + ' ', + '' + ].join('') + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + const spy = spyOn(tooltip, 'show') + + tooltipEl.querySelector('rect').dispatchEvent(createEvent('mouseover', { bubbles: true })) + + setTimeout(() => { + expect(spy).toHaveBeenCalled() + resolve() + }, 0) + }) + }) + + it('should show a tooltip on mobile', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + document.documentElement.ontouchstart = noop + + const spy = spyOn(EventHandler, 'on').and.callThrough() + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).not.toBeNull() + expect(spy).toHaveBeenCalledWith(jasmine.any(Object), 'mouseover', noop) + document.documentElement.ontouchstart = undefined + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip relative to placement option', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + placement: 'bottom' + }) + + tooltipEl.addEventListener('inserted.bs.tooltip', () => { + expect(tooltip._getTipElement()).toHaveClass('bs-tooltip-auto') + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(tooltip._getTipElement()).toHaveClass('bs-tooltip-auto') + expect(tooltip._getTipElement().getAttribute('data-popper-placement')).toEqual('bottom') + resolve() + }) + + tooltip.show() + }) + }) + + it('should not error when trying to show a tooltip that has been removed from the dom', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + const firstCallback = () => { + tooltipEl.removeEventListener('shown.bs.tooltip', firstCallback) + let tooltipShown = document.querySelector('.tooltip') + + tooltipShown.remove() + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + tooltipShown = document.querySelector('.tooltip') + + expect(tooltipShown).not.toBeNull() + resolve() + }) + + tooltip.show() + } + + tooltipEl.addEventListener('shown.bs.tooltip', firstCallback) + + tooltip.show() + }) + }) + + it('should show a tooltip with a dom element container', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + container: fixtureEl + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(fixtureEl.querySelector('.tooltip')).not.toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip with a jquery element container', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + container: { + 0: fixtureEl, + jquery: 'jQuery' + } + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(fixtureEl.querySelector('.tooltip')).not.toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip with a selector in container', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + container: '#fixture' + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(fixtureEl.querySelector('.tooltip')).not.toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip with placement as a function', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const spy = jasmine.createSpy('placement').and.returnValue('top') + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + placement: spy + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).not.toBeNull() + expect(spy).toHaveBeenCalled() + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip without the animation', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + animation: false + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tip = document.querySelector('.tooltip') + + expect(tip).not.toBeNull() + expect(tip).not.toHaveClass('fade') + resolve() + }) + + tooltip.show() + }) + }) + + it('should throw an error the element is not visible', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + try { + tooltip.show() + } catch (error) { + expect(error.message).toEqual('Please use show on visible elements') + } + }) + + it('should not show a tooltip if show.bs.tooltip is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + const expectedDone = () => { + setTimeout(() => { + expect(document.querySelector('.tooltip')).toBeNull() + resolve() + }, 10) + } + + tooltipEl.addEventListener('show.bs.tooltip', ev => { + ev.preventDefault() + expectedDone() + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + reject(new Error('Tooltip should not be shown')) + }) + + tooltip.show() + }) + }) + + it('should show tooltip if leave event hasn\'t occurred before delay expires', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + delay: 150 + }) + + const spy = spyOn(tooltip, 'show') + + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + }, 100) + + setTimeout(() => { + expect(spy).toHaveBeenCalled() + resolve() + }, 200) + + tooltipEl.dispatchEvent(createEvent('mouseover')) + }) + }) + + it('should not show tooltip if leave event occurs before delay expires', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + delay: 150 + }) + + const spy = spyOn(tooltip, 'show') + + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + tooltipEl.dispatchEvent(createEvent('mouseover')) + }, 100) + + setTimeout(() => { + expect(spy).toHaveBeenCalled() + expect(document.querySelectorAll('.tooltip')).toHaveSize(0) + resolve() + }, 200) + + tooltipEl.dispatchEvent(createEvent('mouseover')) + }) + }) + + it('should not hide tooltip if leave event occurs and enter event occurs within the hide delay', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._config.delay).toEqual({ show: 0, hide: 150 }) + + setTimeout(() => { + expect(tooltip._getTipElement()).toHaveClass('show') + tooltipEl.dispatchEvent(createEvent('mouseout')) + + setTimeout(() => { + expect(tooltip._getTipElement()).toHaveClass('show') + tooltipEl.dispatchEvent(createEvent('mouseover')) + }, 100) + + setTimeout(() => { + expect(tooltip._getTipElement()).toHaveClass('show') + expect(document.querySelectorAll('.tooltip')).toHaveSize(1) + resolve() + }, 200) + }, 10) + + tooltipEl.dispatchEvent(createEvent('mouseover')) + }) + }) + + it('should not hide tooltip if leave event occurs and interaction remains inside trigger', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '', + 'Trigger', + 'the tooltip', + '' + ].join('') + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + const triggerChild = tooltipEl.querySelector('b') + + const spy = spyOn(tooltip, 'hide').and.callThrough() + + tooltipEl.addEventListener('mouseover', () => { + const moveMouseToChildEvent = createEvent('mouseout') + Object.defineProperty(moveMouseToChildEvent, 'relatedTarget', { + value: triggerChild + }) + + tooltipEl.dispatchEvent(moveMouseToChildEvent) + }) + + tooltipEl.addEventListener('mouseout', () => { + expect(spy).not.toHaveBeenCalled() + resolve() + }) + + tooltipEl.dispatchEvent(createEvent('mouseover')) + }) + }) + + it('should properly maintain tooltip state if leave event occurs and enter event occurs during hide transition', () => { + return new Promise(resolve => { + // Style this tooltip to give it plenty of room for popper to do what it wants + fixtureEl.innerHTML = 'Trigger' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.15s', + transitionDelay: '0s' + }) + + setTimeout(() => { + expect(tooltip._popper).not.toBeNull() + expect(tooltip._getTipElement().getAttribute('data-popper-placement')).toEqual('top') + tooltipEl.dispatchEvent(createEvent('mouseout')) + + setTimeout(() => { + expect(tooltip._getTipElement()).not.toHaveClass('show') + tooltipEl.dispatchEvent(createEvent('mouseover')) + }, 100) + + setTimeout(() => { + expect(tooltip._popper).not.toBeNull() + expect(tooltip._getTipElement().getAttribute('data-popper-placement')).toEqual('top') + resolve() + }, 200) + }, 10) + + tooltipEl.dispatchEvent(createEvent('mouseover')) + }) + }) + + it('should only trigger inserted event if a new tooltip element was created', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.15s', + transitionDelay: '0s' + }) + + const insertedFunc = jasmine.createSpy() + tooltipEl.addEventListener('inserted.bs.tooltip', insertedFunc) + + setTimeout(() => { + expect(insertedFunc).toHaveBeenCalledTimes(1) + tooltip.hide() + + setTimeout(() => { + tooltip.show() + }, 100) + + setTimeout(() => { + expect(insertedFunc).toHaveBeenCalledTimes(2) + resolve() + }, 200) + }, 0) + + tooltip.show() + }) + }) + + it('should show a tooltip with custom class provided in data attributes', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tip = document.querySelector('.tooltip') + expect(tip).not.toBeNull() + expect(tip).toHaveClass('custom-class') + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip with custom class provided as a string in config', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + customClass: 'custom-class custom-class-2' + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tip = document.querySelector('.tooltip') + expect(tip).not.toBeNull() + expect(tip).toHaveClass('custom-class') + expect(tip).toHaveClass('custom-class-2') + resolve() + }) + + tooltip.show() + }) + }) + + it('should show a tooltip with custom class provided as a function in config', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const spy = jasmine.createSpy('customClass').and.returnValue('custom-class') + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + customClass: spy + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tip = document.querySelector('.tooltip') + expect(tip).not.toBeNull() + expect(spy).toHaveBeenCalled() + expect(tip).toHaveClass('custom-class') + resolve() + }) + + tooltip.show() + }) + }) + + it('should remove `title` attribute if exists', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + expect(tooltipEl.getAttribute('title')).toBeNull() + resolve() + }) + tooltip.show() + }) + }) + }) + + describe('hide', () => { + it('should hide a tooltip', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => tooltip.hide()) + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).toBeNull() + expect(tooltipEl.getAttribute('aria-describedby')).toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should hide a tooltip on mobile', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + const spy = spyOn(EventHandler, 'off') + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + document.documentElement.ontouchstart = noop + tooltip.hide() + }) + + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).toBeNull() + expect(spy).toHaveBeenCalledWith(jasmine.any(Object), 'mouseover', noop) + document.documentElement.ontouchstart = undefined + resolve() + }) + + tooltip.show() + }) + }) + + it('should hide a tooltip without animation', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + animation: false + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => tooltip.hide()) + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + expect(document.querySelector('.tooltip')).toBeNull() + expect(tooltipEl.getAttribute('aria-describedby')).toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + + it('should not hide a tooltip if hide event is prevented', () => { + return new Promise((resolve, reject) => { + fixtureEl.innerHTML = '' + + const assertDone = () => { + setTimeout(() => { + expect(document.querySelector('.tooltip')).not.toBeNull() + resolve() + }, 20) + } + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + animation: false + }) + + tooltipEl.addEventListener('shown.bs.tooltip', () => tooltip.hide()) + tooltipEl.addEventListener('hide.bs.tooltip', event => { + event.preventDefault() + assertDone() + }) + tooltipEl.addEventListener('hidden.bs.tooltip', () => { + reject(new Error('should not trigger hidden event')) + }) + + tooltip.show() + }) + }) + + it('should not throw error running hide if popper hasn\'t been shown', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const tooltip = new Tooltip(div) + + try { + tooltip.hide() + expect().nothing() + } catch { + throw new Error('should not throw error') + } + }) + }) + + describe('update', () => { + it('should call popper update', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const spy = spyOn(tooltip._popper, 'update') + + tooltip.update() + + expect(spy).toHaveBeenCalled() + resolve() + }) + + tooltip.show() + }) + }) + + it('should do nothing if the tooltip is not shown', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.update() + expect().nothing() + }) + }) + + describe('_isWithContent', () => { + it('should return true if there is content', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._isWithContent()).toBeTrue() + }) + + it('should return false if there is no content', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._isWithContent()).toBeFalse() + }) + }) + + describe('_getTipElement', () => { + it('should create the tip element and return it', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + const spy = spyOn(document, 'createElement').and.callThrough() + + expect(tooltip._getTipElement()).toBeDefined() + expect(spy).toHaveBeenCalled() + }) + + it('should return the created tip element', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + const spy = spyOn(document, 'createElement').and.callThrough() + + expect(tooltip._getTipElement()).toBeDefined() + expect(spy).toHaveBeenCalled() + + spy.calls.reset() + + expect(tooltip._getTipElement()).toBeDefined() + expect(spy).not.toHaveBeenCalled() + }) + }) + + describe('setContent', () => { + it('should set tip content', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { animation: false }) + + const tip = tooltip._getTipElement() + + tooltip.setContent(tip) + + expect(tip).not.toHaveClass('show') + expect(tip).not.toHaveClass('fade') + expect(tip.querySelector('.tooltip-inner').textContent).toEqual('Another tooltip') + }) + + it('should re-show tip if it was already shown', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + tooltip.show() + const tip = () => tooltip._getTipElement() + + expect(tip()).toHaveClass('show') + tooltip.setContent({ '.tooltip-inner': 'foo' }) + + expect(tip()).toHaveClass('show') + expect(tip().querySelector('.tooltip-inner').textContent).toEqual('foo') + }) + + it('should keep tip hidden, if it was already hidden before', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + const tip = () => tooltip._getTipElement() + + expect(tip()).not.toHaveClass('show') + tooltip.setContent({ '.tooltip-inner': 'foo' }) + + expect(tip()).not.toHaveClass('show') + tooltip.show() + expect(tip().querySelector('.tooltip-inner').textContent).toEqual('foo') + }) + + it('"setContent" should keep the initial template', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.setContent({ '.tooltip-inner': 'foo' }) + const tip = tooltip._getTipElement() + + expect(tip).toHaveClass('tooltip') + expect(tip).toHaveClass('bs-tooltip-auto') + expect(tip.querySelector('.tooltip-arrow')).not.toBeNull() + expect(tip.querySelector('.tooltip-inner')).not.toBeNull() + }) + }) + + describe('setContent', () => { + it('should do nothing if the element is null', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.setContent({ '.tooltip': null }) + expect().nothing() + }) + + it('should do nothing if the content is a child of the element', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
' + ].join('') + + const tooltipEl = fixtureEl.querySelector('a') + const childContent = fixtureEl.querySelector('div') + const tooltip = new Tooltip(tooltipEl, { + html: true + }) + + tooltip._getTipElement().append(childContent) + tooltip.setContent({ '.tooltip': childContent }) + + expect().nothing() + }) + + it('should add the content as a child of the element for jQuery elements', () => { + fixtureEl.innerHTML = [ + '', + '
', + '
' + ].join('') + + const tooltipEl = fixtureEl.querySelector('a') + const childContent = fixtureEl.querySelector('div') + const tooltip = new Tooltip(tooltipEl, { + html: true + }) + + tooltip.setContent({ '.tooltip': { 0: childContent, jquery: 'jQuery' } }) + tooltip.show() + + expect(childContent.parentNode).toEqual(tooltip._getTipElement()) + }) + + it('should add the child text content in the element', () => { + fixtureEl.innerHTML = [ + '', + '
Tooltip
', + '
' + ].join('') + + const tooltipEl = fixtureEl.querySelector('a') + const childContent = fixtureEl.querySelector('div') + const tooltip = new Tooltip(tooltipEl) + + tooltip.setContent({ '.tooltip': childContent }) + + expect(childContent.textContent).toEqual(tooltip._getTipElement().textContent) + }) + + it('should add html without sanitize it', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + sanitize: false, + html: true + }) + + tooltip.setContent({ '.tooltip': '
Tooltip
' }) + + expect(tooltip._getTipElement().querySelector('div').id).toEqual('childContent') + }) + + it('should add html sanitized', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + html: true + }) + + const content = [ + '
', + ' ', + '
' + ].join('') + + tooltip.setContent({ '.tooltip': content }) + expect(tooltip._getTipElement().querySelector('div').id).toEqual('childContent') + expect(tooltip._getTipElement().querySelector('button')).toBeNull() + }) + + it('should add text content', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltip.setContent({ '.tooltip': 'test' }) + + expect(tooltip._getTipElement().textContent).toEqual('test') + }) + }) + + describe('_getTitle', () => { + it('should return the title', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + expect(tooltip._getTitle()).toEqual('Another tooltip') + }) + + it('should call title function', () => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl, { + title: () => 'test' + }) + + expect(tooltip._getTitle()).toEqual('test') + }) + }) + + describe('getInstance', () => { + it('should return tooltip instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const alert = new Tooltip(div) + + expect(Tooltip.getInstance(div)).toEqual(alert) + expect(Tooltip.getInstance(div)).toBeInstanceOf(Tooltip) + }) + + it('should return null when there is no tooltip instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Tooltip.getInstance(div)).toBeNull() + }) + }) + + describe('aria-label', () => { + it('should add the aria-label attribute for referencing original title', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tooltipShown = document.querySelector('.tooltip') + + expect(tooltipShown).not.toBeNull() + expect(tooltipEl.getAttribute('aria-label')).toEqual('Another tooltip') + resolve() + }) + + tooltip.show() + }) + }) + + it('should add the aria-label attribute when element text content is a whitespace string', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = ' ' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tooltipShown = document.querySelector('.tooltip') + + expect(tooltipShown).not.toBeNull() + expect(tooltipEl.getAttribute('aria-label')).toEqual('A tooltip') + resolve() + }) + + tooltip.show() + }) + }) + + it('should not add the aria-label attribute if the attribute already exists', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tooltipShown = document.querySelector('.tooltip') + + expect(tooltipShown).not.toBeNull() + expect(tooltipEl.getAttribute('aria-label')).toEqual('Different label') + resolve() + }) + + tooltip.show() + }) + }) + + it('should not add the aria-label attribute if the element has text content', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = 'text content' + + const tooltipEl = fixtureEl.querySelector('a') + const tooltip = new Tooltip(tooltipEl) + + tooltipEl.addEventListener('shown.bs.tooltip', () => { + const tooltipShown = document.querySelector('.tooltip') + + expect(tooltipShown).not.toBeNull() + expect(tooltipEl.getAttribute('aria-label')).toBeNull() + resolve() + }) + + tooltip.show() + }) + }) + }) + + describe('getOrCreateInstance', () => { + it('should return tooltip instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const tooltip = new Tooltip(div) + + expect(Tooltip.getOrCreateInstance(div)).toEqual(tooltip) + expect(Tooltip.getInstance(div)).toEqual(Tooltip.getOrCreateInstance(div, {})) + expect(Tooltip.getOrCreateInstance(div)).toBeInstanceOf(Tooltip) + }) + + it('should return new instance when there is no tooltip instance', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Tooltip.getInstance(div)).toBeNull() + expect(Tooltip.getOrCreateInstance(div)).toBeInstanceOf(Tooltip) + }) + + it('should return new instance when there is no tooltip instance with given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Tooltip.getInstance(div)).toBeNull() + const tooltip = Tooltip.getOrCreateInstance(div, { + title: () => 'test' + }) + expect(tooltip).toBeInstanceOf(Tooltip) + + expect(tooltip._getTitle()).toEqual('test') + }) + + it('should return the instance when exists without given configuration', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const tooltip = new Tooltip(div, { + title: () => 'nothing' + }) + expect(Tooltip.getInstance(div)).toEqual(tooltip) + + const tooltip2 = Tooltip.getOrCreateInstance(div, { + title: () => 'test' + }) + expect(tooltip).toBeInstanceOf(Tooltip) + expect(tooltip2).toEqual(tooltip) + + expect(tooltip2._getTitle()).toEqual('nothing') + }) + }) + + describe('jQueryInterface', () => { + it('should create a tooltip', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + jQueryMock.fn.tooltip = Tooltip.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.tooltip.call(jQueryMock) + + expect(Tooltip.getInstance(div)).not.toBeNull() + }) + + it('should not re create a tooltip', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const tooltip = new Tooltip(div) + + jQueryMock.fn.tooltip = Tooltip.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.tooltip.call(jQueryMock) + + expect(Tooltip.getInstance(div)).toEqual(tooltip) + }) + + it('should call a tooltip method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const tooltip = new Tooltip(div) + + const spy = spyOn(tooltip, 'show') + + jQueryMock.fn.tooltip = Tooltip.jQueryInterface + jQueryMock.elements = [div] + + jQueryMock.fn.tooltip.call(jQueryMock, 'show') + + expect(Tooltip.getInstance(div)).toEqual(tooltip) + expect(spy).toHaveBeenCalled() + }) + + it('should throw error on undefined method', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const action = 'undefinedMethod' + + jQueryMock.fn.tooltip = Tooltip.jQueryInterface + jQueryMock.elements = [div] + + expect(() => { + jQueryMock.fn.tooltip.call(jQueryMock, action) + }).toThrowError(TypeError, `No method named "${action}"`) + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/backdrop.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/backdrop.spec.js new file mode 100644 index 0000000..73384fc --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/backdrop.spec.js @@ -0,0 +1,321 @@ +import Backdrop from '../../../src/util/backdrop' +import { getTransitionDurationFromElement } from '../../../src/util/index' +import { clearFixture, getFixture } from '../../helpers/fixture' + +const CLASS_BACKDROP = '.modal-backdrop' +const CLASS_NAME_FADE = 'fade' +const CLASS_NAME_SHOW = 'show' + +describe('Backdrop', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + const list = document.querySelectorAll(CLASS_BACKDROP) + + for (const el of list) { + el.remove() + } + }) + + describe('show', () => { + it('should append the backdrop html once on show and include the "show" class if it is "shown"', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + isAnimated: false + }) + const getElements = () => document.querySelectorAll(CLASS_BACKDROP) + + expect(getElements()).toHaveSize(0) + + instance.show() + instance.show(() => { + expect(getElements()).toHaveSize(1) + for (const el of getElements()) { + expect(el).toHaveClass(CLASS_NAME_SHOW) + } + + resolve() + }) + }) + }) + + it('should not append the backdrop html if it is not "shown"', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: false, + isAnimated: true + }) + const getElements = () => document.querySelectorAll(CLASS_BACKDROP) + + expect(getElements()).toHaveSize(0) + instance.show(() => { + expect(getElements()).toHaveSize(0) + resolve() + }) + }) + }) + + it('should append the backdrop html once and include the "fade" class if it is "shown" and "animated"', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + isAnimated: true + }) + const getElements = () => document.querySelectorAll(CLASS_BACKDROP) + + expect(getElements()).toHaveSize(0) + + instance.show(() => { + expect(getElements()).toHaveSize(1) + for (const el of getElements()) { + expect(el).toHaveClass(CLASS_NAME_FADE) + } + + resolve() + }) + }) + }) + }) + + describe('hide', () => { + it('should remove the backdrop html', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + isAnimated: true + }) + + const getElements = () => document.body.querySelectorAll(CLASS_BACKDROP) + + expect(getElements()).toHaveSize(0) + instance.show(() => { + expect(getElements()).toHaveSize(1) + instance.hide(() => { + expect(getElements()).toHaveSize(0) + resolve() + }) + }) + }) + }) + + it('should remove the "show" class', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + isAnimated: true + }) + const elem = instance._getElement() + + instance.show() + instance.hide(() => { + expect(elem).not.toHaveClass(CLASS_NAME_SHOW) + resolve() + }) + }) + }) + + it('should not try to remove Node on remove method if it is not "shown"', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: false, + isAnimated: true + }) + const getElements = () => document.querySelectorAll(CLASS_BACKDROP) + const spy = spyOn(instance, 'dispose').and.callThrough() + + expect(getElements()).toHaveSize(0) + expect(instance._isAppended).toBeFalse() + instance.show(() => { + instance.hide(() => { + expect(getElements()).toHaveSize(0) + expect(spy).not.toHaveBeenCalled() + expect(instance._isAppended).toBeFalse() + resolve() + }) + }) + }) + }) + + it('should not error if the backdrop no longer has a parent', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const wrapper = fixtureEl.querySelector('#wrapper') + const instance = new Backdrop({ + isVisible: true, + isAnimated: true, + rootElement: wrapper + }) + + const getElements = () => document.querySelectorAll(CLASS_BACKDROP) + + instance.show(() => { + wrapper.remove() + instance.hide(() => { + expect(getElements()).toHaveSize(0) + resolve() + }) + }) + }) + }) + }) + + describe('click callback', () => { + it('should execute callback on click', () => { + return new Promise(resolve => { + const spy = jasmine.createSpy('spy') + + const instance = new Backdrop({ + isVisible: true, + isAnimated: false, + clickCallback: () => spy() + }) + const endTest = () => { + setTimeout(() => { + expect(spy).toHaveBeenCalled() + resolve() + }, 10) + } + + instance.show(() => { + const clickEvent = new Event('mousedown', { bubbles: true, cancelable: true }) + document.querySelector(CLASS_BACKDROP).dispatchEvent(clickEvent) + endTest() + }) + }) + }) + + describe('animation callbacks', () => { + it('should show and hide backdrop after counting transition duration if it is animated', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + isAnimated: true + }) + const spy2 = jasmine.createSpy('spy2') + + const execDone = () => { + setTimeout(() => { + expect(spy2).toHaveBeenCalledTimes(2) + resolve() + }, 10) + } + + instance.show(spy2) + instance.hide(() => { + spy2() + execDone() + }) + expect(spy2).not.toHaveBeenCalled() + }) + }) + + it('should show and hide backdrop without a delay if it is not animated', () => { + return new Promise(resolve => { + const spy = jasmine.createSpy('spy', getTransitionDurationFromElement) + const instance = new Backdrop({ + isVisible: true, + isAnimated: false + }) + const spy2 = jasmine.createSpy('spy2') + + instance.show(spy2) + instance.hide(spy2) + + setTimeout(() => { + expect(spy2).toHaveBeenCalled() + expect(spy).not.toHaveBeenCalled() + resolve() + }, 10) + }) + }) + + it('should not call delay callbacks if it is not "shown"', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: false, + isAnimated: true + }) + const spy = jasmine.createSpy('spy', getTransitionDurationFromElement) + + instance.show() + instance.hide(() => { + expect(spy).not.toHaveBeenCalled() + resolve() + }) + }) + }) + }) + + describe('Config', () => { + describe('rootElement initialization', () => { + it('should be appended on "document.body" by default', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true + }) + const getElement = () => document.querySelector(CLASS_BACKDROP) + instance.show(() => { + expect(getElement().parentElement).toEqual(document.body) + resolve() + }) + }) + }) + + it('should find the rootElement if passed as a string', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + rootElement: 'body' + }) + const getElement = () => document.querySelector(CLASS_BACKDROP) + instance.show(() => { + expect(getElement().parentElement).toEqual(document.body) + resolve() + }) + }) + }) + + it('should be appended on any element given by the proper config', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const wrapper = fixtureEl.querySelector('#wrapper') + const instance = new Backdrop({ + isVisible: true, + rootElement: wrapper + }) + const getElement = () => document.querySelector(CLASS_BACKDROP) + instance.show(() => { + expect(getElement().parentElement).toEqual(wrapper) + resolve() + }) + }) + }) + }) + + describe('ClassName', () => { + it('should allow configuring className', () => { + return new Promise(resolve => { + const instance = new Backdrop({ + isVisible: true, + className: 'foo' + }) + const getElement = () => document.querySelector('.foo') + instance.show(() => { + expect(getElement()).toEqual(instance._getElement()) + instance.dispose() + resolve() + }) + }) + }) + }) + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/component-functions.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/component-functions.spec.js new file mode 100644 index 0000000..ec36672 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/component-functions.spec.js @@ -0,0 +1,108 @@ +/* Test helpers */ + +import { clearFixture, createEvent, getFixture } from '../../helpers/fixture' +import { enableDismissTrigger } from '../../../src/util/component-functions' +import BaseComponent from '../../../src/base-component' + +class DummyClass2 extends BaseComponent { + static get NAME() { + return 'test' + } + + hide() { + return true + } + + testMethod() { + return true + } +} + +describe('Plugin functions', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('data-bs-dismiss functionality', () => { + it('should get Plugin and execute the given method, when a click occurred on data-bs-dismiss="PluginName"', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const spyGet = spyOn(DummyClass2, 'getOrCreateInstance').and.callThrough() + const spyTest = spyOn(DummyClass2.prototype, 'testMethod') + const componentWrapper = fixtureEl.querySelector('#foo') + const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') + const event = createEvent('click') + + enableDismissTrigger(DummyClass2, 'testMethod') + btnClose.dispatchEvent(event) + + expect(spyGet).toHaveBeenCalledWith(componentWrapper) + expect(spyTest).toHaveBeenCalled() + }) + + it('if data-bs-dismiss="PluginName" hasn\'t got "data-bs-target", "getOrCreateInstance" has to be initialized by closest "plugin.Name" class', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const spyGet = spyOn(DummyClass2, 'getOrCreateInstance').and.callThrough() + const spyHide = spyOn(DummyClass2.prototype, 'hide') + const componentWrapper = fixtureEl.querySelector('#foo') + const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') + const event = createEvent('click') + + enableDismissTrigger(DummyClass2) + btnClose.dispatchEvent(event) + + expect(spyGet).toHaveBeenCalledWith(componentWrapper) + expect(spyHide).toHaveBeenCalled() + }) + + it('if data-bs-dismiss="PluginName" is disabled, must not trigger function', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const spy = spyOn(DummyClass2, 'getOrCreateInstance').and.callThrough() + const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') + const event = createEvent('click') + + enableDismissTrigger(DummyClass2) + btnClose.dispatchEvent(event) + + expect(spy).not.toHaveBeenCalled() + }) + + it('should prevent default when the trigger is or ', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') + const event = createEvent('click') + + enableDismissTrigger(DummyClass2) + const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() + + btnClose.dispatchEvent(event) + + expect(spy).toHaveBeenCalled() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/config.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/config.spec.js new file mode 100644 index 0000000..e1693c0 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/config.spec.js @@ -0,0 +1,166 @@ +import Config from '../../../src/util/config' +import { clearFixture, getFixture } from '../../helpers/fixture' + +class DummyConfigClass extends Config { + static get NAME() { + return 'dummy' + } +} + +describe('Config', () => { + let fixtureEl + const name = 'dummy' + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('NAME', () => { + it('should return plugin NAME', () => { + expect(DummyConfigClass.NAME).toEqual(name) + }) + }) + + describe('DefaultType', () => { + it('should return plugin default type', () => { + expect(DummyConfigClass.DefaultType).toEqual(jasmine.any(Object)) + }) + }) + + describe('Default', () => { + it('should return plugin defaults', () => { + expect(DummyConfigClass.Default).toEqual(jasmine.any(Object)) + }) + }) + + describe('mergeConfigObj', () => { + it('should parse element\'s data attributes and merge it with default config. Element\'s data attributes must excel Defaults', () => { + fixtureEl.innerHTML = '
' + + spyOnProperty(DummyConfigClass, 'Default', 'get').and.returnValue({ + testBool: true, + testString: 'foo', + testString1: 'foo', + testInt: 7 + }) + const instance = new DummyConfigClass() + const configResult = instance._mergeConfigObj({}, fixtureEl.querySelector('#test')) + + expect(configResult.testBool).toEqual(false) + expect(configResult.testString).toEqual('foo') + expect(configResult.testString1).toEqual('bar') + expect(configResult.testInt).toEqual(8) + }) + + it('should parse element\'s data attributes and merge it with default config, plug these given during method call. The programmatically given should excel all', () => { + fixtureEl.innerHTML = '
' + + spyOnProperty(DummyConfigClass, 'Default', 'get').and.returnValue({ + testBool: true, + testString: 'foo', + testString1: 'foo', + testInt: 7 + }) + const instance = new DummyConfigClass() + const configResult = instance._mergeConfigObj({ + testString1: 'test', + testInt: 3 + }, fixtureEl.querySelector('#test')) + + expect(configResult.testBool).toEqual(false) + expect(configResult.testString).toEqual('foo') + expect(configResult.testString1).toEqual('test') + expect(configResult.testInt).toEqual(3) + }) + + it('should parse element\'s data attribute `config` and any rest attributes. The programmatically given should excel all. Data attribute `config` should excel only Defaults', () => { + fixtureEl.innerHTML = '
' + + spyOnProperty(DummyConfigClass, 'Default', 'get').and.returnValue({ + testBool: true, + testString: 'foo', + testString1: 'foo', + testInt: 7, + testInt2: 600 + }) + const instance = new DummyConfigClass() + const configResult = instance._mergeConfigObj({ + testString1: 'test' + }, fixtureEl.querySelector('#test')) + + expect(configResult.testBool).toEqual(false) + expect(configResult.testString).toEqual('foo') + expect(configResult.testString1).toEqual('test') + expect(configResult.testInt).toEqual(8) + expect(configResult.testInt2).toEqual(100) + }) + + it('should omit element\'s data attribute `config` if is not an object', () => { + fixtureEl.innerHTML = '
' + + spyOnProperty(DummyConfigClass, 'Default', 'get').and.returnValue({ + testInt: 7, + testInt2: 79 + }) + const instance = new DummyConfigClass() + const configResult = instance._mergeConfigObj({}, fixtureEl.querySelector('#test')) + + expect(configResult.testInt).toEqual(8) + expect(configResult.testInt2).toEqual(79) + }) + }) + + describe('typeCheckConfig', () => { + it('should check type of the config object', () => { + spyOnProperty(DummyConfigClass, 'DefaultType', 'get').and.returnValue({ + toggle: 'boolean', + parent: '(string|element)' + }) + const config = { + toggle: true, + parent: 777 + } + + const obj = new DummyConfigClass() + expect(() => { + obj._typeCheckConfig(config) + }).toThrowError(TypeError, obj.constructor.NAME.toUpperCase() + ': Option "parent" provided type "number" but expected type "(string|element)".') + }) + + it('should return null stringified when null is passed', () => { + spyOnProperty(DummyConfigClass, 'DefaultType', 'get').and.returnValue({ + toggle: 'boolean', + parent: '(null|element)' + }) + + const obj = new DummyConfigClass() + const config = { + toggle: true, + parent: null + } + + obj._typeCheckConfig(config) + expect().nothing() + }) + + it('should return undefined stringified when undefined is passed', () => { + spyOnProperty(DummyConfigClass, 'DefaultType', 'get').and.returnValue({ + toggle: 'boolean', + parent: '(undefined|element)' + }) + + const obj = new DummyConfigClass() + const config = { + toggle: true, + parent: undefined + } + + obj._typeCheckConfig(config) + expect().nothing() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/focustrap.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/focustrap.spec.js new file mode 100644 index 0000000..bedd124 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/focustrap.spec.js @@ -0,0 +1,218 @@ +import FocusTrap from '../../../src/util/focustrap' +import EventHandler from '../../../src/dom/event-handler' +import SelectorEngine from '../../../src/dom/selector-engine' +import { clearFixture, createEvent, getFixture } from '../../helpers/fixture' + +describe('FocusTrap', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('activate', () => { + it('should autofocus itself by default', () => { + fixtureEl.innerHTML = '
' + + const trapElement = fixtureEl.querySelector('div') + + const spy = spyOn(trapElement, 'focus') + + const focustrap = new FocusTrap({ trapElement }) + focustrap.activate() + + expect(spy).toHaveBeenCalled() + }) + + it('if configured not to autofocus, should not autofocus itself', () => { + fixtureEl.innerHTML = '
' + + const trapElement = fixtureEl.querySelector('div') + + const spy = spyOn(trapElement, 'focus') + + const focustrap = new FocusTrap({ trapElement, autofocus: false }) + focustrap.activate() + + expect(spy).not.toHaveBeenCalled() + }) + + it('should force focus inside focus trap if it can', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + 'outside', + '
', + ' inside', + '
' + ].join('') + + const trapElement = fixtureEl.querySelector('div') + const focustrap = new FocusTrap({ trapElement }) + focustrap.activate() + + const inside = document.getElementById('inside') + + const focusInListener = () => { + expect(spy).toHaveBeenCalled() + document.removeEventListener('focusin', focusInListener) + resolve() + } + + const spy = spyOn(inside, 'focus') + spyOn(SelectorEngine, 'focusableChildren').and.callFake(() => [inside]) + + document.addEventListener('focusin', focusInListener) + + const focusInEvent = createEvent('focusin', { bubbles: true }) + Object.defineProperty(focusInEvent, 'target', { + value: document.getElementById('outside') + }) + + document.dispatchEvent(focusInEvent) + }) + }) + + it('should wrap focus around forward on tab', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + 'outside', + '
', + ' first', + ' inside', + ' last', + '
' + ].join('') + + const trapElement = fixtureEl.querySelector('div') + const focustrap = new FocusTrap({ trapElement }) + focustrap.activate() + + const first = document.getElementById('first') + const inside = document.getElementById('inside') + const last = document.getElementById('last') + const outside = document.getElementById('outside') + + spyOn(SelectorEngine, 'focusableChildren').and.callFake(() => [first, inside, last]) + const spy = spyOn(first, 'focus').and.callThrough() + + const focusInListener = () => { + expect(spy).toHaveBeenCalled() + first.removeEventListener('focusin', focusInListener) + resolve() + } + + first.addEventListener('focusin', focusInListener) + + const keydown = createEvent('keydown') + keydown.key = 'Tab' + + document.dispatchEvent(keydown) + outside.focus() + }) + }) + + it('should wrap focus around backwards on shift-tab', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + 'outside', + '
', + ' first', + ' inside', + ' last', + '
' + ].join('') + + const trapElement = fixtureEl.querySelector('div') + const focustrap = new FocusTrap({ trapElement }) + focustrap.activate() + + const first = document.getElementById('first') + const inside = document.getElementById('inside') + const last = document.getElementById('last') + const outside = document.getElementById('outside') + + spyOn(SelectorEngine, 'focusableChildren').and.callFake(() => [first, inside, last]) + const spy = spyOn(last, 'focus').and.callThrough() + + const focusInListener = () => { + expect(spy).toHaveBeenCalled() + last.removeEventListener('focusin', focusInListener) + resolve() + } + + last.addEventListener('focusin', focusInListener) + + const keydown = createEvent('keydown') + keydown.key = 'Tab' + keydown.shiftKey = true + + document.dispatchEvent(keydown) + outside.focus() + }) + }) + + it('should force focus on itself if there is no focusable content', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + 'outside', + '
' + ].join('') + + const trapElement = fixtureEl.querySelector('div') + const focustrap = new FocusTrap({ trapElement }) + focustrap.activate() + + const focusInListener = () => { + expect(spy).toHaveBeenCalled() + document.removeEventListener('focusin', focusInListener) + resolve() + } + + const spy = spyOn(focustrap._config.trapElement, 'focus') + + document.addEventListener('focusin', focusInListener) + + const focusInEvent = createEvent('focusin', { bubbles: true }) + Object.defineProperty(focusInEvent, 'target', { + value: document.getElementById('outside') + }) + + document.dispatchEvent(focusInEvent) + }) + }) + }) + + describe('deactivate', () => { + it('should flag itself as no longer active', () => { + const focustrap = new FocusTrap({ trapElement: fixtureEl }) + focustrap.activate() + expect(focustrap._isActive).toBeTrue() + + focustrap.deactivate() + expect(focustrap._isActive).toBeFalse() + }) + + it('should remove all event listeners', () => { + const focustrap = new FocusTrap({ trapElement: fixtureEl }) + focustrap.activate() + + const spy = spyOn(EventHandler, 'off') + focustrap.deactivate() + + expect(spy).toHaveBeenCalled() + }) + + it('doesn\'t try removing event listeners unless it needs to (in case it hasn\'t been activated)', () => { + const focustrap = new FocusTrap({ trapElement: fixtureEl }) + + const spy = spyOn(EventHandler, 'off') + focustrap.deactivate() + + expect(spy).not.toHaveBeenCalled() + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/index.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/index.spec.js new file mode 100644 index 0000000..9f28ce0 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/index.spec.js @@ -0,0 +1,814 @@ +import * as Util from '../../../src/util/index' +import { clearFixture, getFixture } from '../../helpers/fixture' +import { noop } from '../../../src/util/index' + +describe('Util', () => { + let fixtureEl + + beforeAll(() => { + fixtureEl = getFixture() + }) + + afterEach(() => { + clearFixture() + }) + + describe('getUID', () => { + it('should generate uid', () => { + const uid = Util.getUID('bs') + const uid2 = Util.getUID('bs') + + expect(uid).not.toEqual(uid2) + }) + }) + + describe('getSelectorFromElement', () => { + it('should get selector from data-bs-target', () => { + fixtureEl.innerHTML = [ + '
', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getSelectorFromElement(testEl)).toEqual('.target') + }) + + it('should get selector from href if no data-bs-target set', () => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getSelectorFromElement(testEl)).toEqual('.target') + }) + + it('should get selector from href if data-bs-target equal to #', () => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getSelectorFromElement(testEl)).toEqual('.target') + }) + + it('should return null if a selector from a href is a url without an anchor', () => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getSelectorFromElement(testEl)).toBeNull() + }) + + it('should return the anchor if a selector from a href is a url', () => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getSelectorFromElement(testEl)).toEqual('#target') + }) + + it('should return null if selector not found', () => { + fixtureEl.innerHTML = '' + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getSelectorFromElement(testEl)).toBeNull() + }) + + it('should return null if no selector', () => { + fixtureEl.innerHTML = '
' + + const testEl = fixtureEl.querySelector('div') + + expect(Util.getSelectorFromElement(testEl)).toBeNull() + }) + }) + + describe('getElementFromSelector', () => { + it('should get element from data-bs-target', () => { + fixtureEl.innerHTML = [ + '
', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getElementFromSelector(testEl)).toEqual(fixtureEl.querySelector('.target')) + }) + + it('should get element from href if no data-bs-target set', () => { + fixtureEl.innerHTML = [ + '', + '
' + ].join('') + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getElementFromSelector(testEl)).toEqual(fixtureEl.querySelector('.target')) + }) + + it('should return null if element not found', () => { + fixtureEl.innerHTML = '' + + const testEl = fixtureEl.querySelector('#test') + + expect(Util.getElementFromSelector(testEl)).toBeNull() + }) + + it('should return null if no selector', () => { + fixtureEl.innerHTML = '
' + + const testEl = fixtureEl.querySelector('div') + + expect(Util.getElementFromSelector(testEl)).toBeNull() + }) + }) + + describe('getTransitionDurationFromElement', () => { + it('should get transition from element', () => { + fixtureEl.innerHTML = '
' + + expect(Util.getTransitionDurationFromElement(fixtureEl.querySelector('div'))).toEqual(300) + }) + + it('should return 0 if the element is undefined or null', () => { + expect(Util.getTransitionDurationFromElement(null)).toEqual(0) + expect(Util.getTransitionDurationFromElement(undefined)).toEqual(0) + }) + + it('should return 0 if the element do not possess transition', () => { + fixtureEl.innerHTML = '
' + + expect(Util.getTransitionDurationFromElement(fixtureEl.querySelector('div'))).toEqual(0) + }) + }) + + describe('triggerTransitionEnd', () => { + it('should trigger transitionend event', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = '
' + + const el = fixtureEl.querySelector('div') + const spy = spyOn(el, 'dispatchEvent').and.callThrough() + + el.addEventListener('transitionend', () => { + expect(spy).toHaveBeenCalled() + resolve() + }) + + Util.triggerTransitionEnd(el) + }) + }) + }) + + describe('isElement', () => { + it('should detect if the parameter is an element or not and return Boolean', () => { + fixtureEl.innerHTML = [ + '
', + '
' + ].join('') + + const el = fixtureEl.querySelector('#foo') + + expect(Util.isElement(el)).toBeTrue() + expect(Util.isElement({})).toBeFalse() + expect(Util.isElement(fixtureEl.querySelectorAll('.test'))).toBeFalse() + }) + + it('should detect jQuery element', () => { + fixtureEl.innerHTML = '
' + + const el = fixtureEl.querySelector('div') + const fakejQuery = { + 0: el, + jquery: 'foo' + } + + expect(Util.isElement(fakejQuery)).toBeTrue() + }) + }) + + describe('getElement', () => { + it('should try to parse element', () => { + fixtureEl.innerHTML = [ + '
', + '
' + ].join('') + + const el = fixtureEl.querySelector('div') + + expect(Util.getElement(el)).toEqual(el) + expect(Util.getElement('#foo')).toEqual(el) + expect(Util.getElement('#fail')).toBeNull() + expect(Util.getElement({})).toBeNull() + expect(Util.getElement([])).toBeNull() + expect(Util.getElement()).toBeNull() + expect(Util.getElement(null)).toBeNull() + expect(Util.getElement(fixtureEl.querySelectorAll('.test'))).toBeNull() + + const fakejQueryObject = { + 0: el, + jquery: 'foo' + } + + expect(Util.getElement(fakejQueryObject)).toEqual(el) + }) + }) + + describe('isVisible', () => { + it('should return false if the element is not defined', () => { + expect(Util.isVisible(null)).toBeFalse() + expect(Util.isVisible(undefined)).toBeFalse() + }) + + it('should return false if the element provided is not a dom element', () => { + expect(Util.isVisible({})).toBeFalse() + }) + + it('should return false if the element is not visible with display none', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Util.isVisible(div)).toBeFalse() + }) + + it('should return false if the element is not visible with visibility hidden', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + expect(Util.isVisible(div)).toBeFalse() + }) + + it('should return false if an ancestor element is display none', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('.content') + + expect(Util.isVisible(div)).toBeFalse() + }) + + it('should return false if an ancestor element is visibility hidden', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('.content') + + expect(Util.isVisible(div)).toBeFalse() + }) + + it('should return true if an ancestor element is visibility hidden, but reverted', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('.content') + + expect(Util.isVisible(div)).toBeTrue() + }) + + it('should return true if the element is visible', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('#element') + + expect(Util.isVisible(div)).toBeTrue() + }) + + it('should return false if the element is hidden, but not via display or visibility', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('#element') + + expect(Util.isVisible(div)).toBeFalse() + }) + + it('should return true if its a closed details element', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('#element') + + expect(Util.isVisible(div)).toBeTrue() + }) + + it('should return true if the element is visible inside an open details element', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('#element') + + expect(Util.isVisible(div)).toBeTrue() + }) + + it('should return true if the element is a visible summary in a closed details element', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + ' ', + '
' + ].join('') + + const element1 = fixtureEl.querySelector('#element-1') + const element2 = fixtureEl.querySelector('#element-2') + + expect(Util.isVisible(element1)).toBeTrue() + expect(Util.isVisible(element2)).toBeTrue() + }) + }) + + describe('isDisabled', () => { + it('should return true if the element is not defined', () => { + expect(Util.isDisabled(null)).toBeTrue() + expect(Util.isDisabled(undefined)).toBeTrue() + expect(Util.isDisabled()).toBeTrue() + }) + + it('should return true if the element provided is not a dom element', () => { + expect(Util.isDisabled({})).toBeTrue() + expect(Util.isDisabled('test')).toBeTrue() + }) + + it('should return true if the element has disabled attribute', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('#element') + const div1 = fixtureEl.querySelector('#element1') + const div2 = fixtureEl.querySelector('#element2') + + expect(Util.isDisabled(div)).toBeTrue() + expect(Util.isDisabled(div1)).toBeTrue() + expect(Util.isDisabled(div2)).toBeTrue() + }) + + it('should return false if the element has disabled attribute with "false" value, or doesn\'t have attribute', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('#element') + const div1 = fixtureEl.querySelector('#element1') + + expect(Util.isDisabled(div)).toBeFalse() + expect(Util.isDisabled(div1)).toBeFalse() + }) + + it('should return false if the element is not disabled ', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + ' ', + '
' + ].join('') + + const el = selector => fixtureEl.querySelector(selector) + + expect(Util.isDisabled(el('#button'))).toBeFalse() + expect(Util.isDisabled(el('#select'))).toBeFalse() + expect(Util.isDisabled(el('#input'))).toBeFalse() + }) + + it('should return true if the element has disabled attribute', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + '
' + ].join('') + + const el = selector => fixtureEl.querySelector(selector) + + expect(Util.isDisabled(el('#input'))).toBeTrue() + expect(Util.isDisabled(el('#input1'))).toBeTrue() + expect(Util.isDisabled(el('#button'))).toBeTrue() + expect(Util.isDisabled(el('#button1'))).toBeTrue() + expect(Util.isDisabled(el('#button2'))).toBeTrue() + expect(Util.isDisabled(el('#input'))).toBeTrue() + }) + + it('should return true if the element has class "disabled"', () => { + fixtureEl.innerHTML = [ + '
', + '
', + '
' + ].join('') + + const div = fixtureEl.querySelector('#element') + + expect(Util.isDisabled(div)).toBeTrue() + }) + + it('should return true if the element has class "disabled" but disabled attribute is false', () => { + fixtureEl.innerHTML = [ + '
', + ' ', + '
' + ].join('') + + const div = fixtureEl.querySelector('#input') + + expect(Util.isDisabled(div)).toBeTrue() + }) + }) + + describe('findShadowRoot', () => { + it('should return null if shadow dom is not available', () => { + // Only for newer browsers + if (!document.documentElement.attachShadow) { + expect().nothing() + return + } + + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + + spyOn(document.documentElement, 'attachShadow').and.returnValue(null) + + expect(Util.findShadowRoot(div)).toBeNull() + }) + + it('should return null when we do not find a shadow root', () => { + // Only for newer browsers + if (!document.documentElement.attachShadow) { + expect().nothing() + return + } + + spyOn(document, 'getRootNode').and.returnValue(undefined) + + expect(Util.findShadowRoot(document)).toBeNull() + }) + + it('should return the shadow root when found', () => { + // Only for newer browsers + if (!document.documentElement.attachShadow) { + expect().nothing() + return + } + + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const shadowRoot = div.attachShadow({ + mode: 'open' + }) + + expect(Util.findShadowRoot(shadowRoot)).toEqual(shadowRoot) + + shadowRoot.innerHTML = '' + + expect(Util.findShadowRoot(shadowRoot.firstChild)).toEqual(shadowRoot) + }) + }) + + describe('noop', () => { + it('should be a function', () => { + expect(Util.noop).toEqual(jasmine.any(Function)) + }) + }) + + describe('reflow', () => { + it('should return element offset height to force the reflow', () => { + fixtureEl.innerHTML = '
' + + const div = fixtureEl.querySelector('div') + const spy = spyOnProperty(div, 'offsetHeight') + Util.reflow(div) + expect(spy).toHaveBeenCalled() + }) + }) + + describe('getjQuery', () => { + const fakejQuery = { trigger() {} } + + beforeEach(() => { + Object.defineProperty(window, 'jQuery', { + value: fakejQuery, + writable: true + }) + }) + + afterEach(() => { + window.jQuery = undefined + }) + + it('should return jQuery object when present', () => { + expect(Util.getjQuery()).toEqual(fakejQuery) + }) + + it('should not return jQuery object when present if data-bs-no-jquery', () => { + document.body.setAttribute('data-bs-no-jquery', '') + + expect(window.jQuery).toEqual(fakejQuery) + expect(Util.getjQuery()).toBeNull() + + document.body.removeAttribute('data-bs-no-jquery') + }) + + it('should not return jQuery if not present', () => { + window.jQuery = undefined + expect(Util.getjQuery()).toBeNull() + }) + }) + + describe('onDOMContentLoaded', () => { + it('should execute callbacks when DOMContentLoaded is fired and should not add more than one listener', () => { + const spy = jasmine.createSpy() + const spy2 = jasmine.createSpy() + + const spyAdd = spyOn(document, 'addEventListener').and.callThrough() + spyOnProperty(document, 'readyState').and.returnValue('loading') + + Util.onDOMContentLoaded(spy) + Util.onDOMContentLoaded(spy2) + + document.dispatchEvent(new Event('DOMContentLoaded', { + bubbles: true, + cancelable: true + })) + + expect(spy).toHaveBeenCalled() + expect(spy2).toHaveBeenCalled() + expect(spyAdd).toHaveBeenCalledTimes(1) + }) + + it('should execute callback if readyState is not "loading"', () => { + const spy = jasmine.createSpy() + Util.onDOMContentLoaded(spy) + expect(spy).toHaveBeenCalled() + }) + }) + + describe('defineJQueryPlugin', () => { + const fakejQuery = { fn: {} } + + beforeEach(() => { + Object.defineProperty(window, 'jQuery', { + value: fakejQuery, + writable: true + }) + }) + + afterEach(() => { + window.jQuery = undefined + }) + + it('should define a plugin on the jQuery instance', () => { + const pluginMock = Util.noop + pluginMock.NAME = 'test' + pluginMock.jQueryInterface = Util.noop + + Util.defineJQueryPlugin(pluginMock) + expect(fakejQuery.fn.test).toEqual(pluginMock.jQueryInterface) + expect(fakejQuery.fn.test.Constructor).toEqual(pluginMock) + expect(fakejQuery.fn.test.noConflict).toEqual(jasmine.any(Function)) + }) + }) + + describe('execute', () => { + it('should execute if arg is function', () => { + const spy = jasmine.createSpy('spy') + Util.execute(spy) + expect(spy).toHaveBeenCalled() + }) + }) + + describe('executeAfterTransition', () => { + it('should immediately execute a function when waitForTransition parameter is false', () => { + const el = document.createElement('div') + const callbackSpy = jasmine.createSpy('callback spy') + const eventListenerSpy = spyOn(el, 'addEventListener') + + Util.executeAfterTransition(callbackSpy, el, false) + + expect(callbackSpy).toHaveBeenCalled() + expect(eventListenerSpy).not.toHaveBeenCalled() + }) + + it('should execute a function when a transitionend event is dispatched', () => { + const el = document.createElement('div') + const callbackSpy = jasmine.createSpy('callback spy') + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.05s', + transitionDelay: '0s' + }) + + Util.executeAfterTransition(callbackSpy, el) + + el.dispatchEvent(new TransitionEvent('transitionend')) + + expect(callbackSpy).toHaveBeenCalled() + }) + + it('should execute a function after a computed CSS transition duration and there was no transitionend event dispatched', () => { + return new Promise(resolve => { + const el = document.createElement('div') + const callbackSpy = jasmine.createSpy('callback spy') + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.05s', + transitionDelay: '0s' + }) + + Util.executeAfterTransition(callbackSpy, el) + + setTimeout(() => { + expect(callbackSpy).toHaveBeenCalled() + resolve() + }, 70) + }) + }) + + it('should not execute a function a second time after a computed CSS transition duration and if a transitionend event has already been dispatched', () => { + return new Promise(resolve => { + const el = document.createElement('div') + const callbackSpy = jasmine.createSpy('callback spy') + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.05s', + transitionDelay: '0s' + }) + + Util.executeAfterTransition(callbackSpy, el) + + setTimeout(() => { + el.dispatchEvent(new TransitionEvent('transitionend')) + }, 50) + + setTimeout(() => { + expect(callbackSpy).toHaveBeenCalledTimes(1) + resolve() + }, 70) + }) + }) + + it('should not trigger a transitionend event if another transitionend event had already happened', () => { + return new Promise(resolve => { + const el = document.createElement('div') + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.05s', + transitionDelay: '0s' + }) + + Util.executeAfterTransition(noop, el) + + // simulate a event dispatched by the browser + el.dispatchEvent(new TransitionEvent('transitionend')) + + const dispatchSpy = spyOn(el, 'dispatchEvent').and.callThrough() + + setTimeout(() => { + // setTimeout should not have triggered another transitionend event. + expect(dispatchSpy).not.toHaveBeenCalled() + resolve() + }, 70) + }) + }) + + it('should ignore transitionend events from nested elements', () => { + return new Promise(resolve => { + fixtureEl.innerHTML = [ + '
', + '
', + '
' + ].join('') + + const outer = fixtureEl.querySelector('.outer') + const nested = fixtureEl.querySelector('.nested') + const callbackSpy = jasmine.createSpy('callback spy') + + spyOn(window, 'getComputedStyle').and.returnValue({ + transitionDuration: '0.05s', + transitionDelay: '0s' + }) + + Util.executeAfterTransition(callbackSpy, outer) + + nested.dispatchEvent(new TransitionEvent('transitionend', { + bubbles: true + })) + + setTimeout(() => { + expect(callbackSpy).not.toHaveBeenCalled() + }, 20) + + setTimeout(() => { + expect(callbackSpy).toHaveBeenCalled() + resolve() + }, 70) + }) + }) + }) + + describe('getNextActiveElement', () => { + it('should return first element if active not exists or not given and shouldGetNext is either true, or false with cycling being disabled', () => { + const array = ['a', 'b', 'c', 'd'] + + expect(Util.getNextActiveElement(array, '', true, true)).toEqual('a') + expect(Util.getNextActiveElement(array, 'g', true, true)).toEqual('a') + expect(Util.getNextActiveElement(array, '', true, false)).toEqual('a') + expect(Util.getNextActiveElement(array, 'g', true, false)).toEqual('a') + expect(Util.getNextActiveElement(array, '', false, false)).toEqual('a') + expect(Util.getNextActiveElement(array, 'g', false, false)).toEqual('a') + }) + + it('should return last element if active not exists or not given and shouldGetNext is false but cycling is enabled', () => { + const array = ['a', 'b', 'c', 'd'] + + expect(Util.getNextActiveElement(array, '', false, true)).toEqual('d') + expect(Util.getNextActiveElement(array, 'g', false, true)).toEqual('d') + }) + + it('should return next element or same if is last', () => { + const array = ['a', 'b', 'c', 'd'] + + expect(Util.getNextActiveElement(array, 'a', true, true)).toEqual('b') + expect(Util.getNextActiveElement(array, 'b', true, true)).toEqual('c') + expect(Util.getNextActiveElement(array, 'd', true, false)).toEqual('d') + }) + + it('should return next element or first, if is last and "isCycleAllowed = true"', () => { + const array = ['a', 'b', 'c', 'd'] + + expect(Util.getNextActiveElement(array, 'c', true, true)).toEqual('d') + expect(Util.getNextActiveElement(array, 'd', true, true)).toEqual('a') + }) + + it('should return previous element or same if is first', () => { + const array = ['a', 'b', 'c', 'd'] + + expect(Util.getNextActiveElement(array, 'b', false, true)).toEqual('a') + expect(Util.getNextActiveElement(array, 'd', false, true)).toEqual('c') + expect(Util.getNextActiveElement(array, 'a', false, false)).toEqual('a') + }) + + it('should return next element or first, if is last and "isCycleAllowed = true"', () => { + const array = ['a', 'b', 'c', 'd'] + + expect(Util.getNextActiveElement(array, 'd', false, true)).toEqual('c') + expect(Util.getNextActiveElement(array, 'a', false, true)).toEqual('d') + }) + }) +}) diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/sanitizer.spec.js b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/sanitizer.spec.js new file mode 100644 index 0000000..c656aed --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/unit/util/sanitizer.spec.js @@ -0,0 +1,105 @@ +import { DefaultAllowlist, sanitizeHtml } from '../../../src/util/sanitizer' + +describe('Sanitizer', () => { + describe('sanitizeHtml', () => { + it('should return the same on empty string', () => { + const empty = '' + + const result = sanitizeHtml(empty, DefaultAllowlist, null) + + expect(result).toEqual(empty) + }) + + it('should sanitize template by removing tags with XSS', () => { + const template = [ + '
', + ' Click me', + ' Some content', + '
' + ].join('') + + const result = sanitizeHtml(template, DefaultAllowlist, null) + + expect(result).not.toContain('href="javascript:alert(7)') + }) + + it('should sanitize template and work with multiple regex', () => { + const template = [ + '
', + ' Click me', + ' Some content', + '
' + ].join('') + + const myDefaultAllowList = DefaultAllowlist + // With the default allow list + let result = sanitizeHtml(template, myDefaultAllowList, null) + + // `data-foo` won't be present + expect(result).not.toContain('data-foo="bar"') + + // Add the following regex too + myDefaultAllowList['*'].push(/^data-foo/) + + result = sanitizeHtml(template, myDefaultAllowList, null) + + expect(result).not.toContain('href="javascript:alert(7)') // This is in the default list + expect(result).toContain('aria-label="This is a link"') // This is in the default list + expect(result).toContain('data-foo="bar"') // We explicitly allow this + }) + + it('should allow aria attributes and safe attributes', () => { + const template = [ + '
', + ' Some content', + '
' + ].join('') + + const result = sanitizeHtml(template, DefaultAllowlist, null) + + expect(result).toContain('aria-pressed') + expect(result).toContain('class="test"') + }) + + it('should remove tags not in allowlist', () => { + const template = [ + '
', + ' ', + '
' + ].join('') + + const result = sanitizeHtml(template, DefaultAllowlist, null) + + expect(result).not.toContain(' + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/button.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/button.html new file mode 100644 index 0000000..0c54934 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/button.html @@ -0,0 +1,49 @@ + + + + + + + Button + + +
+

Button Bootstrap Visual Test

+ + + +

For checkboxes and radio buttons, ensure that keyboard behavior is functioning correctly.

+

Navigate to the checkboxes with the keyboard (generally, using TAB / SHIFT + TAB), and ensure that SPACE toggles the currently focused checkbox. Click on one of the checkboxes using the mouse, ensure that focus was correctly set on the actual checkbox, and that SPACE toggles the checkbox again.

+ +
+ + + +
+ +

Navigate to the radio button group with the keyboard (generally, using TAB / SHIFT + TAB). If no radio button was initially set to be selected, the first/last radio button should receive focus (depending on whether you navigated "forward" to the group with TAB or "backwards" using SHIFT + TAB). If a radio button was already selected, navigating with the keyboard should set focus to that particular radio button. Only one radio button in a group should receive focus at any given time. Ensure that the selected radio button can be changed by using the and arrow keys. Click on one of the radio buttons with the mouse, ensure that focus was correctly set on the actual radio button, and that and change the selected radio button again.

+ +
+ + + +
+
+ + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/carousel.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/carousel.html new file mode 100644 index 0000000..153c866 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/carousel.html @@ -0,0 +1,65 @@ + + + + + + + Carousel + + + +
+

Carousel Bootstrap Visual Test

+ +

The transition duration should be around 2s. Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.

+ + +
+ + + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/collapse.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/collapse.html new file mode 100644 index 0000000..2782c56 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/collapse.html @@ -0,0 +1,76 @@ + + + + + + + Collapse + + +
+

Collapse Bootstrap Visual Test

+ +
+ + + + +
+
+ + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/dropdown.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/dropdown.html new file mode 100644 index 0000000..04cf06d --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/dropdown.html @@ -0,0 +1,205 @@ + + + + + + + Dropdown + + +
+

Dropdown Bootstrap Visual Test

+ + + + + +
+
+ +
+ + + +
+
+ +
+ + +
+ + +
+
+ +
+
+ Dropup split align end + + +
+
+ + +
+
+ +
+
+ Dropend split + + +
+
+ + +
+ +
+ Dropstart split + + +
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+
+ + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/modal.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/modal.html new file mode 100644 index 0000000..b738d9e --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/modal.html @@ -0,0 +1,275 @@ + + + + + + + Modal + + + + + +
+

Modal Bootstrap Visual Test

+ + + + + + + + + + + +

+ + + (See Issue #18365) + +

+ + + +

+ + + + + +

+ + +
+ + + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/popover.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/popover.html new file mode 100644 index 0000000..73edf99 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/popover.html @@ -0,0 +1,41 @@ + + + + + + + Popover + + +
+

Popover Bootstrap Visual Test

+ + + + + + + + + + +
+ + + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/scrollspy.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/scrollspy.html new file mode 100644 index 0000000..2daa7ab --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/scrollspy.html @@ -0,0 +1,91 @@ + + + + + + + Scrollspy + + + + +
+

@fat

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+
+

@mdo

+

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+
+

one

+

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+
+

two

+

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+
+

three

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+
+

Final section

+

Ad leggings keytar, brunch id art party dolor labore.

+
+ + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/tab.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/tab.html new file mode 100644 index 0000000..4cbc86c --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/tab.html @@ -0,0 +1,223 @@ + + + + + + + Tab + + + +
+

Tab Bootstrap Visual Test

+ +

Tabs without fade

+ + + +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+
+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+
+
+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+
+
+ +

Tabs with fade

+ + + +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+
+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+
+
+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+
+
+ +

Tabs without fade (no initially active pane)

+ + + +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+
+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+
+
+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+
+
+ +

Tabs with fade (no initially active pane)

+ + + +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+
+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+
+
+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+
+
+ +

Tabs with nav and using links (with fade)

+ + +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

+
+
+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

+
+
+ +

Tabs with list-group (with fade)

+
+
+
+ + + + +
+
+
+ +
+
+
+ + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/toast.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/toast.html new file mode 100644 index 0000000..f86926d --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/toast.html @@ -0,0 +1,70 @@ + + + + + + + Toast + + + +
+

Toast Bootstrap Visual Test

+ +
+
+ + +
+
+
+ +
+ + + +
+ + + + + diff --git a/cao_sunyata/static/libs/bootstrap/js/tests/visual/tooltip.html b/cao_sunyata/static/libs/bootstrap/js/tests/visual/tooltip.html new file mode 100644 index 0000000..1a3b9f2 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/js/tests/visual/tooltip.html @@ -0,0 +1,138 @@ + + + + + + + Tooltip + + + +
+

Tooltip Bootstrap Visual Test

+ +

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.

+ +
+ +
+

+ + + + + +

+
+
+

+ + + + +

+
+
+
+
+
+
+
+
+ +
+
+
Test Selector triggered tooltips
+
+
+ + +
+ +
+
+ +
+
+
+ + + + + + + + diff --git a/cao_sunyata/static/libs/bootstrap/package.json b/cao_sunyata/static/libs/bootstrap/package.json new file mode 100644 index 0000000..049c51b --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/package.json @@ -0,0 +1,180 @@ +{ + "name": "bootstrap", + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", + "version": "5.2.0-beta1", + "config": { + "version_short": "5.2" + }, + "keywords": [ + "css", + "sass", + "mobile-first", + "responsive", + "front-end", + "framework", + "web" + ], + "homepage": "https://getbootstrap.com/", + "author": "The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)", + "contributors": [ + "Twitter, Inc." + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/twbs/bootstrap.git" + }, + "bugs": { + "url": "https://github.com/twbs/bootstrap/issues" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "main": "dist/js/bootstrap.js", + "module": "dist/js/bootstrap.esm.js", + "sass": "scss/bootstrap.scss", + "style": "dist/css/bootstrap.css", + "scripts": { + "start": "npm-run-all --parallel watch docs-serve", + "bundlewatch": "bundlewatch --config .bundlewatch.config.json", + "css": "npm-run-all css-compile css-prefix css-rtl css-minify", + "css-compile": "sass --style expanded --source-map --embed-sources --no-error-css scss/:dist/css/", + "css-rtl": "cross-env NODE_ENV=RTL postcss --config build/postcss.config.js --dir \"dist/css\" --ext \".rtl.css\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*.rtl.css\"", + "css-lint": "npm-run-all --aggregate-output --continue-on-error --parallel css-lint-*", + "css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache --rd", + "css-lint-vars": "fusv scss/ site/assets/scss/", + "css-minify": "npm-run-all --aggregate-output --parallel css-minify-*", + "css-minify-main": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*rtl*.css\"", + "css-minify-rtl": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*rtl.css\" \"!dist/css/*.min.css\"", + "css-prefix": "npm-run-all --aggregate-output --parallel css-prefix-*", + "css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"", + "css-prefix-examples": "postcss --config build/postcss.config.js --replace \"site/content/**/*.css\"", + "css-prefix-examples-rtl": "cross-env-shell NODE_ENV=RTL postcss --config build/postcss.config.js --dir \"site/content/docs/$npm_package_config_version_short/examples/\" --ext \".rtl.css\" --base \"site/content/docs/$npm_package_config_version_short/examples/\" \"site/content/docs/$npm_package_config_version_short/examples/{blog,carousel,dashboard,cheatsheet}/*.css\" \"!site/content/docs/$npm_package_config_version_short/examples/{blog,carousel,dashboard,cheatsheet}/*.rtl.css\"", + "js": "npm-run-all js-compile js-minify", + "js-compile": "npm-run-all --aggregate-output --parallel js-compile-*", + "js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap", + "js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.js --sourcemap", + "js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap", + "js-compile-plugins": "node build/build-plugins.js", + "js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .", + "js-minify": "npm-run-all --aggregate-output --parallel js-minify-*", + "js-minify-standalone": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js", + "js-minify-standalone-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.esm.js.map,includeSources,url=bootstrap.esm.min.js.map\" --output dist/js/bootstrap.esm.min.js dist/js/bootstrap.esm.js", + "js-minify-bundle": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.bundle.js.map,includeSources,url=bootstrap.bundle.min.js.map\" --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js", + "js-test": "npm-run-all --aggregate-output --parallel js-test-karma js-test-jquery js-test-integration-*", + "js-debug": "cross-env DEBUG=true npm run js-test-karma", + "js-test-karma": "karma start js/tests/karma.conf.js", + "js-test-integration-bundle": "rollup --config js/tests/integration/rollup.bundle.js", + "js-test-integration-modularity": "rollup --config js/tests/integration/rollup.bundle-modularity.js", + "js-test-cloud": "cross-env BROWSERSTACK=true npm run js-test-karma", + "js-test-jquery": "cross-env JQUERY=true npm run js-test-karma", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint lockfile-lint", + "docs": "npm-run-all docs-build docs-lint", + "docs-build": "hugo --cleanDestinationDir", + "docs-compile": "npm run docs-build", + "docs-vnu": "node build/vnu-jar.js", + "docs-lint": "npm run docs-vnu", + "docs-serve": "hugo server --port 9001 --disableFastRender", + "docs-serve-only": "npx sirv-cli _site --port 9001", + "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json", + "update-deps": "ncu -u -x globby,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor", + "release": "npm-run-all dist release-sri docs-build release-zip*", + "release-sri": "node build/generate-sri.js", + "release-version": "node build/change-version.js", + "release-zip": "cross-env-shell \"rm -rf bootstrap-$npm_package_version-dist && cp -r dist/ bootstrap-$npm_package_version-dist && zip -r9 bootstrap-$npm_package_version-dist.zip bootstrap-$npm_package_version-dist && rm -rf bootstrap-$npm_package_version-dist\"", + "release-zip-examples": "node build/zip-examples.js", + "dist": "npm-run-all --aggregate-output --parallel css js", + "test": "npm-run-all lint dist js-test docs-build docs-lint", + "netlify": "cross-env-shell HUGO_BASEURL=$DEPLOY_PRIME_URL npm-run-all dist release-sri docs-build", + "watch": "npm-run-all --parallel watch-*", + "watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm-run-all css-lint css-compile css-prefix\"", + "watch-css-dist": "nodemon --watch dist/css/ --ext css --ignore \"dist/css/*.rtl.*\" --exec \"npm run css-rtl\"", + "watch-css-docs": "nodemon --watch site/assets/scss/ --ext scss --exec \"npm run css-lint\"", + "watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm-run-all js-lint js-compile\"", + "watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\"" + }, + "peerDependencies": { + "@popperjs/core": "^2.11.5" + }, + "devDependencies": { + "@babel/cli": "^7.17.10", + "@babel/core": "^7.17.10", + "@babel/preset-env": "^7.17.10", + "@popperjs/core": "^2.11.5", + "@rollup/plugin-babel": "^5.3.1", + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "autoprefixer": "^10.4.7", + "bundlewatch": "^0.3.3", + "clean-css-cli": "^5.6.0", + "cross-env": "^7.0.3", + "eslint": "^8.15.0", + "eslint-config-xo": "^0.40.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-markdown": "^2.2.1", + "eslint-plugin-unicorn": "^42.0.0", + "find-unused-sass-variables": "^4.0.4", + "globby": "^11.1.0", + "hammer-simulator": "0.0.1", + "hugo-bin": "^0.86.0", + "ip": "^2.0.0", + "jquery": "^3.6.0", + "karma": "^6.3.20", + "karma-browserstack-launcher": "1.4.0", + "karma-chrome-launcher": "^3.1.1", + "karma-coverage-istanbul-reporter": "^3.0.3", + "karma-detect-browsers": "^2.3.3", + "karma-firefox-launcher": "^2.1.2", + "karma-jasmine": "^5.0.1", + "karma-jasmine-html-reporter": "^1.7.0", + "karma-rollup-preprocessor": "7.0.7", + "lockfile-lint": "^4.7.4", + "nodemon": "^2.0.16", + "npm-run-all": "^4.1.5", + "postcss": "^8.4.13", + "postcss-cli": "^9.1.0", + "rollup": "^2.72.1", + "rollup-plugin-istanbul": "^3.0.0", + "rtlcss": "^3.5.0", + "sass": "^1.51.0", + "shelljs": "^0.8.5", + "stylelint": "^14.8.2", + "stylelint-config-twbs-bootstrap": "^3.0.1", + "terser": "^5.13.1", + "vnu-jar": "21.10.12" + }, + "files": [ + "dist/{css,js}/*.{css,js,map}", + "js/{src,dist}/**/*.{js,map}", + "scss/**/*.scss" + ], + "hugo-bin": { + "buildTags": "extended" + }, + "jspm": { + "registry": "npm", + "main": "js/bootstrap", + "directories": { + "lib": "dist" + }, + "shim": { + "js/bootstrap": { + "deps": [ + "@popperjs/core" + ] + } + }, + "dependencies": {}, + "peerDependencies": { + "@popperjs/core": "^2.11.5" + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_accordion.scss b/cao_sunyata/static/libs/bootstrap/scss/_accordion.scss new file mode 100644 index 0000000..75588a5 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_accordion.scss @@ -0,0 +1,158 @@ +// +// Base styles +// + +.accordion { + // scss-docs-start accordion-css-vars + --#{$prefix}accordion-color: #{$accordion-color}; + --#{$prefix}accordion-bg: #{$accordion-bg}; + --#{$prefix}accordion-transition: #{$accordion-transition}; + --#{$prefix}accordion-border-color: #{$accordion-border-color}; + --#{$prefix}accordion-border-width: #{$accordion-border-width}; + --#{$prefix}accordion-border-radius: #{$accordion-border-radius}; + --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius}; + --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x}; + --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y}; + --#{$prefix}accordion-btn-color: #{$accordion-button-color}; + --#{$prefix}accordion-btn-bg: #{$accordion-button-bg}; + --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)}; + --#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width}; + --#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform}; + --#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition}; + --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)}; + --#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color}; + --#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow}; + --#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x}; + --#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y}; + --#{$prefix}accordion-active-color: #{$accordion-button-active-color}; + --#{$prefix}accordion-active-bg: #{$accordion-button-active-bg}; + // scss-docs-end accordion-css-vars +} + +.accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x); + @include font-size($font-size-base); + color: var(--#{$prefix}accordion-btn-color); + text-align: left; // Reset button style + background-color: var(--#{$prefix}accordion-btn-bg); + border: 0; + @include border-radius(0); + overflow-anchor: none; + @include transition(var(--#{$prefix}accordion-transition)); + + &:not(.collapsed) { + color: var(--#{$prefix}accordion-active-color); + background-color: var(--#{$prefix}accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list + + &::after { + background-image: var(--#{$prefix}accordion-btn-active-icon); + transform: var(--#{$prefix}accordion-btn-icon-transform); + } + } + + // Accordion icon + &::after { + flex-shrink: 0; + width: var(--#{$prefix}accordion-btn-icon-width); + height: var(--#{$prefix}accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--#{$prefix}accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--#{$prefix}accordion-btn-icon-width); + @include transition(var(--#{$prefix}accordion-btn-icon-transition)); + } + + &:hover { + z-index: 2; + } + + &:focus { + z-index: 3; + border-color: var(--#{$prefix}accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow); + } +} + +.accordion-header { + margin-bottom: 0; +} + +.accordion-item { + color: var(--#{$prefix}accordion-color); + background-color: var(--#{$prefix}accordion-bg); + border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color); + + &:first-of-type { + @include border-top-radius(var(--#{$prefix}accordion-border-radius)); + + .accordion-button { + @include border-top-radius(var(--#{$prefix}accordion-inner-border-radius)); + } + } + + &:not(:first-of-type) { + border-top: 0; + } + + // Only set a border-radius on the last item if the accordion is collapsed + &:last-of-type { + @include border-bottom-radius(var(--#{$prefix}accordion-border-radius)); + + .accordion-button { + &.collapsed { + @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius)); + } + } + + .accordion-collapse { + @include border-bottom-radius(var(--#{$prefix}accordion-border-radius)); + } + } +} + +.accordion-body { + padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x); +} + + +// Flush accordion items +// +// Remove borders and border-radius to keep accordion items edge-to-edge. + +.accordion-flush { + .accordion-collapse { + border-width: 0; + } + + .accordion-item { + border-right: 0; + border-left: 0; + @include border-radius(0); + + &:first-child { border-top: 0; } + &:last-child { border-bottom: 0; } + + .accordion-button { + &, + &.collapsed { + @include border-radius(0); + } + } + } +} + +@if $enable-dark-mode { + @include color-mode(dark) { + .accordion-button::after { + --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)}; + --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon-dark)}; + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_alert.scss b/cao_sunyata/static/libs/bootstrap/scss/_alert.scss new file mode 100644 index 0000000..b8cff9b --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_alert.scss @@ -0,0 +1,68 @@ +// +// Base styles +// + +.alert { + // scss-docs-start alert-css-vars + --#{$prefix}alert-bg: transparent; + --#{$prefix}alert-padding-x: #{$alert-padding-x}; + --#{$prefix}alert-padding-y: #{$alert-padding-y}; + --#{$prefix}alert-margin-bottom: #{$alert-margin-bottom}; + --#{$prefix}alert-color: inherit; + --#{$prefix}alert-border-color: transparent; + --#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color); + --#{$prefix}alert-border-radius: #{$alert-border-radius}; + --#{$prefix}alert-link-color: inherit; + // scss-docs-end alert-css-vars + + position: relative; + padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x); + margin-bottom: var(--#{$prefix}alert-margin-bottom); + color: var(--#{$prefix}alert-color); + background-color: var(--#{$prefix}alert-bg); + border: var(--#{$prefix}alert-border); + @include border-radius(var(--#{$prefix}alert-border-radius)); +} + +// Headings for larger alerts +.alert-heading { + // Specified to prevent conflicts of changing $headings-color + color: inherit; +} + +// Provide class for links that match alerts +.alert-link { + font-weight: $alert-link-font-weight; + color: var(--#{$prefix}alert-link-color); +} + + +// Dismissible alerts +// +// Expand the right padding and account for the close button's positioning. + +.alert-dismissible { + padding-right: $alert-dismissible-padding-r; + + // Adjust close link position + .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: $stretched-link-z-index + 1; + padding: $alert-padding-y * 1.25 $alert-padding-x; + } +} + + +// scss-docs-start alert-modifiers +// Generate contextual modifier classes for colorizing the alert +@each $state in map-keys($theme-colors) { + .alert-#{$state} { + --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis); + --#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle); + --#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle); + --#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text-emphasis); + } +} +// scss-docs-end alert-modifiers diff --git a/cao_sunyata/static/libs/bootstrap/scss/_badge.scss b/cao_sunyata/static/libs/bootstrap/scss/_badge.scss new file mode 100644 index 0000000..cc3d269 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_badge.scss @@ -0,0 +1,38 @@ +// Base class +// +// Requires one of the contextual, color modifier classes for `color` and +// `background-color`. + +.badge { + // scss-docs-start badge-css-vars + --#{$prefix}badge-padding-x: #{$badge-padding-x}; + --#{$prefix}badge-padding-y: #{$badge-padding-y}; + @include rfs($badge-font-size, --#{$prefix}badge-font-size); + --#{$prefix}badge-font-weight: #{$badge-font-weight}; + --#{$prefix}badge-color: #{$badge-color}; + --#{$prefix}badge-border-radius: #{$badge-border-radius}; + // scss-docs-end badge-css-vars + + display: inline-block; + padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x); + @include font-size(var(--#{$prefix}badge-font-size)); + font-weight: var(--#{$prefix}badge-font-weight); + line-height: 1; + color: var(--#{$prefix}badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + @include border-radius(var(--#{$prefix}badge-border-radius)); + @include gradient-bg(); + + // Empty badges collapse automatically + &:empty { + display: none; + } +} + +// Quick fix for badges in buttons +.btn .badge { + position: relative; + top: -1px; +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_breadcrumb.scss b/cao_sunyata/static/libs/bootstrap/scss/_breadcrumb.scss new file mode 100644 index 0000000..b8252ff --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_breadcrumb.scss @@ -0,0 +1,40 @@ +.breadcrumb { + // scss-docs-start breadcrumb-css-vars + --#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x}; + --#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y}; + --#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom}; + @include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size); + --#{$prefix}breadcrumb-bg: #{$breadcrumb-bg}; + --#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius}; + --#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color}; + --#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x}; + --#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color}; + // scss-docs-end breadcrumb-css-vars + + display: flex; + flex-wrap: wrap; + padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x); + margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom); + @include font-size(var(--#{$prefix}breadcrumb-font-size)); + list-style: none; + background-color: var(--#{$prefix}breadcrumb-bg); + @include border-radius(var(--#{$prefix}breadcrumb-border-radius)); +} + +.breadcrumb-item { + // The separator between breadcrumbs (by default, a forward-slash: "/") + + .breadcrumb-item { + padding-left: var(--#{$prefix}breadcrumb-item-padding-x); + + &::before { + float: left; // Suppress inline spacings and underlining of the separator + padding-right: var(--#{$prefix}breadcrumb-item-padding-x); + color: var(--#{$prefix}breadcrumb-divider-color); + content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"}; + } + } + + &.active { + color: var(--#{$prefix}breadcrumb-item-active-color); + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_button-group.scss b/cao_sunyata/static/libs/bootstrap/scss/_button-group.scss new file mode 100644 index 0000000..55ae3f6 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_button-group.scss @@ -0,0 +1,142 @@ +// Make the div behave like a button +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; // match .btn alignment given font-size hack above + + > .btn { + position: relative; + flex: 1 1 auto; + } + + // Bring the hover, focused, and "active" buttons to the front to overlay + // the borders properly + > .btn-check:checked + .btn, + > .btn-check:focus + .btn, + > .btn:hover, + > .btn:focus, + > .btn:active, + > .btn.active { + z-index: 1; + } +} + +// Optional: Group multiple button groups together for a toolbar +.btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; + + .input-group { + width: auto; + } +} + +.btn-group { + @include border-radius($btn-border-radius); + + // Prevent double borders when buttons are next to each other + > :not(.btn-check:first-child) + .btn, + > .btn-group:not(:first-child) { + margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list + } + + // Reset rounded corners + > .btn:not(:last-child):not(.dropdown-toggle), + > .btn.dropdown-toggle-split:first-child, + > .btn-group:not(:last-child) > .btn { + @include border-end-radius(0); + } + + // The left radius should be 0 if the button is: + // - the "third or more" child + // - the second child and the previous element isn't `.btn-check` (making it the first child visually) + // - part of a btn-group which isn't the first child + > .btn:nth-child(n + 3), + > :not(.btn-check) + .btn, + > .btn-group:not(:first-child) > .btn { + @include border-start-radius(0); + } +} + +// Sizing +// +// Remix the default button sizing classes into new ones for easier manipulation. + +.btn-group-sm > .btn { @extend .btn-sm; } +.btn-group-lg > .btn { @extend .btn-lg; } + + +// +// Split button dropdowns +// + +.dropdown-toggle-split { + padding-right: $btn-padding-x * .75; + padding-left: $btn-padding-x * .75; + + &::after, + .dropup &::after, + .dropend &::after { + margin-left: 0; + } + + .dropstart &::before { + margin-right: 0; + } +} + +.btn-sm + .dropdown-toggle-split { + padding-right: $btn-padding-x-sm * .75; + padding-left: $btn-padding-x-sm * .75; +} + +.btn-lg + .dropdown-toggle-split { + padding-right: $btn-padding-x-lg * .75; + padding-left: $btn-padding-x-lg * .75; +} + + +// The clickable button for toggling the menu +// Set the same inset shadow as the :active state +.btn-group.show .dropdown-toggle { + @include box-shadow($btn-active-box-shadow); + + // Show no shadow for `.btn-link` since it has no other button styles. + &.btn-link { + @include box-shadow(none); + } +} + + +// +// Vertical button groups +// + +.btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; + + > .btn, + > .btn-group { + width: 100%; + } + + > .btn:not(:first-child), + > .btn-group:not(:first-child) { + margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list + } + + // Reset rounded corners + > .btn:not(:last-child):not(.dropdown-toggle), + > .btn-group:not(:last-child) > .btn { + @include border-bottom-radius(0); + } + + > .btn ~ .btn, + > .btn-group:not(:first-child) > .btn { + @include border-top-radius(0); + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_buttons.scss b/cao_sunyata/static/libs/bootstrap/scss/_buttons.scss new file mode 100644 index 0000000..cbc0784 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_buttons.scss @@ -0,0 +1,207 @@ +// +// Base styles +// + +.btn { + // scss-docs-start btn-css-vars + --#{$prefix}btn-padding-x: #{$btn-padding-x}; + --#{$prefix}btn-padding-y: #{$btn-padding-y}; + --#{$prefix}btn-font-family: #{$btn-font-family}; + @include rfs($btn-font-size, --#{$prefix}btn-font-size); + --#{$prefix}btn-font-weight: #{$btn-font-weight}; + --#{$prefix}btn-line-height: #{$btn-line-height}; + --#{$prefix}btn-color: #{$btn-color}; + --#{$prefix}btn-bg: transparent; + --#{$prefix}btn-border-width: #{$btn-border-width}; + --#{$prefix}btn-border-color: transparent; + --#{$prefix}btn-border-radius: #{$btn-border-radius}; + --#{$prefix}btn-hover-border-color: transparent; + --#{$prefix}btn-box-shadow: #{$btn-box-shadow}; + --#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity}; + --#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5); + // scss-docs-end btn-css-vars + + display: inline-block; + padding: var(--#{$prefix}btn-padding-y) var(--#{$prefix}btn-padding-x); + font-family: var(--#{$prefix}btn-font-family); + @include font-size(var(--#{$prefix}btn-font-size)); + font-weight: var(--#{$prefix}btn-font-weight); + line-height: var(--#{$prefix}btn-line-height); + color: var(--#{$prefix}btn-color); + text-align: center; + text-decoration: if($link-decoration == none, null, none); + white-space: $btn-white-space; + vertical-align: middle; + cursor: if($enable-button-pointers, pointer, null); + user-select: none; + border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color); + @include border-radius(var(--#{$prefix}btn-border-radius)); + @include gradient-bg(var(--#{$prefix}btn-bg)); + @include box-shadow(var(--#{$prefix}btn-box-shadow)); + @include transition($btn-transition); + + &:hover { + color: var(--#{$prefix}btn-hover-color); + text-decoration: if($link-hover-decoration == underline, none, null); + background-color: var(--#{$prefix}btn-hover-bg); + border-color: var(--#{$prefix}btn-hover-border-color); + } + + .btn-check + &:hover { + // override for the checkbox/radio buttons + color: var(--#{$prefix}btn-color); + background-color: var(--#{$prefix}btn-bg); + border-color: var(--#{$prefix}btn-border-color); + } + + &:focus-visible { + color: var(--#{$prefix}btn-hover-color); + @include gradient-bg(var(--#{$prefix}btn-hover-bg)); + border-color: var(--#{$prefix}btn-hover-border-color); + outline: 0; + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow); + } @else { + box-shadow: var(--#{$prefix}btn-focus-box-shadow); + } + } + + .btn-check:focus-visible + & { + border-color: var(--#{$prefix}btn-hover-border-color); + outline: 0; + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow); + } @else { + box-shadow: var(--#{$prefix}btn-focus-box-shadow); + } + } + + .btn-check:checked + &, + :not(.btn-check) + &:active, + &:first-child:active, + &.active, + &.show { + color: var(--#{$prefix}btn-active-color); + background-color: var(--#{$prefix}btn-active-bg); + // Remove CSS gradients if they're enabled + background-image: if($enable-gradients, none, null); + border-color: var(--#{$prefix}btn-active-border-color); + @include box-shadow(var(--#{$prefix}btn-active-shadow)); + + &:focus-visible { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow); + } @else { + box-shadow: var(--#{$prefix}btn-focus-box-shadow); + } + } + } + + &:disabled, + &.disabled, + fieldset:disabled & { + color: var(--#{$prefix}btn-disabled-color); + pointer-events: none; + background-color: var(--#{$prefix}btn-disabled-bg); + background-image: if($enable-gradients, none, null); + border-color: var(--#{$prefix}btn-disabled-border-color); + opacity: var(--#{$prefix}btn-disabled-opacity); + @include box-shadow(none); + } +} + + +// +// Alternate buttons +// + +// scss-docs-start btn-variant-loops +@each $color, $value in $theme-colors { + .btn-#{$color} { + @if $color == "light" { + @include button-variant( + $value, + $value, + $hover-background: shade-color($value, $btn-hover-bg-shade-amount), + $hover-border: shade-color($value, $btn-hover-border-shade-amount), + $active-background: shade-color($value, $btn-active-bg-shade-amount), + $active-border: shade-color($value, $btn-active-border-shade-amount) + ); + } @else if $color == "dark" { + @include button-variant( + $value, + $value, + $hover-background: tint-color($value, $btn-hover-bg-tint-amount), + $hover-border: tint-color($value, $btn-hover-border-tint-amount), + $active-background: tint-color($value, $btn-active-bg-tint-amount), + $active-border: tint-color($value, $btn-active-border-tint-amount) + ); + } @else { + @include button-variant($value, $value); + } + } +} + +@each $color, $value in $theme-colors { + .btn-outline-#{$color} { + @include button-outline-variant($value); + } +} +// scss-docs-end btn-variant-loops + + +// +// Link buttons +// + +// Make a button look and behave like a link +.btn-link { + --#{$prefix}btn-font-weight: #{$font-weight-normal}; + --#{$prefix}btn-color: #{$btn-link-color}; + --#{$prefix}btn-bg: transparent; + --#{$prefix}btn-border-color: transparent; + --#{$prefix}btn-hover-color: #{$btn-link-hover-color}; + --#{$prefix}btn-hover-border-color: transparent; + --#{$prefix}btn-active-color: #{$btn-link-hover-color}; + --#{$prefix}btn-active-border-color: transparent; + --#{$prefix}btn-disabled-color: #{$btn-link-disabled-color}; + --#{$prefix}btn-disabled-border-color: transparent; + --#{$prefix}btn-box-shadow: 0 0 0 #000; // Can't use `none` as keyword negates all values when used with multiple shadows + --#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix(color-contrast($link-color), $link-color, 15%))}; + + text-decoration: $link-decoration; + @if $enable-gradients { + background-image: none; + } + + &:hover, + &:focus-visible { + text-decoration: $link-hover-decoration; + } + + &:focus-visible { + color: var(--#{$prefix}btn-color); + } + + &:hover { + color: var(--#{$prefix}btn-hover-color); + } + + // No need for an active state here +} + + +// +// Button Sizes +// + +.btn-lg { + @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg); +} + +.btn-sm { + @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm); +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_card.scss b/cao_sunyata/static/libs/bootstrap/scss/_card.scss new file mode 100644 index 0000000..d3535a9 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_card.scss @@ -0,0 +1,239 @@ +// +// Base styles +// + +.card { + // scss-docs-start card-css-vars + --#{$prefix}card-spacer-y: #{$card-spacer-y}; + --#{$prefix}card-spacer-x: #{$card-spacer-x}; + --#{$prefix}card-title-spacer-y: #{$card-title-spacer-y}; + --#{$prefix}card-title-color: #{$card-title-color}; + --#{$prefix}card-subtitle-color: #{$card-subtitle-color}; + --#{$prefix}card-border-width: #{$card-border-width}; + --#{$prefix}card-border-color: #{$card-border-color}; + --#{$prefix}card-border-radius: #{$card-border-radius}; + --#{$prefix}card-box-shadow: #{$card-box-shadow}; + --#{$prefix}card-inner-border-radius: #{$card-inner-border-radius}; + --#{$prefix}card-cap-padding-y: #{$card-cap-padding-y}; + --#{$prefix}card-cap-padding-x: #{$card-cap-padding-x}; + --#{$prefix}card-cap-bg: #{$card-cap-bg}; + --#{$prefix}card-cap-color: #{$card-cap-color}; + --#{$prefix}card-height: #{$card-height}; + --#{$prefix}card-color: #{$card-color}; + --#{$prefix}card-bg: #{$card-bg}; + --#{$prefix}card-img-overlay-padding: #{$card-img-overlay-padding}; + --#{$prefix}card-group-margin: #{$card-group-margin}; + // scss-docs-end card-css-vars + + position: relative; + display: flex; + flex-direction: column; + min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106 + height: var(--#{$prefix}card-height); + color: var(--#{$prefix}body-color); + word-wrap: break-word; + background-color: var(--#{$prefix}card-bg); + background-clip: border-box; + border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color); + @include border-radius(var(--#{$prefix}card-border-radius)); + @include box-shadow(var(--#{$prefix}card-box-shadow)); + + > hr { + margin-right: 0; + margin-left: 0; + } + + > .list-group { + border-top: inherit; + border-bottom: inherit; + + &:first-child { + border-top-width: 0; + @include border-top-radius(var(--#{$prefix}card-inner-border-radius)); + } + + &:last-child { + border-bottom-width: 0; + @include border-bottom-radius(var(--#{$prefix}card-inner-border-radius)); + } + } + + // Due to specificity of the above selector (`.card > .list-group`), we must + // use a child selector here to prevent double borders. + > .card-header + .list-group, + > .list-group + .card-footer { + border-top: 0; + } +} + +.card-body { + // Enable `flex-grow: 1` for decks and groups so that card blocks take up + // as much space as possible, ensuring footers are aligned to the bottom. + flex: 1 1 auto; + padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x); + color: var(--#{$prefix}card-color); +} + +.card-title { + margin-bottom: var(--#{$prefix}card-title-spacer-y); + color: var(--#{$prefix}card-title-color); +} + +.card-subtitle { + margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list + margin-bottom: 0; + color: var(--#{$prefix}card-subtitle-color); +} + +.card-text:last-child { + margin-bottom: 0; +} + +.card-link { + &:hover { + text-decoration: if($link-hover-decoration == underline, none, null); + } + + + .card-link { + margin-left: var(--#{$prefix}card-spacer-x); + } +} + +// +// Optional textual caps +// + +.card-header { + padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x); + margin-bottom: 0; // Removes the default margin-bottom of + color: var(--#{$prefix}card-cap-color); + background-color: var(--#{$prefix}card-cap-bg); + border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color); + + &:first-child { + @include border-radius(var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius) 0 0); + } +} + +.card-footer { + padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x); + color: var(--#{$prefix}card-cap-color); + background-color: var(--#{$prefix}card-cap-bg); + border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color); + + &:last-child { + @include border-radius(0 0 var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius)); + } +} + + +// +// Header navs +// + +.card-header-tabs { + margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list + margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list + margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list + border-bottom: 0; + + .nav-link.active { + background-color: var(--#{$prefix}card-bg); + border-bottom-color: var(--#{$prefix}card-bg); + } +} + +.card-header-pills { + margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list + margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list +} + +// Card image +.card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--#{$prefix}card-img-overlay-padding); + @include border-radius(var(--#{$prefix}card-inner-border-radius)); +} + +.card-img, +.card-img-top, +.card-img-bottom { + width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch +} + +.card-img, +.card-img-top { + @include border-top-radius(var(--#{$prefix}card-inner-border-radius)); +} + +.card-img, +.card-img-bottom { + @include border-bottom-radius(var(--#{$prefix}card-inner-border-radius)); +} + + +// +// Card groups +// + +.card-group { + // The child selector allows nested `.card` within `.card-group` + // to display properly. + > .card { + margin-bottom: var(--#{$prefix}card-group-margin); + } + + @include media-breakpoint-up(sm) { + display: flex; + flex-flow: row wrap; + // The child selector allows nested `.card` within `.card-group` + // to display properly. + > .card { + // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4 + flex: 1 0 0%; + margin-bottom: 0; + + + .card { + margin-left: 0; + border-left: 0; + } + + // Handle rounded corners + @if $enable-rounded { + &:not(:last-child) { + @include border-end-radius(0); + + .card-img-top, + .card-header { + // stylelint-disable-next-line property-disallowed-list + border-top-right-radius: 0; + } + .card-img-bottom, + .card-footer { + // stylelint-disable-next-line property-disallowed-list + border-bottom-right-radius: 0; + } + } + + &:not(:first-child) { + @include border-start-radius(0); + + .card-img-top, + .card-header { + // stylelint-disable-next-line property-disallowed-list + border-top-left-radius: 0; + } + .card-img-bottom, + .card-footer { + // stylelint-disable-next-line property-disallowed-list + border-bottom-left-radius: 0; + } + } + } + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_carousel.scss b/cao_sunyata/static/libs/bootstrap/scss/_carousel.scss new file mode 100644 index 0000000..0ac8f87 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_carousel.scss @@ -0,0 +1,244 @@ +// Notes on the classes: +// +// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically) +// even when their scroll action started on a carousel, but for compatibility (with Firefox) +// we're preventing all actions instead +// 2. The .carousel-item-start and .carousel-item-end is used to indicate where +// the active slide is heading. +// 3. .active.carousel-item is the current slide. +// 4. .active.carousel-item-start and .active.carousel-item-end is the current +// slide in its in-transition state. Only one of these occurs at a time. +// 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end +// is the upcoming slide in transition. + +.carousel { + position: relative; +} + +.carousel.pointer-event { + touch-action: pan-y; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; + @include clearfix(); +} + +.carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + backface-visibility: hidden; + @include transition($carousel-transition); +} + +.carousel-item.active, +.carousel-item-next, +.carousel-item-prev { + display: block; +} + +.carousel-item-next:not(.carousel-item-start), +.active.carousel-item-end { + transform: translateX(100%); +} + +.carousel-item-prev:not(.carousel-item-end), +.active.carousel-item-start { + transform: translateX(-100%); +} + + +// +// Alternate transitions +// + +.carousel-fade { + .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; + } + + .carousel-item.active, + .carousel-item-next.carousel-item-start, + .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; + } + + .active.carousel-item-start, + .active.carousel-item-end { + z-index: 0; + opacity: 0; + @include transition(opacity 0s $carousel-transition-duration); + } +} + + +// +// Left/right controls for nav +// + +.carousel-control-prev, +.carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + // Use flex for alignment (1-3) + display: flex; // 1. allow flex styles + align-items: center; // 2. vertically center contents + justify-content: center; // 3. horizontally center contents + width: $carousel-control-width; + padding: 0; + color: $carousel-control-color; + text-align: center; + background: none; + border: 0; + opacity: $carousel-control-opacity; + @include transition($carousel-control-transition); + + // Hover/focus state + &:hover, + &:focus { + color: $carousel-control-color; + text-decoration: none; + outline: 0; + opacity: $carousel-control-hover-opacity; + } +} +.carousel-control-prev { + left: 0; + background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null); +} +.carousel-control-next { + right: 0; + background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null); +} + +// Icons for within +.carousel-control-prev-icon, +.carousel-control-next-icon { + display: inline-block; + width: $carousel-control-icon-width; + height: $carousel-control-icon-width; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +/* rtl:options: { + "autoRename": true, + "stringMap":[ { + "name" : "prev-next", + "search" : "prev", + "replace" : "next" + } ] +} */ +.carousel-control-prev-icon { + background-image: escape-svg($carousel-control-prev-icon-bg); +} +.carousel-control-next-icon { + background-image: escape-svg($carousel-control-next-icon-bg); +} + +// Optional indicator pips/controls +// +// Add a container (such as a list) with the following class and add an item (ideally a focusable control, +// like a button) with data-bs-target for each slide your carousel holds. + +.carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + // Use the .carousel-control's width as margin so we don't overlay those + margin-right: $carousel-control-width; + margin-bottom: 1rem; + margin-left: $carousel-control-width; + + [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: $carousel-indicator-width; + height: $carousel-indicator-height; + padding: 0; + margin-right: $carousel-indicator-spacer; + margin-left: $carousel-indicator-spacer; + text-indent: -999px; + cursor: pointer; + background-color: $carousel-indicator-active-bg; + background-clip: padding-box; + border: 0; + // Use transparent borders to increase the hit area by 10px on top and bottom. + border-top: $carousel-indicator-hit-area-height solid transparent; + border-bottom: $carousel-indicator-hit-area-height solid transparent; + opacity: $carousel-indicator-opacity; + @include transition($carousel-indicator-transition); + } + + .active { + opacity: $carousel-indicator-active-opacity; + } +} + + +// Optional captions +// +// + +.carousel-caption { + position: absolute; + right: (100% - $carousel-caption-width) * .5; + bottom: $carousel-caption-spacer; + left: (100% - $carousel-caption-width) * .5; + padding-top: $carousel-caption-padding-y; + padding-bottom: $carousel-caption-padding-y; + color: $carousel-caption-color; + text-align: center; +} + +// Dark mode carousel + +@mixin carousel-dark() { + .carousel-control-prev-icon, + .carousel-control-next-icon { + filter: $carousel-dark-control-icon-filter; + } + + .carousel-indicators [data-bs-target] { + background-color: $carousel-dark-indicator-active-bg; + } + + .carousel-caption { + color: $carousel-dark-caption-color; + } +} + +.carousel-dark { + @include carousel-dark(); +} + +@if $enable-dark-mode { + @include color-mode(dark) { + @if $color-mode-type == "media-query" { + .carousel { + @include carousel-dark(); + } + } @else { + .carousel, + &.carousel { + @include carousel-dark(); + } + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_close.scss b/cao_sunyata/static/libs/bootstrap/scss/_close.scss new file mode 100644 index 0000000..4d6e73c --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_close.scss @@ -0,0 +1,63 @@ +// Transparent background and border properties included for button version. +// iOS requires the button element instead of an anchor tag. +// If you want the anchor version, it requires `href="#"`. +// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile + +.btn-close { + // scss-docs-start close-css-vars + --#{$prefix}btn-close-color: #{$btn-close-color}; + --#{$prefix}btn-close-bg: #{ escape-svg($btn-close-bg) }; + --#{$prefix}btn-close-opacity: #{$btn-close-opacity}; + --#{$prefix}btn-close-hover-opacity: #{$btn-close-hover-opacity}; + --#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow}; + --#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity}; + --#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity}; + --#{$prefix}btn-close-white-filter: #{$btn-close-white-filter}; + // scss-docs-end close-css-vars + + box-sizing: content-box; + width: $btn-close-width; + height: $btn-close-height; + padding: $btn-close-padding-y $btn-close-padding-x; + color: var(--#{$prefix}btn-close-color); + background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements + border: 0; // for button elements + @include border-radius(); + opacity: var(--#{$prefix}btn-close-opacity); + + // Override 's hover style + &:hover { + color: var(--#{$prefix}btn-close-color); + text-decoration: none; + opacity: var(--#{$prefix}btn-close-hover-opacity); + } + + &:focus { + outline: 0; + box-shadow: var(--#{$prefix}btn-close-focus-shadow); + opacity: var(--#{$prefix}btn-close-focus-opacity); + } + + &:disabled, + &.disabled { + pointer-events: none; + user-select: none; + opacity: var(--#{$prefix}btn-close-disabled-opacity); + } +} + +@mixin btn-close-white() { + filter: var(--#{$prefix}btn-close-white-filter); +} + +.btn-close-white { + @include btn-close-white(); +} + +@if $enable-dark-mode { + @include color-mode(dark) { + .btn-close { + @include btn-close-white(); + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_containers.scss b/cao_sunyata/static/libs/bootstrap/scss/_containers.scss new file mode 100644 index 0000000..83b3138 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_containers.scss @@ -0,0 +1,41 @@ +// Container widths +// +// Set the container width, and override it for fixed navbars in media queries. + +@if $enable-container-classes { + // Single container class with breakpoint max-widths + .container, + // 100% wide container at all breakpoints + .container-fluid { + @include make-container(); + } + + // Responsive containers that are 100% wide until a breakpoint + @each $breakpoint, $container-max-width in $container-max-widths { + .container-#{$breakpoint} { + @extend .container-fluid; + } + + @include media-breakpoint-up($breakpoint, $grid-breakpoints) { + %responsive-container-#{$breakpoint} { + max-width: $container-max-width; + } + + // Extend each breakpoint which is smaller or equal to the current breakpoint + $extend-breakpoint: true; + + @each $name, $width in $grid-breakpoints { + @if ($extend-breakpoint) { + .container#{breakpoint-infix($name, $grid-breakpoints)} { + @extend %responsive-container-#{$breakpoint}; + } + + // Once the current breakpoint is reached, stop extending + @if ($breakpoint == $name) { + $extend-breakpoint: false; + } + } + } + } + } +} diff --git a/cao_sunyata/static/libs/bootstrap/scss/_dropdown.scss b/cao_sunyata/static/libs/bootstrap/scss/_dropdown.scss new file mode 100644 index 0000000..587ebb4 --- /dev/null +++ b/cao_sunyata/static/libs/bootstrap/scss/_dropdown.scss @@ -0,0 +1,250 @@ +// The dropdown wrapper (`
`) +.dropup, +.dropend, +.dropdown, +.dropstart, +.dropup-center, +.dropdown-center { + position: relative; +} + +.dropdown-toggle { + white-space: nowrap; + + // Generate the caret automatically + @include caret(); +} + +// The dropdown menu +.dropdown-menu { + // scss-docs-start dropdown-css-vars + --#{$prefix}dropdown-zindex: #{$zindex-dropdown}; + --#{$prefix}dropdown-min-width: #{$dropdown-min-width}; + --#{$prefix}dropdown-padding-x: #{$dropdown-padding-x}; + --#{$prefix}dropdown-padding-y: #{$dropdown-padding-y}; + --#{$prefix}dropdown-spacer: #{$dropdown-spacer}; + @include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size); + --#{$prefix}dropdown-color: #{$dropdown-color}; + --#{$prefix}dropdown-bg: #{$dropdown-bg}; + --#{$prefix}dropdown-border-color: #{$dropdown-border-color}; + --#{$prefix}dropdown-border-radius: #{$dropdown-border-radius}; + --#{$prefix}dropdown-border-width: #{$dropdown-border-width}; + --#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius}; + --#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg}; + --#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y}; + --#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow}; + --#{$prefix}dropdown-link-color: #{$dropdown-link-color}; + --#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color}; + --#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg}; + --#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color}; + --#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg}; + --#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color}; + --#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x}; + --#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y}; + --#{$prefix}dropdown-header-color: #{$dropdown-header-color}; + --#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x}; + --#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y}; + // scss-docs-end dropdown-css-vars + + position: absolute; + z-index: var(--#{$prefix}dropdown-zindex); + display: none; // none by default, but block on "open" of the menu + min-width: var(--#{$prefix}dropdown-min-width); + padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x); + margin: 0; // Override default margin of ul + @include font-size(var(--#{$prefix}dropdown-font-size)); + color: var(--#{$prefix}dropdown-color); + text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) + list-style: none; + background-color: var(--#{$prefix}dropdown-bg); + background-clip: padding-box; + border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color); + @include border-radius(var(--#{$prefix}dropdown-border-radius)); + @include box-shadow(var(--#{$prefix}dropdown-box-shadow)); + + &[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--#{$prefix}dropdown-spacer); + } + + @if $dropdown-padding-y == 0 { + > .dropdown-item:first-child, + > li:first-child .dropdown-item { + @include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius)); + } + > .dropdown-item:last-child, + > li:last-child .dropdown-item { + @include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius)); + } + + } +} + +// scss-docs-start responsive-breakpoints +// We deliberately hardcode the `bs-` prefix because we check +// this custom property in JS to determine Popper's positioning + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .dropdown-menu#{$infix}-start { + --bs-position: start; + + &[data-bs-popper] { + right: auto; + left: 0; + } + } + + .dropdown-menu#{$infix}-end { + --bs-position: end; + + &[data-bs-popper] { + right: 0; + left: auto; + } + } + } +} +// scss-docs-end responsive-breakpoints + +// Allow for dropdowns to go bottom up (aka, dropup-menu) +// Just add .dropup after the standard .dropdown class and you're set. +.dropup { + .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--#{$prefix}dropdown-spacer); + } + + .dropdown-toggle { + @include caret(up); + } +} + +.dropend { + .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--#{$prefix}dropdown-spacer); + } + + .dropdown-toggle { + @include caret(end); + &::after { + vertical-align: 0; + } + } +} + +.dropstart { + .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--#{$prefix}dropdown-spacer); + } + + .dropdown-toggle { + @include caret(start); + &::before { + vertical-align: 0; + } + } +} + + +// Dividers (basically an `
`) within the dropdown +.dropdown-divider { + height: 0; + margin: var(--#{$prefix}dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--#{$prefix}dropdown-divider-bg); + opacity: 1; // Revisit in v6 to de-dupe styles that conflict with
element +} + +// Links, buttons, and more within the dropdown menu +// +// `
+
+ Retour + {% if blog_id != '0' %} - + {% endif %}
@@ -95,5 +95,7 @@
- + + + {% endblock %} diff --git a/cao_sunyata/templates/blog_search.jinja2 b/cao_sunyata/templates/blog_search.jinja2 index f56ed4f..7446262 100644 --- a/cao_sunyata/templates/blog_search.jinja2 +++ b/cao_sunyata/templates/blog_search.jinja2 @@ -2,50 +2,47 @@ {% block content %} +
+
+
-
-
-
- - - - -
-
+
+
+ + +
- {% if items %} - - - - - - - - - - {% for entry in items %} - - - - - - {% endfor %} -
TitreTagsDate
- - {{ entry.title }} - - {{ entry.tag }}{{ entry.edit_date }}
- {% else %} - {{ liste | safe }} - {% endif %} + {% for entry in items %} + + + + + + + + + + + + + + + + +
TitreTagsDate
+ + {{ entry.title }} + + {{ entry.tag }}{{ entry.edit_date }}
+ {% endfor %}


+
+
{% endblock %} diff --git a/cao_sunyata/templates/contact.jinja2 b/cao_sunyata/templates/contact.jinja2 new file mode 100644 index 0000000..a2c124b --- /dev/null +++ b/cao_sunyata/templates/contact.jinja2 @@ -0,0 +1,61 @@ +{% extends "layout.jinja2" %} + +{% block content %} + +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+
+
+
+
+
+
Méditation Sunyata Paris
+

+ 116 bd Maréchal Foch
+ 93160 NOISY LE GRAND
+
+ RER A station Bry sur Marne
+
+ Bus 220 arrêt Verdun
+
+

+ +
+
+ + + + +{% endblock %} diff --git a/cao_sunyata/templates/home.jinja2 b/cao_sunyata/templates/home.jinja2 index 873346a..d256b43 100644 --- a/cao_sunyata/templates/home.jinja2 +++ b/cao_sunyata/templates/home.jinja2 @@ -2,175 +2,149 @@ {% block content %} -