kcc-gem-theme-original 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/hash/theme_hash.yml +1 -1
  3. data/_includes/hero-slider.html +34 -22
  4. data/_includes/tabbed-content.html +1 -1
  5. data/assets/js/alerts/addAccordionOrTabHistoryStates.js +44 -0
  6. data/assets/js/alerts/alerts.js +57 -0
  7. data/assets/js/{src → alerts}/checkForPrefersReducedMotion.js +4 -4
  8. data/assets/js/{src → alerts}/contentHashLink.js +25 -30
  9. data/assets/js/{src → alerts}/createAlertsHtml.js +22 -15
  10. data/assets/js/dist/{453.a3e46e0e2fed29d4a55b.bundle.js → 453.cd026bdf2f4c38d33847.bundle.js} +1 -1
  11. data/assets/js/dist/604.cd026bdf2f4c38d33847.bundle.js +1 -0
  12. data/assets/js/dist/{635.a3e46e0e2fed29d4a55b.bundle.js → 635.cd026bdf2f4c38d33847.bundle.js} +1 -1
  13. data/assets/js/dist/695.cd026bdf2f4c38d33847.bundle.js +2 -0
  14. data/assets/js/dist/977.cd026bdf2f4c38d33847.bundle.js +1 -0
  15. data/assets/js/dist/{theme.a3e46e0e2fed29d4a55b.bundle.js → theme.cd026bdf2f4c38d33847.bundle.js} +2 -2
  16. data/assets/js/dist/theme.cd026bdf2f4c38d33847.css +1 -0
  17. data/assets/js/src/all.js +1 -1
  18. data/assets/scss/0-tools/_bootstrap-overrides.scss +12 -1
  19. data/assets/scss/2-modules/_hero-slider.scss +27 -3
  20. metadata +30 -31
  21. data/assets/js/dist/13.a3e46e0e2fed29d4a55b.bundle.js +0 -2
  22. data/assets/js/dist/873.a3e46e0e2fed29d4a55b.bundle.js +0 -1
  23. data/assets/js/dist/theme.a3e46e0e2fed29d4a55b.css +0 -1
  24. data/assets/js/src/alerts.js +0 -24
  25. data/assets/js/src/cacheResponse.js +0 -22
  26. data/assets/js/src/campusAlertsSheetsAPI.js +0 -53
  27. data/assets/js/src/getCachedResponse.js +0 -37
  28. /data/assets/js/{src → alerts}/parseMarkdownToHTML.js +0 -0
  29. /data/assets/js/dist/{102.a3e46e0e2fed29d4a55b.bundle.js → 102.cd026bdf2f4c38d33847.bundle.js} +0 -0
  30. /data/assets/js/dist/{143.a3e46e0e2fed29d4a55b.bundle.js → 143.cd026bdf2f4c38d33847.bundle.js} +0 -0
  31. /data/assets/js/dist/{183.a3e46e0e2fed29d4a55b.bundle.js → 183.cd026bdf2f4c38d33847.bundle.js} +0 -0
  32. /data/assets/js/dist/{3.a3e46e0e2fed29d4a55b.bundle.js → 3.cd026bdf2f4c38d33847.bundle.js} +0 -0
  33. /data/assets/js/dist/{303.a3e46e0e2fed29d4a55b.bundle.js → 303.cd026bdf2f4c38d33847.bundle.js} +0 -0
  34. /data/assets/js/dist/{354.a3e46e0e2fed29d4a55b.bundle.js → 354.cd026bdf2f4c38d33847.bundle.js} +0 -0
  35. /data/assets/js/dist/{384.a3e46e0e2fed29d4a55b.bundle.js → 384.cd026bdf2f4c38d33847.bundle.js} +0 -0
  36. /data/assets/js/dist/{384.a3e46e0e2fed29d4a55b.css → 384.cd026bdf2f4c38d33847.css} +0 -0
  37. /data/assets/js/dist/{453.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → 453.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
  38. /data/assets/js/dist/{635.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → 635.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
  39. /data/assets/js/dist/{13.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → 695.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
  40. /data/assets/js/dist/{723.a3e46e0e2fed29d4a55b.bundle.js → 723.cd026bdf2f4c38d33847.bundle.js} +0 -0
  41. /data/assets/js/dist/{965.a3e46e0e2fed29d4a55b.bundle.js → 965.cd026bdf2f4c38d33847.bundle.js} +0 -0
  42. /data/assets/js/dist/{bootstrap.a3e46e0e2fed29d4a55b.bundle.js → bootstrap.cd026bdf2f4c38d33847.bundle.js} +0 -0
  43. /data/assets/js/dist/{bootstrap.a3e46e0e2fed29d4a55b.css → bootstrap.cd026bdf2f4c38d33847.css} +0 -0
  44. /data/assets/js/dist/{theme.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → theme.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8417366edfa43d256ac0853fac6461caa90b5966b31f10b7120a35f47327940
4
- data.tar.gz: 8191afe6a55e8871b976d97b181091b8beabd99c36be0a17a6c31d267b0cfc48
3
+ metadata.gz: c9c26621271d53828662fcc49747b28b59b00e05d7b58bc97aad5e0b3da60762
4
+ data.tar.gz: 1c35f07d5c87ca49cf6f74fcb9d200b6c61939bf9be7dde3dc0b093d7a5787c4
5
5
  SHA512:
6
- metadata.gz: e5e36150e0eb371dddb045381312f53193d11a5d96a49271dc7a3affdf7b2229774f90871df6e84bc6e4ba20d27af452e4af99d5575acf8fad9445578254f594
7
- data.tar.gz: 910d241e4227d792e411dc04a6fbe60afe7ed70e90ad9b52d7b1a0f0b2c6a2028794583e10afc3317d930ec3b45c202a42bb73de6cdcd6d07af92a95b597325a
6
+ metadata.gz: 3a56df7dfda4c06b87d4e4c0f00e804d6212eb42470cbac3c89b065dc0daec4c8352de223f2b2f89bb492b128a3bb91c39bd7592de859c5d203610bc148f2c1d
7
+ data.tar.gz: 99f00694b7c4b0a449a9165f748f6d6ed9571f327609281d7c747c7d7ffcf4ce2859e241137894b73152ef1273ee75f151f8191aba5bcff4cf28cfb9708f5cf6
@@ -1 +1 @@
1
- a3e46e0e2fed29d4a55b
1
+ cd026bdf2f4c38d33847
@@ -1,32 +1,44 @@
1
-
2
- <div class="row">
3
- <div class="col hero-slider__slider">
4
- {% for slide in page.slides %}
1
+ {% assign slide_collection = page.slides %}
2
+ <div class="row{% if page.slider_parent_classes %} {{ page.slider_parent_classes | join: ' ' }}{% endif %}">
3
+ <div class="col hero-slider__slider hero-slider__slides-{{ slide_collection.size }}">
4
+ {% for slide in slide_collection %}
5
5
  {% assign url_first_char = slide.url | slice: 0 %}
6
- {%- if slide.url contains 'https://' or slide.url contains 'http://' or url_first_char == '.' or url_first_char == '/' -%}
7
- {%- assign slide_url = slide.url -%}
8
- {%- else -%}
9
- {%- assign slide_url = slide.url | prepend: page.baseurl -%}
10
- {%- endif -%}
6
+ {% if forloop.first == true %}
11
7
  <div>
12
8
  <a
13
- href="{{ slide_url }}"
14
9
  class="ga_slider_link"
15
- {%- if slide.new_tab == true %}
16
- target="_blank"
17
- rel="noopener noreferrer"
18
- {%- endif %}>
19
- <img
20
- src="{{ page.baseurl }}assets/img/placeholder_16to9.svg"
21
- data-src="{{ page.baseurl }}{{ slide.image }}"
22
- class="img-fluid hero-slider__slider--slide-img{% if slide.white_background %} hero-slider__slide-img--border{% endif %}"
23
- alt="{{ slide.alt-text | replace: '"', '&quot;' }}">
10
+ {% if slide.url contains "https://" or slide.url contains "http://" %}href="{{ slide.url }}"
11
+ {% elsif url_first_char == '.' or url_first_char == '/' or slide.url == '#' %}href="{{ slide.url }}"
12
+ {% else %}href="{{ page.baseurl }}{{ slide.url }}"{%- endif -%}
13
+ {% if slide.new_tab == true %} target="_blank" rel="noopener noreferrer"{%- endif -%}>
14
+ <img src="{{page.baseurl}}{{ slide.image | replace: '/uploads', 'uploads' | replace: '/assets', 'assets' }}"
15
+ class="img-fluid hero-slider__slider--slide-img {% if slide.white_background == true %} hero-slider__slide-img--border{% endif %}"
16
+ alt="{{slide.alt-text}}" />
24
17
  </a>
25
- {%- if slide.text %}
18
+ {% if slide.text and slide.text != '' %}
26
19
  <div class="hero-slider__slider--heading-container text-center">
27
- <h3 class="hero-slider__slider--slide-heading">{{ slide.text }}</h3>
20
+ <h3 class="hero-slider__slider--slide-heading">{{slide.text}}</h3>
21
+ </div>
22
+ {% endif %}
23
+ </div>
24
+ {%- else -%}
25
+ <div>
26
+ <a
27
+ class="ga_slider_link"
28
+ {% if slide.url contains "https://" or slide.url contains "http://" %}href="{{ slide.url }}"
29
+ {% elsif url_first_char == "." or url_first_char == "/" or slide.url == '#' %}href="{{ slide.url }}"
30
+ {% else %}href="{{ page.baseurl }}{{ slide.url }}"{%- endif -%}
31
+ {% if slide.new_tab == true %} target="_blank" rel="noopener noreferrer"{%- endif -%}>
32
+ <img src="{{ page.baseurl }}assets/img/placeholder_16to9.jpg"
33
+ data-src="{{page.baseurl}}{{ slide.image | replace: '/uploads', 'uploads' | replace: '/assets', 'assets' }}"
34
+ class="img-fluid hero-slider__slider--slide-img {% if slide.white_background == true %} hero-slider__slide-img--border{% endif %}"
35
+ alt="{{slide.alt-text}}" />
36
+ </a>
37
+ {% if slide.text and slide.text != "" %}<div class="hero-slider__slider--heading-container text-center">
38
+ <h3 class="hero-slider__slider--slide-heading">{{slide.text}}</h3>
28
39
  </div>{% endif %}
29
40
  </div>
30
- {% endfor %}
41
+ {% endif %}
42
+ {%- endfor -%}
31
43
  </div>
32
44
  </div>
@@ -3,7 +3,7 @@
3
3
  <a href="cloudcannon:collections/_tabs/" class="btn btn-success editor-button">Edit Tabs Collection</a>
4
4
  </div>
5
5
  </div>
6
- <ul class="nav nav-tabs" id="{{ page.title | replace: ' ', '-' | downcase }}" role="tablist">
6
+ <ul class="nav nav-tabs navTabs" id="{{ page.title | replace: ' ', '-' | downcase }}" role="tablist">
7
7
  {% assign page_title = page.title %}
8
8
  {% assign tab_collection = site.tabs | where: "tabs_page", page_title | sort: "order" %}
9
9
  {% for tab in tab_collection %}
@@ -0,0 +1,44 @@
1
+
2
+ function addHistoryState(target, hashTarget) {
3
+ let url = new URL(window.location);
4
+ let state = {
5
+ page: document.title,
6
+ accordion: target.innerText.trim() // .trim() is needed b/c of the accordion's HTML--each accordion button's text is proceeded by a space
7
+ };
8
+ const title = ''; // Pass empty string as pushState() title parameter
9
+
10
+ url.search = ''; // Remove any searchParams/queries from the URL (e.g. /?id=heading#page)
11
+ url.hash = hashTarget;
12
+ window.history.pushState(state, title, url);
13
+ }
14
+
15
+ function accordionHandler(e) {
16
+ if ( !e.target.matches('.accordion__button') )
17
+ return;
18
+
19
+ const accordionIsOpening = Boolean(JSON.parse(e.target.getAttribute('aria-expanded')));
20
+
21
+ accordionIsOpening ? addHistoryState(e.target, e.target.dataset.bsTarget) : null;
22
+ }
23
+
24
+ function tabHandler(e) {
25
+ let target = e.target;
26
+ let targetHref = target.hash;
27
+
28
+ addHistoryState(e.target, targetHref)
29
+ }
30
+
31
+ function addAccordionOrTabHistoryStates() {
32
+ if (document.getElementById('accordion')) {
33
+ const accordion = document.getElementById('accordion');
34
+
35
+ accordion.addEventListener('click', accordionHandler);
36
+ }
37
+ if (document.querySelector('.navTabs')) {
38
+ const tabs = document.querySelector('.navTabs');
39
+
40
+ tabs.addEventListener('click', tabHandler);
41
+ }
42
+ }
43
+
44
+ export default addAccordionOrTabHistoryStates;
@@ -0,0 +1,57 @@
1
+ /*
2
+ // Custom JS | written by https://github.com/wdzajicek
3
+ // © 2020 Kankakee Community College
4
+ // =================================================== */
5
+ import createAlertsHtml from './createAlertsHtml';
6
+ import checkForPrefersReducedMotion from './checkForPrefersReducedMotion';
7
+
8
+ const sheetKey = '1plXBiZY5pVbhNT-mszxEuqCl4zy8wMnz9gXXbbT_yLs'; // Corresponds to the ID of the Google Sheet
9
+ const sheetTab = 'Alerts'; // Corresponds to the tab of workbook: either 'Alerts' or 'Alerts Testing' unless you make a new one.
10
+ // const devSheetTab = 'ALERTS_TESTING';
11
+ const emergencyAlertsDiv = 'emergencyAlerts'
12
+ const sheetParams = {
13
+ spreadsheetId: sheetKey,
14
+ range: sheetTab
15
+ // range: devSheetTab
16
+ }; // Configures the Object used for `sheets.spreadsheets.values.get()` parameters
17
+ const apiParams = { // This is configuration for API call with spreadsheets that are setup as readonly
18
+ 'apiKey': 'AIzaSyCEBsbXfFcdbkASlg-PodD1rT_Fe3Nw62A',
19
+ 'discoveryDocs': ['https://www.googleapis.com/discovery/v1/apis/sheets/v4/rest']
20
+ };
21
+ const pageHasAccordionOrTabs = (document.querySelector('#accordion') || document.querySelector('.navTabs')) ? true : false;
22
+
23
+ async function loadModule(module) {
24
+ const { default: module_func } = await import(`./${module}`);
25
+
26
+ return module_func();
27
+ }
28
+
29
+ export default function alerts(Collapse) {
30
+ checkForPrefersReducedMotion();
31
+
32
+ if (!document.getElementById(emergencyAlertsDiv)) {
33
+ if (pageHasAccordionOrTabs) {
34
+ return import('./contentHashLink').then(({default: contentHashLink}) => contentHashLink(Collapse));
35
+ }
36
+ }
37
+
38
+ new Promise((resolve, reject) => { // First build the alert, whether by cache or API call
39
+ gapi.load('client', () => {
40
+ gapi.client.init(apiParams).then(() => {
41
+ return gapi.client.sheets.spreadsheets.values.get(sheetParams);
42
+ }).then(response => {
43
+ createAlertsHtml(response) // Promise is resolved after HTML alert is built
44
+ resolve();
45
+ }, err => {
46
+ console.error("Error trying to fetch the alert from gapi:", err);
47
+ })
48
+ });
49
+
50
+ }).then(() => {
51
+ window.setTimeout(() => {
52
+ if (pageHasAccordionOrTabs) {
53
+ import('./contentHashLink').then(({default: contentHashLink}) => contentHashLink(Collapse));
54
+ }
55
+ }, 100)
56
+ }) // Run accordion/tab JS, which includes a `scrollTo()`, after alert has painted
57
+ }
@@ -1,14 +1,14 @@
1
1
  function checkForPrefersReduceMotion() {
2
2
  const reducedMotionMediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
3
- let reducedMotion = reducedMotionMediaQuery.matches ? true : false;
3
+ let reducedMotion = (reducedMotionMediaQuery.matches) ? true : false;
4
4
 
5
5
  localStorage.setItem('userPrefersReducedMotion', reducedMotion);
6
6
 
7
- reducedMotionMediaQuery.addEventListener('change', _e => {
7
+ reducedMotionMediaQuery.addEventListener('change', (e) => {
8
8
  if (reducedMotionMediaQuery.matches) {
9
- reducedMotion = true;
9
+ reducedMotion = true
10
10
  } else {
11
- reducedMotion = false;
11
+ reducedMotion = false
12
12
  }
13
13
  localStorage.setItem('userPrefersReducedMotion', reducedMotion);
14
14
  });
@@ -10,10 +10,11 @@
10
10
  // This JS will allow us to link to a specific area of content in a page where a traditional hash link wouldn't work
11
11
  // In this case hash links won't work because the element with he matching ID is "stuck" in a closed accordion or tab.
12
12
  //
13
- const idRegex = /^id=/g; // Lets just cache these reused regex's here
14
- const queryStartRegex = /^\?/g;
13
+ import Tab from 'bootstrap/js/dist/tab'; // Import Tab from Bootstrap 5
14
+
15
+ const idRegex = /.*[\?&]id=([^&]+).*$/; // Lets just cache these reused regex's here
15
16
  const endingSlashRegex = /\/$/g;
16
- const REDUCED_MOTION_STORAGE_KEY = 'userPrefersReducedMotion'; // This localStorage key is set by module: './checkForPrefersReducedMotion.js'
17
+ const PREFERS_REDUCED_MOTION_LOCALSTORAGE_KEY = 'userPrefersReducedMotion'; // This localStorage key is set by module: './checkForPrefersReducedMotion.js'
17
18
  const scrollIntoViewOptionsObject = {
18
19
  behavior: 'smooth',
19
20
  block: 'center'
@@ -23,14 +24,14 @@ const reducedMotionscrollIntoViewOptionsObject = {
23
24
  }
24
25
 
25
26
  function focusElement(el) {
26
- const prefersReducedMotion = window.localStorage.getItem(REDUCED_MOTION_STORAGE_KEY);
27
+ const prefersReducedMotion = window.localStorage.getItem(PREFERS_REDUCED_MOTION_LOCALSTORAGE_KEY);
27
28
 
28
29
  prefersReducedMotion == 'true' ? el.scrollIntoView(reducedMotionscrollIntoViewOptionsObject) : el.scrollIntoView(scrollIntoViewOptionsObject);
29
30
  return el.focus();
30
31
  }
31
32
 
32
33
  function processIdQuery(query, hash) {
33
- let id = query.replace(idRegex, '');
34
+ let id = query.replace(idRegex, `$1`);
34
35
  const parentEl = document.querySelector(hash);
35
36
  const heading = parentEl.querySelector(`#${id}`);
36
37
 
@@ -49,30 +50,27 @@ function findContentTarget(hash) {
49
50
  focusElement(target);
50
51
  }
51
52
 
52
- async function checkForMatchingTabOrAccordion(hash, Collapse) {
53
- if (document.querySelector(`.nav-tabs a[href="${hash}"]`)) { // Looks for a matching BS4 tab element
54
- const { default: Tab } = await import('bootstrap/js/dist/tab');
55
- let tab = document.querySelector(`.nav-tabs a[href="${hash}"]`);
56
- const bsTab = new Tab(tab, { toggle: false });
53
+ function checkForMatchingTabOrAccordion(hash, Collapse) {
54
+ if ( document.querySelector(`.nav-tabs a[href="${hash}"]`) ) { // Looks for a matching BS4 tab element
55
+ const tab = document.querySelector(`.nav-tabs a[href="${hash}"]`);
56
+ const bsTab = new Tab(tab);
57
57
 
58
- tab.addEventListener('shown.bs.tab', () => {
59
- if (window.location.search) {
60
- checkForQuery(window.location.search.replace(queryStartRegex, ''), hash);
61
- }
58
+ tab.addEventListener('shown.bs.tab', _e => {
59
+ window.location.search ?
60
+ checkForQuery(window.location.search, hash)
61
+ : findContentTarget(`${hash}-label`); // You need to .scrollIntoView() & .focus() on the tab-label which is an <a href="...">. It won't work to do .scrollIntoView() and .focus() on the div
62
62
  });
63
63
  bsTab.show();
64
- findContentTarget(`${hash}-label`); // You need to .scrollIntoView() & .focus() on the tab-label which is an <a href="...">. It won't work to do .scrollIntoView() and .focus() on the div
65
- } else if (document.querySelector(`.accordion ${hash}.collapse`)) { // Looks for a matching BS4 collapse element
66
- let card = document.querySelector(hash);
67
- const bsCollapse = new Collapse(card, { toggle: false });
64
+ } else if ( document.querySelector(`${hash}.collapse`) ) { // Looks for a matching BS4 collapse element
65
+ const card = document.querySelector(hash);
66
+ const bsCard = new Collapse(card, {toggle: false});
68
67
 
69
68
  card.addEventListener('shown.bs.collapse', _e => {
70
- if (window.location.search) {
71
- checkForQuery(window.location.search.replace(queryStartRegex, ''), hash);
72
- }
69
+ window.location.search ?
70
+ checkForQuery(window.location.search, hash)
71
+ : findContentTarget(`button[data-bs-target="${hash}"]`);
73
72
  });
74
- bsCollapse.show();
75
- findContentTarget(hash);
73
+ bsCard.show();
76
74
  }
77
75
  }
78
76
 
@@ -85,18 +83,15 @@ function checkForHash(Collapse) {
85
83
  return;
86
84
  }
87
85
 
88
- function initContentHashLink(Collapse) {
86
+ function contentHashLink(Collapse) {
89
87
  checkForHash(Collapse);
90
88
  window.addEventListener('hashchange', _e => {
91
89
  checkForHash(Collapse);
92
90
  }, false);
93
- }
94
91
 
95
- function contentHashLink(Collapse) {
96
- if (!document.querySelector('#accordion') && !document.querySelector('.nav.nav-tabs'))
97
- return;
98
-
99
- initContentHashLink(Collapse);
92
+ import('./addAccordionOrTabHistoryStates').then(({ default: addAccordionOrTabHistoryStates }) => {
93
+ addAccordionOrTabHistoryStates();
94
+ });
100
95
  }
101
96
 
102
97
  export default contentHashLink;
@@ -5,42 +5,49 @@
5
5
  // JS module to build alert message using data from Google Sheets API v4
6
6
  //
7
7
  // This exported module requires you pass it's default-function the `response` object from the API call, as the only argument
8
- import contentHashLink from './contentHashLink.js';
8
+ //
9
9
  import parseMarkdownToHTML from './parseMarkdownToHTML.js'; // Parses a simplified markdown into html & creates the paragraph el's with appropriate class
10
+ //
11
+ const alertDiv = document.getElementById('emergencyAlerts'); // This targets an element built into the DOM that we inject everything into.
10
12
 
11
13
  function injectAlert(target, alert) {
12
14
  target.innerHTML = alert;
13
15
  return target.classList.add('position__offset-alert--visible');
14
16
  }
15
17
 
16
- function createAlertsHtml(response, Collapse) { // Incoming response from our Google Sheet via the Sheets API
17
- // This is where the cell values hide in the response object from the Google API.
18
+ function checkAlertType(type) {
19
+ return type == 'SCHOOL EMERGENCY/CLOSURE - red' ? 'danger'
20
+ : type == 'SCHOOL INFO - blue' ? 'primary'
21
+ : type == 'SCHOOL INFO - cyan' ? 'info'
22
+ : 'warning';
23
+ }
18
24
 
19
- let [visibility, allPages, content, expire, start, end] = response.result.values[2]; // The 3rd row has our table's data
20
- if (visibility === 'FALSE') return contentHashLink(Collapse); // Predefined dropdown options in the Sheet are `'TRUE'` & `'FALSE'`
25
+ function createAlertsHtml(response) { // Incoming response from our Google Sheet via the Sheets API
26
+ let [visibility, allPages, content, expire, start, end, type] = response.result.values[2]; // The 3rd row has our table's data
27
+ if (visibility === 'FALSE') // Predefined dropdown options in the Sheet are `'TRUE'` & `'FALSE'`
28
+ return;
21
29
 
22
- const alertDiv = document.getElementById('emergencyAlerts'); // This targets an element built into the DOM that we inject everything into.
23
- let d = new Date;
24
- let s = new Date(start);
25
- let e = new Date(end);
30
+ const d = new Date;
31
+ const s = new Date(start);
32
+ const e = new Date(end);
33
+ const alertType = checkAlertType(type);
26
34
  const alertIsActive = expire === 'FALSE' || expire === 'TRUE' && s.getTime() <= d.getTime() && e.getTime() > d.getTime();
27
35
  const indexPageOnly = allPages === 'TRUE' || allPages === 'FALSE' && window.location.pathname == '/';
28
36
  let alert = `
29
37
  <div class="container">
30
38
  <div class="row">
31
39
  <div class="col">
32
- <div class="alert alert-warning">
33
- ${parseMarkdownToHTML(content)}
40
+ <div role="alert" class="alert alert-${alertType} d-lg-flex align-items-center">
41
+ <div class="typography__last-p--mb0">
42
+ ${parseMarkdownToHTML(content)}
34
43
  </div>
44
+ </div>
35
45
  </div>
36
46
  </div>
37
47
  </div>`;
38
48
 
39
49
  [d,s,e].map(d => d.setHours(0, 0, 0, 0));
40
- if (alertIsActive && indexPageOnly) {
41
- injectAlert(alertDiv, alert);
42
- }
43
- return contentHashLink(Collapse);
50
+ return alertIsActive && indexPageOnly ? injectAlert(alertDiv, alert) : null;
44
51
  }
45
52
 
46
53
  export default createAlertsHtml;
@@ -1,2 +1,2 @@
1
- /*! For license information please see 453.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt */
1
+ /*! For license information please see 453.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt */
2
2
  (self.webpackChunkkcc_gem_theme=self.webpackChunkkcc_gem_theme||[]).push([[453],{170:function(e,t,n){"use strict";n.r(t),n.d(t,{afterMain:function(){return O},afterRead:function(){return b},afterWrite:function(){return E},applyStyles:function(){return C},arrow:function(){return J},auto:function(){return s},basePlacements:function(){return f},beforeMain:function(){return w},beforeRead:function(){return v},beforeWrite:function(){return _},bottom:function(){return o},clippingParents:function(){return p},computeStyles:function(){return ne},createPopper:function(){return Te},createPopperBase:function(){return ke},createPopperLite:function(){return Ce},detectOverflow:function(){return ve},end:function(){return u},eventListeners:function(){return oe},flip:function(){return ye},hide:function(){return xe},left:function(){return a},main:function(){return x},modifierPhases:function(){return P},offset:function(){return Oe},placements:function(){return g},popper:function(){return d},popperGenerator:function(){return Le},popperOffsets:function(){return _e},preventOverflow:function(){return je},read:function(){return y},reference:function(){return h},right:function(){return i},start:function(){return c},top:function(){return r},variationPlacements:function(){return m},viewport:function(){return l},write:function(){return j}});var r="top",o="bottom",i="right",a="left",s="auto",f=[r,o,i,a],c="start",u="end",p="clippingParents",l="viewport",d="popper",h="reference",m=f.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+u])}),[]),g=[].concat(f,[s]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+u])}),[]),v="beforeRead",y="read",b="afterRead",w="beforeMain",x="main",O="afterMain",_="beforeWrite",j="write",E="afterWrite",P=[v,y,b,w,x,O,_,j,E];function D(e){return e?(e.nodeName||"").toLowerCase():null}function A(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function L(e){return e instanceof A(e).Element||e instanceof Element}function k(e){return e instanceof A(e).HTMLElement||e instanceof HTMLElement}function T(e){return"undefined"!=typeof ShadowRoot&&(e instanceof A(e).ShadowRoot||e instanceof ShadowRoot)}var C={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];k(o)&&D(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});k(r)&&D(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var R=Math.max,H=Math.min,S=Math.round;function W(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(W())}function N(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&k(e)&&(o=e.offsetWidth>0&&S(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&S(r.height)/e.offsetHeight||1);var a=(L(e)?A(e):window).visualViewport,s=!B()&&n,f=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,p=r.height/i;return{width:u,height:p,top:c,right:f+u,bottom:c+p,left:f,x:f,y:c}}function $(e){var t=N(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function I(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&T(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function V(e){return A(e).getComputedStyle(e)}function q(e){return["table","td","th"].indexOf(D(e))>=0}function U(e){return((L(e)?e.ownerDocument:e.document)||window.document).documentElement}function z(e){return"html"===D(e)?e:e.assignedSlot||e.parentNode||(T(e)?e.host:null)||U(e)}function F(e){return k(e)&&"fixed"!==V(e).position?e.offsetParent:null}function K(e){for(var t=A(e),n=F(e);n&&q(n)&&"static"===V(n).position;)n=F(n);return n&&("html"===D(n)||"body"===D(n)&&"static"===V(n).position)?t:n||function(e){var t=/firefox/i.test(W());if(/Trident/i.test(W())&&k(e)&&"fixed"===V(e).position)return null;var n=z(e);for(T(n)&&(n=n.host);k(n)&&["html","body"].indexOf(D(n))<0;){var r=V(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return R(e,H(t,n))}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,c=e.options,u=n.elements.arrow,p=n.modifiersData.popperOffsets,l=M(n.placement),d=Q(l),h=[a,i].indexOf(l)>=0?"height":"width";if(u&&p){var m=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,f))}(c.padding,n),g=$(u),v="y"===d?r:a,y="y"===d?o:i,b=n.rects.reference[h]+n.rects.reference[d]-p[d]-n.rects.popper[h],w=p[d]-n.rects.reference[d],x=K(u),O=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0,_=b/2-w/2,j=m[v],E=O-g[h]-m[y],P=O/2-g[h]/2+_,D=X(j,P,E),A=d;n.modifiersData[s]=((t={})[A]=D,t.centerOffset=D-P,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&I(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,s=e.popperRect,f=e.placement,c=e.variation,p=e.offsets,l=e.position,d=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=p.x,y=void 0===v?0:v,b=p.y,w=void 0===b?0:b,x="function"==typeof m?m({x:y,y:w}):{x:y,y:w};y=x.x,w=x.y;var O=p.hasOwnProperty("x"),_=p.hasOwnProperty("y"),j=a,E=r,P=window;if(h){var D=K(n),L="clientHeight",k="clientWidth";D===A(n)&&"static"!==V(D=U(n)).position&&"absolute"===l&&(L="scrollHeight",k="scrollWidth"),(f===r||(f===a||f===i)&&c===u)&&(E=o,w-=(g&&D===P&&P.visualViewport?P.visualViewport.height:D[L])-s.height,w*=d?1:-1),f!==a&&(f!==r&&f!==o||c!==u)||(j=i,y-=(g&&D===P&&P.visualViewport?P.visualViewport.width:D[k])-s.width,y*=d?1:-1)}var T,C=Object.assign({position:l},h&&ee),M=!0===m?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:S(n*o)/o||0,y:S(r*o)/o||0}}({x:y,y:w},A(n)):{x:y,y:w};return y=M.x,w=M.y,d?Object.assign({},C,((T={})[E]=_?"0":"",T[j]=O?"0":"",T.transform=(P.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",T)):Object.assign({},C,((t={})[E]=_?w+"px":"",t[j]=O?y+"px":"",t.transform="",t))}var ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:M(t.placement),variation:Z(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},re={passive:!0},oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,f=A(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,re)})),s&&f.addEventListener("resize",n.update,re),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,re)})),s&&f.removeEventListener("resize",n.update,re)}},data:{}},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e){var t=A(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ue(e){return N(U(e)).left+ce(e).scrollLeft}function pe(e){var t=V(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function le(e){return["html","body","#document"].indexOf(D(e))>=0?e.ownerDocument.body:k(e)&&pe(e)?e:le(z(e))}function de(e,t){var n;void 0===t&&(t=[]);var r=le(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=A(r),a=o?[i].concat(i.visualViewport||[],pe(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(de(z(a)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===l?he(function(e,t){var n=A(e),r=U(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,f=0;if(o){i=o.width,a=o.height;var c=B();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,f=o.offsetTop)}return{width:i,height:a,x:s+ue(e),y:f}}(e,n)):L(t)?function(e,t){var n=N(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=U(e),r=ce(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=R(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=R(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+ue(e),f=-r.scrollTop;return"rtl"===V(o||n).direction&&(s+=R(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}(U(e)))}function ge(e){var t,n=e.reference,s=e.element,f=e.placement,p=f?M(f):null,l=f?Z(f):null,d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2;switch(p){case r:t={x:d,y:n.y-s.height};break;case o:t={x:d,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case a:t={x:n.x-s.width,y:h};break;default:t={x:n.x,y:n.y}}var m=p?Q(p):null;if(null!=m){var g="y"===m?"height":"width";switch(l){case c:t[m]=t[m]-(n[g]/2-s[g]/2);break;case u:t[m]=t[m]+(n[g]/2-s[g]/2)}}return t}function ve(e,t){void 0===t&&(t={});var n=t,a=n.placement,s=void 0===a?e.placement:a,c=n.strategy,u=void 0===c?e.strategy:c,m=n.boundary,g=void 0===m?p:m,v=n.rootBoundary,y=void 0===v?l:v,b=n.elementContext,w=void 0===b?d:b,x=n.altBoundary,O=void 0!==x&&x,_=n.padding,j=void 0===_?0:_,E=Y("number"!=typeof j?j:G(j,f)),P=w===d?h:d,A=e.rects.popper,T=e.elements[O?P:w],C=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=de(z(e)),n=["absolute","fixed"].indexOf(V(e).position)>=0&&k(e)?K(e):e;return L(n)?t.filter((function(e){return L(e)&&I(e,n)&&"body"!==D(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=me(e,n,r);return t.top=R(o.top,t.top),t.right=H(o.right,t.right),t.bottom=H(o.bottom,t.bottom),t.left=R(o.left,t.left),t}),me(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(L(T)?T:T.contextElement||U(e.elements.popper),g,y,u),M=N(e.elements.reference),S=ge({reference:M,element:A,strategy:"absolute",placement:s}),W=he(Object.assign({},A,S)),B=w===d?W:M,$={top:C.top-B.top+E.top,bottom:B.bottom-C.bottom+E.bottom,left:C.left-B.left+E.left,right:B.right-C.right+E.right},q=e.modifiersData.offset;if(w===d&&q){var F=q[s];Object.keys($).forEach((function(e){var t=[i,o].indexOf(e)>=0?1:-1,n=[r,o].indexOf(e)>=0?"y":"x";$[e]+=F[n]*t}))}return $}var ye={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,u=e.name;if(!t.modifiersData[u]._skip){for(var p=n.mainAxis,l=void 0===p||p,d=n.altAxis,h=void 0===d||d,v=n.fallbackPlacements,y=n.padding,b=n.boundary,w=n.rootBoundary,x=n.altBoundary,O=n.flipVariations,_=void 0===O||O,j=n.allowedAutoPlacements,E=t.options.placement,P=M(E),D=v||(P!==E&&_?function(e){if(M(e)===s)return[];var t=ae(e);return[fe(e),t,fe(t)]}(E):[ae(E)]),A=[E].concat(D).reduce((function(e,n){return e.concat(M(n)===s?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?g:c,p=Z(r),l=p?s?m:m.filter((function(e){return Z(e)===p})):f,d=l.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=l);var h=d.reduce((function(t,n){return t[n]=ve(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[M(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:b,rootBoundary:w,padding:y,flipVariations:_,allowedAutoPlacements:j}):n)}),[]),L=t.rects.reference,k=t.rects.popper,T=new Map,C=!0,R=A[0],H=0;H<A.length;H++){var S=A[H],W=M(S),B=Z(S)===c,N=[r,o].indexOf(W)>=0,$=N?"width":"height",I=ve(t,{placement:S,boundary:b,rootBoundary:w,altBoundary:x,padding:y}),V=N?B?i:a:B?o:r;L[$]>k[$]&&(V=ae(V));var q=ae(V),U=[];if(l&&U.push(I[W]<=0),h&&U.push(I[V]<=0,I[q]<=0),U.every((function(e){return e}))){R=S,C=!1;break}T.set(S,U)}if(C)for(var z=function(e){var t=A.find((function(t){var n=T.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return R=t,"break"},F=_?3:1;F>0&&"break"!==z(F);F--);t.placement!==R&&(t.modifiersData[u]._skip=!0,t.placement=R,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function we(e){return[r,i,o,a].some((function(t){return e[t]>=0}))}var xe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ve(t,{elementContext:"reference"}),s=ve(t,{altBoundary:!0}),f=be(a,r),c=be(s,o,i),u=we(f),p=we(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}},Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,s=n.offset,f=void 0===s?[0,0]:s,c=g.reduce((function(e,n){return e[n]=function(e,t,n){var o=M(e),s=[a,r].indexOf(o)>=0?-1:1,f="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=f[0],u=f[1];return c=c||0,u=(u||0)*s,[a,i].indexOf(o)>=0?{x:u,y:c}:{x:c,y:u}}(n,t.rects,f),e}),{}),u=c[t.placement],p=u.x,l=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=c}},_e={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ge({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},je={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,f=n.mainAxis,u=void 0===f||f,p=n.altAxis,l=void 0!==p&&p,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,b=n.tetherOffset,w=void 0===b?0:b,x=ve(t,{boundary:d,rootBoundary:h,padding:g,altBoundary:m}),O=M(t.placement),_=Z(t.placement),j=!_,E=Q(O),P="x"===E?"y":"x",D=t.modifiersData.popperOffsets,A=t.rects.reference,L=t.rects.popper,k="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,T="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(D){if(u){var W,B="y"===E?r:a,N="y"===E?o:i,I="y"===E?"height":"width",V=D[E],q=V+x[B],U=V-x[N],z=y?-L[I]/2:0,F=_===c?A[I]:L[I],Y=_===c?-L[I]:-A[I],G=t.elements.arrow,J=y&&G?$(G):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[B],ne=ee[N],re=X(0,A[I],J[I]),oe=j?A[I]/2-z-re-te-T.mainAxis:F-re-te-T.mainAxis,ie=j?-A[I]/2+z+re+ne+T.mainAxis:Y+re+ne+T.mainAxis,ae=t.elements.arrow&&K(t.elements.arrow),se=ae?"y"===E?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(W=null==C?void 0:C[E])?W:0,ce=V+ie-fe,ue=X(y?H(q,V+oe-fe-se):q,V,y?R(U,ce):U);D[E]=ue,S[E]=ue-V}if(l){var pe,le="x"===E?r:a,de="x"===E?o:i,he=D[P],me="y"===P?"height":"width",ge=he+x[le],ye=he-x[de],be=-1!==[r,a].indexOf(O),we=null!=(pe=null==C?void 0:C[P])?pe:0,xe=be?ge:he-A[me]-L[me]-we+T.altAxis,Oe=be?he+A[me]+L[me]-we-T.altAxis:ye,_e=y&&be?function(e,t,n){var r=X(e,t,n);return r>n?n:r}(xe,he,Oe):X(y?xe:ge,he,y?Oe:ye);D[P]=_e,S[P]=_e-he}t.modifiersData[s]=S}},requiresIfExists:["offset"]};function Ee(e,t,n){void 0===n&&(n=!1);var r,o,i=k(t),a=k(t)&&function(e){var t=e.getBoundingClientRect(),n=S(t.width)/e.offsetWidth||1,r=S(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=U(t),f=N(e,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==D(t)||pe(s))&&(c=(r=t)!==A(r)&&k(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:ce(r)),k(t)?((u=N(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=ue(s))),{x:f.left+c.scrollLeft-u.x,y:f.top+c.scrollTop-u.y,width:f.width,height:f.height}}function Pe(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var De={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Le(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?De:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},De,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,u={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;p(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:L(e)?de(e):e.contextElement?de(e.contextElement):[],popper:de(t)};var a,c,l=function(e){var t=Pe(e);return P.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((a=[].concat(r,s.options.modifiers),c=a.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return s.orderedModifiers=l.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:u,options:r});f.push(i||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(Ae(t,n)){s.rects={reference:Ee(t,K(n),"fixed"===s.options.strategy),popper:$(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,f=void 0===a?{}:a,p=o.name;"function"==typeof i&&(s=i({state:s,options:f,name:p,instance:u})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){p(),c=!0}};if(!Ae(e,t))return u;function p(){f.forEach((function(e){return e()})),f=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var ke=Le(),Te=Le({defaultModifiers:[oe,_e,ne,C,Oe,ye,je,J,xe]}),Ce=Le({defaultModifiers:[oe,_e,ne,C]})},453:function(e,t,n){e.exports=function(e,t,n,r,o,i){"use strict";function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const s=a(e),f="dropdown",c=".bs.dropdown",u=".data-api",p="ArrowUp",l="ArrowDown",d=`hide${c}`,h=`hidden${c}`,m=`show${c}`,g=`shown${c}`,v=`click${c}${u}`,y=`keydown${c}${u}`,b=`keyup${c}${u}`,w="show",x='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',O=`${x}.${w}`,_=".dropdown-menu",j=i.isRTL()?"top-end":"top-start",E=i.isRTL()?"top-start":"top-end",P=i.isRTL()?"bottom-end":"bottom-start",D=i.isRTL()?"bottom-start":"bottom-end",A=i.isRTL()?"left-start":"right-start",L=i.isRTL()?"right-start":"left-start",k={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},T={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class C extends t{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=o.next(this._element,_)[0]||o.prev(this._element,_)[0]||o.findOne(_,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return k}static get DefaultType(){return T}static get NAME(){return f}toggle(){return this._isShown()?this.hide():this.show()}show(){if(i.isDisabled(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!n.trigger(this._element,m,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))n.on(e,"mouseover",i.noop);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(w),this._element.classList.add(w),n.trigger(this._element,g,e)}}hide(){if(i.isDisabled(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!n.trigger(this._element,d,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))n.off(e,"mouseover",i.noop);this._popper&&this._popper.destroy(),this._menu.classList.remove(w),this._element.classList.remove(w),this._element.setAttribute("aria-expanded","false"),r.removeDataAttribute(this._menu,"popper"),n.trigger(this._element,h,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!i.isElement(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${f.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===s)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:i.isElement(this._config.reference)?e=i.getElement(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=s.createPopper(e,this._menu,t)}_isShown(){return this._menu.classList.contains(w)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return A;if(e.classList.contains("dropstart"))return L;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?E:j:t?D:P}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(r.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...i.execute(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=o.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>i.isVisible(e)));n.length&&i.getNextActiveElement(n,t,e===l,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=C.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=o.find(O);for(const n of t){const t=C.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),o=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!o||"outside"===t._config.autoClose&&o)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const i={relatedTarget:t._element};"click"===e.type&&(i.clickEvent=e),t._completeHide(i)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[p,l].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(x)?this:o.prev(this,x)[0]||o.next(this,x)[0]||o.findOne(x,e.delegateTarget.parentNode),a=C.getOrCreateInstance(i);if(r)return e.stopPropagation(),a.show(),void a._selectMenuItem(e);a._isShown()&&(e.stopPropagation(),a.hide(),i.focus())}}return n.on(document,y,x,C.dataApiKeydownHandler),n.on(document,y,_,C.dataApiKeydownHandler),n.on(document,v,C.clearMenus),n.on(document,b,C.clearMenus),n.on(document,v,x,(function(e){e.preventDefault(),C.getOrCreateInstance(this).toggle()})),i.defineJQueryPlugin(C),C}(n(170),n(11),n(956),n(333),n(411),n(35))}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkkcc_gem_theme=self.webpackChunkkcc_gem_theme||[]).push([[604],{416:function(e,t,n){var r={"./addAccordionOrTabHistoryStates":[977,977],"./addAccordionOrTabHistoryStates.js":[977,977],"./alerts":[239],"./alerts.js":[239],"./checkForPrefersReducedMotion":[874],"./checkForPrefersReducedMotion.js":[874],"./contentHashLink":[695,695],"./contentHashLink.js":[695,695],"./createAlertsHtml":[942],"./createAlertsHtml.js":[942],"./parseMarkdownToHTML":[820],"./parseMarkdownToHTML.js":[820]};function o(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(o)}))}o.keys=function(){return Object.keys(r)},o.id=416,e.exports=o},239:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var r=n(942),o=n(874);const s="emergencyAlerts",a={spreadsheetId:"1plXBiZY5pVbhNT-mszxEuqCl4zy8wMnz9gXXbbT_yLs",range:"Alerts"},c={apiKey:"AIzaSyCEBsbXfFcdbkASlg-PodD1rT_Fe3Nw62A",discoveryDocs:["https://www.googleapis.com/discovery/v1/apis/sheets/v4/rest"]},i=!(!document.querySelector("#accordion")&&!document.querySelector(".navTabs"));function l(e){if((0,o.default)(),!document.getElementById(s)&&i)return n.e(695).then(n.bind(n,695)).then((t=>{let{default:n}=t;return n(e)}));new Promise(((e,t)=>{gapi.load("client",(()=>{gapi.client.init(c).then((()=>gapi.client.sheets.spreadsheets.values.get(a))).then((t=>{(0,r.default)(t),e()}),(e=>{console.error("Error trying to fetch the alert from gapi:",e)}))}))})).then((()=>{window.setTimeout((()=>{i&&n.e(695).then(n.bind(n,695)).then((t=>{let{default:n}=t;return n(e)}))}),100)}))}},874:function(e,t){"use strict";t.default=function(){const e=window.matchMedia("(prefers-reduced-motion: reduce)");let t=!!e.matches;localStorage.setItem("userPrefersReducedMotion",t),e.addEventListener("change",(n=>{t=!!e.matches,localStorage.setItem("userPrefersReducedMotion",t)}))}},942:function(e,t,n){"use strict";var r=n(820);const o=document.getElementById("emergencyAlerts");t.default=function(e){let[t,n,s,a,c,i,l]=e.result.values[2];if("FALSE"===t)return;const u=new Date,d=new Date(c),f=new Date(i),p=function(e){return"SCHOOL EMERGENCY/CLOSURE - red"==e?"danger":"SCHOOL INFO - blue"==e?"primary":"SCHOOL INFO - cyan"==e?"info":"warning"}(l),_="FALSE"===a||"TRUE"===a&&d.getTime()<=u.getTime()&&f.getTime()>u.getTime(),m="TRUE"===n||"FALSE"===n&&"/"==window.location.pathname;let h=`\n<div class="container">\n <div class="row">\n <div class="col">\n <div role="alert" class="alert alert-${p} d-lg-flex align-items-center">\n <div class="typography__last-p--mb0">\n ${(0,r.default)(s)}\n </div>\n </div>\n </div>\n </div>\n</div>`;return[u,d,f].map((e=>e.setHours(0,0,0,0))),_&&m?function(e,t){return e.innerHTML=t,e.classList.add("position__offset-alert--visible")}(o,h):null}},820:function(e,t){"use strict";const n={strong:/\*\*([^\*]*)\*\*/g,em:/_([^_]*)_/g};function r(e,t,n){return e.replace(t,n)}function o(e,t){const n={"\\*":"__asterisk__","\\_":"__underscore__","\\[":"__openBracket__","\\]":"__closeBracket__","\\(":"__openParenthesis__","\\)":"__closeParenthesis__"};for(let o in n)n.hasOwnProperty(o)&&(!0===t?e=r(e,o,n[o]):!1===t&&(e=r(e,n[o],o.replace(/^\\/g,""))));return e}function s(e,t){if(""===t)return e;for(var r in n)n.hasOwnProperty(r)&&(e=e.replace(n[r],"<"+r+">$1</"+r+">"));return e}function a(e,t){return""===t?e:e.replace(/^(.*)$/gm,'<p class="typography__alert">$1</p>')}t.default=function(e){const t=function(e){return e.replace(/\[(?<linkText>[^\]]*)\]\((?<linkHref>[^\)]*)\)/g,'<a href="$<linkHref>" target="_blank" rel="noopener noreferrer">$<linkText></a>')}(function(e){for(var t in n)n.hasOwnProperty(t)&&(e=e.replace(n[t],s));return e}(o(e,!0)));return o(function(e){return e.replace(/^(.*)$/gm,a)}(t),!1)}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 635.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt */
1
+ /*! For license information please see 635.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt */
2
2
  (self.webpackChunkkcc_gem_theme=self.webpackChunkkcc_gem_theme||[]).push([[635],{635:function(t,e,i){t.exports=function(t,e,i,s,n,o,a,l){"use strict";const r=".bs.modal",h=`hide${r}`,c=`hidePrevented${r}`,d=`hidden${r}`,_=`show${r}`,u=`shown${r}`,m=`resize${r}`,g=`click.dismiss${r}`,f=`mousedown.dismiss${r}`,p=`keydown.dismiss${r}`,b=`click${r}.data-api`,A="modal-open",w="show",y="modal-static",k={backdrop:!0,focus:!0,keyboard:!0},v={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class E extends t{constructor(t,e){super(t,e),this._dialog=i.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new l,this._addEventListeners()}static get Default(){return k}static get DefaultType(){return v}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||e.trigger(this._element,_,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(A),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(e.trigger(this._element,h).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(w),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){e.off(window,r),e.off(this._dialog,r),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new s({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new o({trapElement:this._element})}_showElement(t){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",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const s=i.findOne(".modal-body",this._dialog);s&&(s.scrollTop=0),a.reflow(this._element),this._element.classList.add(w);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,e.trigger(this._element,u,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){e.on(this._element,p,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),e.on(window,m,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),e.on(this._element,f,(t=>{e.one(this._element,g,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(A),this._resetAdjustments(),this._scrollBar.reset(),e.trigger(this._element,d)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(e.trigger(this._element,c).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,i=this._element.style.overflowY;"hidden"===i||this._element.classList.contains(y)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(y),this._queueCallback((()=>{this._element.classList.remove(y),this._queueCallback((()=>{this._element.style.overflowY=i}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=a.isRTL()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=a.isRTL()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=E.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}return e.on(document,b,'[data-bs-toggle="modal"]',(function(t){const s=i.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),e.one(s,_,(t=>{t.defaultPrevented||e.one(s,d,(()=>{a.isVisible(this)&&this.focus()}))}));const n=i.findOne(".modal.show");n&&E.getInstance(n).hide(),E.getOrCreateInstance(s).toggle(this)})),n.enableDismissTrigger(E),a.defineJQueryPlugin(E),E}(i(11),i(956),i(411),i(877),i(248),i(936),i(35),i(673))},877:function(t,e,i){t.exports=function(t,e,i){"use strict";const s="backdrop",n="show",o=`mousedown.bs.${s}`,a={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},l={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};return class extends e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return a}static get DefaultType(){return l}static get NAME(){return s}show(t){if(!this._config.isVisible)return void i.execute(t);this._append();const e=this._getElement();this._config.isAnimated&&i.reflow(e),e.classList.add(n),this._emulateAnimation((()=>{i.execute(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(n),this._emulateAnimation((()=>{this.dispose(),i.execute(t)}))):i.execute(t)}dispose(){this._isAppended&&(t.off(this._element,o),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=i.getElement(t.rootElement),t}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),t.on(e,o,(()=>{i.execute(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){i.executeAfterTransition(t,this._getElement(),this._config.isAnimated)}}}(i(956),i(105),i(35))},248:function(t,e,i){!function(t,e,i,s){"use strict";t.enableDismissTrigger=(t,n="hide")=>{const o=`click.dismiss${t.EVENT_KEY}`,a=t.NAME;e.on(document,o,`[data-bs-dismiss="${a}"]`,(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),s.isDisabled(this))return;const o=i.getElementFromSelector(this)||this.closest(`.${a}`);t.getOrCreateInstance(o)[n]()}))},Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e,i(956),i(411),i(35))},936:function(t,e,i){t.exports=function(t,e,i){"use strict";const s=".bs.focustrap",n=`focusin${s}`,o=`keydown.tab${s}`,a="backward",l={autofocus:!0,trapElement:null},r={autofocus:"boolean",trapElement:"element"};return class extends i{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return l}static get DefaultType(){return r}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),t.off(document,s),t.on(document,n,(t=>this._handleFocusin(t))),t.on(document,o,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,t.off(document,s))}_handleFocusin(t){const{trapElement:i}=this._config;if(t.target===document||t.target===i||i.contains(t.target))return;const s=e.focusableChildren(i);0===s.length?i.focus():this._lastTabNavDirection===a?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?a:"forward")}}}(i(956),i(411),i(105))},673:function(t,e,i){t.exports=function(t,e,i){"use strict";const s=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",n=".sticky-top",o="padding-right",a="margin-right";return class{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,o,(e=>e+t)),this._setElementAttributes(s,o,(e=>e+t)),this._setElementAttributes(n,a,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,o),this._resetElementAttributes(s,o),this._resetElementAttributes(n,a)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(e,i){const s=e.style.getPropertyValue(i);s&&t.setDataAttribute(e,i,s)}_resetElementAttributes(e,i){this._applyManipulationCallback(e,(e=>{const s=t.getDataAttribute(e,i);null!==s?(t.removeDataAttribute(e,i),e.style.setProperty(i,s)):e.style.removeProperty(i)}))}_applyManipulationCallback(t,s){if(i.isElement(t))s(t);else for(const i of e.find(t,this._element))s(i)}}}(i(333),i(411),i(35))}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 695.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt */
2
+ (self.webpackChunkkcc_gem_theme=self.webpackChunkkcc_gem_theme||[]).push([[695],{695:function(t,e,s){"use strict";s.r(e);var i=s(13),n=s.n(i);const r=/.*[\?&]id=([^&]+).*$/,o=/\/$/g,a="userPrefersReducedMotion",l={behavior:"smooth",block:"center"},c={block:"center"};function u(t){return"true"==window.localStorage.getItem(a)?t.scrollIntoView(c):t.scrollIntoView(l),t.focus()}function d(t,e){-1!==t.search(r)&&function(t,e){let s=t.replace(r,"$1");u(document.querySelector(e).querySelector(`#${s}`))}(t,e)}function h(t){u(document.querySelector(t))}function g(t){window.location.hash&&function(t,e){if(document.querySelector(`.nav-tabs a[href="${t}"]`)){const e=document.querySelector(`.nav-tabs a[href="${t}"]`),s=new(n())(e);e.addEventListener("shown.bs.tab",(e=>{window.location.search?d(window.location.search,t):h(`${t}-label`)})),s.show()}else if(document.querySelector(`${t}.collapse`)){const s=document.querySelector(t),i=new e(s,{toggle:!1});s.addEventListener("shown.bs.collapse",(e=>{window.location.search?d(window.location.search,t):h(`button[data-bs-target="${t}"]`)})),i.show()}}(window.location.hash.replace(o,""),t)}e.default=function(t){g(t),window.addEventListener("hashchange",(e=>{g(t)}),!1),s.e(977).then(s.bind(s,977)).then((t=>{let{default:e}=t;e()}))}},13:function(t,e,s){t.exports=function(t,e,s,i){"use strict";const n=".bs.tab",r=`hide${n}`,o=`hidden${n}`,a=`show${n}`,l=`shown${n}`,c=`click${n}`,u=`keydown${n}`,d=`load${n}`,h="ArrowLeft",g="ArrowRight",b="ArrowUp",f="ArrowDown",_="Home",w="End",m="active",A="fade",p="show",v=".dropdown-toggle",I=`:not(${v})`,$='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',E=`.nav-link${I}, .list-group-item${I}, [role="tab"]${I}, ${$}`,k=`.${m}[data-bs-toggle="tab"], .${m}[data-bs-toggle="pill"], .${m}[data-bs-toggle="list"]`;class y extends t{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),e.on(this._element,u,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const s=this._getActiveElem(),i=s?e.trigger(s,r,{relatedTarget:t}):null;e.trigger(t,a,{relatedTarget:s}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(s,t),this._activate(t,s))}_activate(t,i){if(!t)return;t.classList.add(m),this._activate(s.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),e.trigger(t,l,{relatedTarget:i})):t.classList.add(p)}),t,t.classList.contains(A))}_deactivate(t,i){if(!t)return;t.classList.remove(m),t.blur(),this._deactivate(s.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),e.trigger(t,o,{relatedTarget:i})):t.classList.remove(p)}),t,t.classList.contains(A))}_keydown(t){if(![h,g,b,f,_,w].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!i.isDisabled(t)));let s;if([_,w].includes(t.key))s=e[t.key===_?0:e.length-1];else{const n=[g,f].includes(t.key);s=i.getNextActiveElement(e,t.target,n,!0)}s&&(s.focus({preventScroll:!0}),y.getOrCreateInstance(s).show())}_getChildren(){return s.find(E,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),s=this._getOuterElement(t);t.setAttribute("aria-selected",e),s!==t&&this._setAttributeIfNotExists(s,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=s.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const r=s.findOne(t,i);r&&r.classList.toggle(n,e)};n(v,m),n(".dropdown-menu",p),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,s){t.hasAttribute(e)||t.setAttribute(e,s)}_elemIsActive(t){return t.classList.contains(m)}_getInnerElement(t){return t.matches(E)?t:s.findOne(E,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=y.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}return e.on(document,c,$,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),i.isDisabled(this)||y.getOrCreateInstance(this).show()})),e.on(window,d,(()=>{for(const t of s.find(k))y.getOrCreateInstance(t)})),i.defineJQueryPlugin(y),y}(s(11),s(956),s(411),s(35))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkkcc_gem_theme=self.webpackChunkkcc_gem_theme||[]).push([[977],{977:function(e,t,n){function a(e,t){let n=new URL(window.location),a={page:document.title,accordion:e.innerText.trim()};n.search="",n.hash=t,window.history.pushState(a,"",n)}function c(e){e.target.matches(".accordion__button")&&Boolean(JSON.parse(e.target.getAttribute("aria-expanded")))&&a(e.target,e.target.dataset.bsTarget)}function o(e){let t=e.target.hash;a(e.target,t)}n.r(t),t.default=function(){document.getElementById("accordion")&&document.getElementById("accordion").addEventListener("click",c),document.querySelector(".navTabs")&&document.querySelector(".navTabs").addEventListener("click",o)}}}]);