diff --git a/libs/Format/HTML/Template.php b/libs/Format/HTML/Template.php
index 010f703..2d133a0 100644
--- a/libs/Format/HTML/Template.php
+++ b/libs/Format/HTML/Template.php
@@ -133,9 +133,9 @@ class Template
$icon = ' ';
if (array_key_exists('href', $entry)) {
- $link = '' . $icon . $entry['title'] . '';
+ $link = '' . $icon . $entry['title'] . '';
} else {
- $link = '' . $icon . $entry['title'] . '';
+ $link = '' . $icon . $entry['title'] . '';
}
$link .= $this->renderNavigation($entry['children']);
diff --git a/libs/Format/HTMLFile/Book.php b/libs/Format/HTMLFile/Book.php
index 0be3a1b..8e0ed21 100644
--- a/libs/Format/HTMLFile/Book.php
+++ b/libs/Format/HTMLFile/Book.php
@@ -64,9 +64,9 @@ class Book
foreach ($entries as $entry) {
if (array_key_exists('children', $entry)) {
if (array_key_exists('href', $entry)) {
- $link = '' . $entry['title'] . '';
+ $link = '' . $entry['title'] . '';
} else {
- $link = '' . $entry['title'] . '';
+ $link = '' . $entry['title'] . '';
}
$link .= $this->renderNavigation($entry['children']);
diff --git a/src/js/theme_daux/hamburger.js b/src/js/theme_daux/hamburger.js
index 4d3fac0..45b0663 100644
--- a/src/js/theme_daux/hamburger.js
+++ b/src/js/theme_daux/hamburger.js
@@ -10,10 +10,7 @@ if (trigger) {
trigger.setAttribute("aria-expanded", "false");
} else {
trigger.setAttribute("aria-expanded", "true");
- content.style.transitionDuration = `${Math.max(
- content.scrollHeight,
- 150
- )}ms`;
+ content.style.transitionDuration = "150ms";
content.style.height = `${content.scrollHeight}px`;
content.classList.add("Collapsible__content--open");
}
diff --git a/src/js/theme_daux/menu.js b/src/js/theme_daux/menu.js
index f94d4b7..06a4948 100644
--- a/src/js/theme_daux/menu.js
+++ b/src/js/theme_daux/menu.js
@@ -1,46 +1,57 @@
-function setHeightToAuto(ev) {
- if (ev.target.style.height !== "0px") {
- ev.target.style.height = "auto";
+/**
+ * After the transition finishes set the height to auto so child
+ * menus can expand properly.
+ * @param {Element} item
+ */
+function resetHeightAfterAnimation(item) {
+ const setHeightToAuto = ev => {
+ if (ev.target.style.height !== "0px") {
+ ev.target.style.height = "auto";
+ }
+
+ ev.target.removeEventListener("transitionend", setHeightToAuto);
+ };
+
+ item.addEventListener("transitionend", setHeightToAuto);
+}
+
+function findNavItem(start) {
+ let elem = start;
+ while ((elem = elem.parentNode) && elem.nodeType !== 9) {
+ if (elem.nodeType === 1 && elem.classList.contains("Nav__item")) {
+ return elem;
+ }
}
- ev.target.removeEventListener("transitionend", setHeightToAuto);
+ throw new Error("Could not find a NavItem...");
}
function toggleSubMenu(ev) {
- if (ev.preventDefault !== undefined) {
+ const isEvent = ev.preventDefault !== undefined;
+
+ if (isEvent) {
ev.preventDefault();
}
- const parent = ev.target.parentNode.parentNode;
+ const parent = findNavItem(ev.target);
const subNav = parent.querySelector("ul.Nav");
- if (
- ev.preventDefault !== undefined &&
- parent.classList.contains("Nav__item--open")
- ) {
+ if (isEvent && parent.classList.contains("Nav__item--open")) {
// Temporarily set the height so the transition can work.
subNav.style.height = `${subNav.scrollHeight}px`;
- subNav.style.transitionDuration = `${Math.max(
- subNav.scrollHeight,
- 150
- )}ms`;
+ subNav.style.transitionDuration = "150ms";
subNav.style.height = "0px";
parent.classList.remove("Nav__item--open");
} else {
- if (ev.preventDefault === undefined) {
+ if (isEvent) {
+ subNav.style.transitionDuration = "150ms";
+ resetHeightAfterAnimation(subNav);
+ subNav.style.height = `${subNav.scrollHeight}px`;
+ parent.classList.add("Nav__item--open");
+ } else {
// When running at page load the transitions don't need to fire and
// the classList doesn't need to be altered.
subNav.style.height = "auto";
- } else {
- subNav.style.transitionDuration = `${Math.max(
- subNav.scrollHeight,
- 150
- )}ms`;
- // After the transition finishes set the height to auto so child
- // menus can expand properly.
- subNav.addEventListener("transitionend", setHeightToAuto);
- subNav.style.height = `${subNav.scrollHeight}px`;
- parent.classList.add("Nav__item--open");
}
}
}
@@ -52,11 +63,17 @@ const navItems = document.querySelectorAll(
// Go in reverse here because on page load the child nav items need to be
// opened first before their parents so the height on the parents can be
// calculated properly.
-for (let i = navItems.length - 1, cur; i >= 0; i--) {
- cur = navItems[i];
- cur.addEventListener("click", toggleSubMenu);
+for (let i = navItems.length - 1, target; i >= 0; i--) {
+ target = navItems[i];
+ target.addEventListener("click", toggleSubMenu);
- if (cur.parentNode.parentNode.classList.contains("Nav__item--open")) {
- toggleSubMenu({ target: cur });
+ if (target.parentNode.parentNode.classList.contains("Nav__item--open")) {
+ toggleSubMenu({ target });
}
}
+
+// Some navigations just have sub-pages without having a page by themselves
+const ajNav = document.querySelectorAll(".Nav__item__link--nopage");
+for (const navItem of ajNav) {
+ navItem.addEventListener("click", toggleSubMenu);
+}
diff --git a/themes/daux/js/daux.min.js b/themes/daux/js/daux.min.js
index 1563439..3bfaeb1 100644
--- a/themes/daux/js/daux.min.js
+++ b/themes/daux/js/daux.min.js
@@ -1,2 +1,2 @@
-var e=document.querySelectorAll(".s-content pre"),t=document.querySelector(".CodeToggler"),a="daux_code_blocks_hidden";function n(t){for(var n=0;n code:not(.hljs)");if(r.length){var i=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.async=!0,c.src="".concat(window.base_url,"_libraries/highlight.pack.js"),c.onload=function(e){[].forEach.call(r,window.hljs.highlightBlock)},i.appendChild(c)}function s(e){"0px"!==e.target.style.height&&(e.target.style.height="auto"),e.target.removeEventListener("transitionend",s)}function d(e){void 0!==e.preventDefault&&e.preventDefault();var t=e.target.parentNode.parentNode,a=t.querySelector("ul.Nav");void 0!==e.preventDefault&&t.classList.contains("Nav__item--open")?(a.style.height="".concat(a.scrollHeight,"px"),a.style.transitionDuration="".concat(Math.max(a.scrollHeight,150),"ms"),a.style.height="0px",t.classList.remove("Nav__item--open")):void 0===e.preventDefault?a.style.height="auto":(a.style.transitionDuration="".concat(Math.max(a.scrollHeight,150),"ms"),a.addEventListener("transitionend",s),a.style.height="".concat(a.scrollHeight,"px"),t.classList.add("Nav__item--open"))}for(var h,g=document.querySelectorAll(".Nav__item.has-children i.Nav__arrow"),u=g.length-1;u>=0;u--)(h=g[u]).addEventListener("click",d),h.parentNode.parentNode.classList.contains("Nav__item--open")&&d({target:h});
+var e=document.querySelectorAll(".s-content pre"),t=document.querySelector(".CodeToggler"),n="daux_code_blocks_hidden";function a(t){for(var a=0;a code:not(.hljs)");if(l.length){var i=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.async=!0,c.src="".concat(window.base_url,"_libraries/highlight.pack.js"),c.onload=function(e){[].forEach.call(l,window.hljs.highlightBlock)},i.appendChild(c)}function s(e){var t=void 0!==e.preventDefault;t&&e.preventDefault();var n=function(e){for(var t=e;(t=t.parentNode)&&9!==t.nodeType;)if(1===t.nodeType&&t.classList.contains("Nav__item"))return t;throw new Error("Could not find a NavItem...")}(e.target),a=n.querySelector("ul.Nav");t&&n.classList.contains("Nav__item--open")?(a.style.height="".concat(a.scrollHeight,"px"),a.style.transitionDuration="150ms",a.style.height="0px",n.classList.remove("Nav__item--open")):t?(a.style.transitionDuration="150ms",a.addEventListener("transitionend",(function e(t){"0px"!==t.target.style.height&&(t.target.style.height="auto"),t.target.removeEventListener("transitionend",e)})),a.style.height="".concat(a.scrollHeight,"px"),n.classList.add("Nav__item--open")):a.style.height="auto"}for(var d,u=document.querySelectorAll(".Nav__item.has-children i.Nav__arrow"),h=u.length-1;h>=0;h--)(d=u[h]).addEventListener("click",s),d.parentNode.parentNode.classList.contains("Nav__item--open")&&s({target:d});var g=document.querySelectorAll(".Nav__item__link--nopage"),v=!0,p=!1,_=void 0;try{for(var y,m=g[Symbol.iterator]();!(v=(y=m.next()).done);v=!0){y.value.addEventListener("click",s)}}catch(e){p=!0,_=e}finally{try{v||null==m.return||m.return()}finally{if(p)throw _}}
//# sourceMappingURL=daux.min.js.map
diff --git a/themes/daux/js/daux.min.js.map b/themes/daux/js/daux.min.js.map
index 81b7a3b..e6cbc2f 100644
--- a/themes/daux/js/daux.min.js.map
+++ b/themes/daux/js/daux.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"daux.min.js.map","sources":["../../../src/js/theme_daux/code_toggle.js","../../../src/js/theme_daux/hamburger.js","../../../src/js/theme_daux/highlight.js","../../../src/js/theme_daux/menu.js"],"sourcesContent":["const codeBlocks = document.querySelectorAll(\".s-content pre\");\nconst toggleCodeSection = document.querySelector(\".CodeToggler\");\n\nconst LOCAL_STORAGE_KEY = \"daux_code_blocks_hidden\";\n\nfunction setCodeBlockStyle(hidden) {\n for (let a = 0; a < codeBlocks.length; a++) {\n codeBlocks[a].classList.toggle(\"Hidden\", hidden);\n }\n try {\n localStorage.setItem(LOCAL_STORAGE_KEY, hidden);\n } catch (e) {\n // local storage operations can fail with the file:// protocol\n }\n}\n\nfunction enableToggler() {\n const toggleCodeBlockBtnSet = toggleCodeSection.querySelector(\n \".CodeToggler__button--main\"\n ); // available when floating is disabled\n\n toggleCodeBlockBtnSet.addEventListener(\n \"change\",\n ev => {\n setCodeBlockStyle(!ev.target.checked);\n },\n false\n );\n\n let hidden = false;\n try {\n hidden = localStorage.getItem(LOCAL_STORAGE_KEY);\n\n if (hidden === \"false\") {\n hidden = false;\n } else if (hidden === \"true\") {\n hidden = true;\n }\n\n if (hidden) {\n setCodeBlockStyle(!!hidden);\n toggleCodeBlockBtnSet.checked = !hidden;\n }\n } catch (e) {\n // local storage operations can fail with the file:// protocol\n }\n}\n\nif (toggleCodeSection) {\n if (codeBlocks.length) {\n enableToggler();\n } else {\n toggleCodeSection.classList.add(\"Hidden\");\n }\n}\n","const trigger = document.querySelector(\".Collapsible__trigger\");\n\nif (trigger) {\n const content = document.querySelector(\".Collapsible__content\");\n\n trigger.addEventListener(\"click\", ev => {\n if (content.classList.contains(\"Collapsible__content--open\")) {\n content.style.height = 0;\n content.classList.remove(\"Collapsible__content--open\");\n trigger.setAttribute(\"aria-expanded\", \"false\");\n } else {\n trigger.setAttribute(\"aria-expanded\", \"true\");\n content.style.transitionDuration = `${Math.max(\n content.scrollHeight,\n 150\n )}ms`;\n content.style.height = `${content.scrollHeight}px`;\n content.classList.add(\"Collapsible__content--open\");\n }\n });\n}\n","const codeBlocks = document.querySelectorAll(\"pre > code:not(.hljs)\");\nif (codeBlocks.length) {\n const head = document.getElementsByTagName(\"head\")[0],\n script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.async = true;\n script.src = `${window.base_url}_libraries/highlight.pack.js`;\n script.onload = function(src) {\n [].forEach.call(codeBlocks, window.hljs.highlightBlock);\n };\n head.appendChild(script);\n}\n","function setHeightToAuto(ev) {\n if (ev.target.style.height !== \"0px\") {\n ev.target.style.height = \"auto\";\n }\n\n ev.target.removeEventListener(\"transitionend\", setHeightToAuto);\n}\n\nfunction toggleSubMenu(ev) {\n if (ev.preventDefault !== undefined) {\n ev.preventDefault();\n }\n\n const parent = ev.target.parentNode.parentNode;\n const subNav = parent.querySelector(\"ul.Nav\");\n\n if (\n ev.preventDefault !== undefined &&\n parent.classList.contains(\"Nav__item--open\")\n ) {\n // Temporarily set the height so the transition can work.\n subNav.style.height = `${subNav.scrollHeight}px`;\n subNav.style.transitionDuration = `${Math.max(\n subNav.scrollHeight,\n 150\n )}ms`;\n subNav.style.height = \"0px\";\n parent.classList.remove(\"Nav__item--open\");\n } else {\n if (ev.preventDefault === undefined) {\n // When running at page load the transitions don't need to fire and\n // the classList doesn't need to be altered.\n subNav.style.height = \"auto\";\n } else {\n subNav.style.transitionDuration = `${Math.max(\n subNav.scrollHeight,\n 150\n )}ms`;\n // After the transition finishes set the height to auto so child\n // menus can expand properly.\n subNav.addEventListener(\"transitionend\", setHeightToAuto);\n subNav.style.height = `${subNav.scrollHeight}px`;\n parent.classList.add(\"Nav__item--open\");\n }\n }\n}\n\nconst navItems = document.querySelectorAll(\n \".Nav__item.has-children i.Nav__arrow\"\n);\n\n// Go in reverse here because on page load the child nav items need to be\n// opened first before their parents so the height on the parents can be\n// calculated properly.\nfor (let i = navItems.length - 1, cur; i >= 0; i--) {\n cur = navItems[i];\n cur.addEventListener(\"click\", toggleSubMenu);\n\n if (cur.parentNode.parentNode.classList.contains(\"Nav__item--open\")) {\n toggleSubMenu({ target: cur });\n }\n}\n"],"names":["codeBlocks","document","querySelectorAll","toggleCodeSection","querySelector","LOCAL_STORAGE_KEY","setCodeBlockStyle","hidden","a","length","classList","toggle","localStorage","setItem","e","toggleCodeBlockBtnSet","addEventListener","ev","target","checked","getItem","enableToggler","add","trigger","content","contains","style","height","remove","setAttribute","transitionDuration","Math","max","scrollHeight","head","getElementsByTagName","script","createElement","type","async","src","window","base_url","onload","forEach","call","hljs","highlightBlock","appendChild","setHeightToAuto","removeEventListener","toggleSubMenu","undefined","preventDefault","parent","parentNode","subNav","cur","navItems","i"],"mappings":"AAAA,IAAMA,EAAaC,SAASC,iBAAiB,kBACvCC,EAAoBF,SAASG,cAAc,gBAE3CC,EAAoB,0BAE1B,SAASC,EAAkBC,OAClB,IAAIC,EAAI,EAAGA,EAAIR,EAAWS,OAAQD,IACnCR,EAAWQ,GAAGE,UAAUC,OAAO,SAAUJ,OAGzCK,aAAaC,QAAQR,EAAmBE,GAC1C,MAAOO,KAqCTX,IACIH,EAAWS,OAjCnB,eACUM,EAAwBZ,EAAkBC,cAC5C,8BAGJW,EAAsBC,iBAClB,UACA,SAAAC,GACIX,GAAmBW,EAAGC,OAAOC,YAEjC,OAGAZ,GAAS,MAIM,WAFfA,EAASK,aAAaQ,QAAQf,IAG1BE,GAAS,EACS,SAAXA,IACPA,GAAS,GAGTA,IACAD,IAAoBC,GACpBQ,EAAsBI,SAAWZ,GAEvC,MAAOO,KAOLO,GAEAlB,EAAkBO,UAAUY,IAAI,WCpDxC,IAAMC,EAAUtB,SAASG,cAAc,yBAEvC,GAAImB,EAAS,KACHC,EAAUvB,SAASG,cAAc,yBAEvCmB,EAAQP,iBAAiB,SAAS,SAAAC,GAC1BO,EAAQd,UAAUe,SAAS,+BAC3BD,EAAQE,MAAMC,OAAS,EACvBH,EAAQd,UAAUkB,OAAO,8BACzBL,EAAQM,aAAa,gBAAiB,WA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wCAMKyD,EAAID,EAASjD,OAAS,EAAQkD,GAAK,EAAGA,KAC3CF,EAAMC,EAASC,IACX3C,iBAAiB,QAASmC,GAE1BM,EAAIF,WAAWA,WAAW7C,UAAUe,SAAS,oBAC7C0B,EAAc,CAAEjC,OAAQuC"}
\ No newline at end of file
+{"version":3,"file":"daux.min.js.map","sources":["../../../src/js/theme_daux/code_toggle.js","../../../src/js/theme_daux/hamburger.js","../../../src/js/theme_daux/highlight.js","../../../src/js/theme_daux/menu.js"],"sourcesContent":["const codeBlocks = document.querySelectorAll(\".s-content pre\");\nconst toggleCodeSection = document.querySelector(\".CodeToggler\");\n\nconst LOCAL_STORAGE_KEY = \"daux_code_blocks_hidden\";\n\nfunction setCodeBlockStyle(hidden) {\n for (let a = 0; a < codeBlocks.length; a++) {\n codeBlocks[a].classList.toggle(\"Hidden\", hidden);\n }\n try {\n localStorage.setItem(LOCAL_STORAGE_KEY, hidden);\n } catch (e) {\n // local storage operations can fail with the file:// protocol\n }\n}\n\nfunction enableToggler() {\n const toggleCodeBlockBtnSet = toggleCodeSection.querySelector(\n \".CodeToggler__button--main\"\n ); // available when floating is disabled\n\n toggleCodeBlockBtnSet.addEventListener(\n \"change\",\n ev => {\n setCodeBlockStyle(!ev.target.checked);\n },\n false\n );\n\n let hidden = false;\n try {\n hidden = localStorage.getItem(LOCAL_STORAGE_KEY);\n\n if (hidden === \"false\") {\n hidden = false;\n } else if (hidden === \"true\") {\n hidden = true;\n }\n\n if (hidden) {\n setCodeBlockStyle(!!hidden);\n toggleCodeBlockBtnSet.checked = !hidden;\n }\n } catch (e) {\n // local storage operations can fail with the file:// protocol\n }\n}\n\nif (toggleCodeSection) {\n if (codeBlocks.length) {\n enableToggler();\n } else {\n toggleCodeSection.classList.add(\"Hidden\");\n }\n}\n","const trigger = document.querySelector(\".Collapsible__trigger\");\n\nif (trigger) {\n const content = document.querySelector(\".Collapsible__content\");\n\n trigger.addEventListener(\"click\", ev => {\n if (content.classList.contains(\"Collapsible__content--open\")) {\n content.style.height = 0;\n content.classList.remove(\"Collapsible__content--open\");\n trigger.setAttribute(\"aria-expanded\", \"false\");\n } else {\n trigger.setAttribute(\"aria-expanded\", \"true\");\n content.style.transitionDuration = \"150ms\";\n content.style.height = `${content.scrollHeight}px`;\n content.classList.add(\"Collapsible__content--open\");\n }\n });\n}\n","const codeBlocks = document.querySelectorAll(\"pre > code:not(.hljs)\");\nif (codeBlocks.length) {\n const head = document.getElementsByTagName(\"head\")[0],\n script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.async = true;\n script.src = `${window.base_url}_libraries/highlight.pack.js`;\n script.onload = function(src) {\n [].forEach.call(codeBlocks, window.hljs.highlightBlock);\n };\n head.appendChild(script);\n}\n","/**\n * After the transition finishes set the height to auto so child\n * menus can expand properly.\n * @param {Element} item\n */\nfunction resetHeightAfterAnimation(item) {\n const setHeightToAuto = ev => {\n if (ev.target.style.height !== \"0px\") {\n ev.target.style.height = \"auto\";\n }\n\n ev.target.removeEventListener(\"transitionend\", setHeightToAuto);\n };\n\n item.addEventListener(\"transitionend\", setHeightToAuto);\n}\n\nfunction findNavItem(start) {\n let elem = start;\n while ((elem = elem.parentNode) && elem.nodeType !== 9) {\n if (elem.nodeType === 1 && elem.classList.contains(\"Nav__item\")) {\n return elem;\n }\n }\n\n throw new Error(\"Could not find a NavItem...\");\n}\n\nfunction toggleSubMenu(ev) {\n const isEvent = ev.preventDefault !== undefined;\n\n if (isEvent) {\n ev.preventDefault();\n }\n\n const parent = findNavItem(ev.target);\n const subNav = parent.querySelector(\"ul.Nav\");\n\n if (isEvent && parent.classList.contains(\"Nav__item--open\")) {\n // Temporarily set the height so the transition can work.\n subNav.style.height = `${subNav.scrollHeight}px`;\n subNav.style.transitionDuration = \"150ms\";\n subNav.style.height = \"0px\";\n parent.classList.remove(\"Nav__item--open\");\n } else {\n if (isEvent) {\n subNav.style.transitionDuration = \"150ms\";\n resetHeightAfterAnimation(subNav);\n subNav.style.height = `${subNav.scrollHeight}px`;\n parent.classList.add(\"Nav__item--open\");\n } else {\n // When running at page load the transitions don't need to fire and\n // the classList doesn't need to be altered.\n subNav.style.height = \"auto\";\n }\n }\n}\n\nconst navItems = document.querySelectorAll(\n \".Nav__item.has-children i.Nav__arrow\"\n);\n\n// Go in reverse here because on page load the child nav items need to be\n// opened first before their parents so the height on the parents can be\n// calculated properly.\nfor (let i = navItems.length - 1, target; i >= 0; i--) {\n target = navItems[i];\n target.addEventListener(\"click\", toggleSubMenu);\n\n if (target.parentNode.parentNode.classList.contains(\"Nav__item--open\")) {\n toggleSubMenu({ target });\n }\n}\n\n// Some navigations just have sub-pages without having a page by themselves\nconst ajNav = document.querySelectorAll(\".Nav__item__link--nopage\");\nfor (const navItem of ajNav) {\n navItem.addEventListener(\"click\", toggleSubMenu);\n}\n"],"names":["codeBlocks","document","querySelectorAll","toggleCodeSection","querySelector","LOCAL_STORAGE_KEY","setCodeBlockStyle","hidden","a","length","classList","toggle","localStorage","setItem","e","toggleCodeBlockBtnSet","addEventListener","ev","target","checked","getItem","enableToggler","add","trigger","content","contains","style","height","remove","setAttribute","transitionDuration","scrollHeight","head","getElementsByTagName","script","createElement","type","async","src","window","base_url","onload","forEach","call","hljs","highlightBlock","appendChild","toggleSubMenu","isEvent","undefined","preventDefault","parent","start","elem","parentNode","nodeType","Error","findNavItem","subNav","setHeightToAuto","removeEventListener","navItems","i","ajNav"],"mappings":"AAAA,IAAMA,EAAaC,SAASC,iBAAiB,kBACvCC,EAAoBF,SAASG,cAAc,gBAE3CC,EAAoB,0BAE1B,SAASC,EAAkBC,OAClB,IAAIC,EAAI,EAAGA,EAAIR,EAAWS,OAAQD,IACnCR,EAAWQ,GAAGE,UAAUC,OAAO,SAAUJ,OAGzCK,aAAaC,QAAQR,EAAmBE,GAC1C,MAAOO,KAqCTX,IACIH,EAAWS,OAjCnB,eACUM,EAAwBZ,EAAkBC,cAC5C,8BAGJW,EAAsBC,iBAClB,UACA,SAAAC,GACIX,GAAmBW,EAAGC,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