File manager - Edit - /home/opticamezl/www/newok/joomla-custom-elements.tar
Back
css/joomla-alert.min.css.gz 0000644 00000001673 15173236314 0011651 0 ustar 00 � �W�n�8}V�J�dG@C35i�c4?�m7`#�4�� 0>���Ο6����'���7)�C�3ej�*�}��Ʃ��(ʏd��ĔrqF�X��Q��(�:s�/�����RQ�PX~xZ�zFa�K��0 T��J#�:X�.��j?�C� �\�aV �"�re5Y�2F Hd.�X]�Sː��/=eY6���uBO���=;)&׳���=�����w�X ����\\{XEQ�`\d�����;�Br4U�X��9j8R���17�D� Yĉ�8zu"�e�e����ٲ�}%� ���Y8�G�8?���(�Lg��N�Rg��lG��� G;���io,�r�x���1�X��(��>=^˝&H08�Ù�PC�6���6p�P_�+���>�.� ���'JsI����iiw<��OR;�O@+�~�+�h"�����{���$��Տw E�r$�+7�T!A��~���=L2)���v��ƍ�by �$�Kw&�Ą�Ot�m���ijK�y�(�c��Y�.�`o>�}�/�� ��K �թ[��h���%��ی�L�J�m�E�3U��RZ*TJ.SNNq�Aʈ��TH�F�0�%�f�g=��K����:��v�'�5�9����j�����d����o��^o�P_`��ո���;�Xg�`}�z�����'�E�� �m�i�d`������4/E`��Ӯ� lxX"{�_��/k��E��$kͷ��`���qEvP�����A�;���h��a26���`�kc���&}��Mt��b����2�Oo�c�n�5k��M�,3I��ᢝ�����>�]�g�p��?�0m"V�]�6����g Y�aYx7r��[��{_J�2�4T�V�QXH�5�K�~�F^N�a���E)���$[���_8�| css/joomla-alert.css 0000644 00000010670 15173236314 0010445 0 ustar 00 joomla-alert { --jui-alert-min-width: 250px; --jui-alert-padding: .5rem 1.25rem; --jui-alert-margin: 0 0 1rem 0; --jui-alert-border: 1px solid transparent; --jui-alert-border-radius: .25rem; --jui-alert-animation-duration: .5s; --jui-alert-animation-timing-function: ease-in-out; --jui-alert-button-color-dark: #000; --jui-alert-button-color-light: #fff; --jui-alert-success-color: #234423; --jui-alert-success-background-color: #d9e6d9; --jui-alert-success-border-color: #cadcca; --jui-alert-success-link-color: #122212; --jui-alert-info-color: #0c5460; --jui-alert-info-background-color: #d1ecf1; --jui-alert-info-border-color: #bee5eb; --jui-alert-info-link-color: #062c33; --jui-alert-warning-color: #7d5a29; --jui-alert-warning-background-color: #fcefdc; --jui-alert-warning-border-color: #fbe8cd; --jui-alert-warning-link-color: #573e1c; --jui-alert-danger-color: #712b29; --jui-alert-danger-background-color: #f7dddc; --jui-alert-danger-border-color: #f4cfce; --jui-alert-danger-link-color: #4c1d1b; display: block; min-width: var(--jui-alert-min-width, 250px); padding: var(--jui-alert-padding, 0.5rem 1.25rem); margin: var(--jui-alert-margin, 0 0 1rem 0); border: var(--jui-alert-border, 1px solid transparent); border-radius: var(--jui-alert-border-radius, 0.25rem); -webkit-animation-duration: var(--jui-alert-animation-duration, 0.5s); animation-duration: var(--jui-alert-animation-duration, 0.5s); -webkit-animation-timing-function: var(--jui-alert-animation-timing-function, ease-in-out); animation-timing-function: var(--jui-alert-animation-timing-function, ease-in-out); } joomla-alert .joomla-alert--close { position: relative; top: -0.5rem; right: -1.25rem; float: right; padding: 0.2rem 1rem; font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--jui-alert-button-color-dark, #000); text-shadow: 0 1px 0 var(--jui-alert-button-color-light, #fff); background: transparent; border: 0; opacity: 0.5; } joomla-alert .joomla-alert--close:hover, joomla-alert .joomla-alert--close:focus { color: var(--jui-alert-button-color-dark, #000); text-decoration: none; cursor: pointer; opacity: 0.75; } joomla-alert[type=success] { color: var(--jui-alert-success-color, #234423); background-color: var(--jui-alert-success-background-color, #d9e6d9); border-color: var(--jui-alert-success-border-color, #cadcca); } joomla-alert[type=success] hr { border-top-color: var(--jui-alert-success-border-color, #cadcca); } joomla-alert[type=success] .alert-link { color: var(--jui-alert-success-link-color, #122212); } joomla-alert[type=info] { color: var(--jui-alert-info-color, #0c5460); background-color: var(--jui-alert-info-background-color, #d1ecf1); border-color: var(--jui-alert-info-border-color, #bee5eb); } joomla-alert[type=info] hr { border-top-color: var(--jui-alert-info-border-color, #bee5eb); } joomla-alert[type=info] .alert-link { color: var(--jui-alert-info-link-color, #062c33); } joomla-alert[type=warning] { color: var(--jui-alert-warning-color, #7d5a29); background-color: var(--jui-alert-warning-background-color, #fcefdc); border-color: var(--jui-alert-warning-border-color, #fbe8cd); } joomla-alert[type=warning] hr { border-top-color: var(--jui-alert-warning-border-color, #fbe8cd); } joomla-alert[type=warning] .alert-link { color: var(--jui-alert-warning-link-color, #573e1c); } joomla-alert[type=danger] { color: var(--jui-alert-danger-color, #712b29); background-color: var(--jui-alert-danger-background-color, #f7dddc); border-color: var(--jui-alert-danger-border-color, #f4cfce); } joomla-alert[type=danger] hr { border-top-color: var(--jui-alert-danger-border-color, #f4cfce); } joomla-alert[type=danger] .alert-link { color: var(--jui-alert-danger-link-color, #4c1d1b); } html[dir=rtl] joomla-alert .joomla-alert--close, html[dir=rtl] joomla-alert .joomla-alert-button--close { right: auto; left: -1.25rem; float: left; } @-webkit-keyframes joomla-alert-fade-in { 0% { opacity: 0; } } @keyframes joomla-alert-fade-in { 0% { opacity: 0; } } @-webkit-keyframes joomla-alert-fade-out { 0% { opacity: 1; } 100% { opacity: 0; } } @keyframes joomla-alert-fade-out { 0% { opacity: 1; } 100% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { joomla-alert { -webkit-animation-duration: 1ms !important; animation-duration: 1ms !important; } } css/joomla-alert.min.css 0000644 00000007574 15173236314 0011240 0 ustar 00 joomla-alert{--jui-alert-min-width:250px;--jui-alert-padding:.5rem 1.25rem;--jui-alert-margin:0 0 1rem 0;--jui-alert-border:1px solid transparent;--jui-alert-border-radius:.25rem;--jui-alert-animation-duration:.5s;--jui-alert-animation-timing-function:ease-in-out;--jui-alert-button-color-dark:#000;--jui-alert-button-color-light:#fff;--jui-alert-success-color:#234423;--jui-alert-success-background-color:#d9e6d9;--jui-alert-success-border-color:#cadcca;--jui-alert-success-link-color:#122212;--jui-alert-info-color:#0c5460;--jui-alert-info-background-color:#d1ecf1;--jui-alert-info-border-color:#bee5eb;--jui-alert-info-link-color:#062c33;--jui-alert-warning-color:#7d5a29;--jui-alert-warning-background-color:#fcefdc;--jui-alert-warning-border-color:#fbe8cd;--jui-alert-warning-link-color:#573e1c;--jui-alert-danger-color:#712b29;--jui-alert-danger-background-color:#f7dddc;--jui-alert-danger-border-color:#f4cfce;--jui-alert-danger-link-color:#4c1d1b;-webkit-animation-duration:var(--jui-alert-animation-duration,.5s);animation-duration:var(--jui-alert-animation-duration,.5s);-webkit-animation-timing-function:var(--jui-alert-animation-timing-function,ease-in-out);animation-timing-function:var(--jui-alert-animation-timing-function,ease-in-out);border:var(--jui-alert-border,1px solid transparent);border-radius:var(--jui-alert-border-radius,.25rem);display:block;margin:var(--jui-alert-margin,0 0 1rem 0);min-width:var(--jui-alert-min-width,250px);padding:var(--jui-alert-padding,.5rem 1.25rem)}joomla-alert .joomla-alert--close{background:transparent;border:0;color:var(--jui-alert-button-color-dark,#000);float:right;font-size:1.5rem;font-weight:700;line-height:1;opacity:.5;padding:.2rem 1rem;position:relative;right:-1.25rem;text-shadow:0 1px 0 var(--jui-alert-button-color-light,#fff);top:-.5rem}joomla-alert .joomla-alert--close:focus,joomla-alert .joomla-alert--close:hover{color:var(--jui-alert-button-color-dark,#000);cursor:pointer;opacity:.75;text-decoration:none}joomla-alert[type=success]{background-color:var(--jui-alert-success-background-color,#d9e6d9);border-color:var(--jui-alert-success-border-color,#cadcca);color:var(--jui-alert-success-color,#234423)}joomla-alert[type=success] hr{border-top-color:var(--jui-alert-success-border-color,#cadcca)}joomla-alert[type=success] .alert-link{color:var(--jui-alert-success-link-color,#122212)}joomla-alert[type=info]{background-color:var(--jui-alert-info-background-color,#d1ecf1);border-color:var(--jui-alert-info-border-color,#bee5eb);color:var(--jui-alert-info-color,#0c5460)}joomla-alert[type=info] hr{border-top-color:var(--jui-alert-info-border-color,#bee5eb)}joomla-alert[type=info] .alert-link{color:var(--jui-alert-info-link-color,#062c33)}joomla-alert[type=warning]{background-color:var(--jui-alert-warning-background-color,#fcefdc);border-color:var(--jui-alert-warning-border-color,#fbe8cd);color:var(--jui-alert-warning-color,#7d5a29)}joomla-alert[type=warning] hr{border-top-color:var(--jui-alert-warning-border-color,#fbe8cd)}joomla-alert[type=warning] .alert-link{color:var(--jui-alert-warning-link-color,#573e1c)}joomla-alert[type=danger]{background-color:var(--jui-alert-danger-background-color,#f7dddc);border-color:var(--jui-alert-danger-border-color,#f4cfce);color:var(--jui-alert-danger-color,#712b29)}joomla-alert[type=danger] hr{border-top-color:var(--jui-alert-danger-border-color,#f4cfce)}joomla-alert[type=danger] .alert-link{color:var(--jui-alert-danger-link-color,#4c1d1b)}html[dir=rtl] joomla-alert .joomla-alert--close,html[dir=rtl] joomla-alert .joomla-alert-button--close{float:left;left:-1.25rem;right:auto}@-webkit-keyframes joomla-alert-fade-in{0%{opacity:0}}@keyframes joomla-alert-fade-in{0%{opacity:0}}@-webkit-keyframes joomla-alert-fade-out{0%{opacity:1}to{opacity:0}}@keyframes joomla-alert-fade-out{0%{opacity:1}to{opacity:0}}@media (prefers-reduced-motion:reduce){joomla-alert{-webkit-animation-duration:1ms!important;animation-duration:1ms!important}} css/joomla-tab.css 0000644 00000010374 15173236314 0010105 0 ustar 00 joomla-tab { display: flex; flex-direction: column; } joomla-tab[view=tabs] > div[role=tablist] { display: flex; padding: 0; margin: 0; overflow-x: auto; overflow-y: hidden; white-space: nowrap; list-style: outside none none; background-color: #f5f5f5; border-color: #ccc #ccc currentcolor; border-style: solid solid none; border-width: 1px 1px 0; border-radius: 0.25rem 0.25rem 0 0; -o-border-image: none; border-image: none; box-shadow: 0 1px #fff inset, 0 2px 3px -3px rgba(0, 0, 0, 0.15), 0 -4px 0 rgba(0, 0, 0, 0.05) inset, 0 0 3px rgba(0, 0, 0, 0.04); } joomla-tab[view=accordion] > div[role=tablist] { display: none; } joomla-tab button[role=tab] { -webkit-appearance: none; -moz-appearance: none; appearance: none; position: relative; display: block; padding: 0.75em 1em; color: #0d1321; background-color: transparent; text-decoration: none; box-shadow: 1px 0 0 rgba(0, 0, 0, 0.05); border: unset; } joomla-tab button[role=tab][aria-expanded=true] { background-color: rgba(0, 0, 0, 0.03); background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05) 100%); border-right: 0 none; border-left: 0 none; border-top-left-radius: 0; border-top-right-radius: 0; box-shadow: 2px 0 1px -1px rgba(0, 0, 0, 0.08) inset, -2px 0 1px -1px rgba(0, 0, 0, 0.08) inset, 0 1px 0 rgba(0, 0, 0, 0.02) inset; } joomla-tab button[aria-expanded=true]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 5px; content: ""; background-color: #006898; opacity: 0.8; } joomla-tab > joomla-tab-element { position: relative; display: none; padding: 15px; background-color: #fefefe; border: 1px solid #ccc; border-radius: 0 0 0.25rem 0.25rem; box-shadow: 0 0 3px rgba(0, 0, 0, 0.04); } joomla-tab > joomla-tab-element[active] { display: block; } joomla-tab[orientation=vertical] { flex-direction: row; align-items: flex-start; } joomla-tab[orientation=vertical] > div[role=tablist] { flex-direction: column; min-width: 30%; height: auto; overflow: hidden; border: 1px solid #ccc; border-radius: 0.25rem; box-shadow: none; } joomla-tab[orientation=vertical] > div[role=tablist] button:last-of-type { border-bottom: 0; } joomla-tab[orientation=vertical] > div[role=tablist] button { -webkit-appearance: none; -moz-appearance: none; appearance: none; position: relative; display: block; padding: 0.75em 1em; color: #0d1321; background-color: transparent; text-decoration: none; border-bottom: 1px solid #ddd; box-shadow: none; } joomla-tab[orientation=vertical] > div[role=tablist] button[aria-expanded=true] { background-color: #fff; background-image: none; border-right: 0 none; border-left: 0 none; box-shadow: none; } joomla-tab[orientation=vertical] > div[role=tablist] button[aria-expanded=true]::after { top: 0; bottom: 0; left: -1px; width: 5px; height: auto; } joomla-tab[orientation=vertical] > joomla-tab-element { padding: 15px; border: 0 none; box-shadow: none; } joomla-tab[view=accordion] { flex-direction: column; white-space: normal; border-radius: 0.25rem; box-shadow: 0 1px #fff inset, 0 0 3px rgba(0, 0, 0, 0.04); } joomla-tab[view=accordion] > button { -webkit-appearance: none; -moz-appearance: none; appearance: none; position: relative; display: block; padding: 0.75em 1em; color: #0d1321; background-color: #f5f5f5; text-decoration: none; box-shadow: 1px 0 0 rgba(0, 0, 0, 0.05); border: unset; } joomla-tab[view=accordion] > button[aria-expanded=true], joomla-tab[view=accordion] > button:focus { background-color: rgba(0, 0, 0, 0.03); background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05) 100%); } joomla-tab[view=accordion] joomla-tab-element { display: none; padding: 15px; } joomla-tab[view=accordion] joomla-tab-element[active] { display: block; border-bottom: 1px solid #ddd; } joomla-tab[view=accordion] [active] { background-color: #fff; } joomla-tab[view=accordion] button { -webkit-appearance: none; -moz-appearance: none; appearance: none; border-bottom: 1px solid #ddd; } joomla-tab[view=accordion] button[aria-expanded=true]::after { top: 0; left: 0; width: 5px; height: 100%; } css/joomla-tab.min.css.gz 0000644 00000001533 15173236314 0011303 0 ustar 00 � �Vao�<�+֪I�W&]�73�H�ī�-s$d��d B�i�&$ۇ}�����Er��tZx���ËJ�!Ee O�� ����i�`��")��J�{�VCjU��1�K�me$M����e��ĉ�<�\MJ��$wi���4����,���S�9pc �Wg���*��j� �#,NlM˭�vϕ) #��,˖��\M\Mhx�<��2<��z����gWv��%#�?c��� Z�A��Kl���@��se8��|���\Th���*)��NH�L�Y��*Z:��-�^�э�4�^*k���s/x��$�5'��#�C� �@xa�qZ����xt��)��`�#@��_P��<B:n��d�N�&ڦ/'`�_CA"(bgK��Ճ�v#�H%�f�V�O�+A�v�H���+����~ȯ��ʀ�4���� ��/{H,�.::kȐ��U�� ѺƠ#��Bc�_��`��ѐ�����MV���Z-&������O�c�m�l�V��qj �A��C������#�D���7�Iiu���\�z�KAC�� �3�TƄ���c~K#�\�(��F��I����MV���@����;�R���B��P�P��P��ǡ�{���Ք��1V �%���Fe�^I���N���-G�%R�Q<88���o��*��[J9��%�Qy���=V�~տ&���Y7;��ڔ>5w�B�B�nh�v�m�T�5�F�\��L�?�J��~hZ������s�Ȼ�à��W�+��̦U��i��ڏ��C�V�_��T�f�j�p�nJP�#����3�� M��Ǯ���O`J�� css/joomla-tab.min.css 0000644 00000006710 15173236314 0010666 0 ustar 00 joomla-tab{display:flex;flex-direction:column}joomla-tab[view=tabs]>div[role=tablist]{background-color:#f5f5f5;border:1px solid #ccc;border-bottom:0;-o-border-image:none;border-image:none;border-radius:.25rem .25rem 0 0;box-shadow:inset 0 1px #fff,0 2px 3px -3px rgba(0,0,0,.15),inset 0 -4px 0 rgba(0,0,0,.05),0 0 3px rgba(0,0,0,.04);display:flex;list-style:none outside none;margin:0;overflow-x:auto;overflow-y:hidden;padding:0;white-space:nowrap}joomla-tab[view=accordion]>div[role=tablist]{display:none}joomla-tab button[role=tab]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:unset;box-shadow:1px 0 0 rgba(0,0,0,.05);color:#0d1321;display:block;padding:.75em 1em;position:relative;text-decoration:none}joomla-tab button[role=tab][aria-expanded=true]{background-color:rgba(0,0,0,.03);background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.05));border-left:0;border-right:0;border-top-left-radius:0;border-top-right-radius:0;box-shadow:inset 2px 0 1px -1px rgba(0,0,0,.08),inset -2px 0 1px -1px rgba(0,0,0,.08),inset 0 1px 0 rgba(0,0,0,.02)}joomla-tab button[aria-expanded=true]:after{background-color:#006898;bottom:-1px;content:"";height:5px;left:0;opacity:.8;position:absolute;right:0}joomla-tab>joomla-tab-element{background-color:#fefefe;border:1px solid #ccc;border-radius:0 0 .25rem .25rem;box-shadow:0 0 3px rgba(0,0,0,.04);display:none;padding:15px;position:relative}joomla-tab>joomla-tab-element[active]{display:block}joomla-tab[orientation=vertical]{align-items:flex-start;flex-direction:row}joomla-tab[orientation=vertical]>div[role=tablist]{border:1px solid #ccc;border-radius:.25rem;box-shadow:none;flex-direction:column;height:auto;min-width:30%;overflow:hidden}joomla-tab[orientation=vertical]>div[role=tablist] button:last-of-type{border-bottom:0}joomla-tab[orientation=vertical]>div[role=tablist] button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-bottom:1px solid #ddd;box-shadow:none;color:#0d1321;display:block;padding:.75em 1em;position:relative;text-decoration:none}joomla-tab[orientation=vertical]>div[role=tablist] button[aria-expanded=true]{background-color:#fff;background-image:none;border-left:0;border-right:0;box-shadow:none}joomla-tab[orientation=vertical]>div[role=tablist] button[aria-expanded=true]:after{bottom:0;height:auto;left:-1px;top:0;width:5px}joomla-tab[orientation=vertical]>joomla-tab-element{border:0;box-shadow:none;padding:15px}joomla-tab[view=accordion]{border-radius:.25rem;box-shadow:inset 0 1px #fff,0 0 3px rgba(0,0,0,.04);flex-direction:column;white-space:normal}joomla-tab[view=accordion]>button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#f5f5f5;border:unset;box-shadow:1px 0 0 rgba(0,0,0,.05);color:#0d1321;display:block;padding:.75em 1em;position:relative;text-decoration:none}joomla-tab[view=accordion]>button:focus,joomla-tab[view=accordion]>button[aria-expanded=true]{background-color:rgba(0,0,0,.03);background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.05))}joomla-tab[view=accordion] joomla-tab-element{display:none;padding:15px}joomla-tab[view=accordion] joomla-tab-element[active]{border-bottom:1px solid #ddd;display:block}joomla-tab[view=accordion] [active]{background-color:#fff}joomla-tab[view=accordion] button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-bottom:1px solid #ddd}joomla-tab[view=accordion] button[aria-expanded=true]:after{height:100%;left:0;top:0;width:5px} LICENSE 0000644 00000043254 15173236314 0005566 0 ustar 00 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. js/joomla-alert.min.js.gz 0000644 00000002203 15173236314 0011307 0 ustar 00 � �WMo�8�ﯰyPE@�&��)���@��!{*z�ű�F& �(����(Y��l�bO����f��f�,�����Q8�����9l��.��Y�[p1Oh�1�r� ?Ӆ6*��@����㧂�q�5s ���Gk�$I7����=�'��mxy�4?*�d'��^8��'�Z��F�O�,� �ӳ2`H�>?�!o\̤ћ��bIL�r�~X���L��h�� f�0!�����@QJҭ�����(�CW���uE��$���|Z��������s���}���݂��N���q^�_L���S��j�S���K��MV@�p��c{z1�9�o�����l�(���&���cE5#x"���ޯ��T�+��"��y��-�]]��UB���A��YEYcV��u.� ���E�Nz5��m����0�b����&i<�)��|"���\M�u'�7�2��@F��e�/dv��ܑ�z*���}kD�7��Ҳ�=Jg�Y�&�f�%�,D�=�&���|�?�n5d��W4U��_�enW`o;�S��vHa�\�YE��?ww�7,�~h��\��f\t��8阤��n~8��5$���_�Yճ�GѸ�T�G�ڀ��6�ߟ�8�Ż��f"����V �`� `�� �Ň߽��;��b-�ە�;��YS�`wԽ����m���۪#���P����GA�:����HK��z�!�z���,��}7��}`�yٮ�뵗Ɂ�H���QS��S �� ���{��ٹⵊS�t����<�ںX8��G��c�Sr�zo��۔~�Q��T��!���^��R�������,���~�q �7����N{�w�O��H����&_B@O=��;-%��}>�����ki]\]�'0�� q�^}Y!x�ԍU�ifE�^|�a0����������/�z�e}��s���ʑ�^(�>�p�!��՟Y&���Q�W �_��ɛ�p�� �����P��\����N�G5�c9������<o��V:0��5�W���[�"�y�SJ����V:���y�K���� �"8T�%t)�Ϯh�����n�K[a���/�#Km��,!~�ۿk?�42 js/joomla-alert.js 0000644 00000014037 15173236314 0010116 0 ustar 00 class AlertElement extends HTMLElement { constructor() { super(); // Bindings this.close = this.close.bind(this); this.destroyCloseButton = this.destroyCloseButton.bind(this); this.createCloseButton = this.createCloseButton.bind(this); this.onMutation = this.onMutation.bind(this); this.observer = new MutationObserver(this.onMutation); this.observer.observe(this, { attributes: false, childList: true, subtree: true }); // Handle the fade in animation this.addEventListener('animationend', (event) => { if (event.animationName === 'joomla-alert-fade-in' && event.target === this) { this.dispatchEvent(new CustomEvent('joomla.alert.shown')); this.style.removeProperty('animationName'); } }); // Handle the fade out animation this.addEventListener('animationend', (event) => { if (event.animationName === 'joomla-alert-fade-out' && event.target === this) { this.dispatchEvent(new CustomEvent('joomla.alert.closed')); this.remove(); } }); } /* Attributes to monitor */ static get observedAttributes() { return ['type', 'role', 'dismiss', 'auto-dismiss', 'close-text']; } get type() { return this.getAttribute('type'); } set type(value) { this.setAttribute('type', value); } get role() { return this.getAttribute('role'); } set role(value) { this.setAttribute('role', value); } get closeText() { return this.getAttribute('close-text'); } set closeText(value) { this.setAttribute('close-text', value); } get dismiss() { return this.getAttribute('dismiss'); } set dismiss(value) { this.setAttribute('dismiss', value); } get autodismiss() { return this.getAttribute('auto-dismiss'); } set autodismiss(value) { this.setAttribute('auto-dismiss', value); } /* Lifecycle, element appended to the DOM */ connectedCallback() { this.dispatchEvent(new CustomEvent('joomla.alert.show')); this.style.animationName = 'joomla-alert-fade-in'; // Default to info if (!this.type || !['info', 'warning', 'danger', 'success'].includes(this.type)) { this.setAttribute('type', 'info'); } // Default to alert if (!this.role || !['alert', 'alertdialog'].includes(this.role)) { this.setAttribute('role', 'alert'); } // Hydrate the button if (this.firstElementChild && this.firstElementChild.tagName === 'BUTTON') { this.button = this.firstElementChild; if (this.button.classList.contains('joomla-alert--close')) { this.button.classList.add('joomla-alert--close'); } if (this.button.innerHTML === '') { this.button.innerHTML = '<span aria-hidden="true">×</span>'; } if (!this.button.hasAttribute('aria-label')) { this.button.setAttribute('aria-label', this.closeText); } } // Append button if (this.hasAttribute('dismiss') && !this.button) { this.createCloseButton(); } if (this.hasAttribute('auto-dismiss')) { this.autoDismiss(); } } /* Lifecycle, element removed from the DOM */ disconnectedCallback() { if (this.button) { this.button.removeEventListener('click', this.close); } this.observer.disconnect(); } /* Respond to attribute changes */ attributeChangedCallback(attr, oldValue, newValue) { switch (attr) { case 'type': if (!newValue || (newValue && ['info', 'warning', 'danger', 'success'].indexOf(newValue) === -1)) { this.type = 'info'; } break; case 'role': if (!newValue || (newValue && ['alert', 'alertdialog'].indexOf(newValue) === -1)) { this.role = 'alert'; } break; case 'dismiss': if ((!newValue || newValue === '') && (!oldValue || oldValue === '')) { if (this.button && !this.hasAttribute('dismiss')) { this.destroyCloseButton(); } else if (!this.button && this.hasAttribute('dismiss')) { this.createCloseButton(); } } else if (this.button && newValue === 'false') { this.destroyCloseButton(); } else if (!this.button && newValue !== 'false') { this.createCloseButton(); } break; case 'close-text': if (!newValue || newValue !== oldValue) { if (this.button) { this.button.setAttribute('aria-label', newValue); } } break; case 'auto-dismiss': this.autoDismiss(); break; } } /* Observe added elements */ onMutation(mutationsList) { // eslint-disable-next-line no-restricted-syntax for (const mutation of mutationsList) { if (mutation.type === 'childList') { if (mutation.addedNodes.length) { // Make sure that the button is always the first element if (this.button && this.firstElementChild !== this.button) { this.prepend(this.button); } } } } } /* Method to close the alert */ close() { this.dispatchEvent(new CustomEvent('joomla.alert.close')); this.style.animationName = 'joomla-alert-fade-out'; } /* Method to create the close button */ createCloseButton() { this.button = document.createElement('button'); this.button.setAttribute('type', 'button'); this.button.classList.add('joomla-alert--close'); this.button.innerHTML = '<span aria-hidden="true">×</span>'; this.button.setAttribute('aria-label', this.closeText); this.insertAdjacentElement('afterbegin', this.button); /* Add the required listener */ this.button.addEventListener('click', this.close); } /* Method to remove the close button */ destroyCloseButton() { if (this.button) { this.button.removeEventListener('click', this.close); this.button.parentNode.removeChild(this.button); this.button = null; } } /* Method to auto-dismiss */ autoDismiss() { const timer = parseInt(this.getAttribute('auto-dismiss'), 10); setTimeout(this.close, timer >= 10 ? timer : 3000); } } if (!customElements.get('joomla-alert')) { customElements.define('joomla-alert', AlertElement); } js/joomla-alert-es5.min.js 0000644 00000024440 15173236314 0011371 0 ustar 00 function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function t(e) { return (t = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (t) { return _typeof(t); } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : _typeof(t); })(e); } function e(t, e) { var o = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]; if (!o) { if (Array.isArray(t) || (o = function (t, e) { if (!t) return; if ("string" == typeof t) return n(t, e); var o = Object.prototype.toString.call(t).slice(8, -1); "Object" === o && t.constructor && (o = t.constructor.name); if ("Map" === o || "Set" === o) return Array.from(t); if ("Arguments" === o || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return n(t, e); }(t)) || e && t && "number" == typeof t.length) { o && (t = o); var i = 0, r = function r() {}; return { s: r, n: function n() { return i >= t.length ? { done: !0 } : { done: !1, value: t[i++] }; }, e: function e(t) { throw t; }, f: r }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var s, u = !0, a = !1; return { s: function s() { o = o.call(t); }, n: function n() { var t = o.next(); return u = t.done, t; }, e: function e(t) { a = !0, s = t; }, f: function f() { try { u || null == o["return"] || o["return"](); } finally { if (a) throw s; } } }; } function n(t, e) { (null == e || e > t.length) && (e = t.length); for (var n = 0, o = new Array(e); n < e; n++) { o[n] = t[n]; } return o; } function o(t, e) { for (var n = 0; n < e.length; n++) { var o = e[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } function i(e, n) { return !n || "object" !== t(n) && "function" != typeof n ? r(e) : n; } function r(t) { if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function s(t) { var e = "function" == typeof Map ? new Map() : void 0; return (s = function s(t) { if (null === t || (n = t, -1 === Function.toString.call(n).indexOf("[native code]"))) return t; var n; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== e) { if (e.has(t)) return e.get(t); e.set(t, o); } function o() { return u(t, arguments, c(this).constructor); } return o.prototype = Object.create(t.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), l(o, t); })(t); } function u(t, e, n) { return (u = a() ? Reflect.construct : function (t, e, n) { var o = [null]; o.push.apply(o, e); var i = new (Function.bind.apply(t, o))(); return n && l(i, n.prototype), i; }).apply(null, arguments); } function a() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0; } catch (t) { return !1; } } function l(t, e) { return (l = Object.setPrototypeOf || function (t, e) { return t.__proto__ = e, t; })(t, e); } function c(t) { return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) { return t.__proto__ || Object.getPrototypeOf(t); })(t); } var f = function (t) { !function (t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), e && l(t, e); }(y, s(HTMLElement)); var n, u, f, h, b, d = (n = y, u = a(), function () { var t, e = c(n); if (u) { var o = c(this).constructor; t = Reflect.construct(e, arguments, o); } else t = e.apply(this, arguments); return i(this, t); }); function y() { var t; return function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); }(this, y), (t = d.call(this)).close = t.close.bind(r(t)), t.destroyCloseButton = t.destroyCloseButton.bind(r(t)), t.createCloseButton = t.createCloseButton.bind(r(t)), t.onMutation = t.onMutation.bind(r(t)), t.observer = new MutationObserver(t.onMutation), t.observer.observe(r(t), { attributes: !1, childList: !0, subtree: !0 }), t.addEventListener("animationend", function (e) { "joomla-alert-fade-in" === e.animationName && e.target === r(t) && (t.dispatchEvent(new CustomEvent("joomla.alert.shown")), t.style.removeProperty("animationName")); }), t.addEventListener("animationend", function (e) { "joomla-alert-fade-out" === e.animationName && e.target === r(t) && (t.dispatchEvent(new CustomEvent("joomla.alert.closed")), t.remove()); }), t; } return f = y, b = [{ key: "observedAttributes", get: function get() { return ["type", "role", "dismiss", "auto-dismiss", "close-text"]; } }], (h = [{ key: "type", get: function get() { return this.getAttribute("type"); }, set: function set(t) { this.setAttribute("type", t); } }, { key: "role", get: function get() { return this.getAttribute("role"); }, set: function set(t) { this.setAttribute("role", t); } }, { key: "closeText", get: function get() { return this.getAttribute("close-text"); }, set: function set(t) { this.setAttribute("close-text", t); } }, { key: "dismiss", get: function get() { return this.getAttribute("dismiss"); }, set: function set(t) { this.setAttribute("dismiss", t); } }, { key: "autodismiss", get: function get() { return this.getAttribute("auto-dismiss"); }, set: function set(t) { this.setAttribute("auto-dismiss", t); } }, { key: "connectedCallback", value: function value() { this.dispatchEvent(new CustomEvent("joomla.alert.show")), this.style.animationName = "joomla-alert-fade-in", this.type && ["info", "warning", "danger", "success"].includes(this.type) || this.setAttribute("type", "info"), this.role && ["alert", "alertdialog"].includes(this.role) || this.setAttribute("role", "alert"), this.firstElementChild && "BUTTON" === this.firstElementChild.tagName && (this.button = this.firstElementChild, this.button.classList.contains("joomla-alert--close") && this.button.classList.add("joomla-alert--close"), "" === this.button.innerHTML && (this.button.innerHTML = '<span aria-hidden="true">×</span>'), this.button.hasAttribute("aria-label") || this.button.setAttribute("aria-label", this.closeText)), this.hasAttribute("dismiss") && !this.button && this.createCloseButton(), this.hasAttribute("auto-dismiss") && this.autoDismiss(); } }, { key: "disconnectedCallback", value: function value() { this.button && this.button.removeEventListener("click", this.close), this.observer.disconnect(); } }, { key: "attributeChangedCallback", value: function value(t, e, n) { switch (t) { case "type": (!n || n && -1 === ["info", "warning", "danger", "success"].indexOf(n)) && (this.type = "info"); break; case "role": (!n || n && -1 === ["alert", "alertdialog"].indexOf(n)) && (this.role = "alert"); break; case "dismiss": n && "" !== n || e && "" !== e ? this.button && "false" === n ? this.destroyCloseButton() : this.button || "false" === n || this.createCloseButton() : this.button && !this.hasAttribute("dismiss") ? this.destroyCloseButton() : !this.button && this.hasAttribute("dismiss") && this.createCloseButton(); break; case "close-text": n && n === e || this.button && this.button.setAttribute("aria-label", n); break; case "auto-dismiss": this.autoDismiss(); } } }, { key: "onMutation", value: function value(t) { var n, o = e(t); try { for (o.s(); !(n = o.n()).done;) { var i = n.value; "childList" === i.type && i.addedNodes.length && this.button && this.firstElementChild !== this.button && this.prepend(this.button); } } catch (t) { o.e(t); } finally { o.f(); } } }, { key: "close", value: function value() { this.dispatchEvent(new CustomEvent("joomla.alert.close")), this.style.animationName = "joomla-alert-fade-out"; } }, { key: "createCloseButton", value: function value() { this.button = document.createElement("button"), this.button.setAttribute("type", "button"), this.button.classList.add("joomla-alert--close"), this.button.innerHTML = '<span aria-hidden="true">×</span>', this.button.setAttribute("aria-label", this.closeText), this.insertAdjacentElement("afterbegin", this.button), this.button.addEventListener("click", this.close); } }, { key: "destroyCloseButton", value: function value() { this.button && (this.button.removeEventListener("click", this.close), this.button.parentNode.removeChild(this.button), this.button = null); } }, { key: "autoDismiss", value: function value() { var t = parseInt(this.getAttribute("auto-dismiss"), 10); setTimeout(this.close, t >= 10 ? t : 3e3); } }]) && o(f.prototype, h), b && o(f, b), y; }(); customElements.get("joomla-alert") || customElements.define("joomla-alert", f); js/joomla-tab-es5.min.js.gz 0000644 00000011111 15173236314 0011436 0 ustar 00 � �<]s�8��0��CVhƾ�ڛ�F�d��u��$S��=�O��Ȗ��u d�3��j|� Jr�٧�KLht7� -�����䣼�@�L�ŧ��N��t���-9%�{2%lIR�@�߮MMf�I�RBNN���`���[�2�U̢dF�#x�[�-�f�iJ��@��C 4�O�"x7�OE��V�mi6��Wrܽ)6�� B$Ud2�ՠ�"6%�GG�2���~D��T��,@��_p6� ���EϖT�%H��̦G�ܓɎ�R��!��q� ��d)d�#�K`�2HE�E�|)�-X��Oe���̂��wwc�-�`�8T 9��ɷu�>\�#�k�K2���-E����,Rr%���|���B4"M^�kZ��P)a��D6���� ?U/j �������9iD�.��!��@-Y(eK��V��Bɀ�4#k���*C@�O<�91�t���V Ư\���̩}M�dF�)�z�)d�^�(JZש̊�f%�������5�=7Q�ȇBzrBR\�{[p��,'���3��H�:@�6� I^����l�)�'����{�q�^L��;��ݟ�5K/&�j��@�](8�����ʔ�5< rݰ��){�eS%o�\�"���\e�:Pԙ7ӣ#B�� ���YN�)����)��;S=�6���%�kt�C���n�J����c 0� a��������#��9a�gKv�����r�\�z a�0E?+n�݈,�⤏�/�ـ���5+>�mNX6�$�8���j��,~H_Q�IPN %eMۖЖ��'��i���۫"p��GG�~�݀ �e#�m�:�� ��2�8'�?|� *!U+C? 7蜞�y��ZoaBdn��FLp��;w�z}���鬬Jp��Z����h�R���0���D �64�^��A��F�X���aj��D� �Z��~NYN�U9�F_�+9��M}��:c-���ε$��oS�؞<��1��B��d��L���>���9�Տ�fҕ�_a xi �%+��o$Y p�8��֬�����0ͼx �J�=�>&�p�����! �7t��:ӺR�7\���(���Am Њ�w7�{ó�� ��[��%��])� �Iֻ�1a���vC>���2�g4�m%�Ŋ��_�H��?(Z|����{B�C40j�����ءm�Pь��Nٰ���c���{SC#�H�"��*<ݝk*���̴֪�\���n��{{x�{�Y�Ͷ]��|/��v"�`����1K}Ljk�Js�{&g9��>3��ՔK�*u��3����,�����O ����]�ud`T�"�/���3u���#����P](�y�ԧ{��̈́�\�s߲�gY��A_RY������&*��[I�z�oA�b�{���?�V�?*b>~D*eth7�A�.G�����;�D���8�4<C(���`���d����7?�XJ`��Z�Ц�x�}� $:K����C�&O�Q�me�6K��aL�OM��驤�S�ߒ�\�Dl�����X[�Gm�X)"����sj�4Fo��:��21�⬐tѢZ��D�K\�r#�5�e��ڌh ����J��y�Jդ�8d8�3� +�@���R\�J�@j������֪���`|����2�ѱ�} F5��5�=-E����%ӛ`�P�z�D�l��к�\������58�v!8.ofϭZ��r�F�R��n'��ի��z��{�9�h�v�2�"��$i����k7��B ��i��|�;������QQ!t����4���ܑ��ƀXmP�[�q��=S�qx��۔G ��yξ��@���1�P��k.� �,'�g�#��ne�9��W����l�1f��zN��U..m�p�� ��h�NN��e�j��ᒪz B���ɼ`����i81Ӊ��q��A�x�v��2�\��e#*��pQ�v���� _̊��v�P Q ϊ%�%�4�P�9����1[!��[�Ƅ��� �W����b�cu��~���q�}����a���|�TP�u�b��%���c�ͪ��J`c�X�6����1I�/�y��h��u�x��uSj㻢�GL��F�v�J��g�3��3:f����tQ�J�L�!���� ��}���_��NN�ϝY�Gݟ�c���\- ��BfѲ�E�[�E�l&����K4�A��g��n��y�^���sL���в� �#i-��K^Ɣ]�ڧ�w�F����%��k��?l�lx!`�\C@wY3D�w�#oU�WM(���� ����jE�Ձ BB��G�ʉ�-f��|�S��w�n�G_&�:qD.Hw4�_�9aDw���C���bUܳ���k�p�}�n �$I2_���Lω!m3F��OA�(��lc��0�����)U�lu��IŮ].��hjTj(y5ke7���|Y}�%p��K bW�'�+d�`�=/�Q[ڹ;T�-v�1h�v73�g*=�/�+���È����R45*(X���lp�z1dF����P��U��������`r��2��_Ǻ)B��ʆ'/�{�_��(�>��X6�s_O�n[�� ��� Soك��Kg?b;�a���R�<�m��v�����$��CC7��+t�S�����6^�C�� ���dt��+��Ӊ-�,O='�.&r����+�� �K��A|�7�m�}�anj6�0�9(���%�L�� �,�g�Jh��@�T;�j��:$߮ ���H,� W������[�8�B�����dsB��"��$�S� ��E�^A." ��V�+N&�&��o��~I�=�!N�W�!Wa���Fr/�儈����]������L�Q���Vw�x�0�<�"ֺ9�t(��`ژ<���G뺱���fӘԛ�y�m}(���ؚ&���Y:@�l�z��Z�77��j�9Qj�yI�'K�i]�v�ڲz�:�����}�"�ڙhѦٔ��*Z�4�[��,�$S]tQH���6��P�oTzM(T�rj����Cse��80o�uJZ���!+k�ѕ��g75,�*�W�39��X���"7�?�2�0]�;)=(�s�Pڍ��!%pIXY�wΪv)m�Q��5H�ܚ'Z˟�v�����~�S�r�Q�A��W��E���L� ������s��g�_�R��cv����H6�Ѝ��<#��;�~L �Y�l�ȯiH��G'|><��j�⒱��"�^� ����+�����.?�Y�WM>�*S���^};�lLwq'-�TŐ��eSn�T��� }c>�R:p�7X�m=��*�y�˿���a���,�8�:������?,��7��"銵�-V�J9���Ѡ=�q���%F4�q����v�t�ɵ�-����*�� {9:����� }@���8=��x��aiL� ��u��#�;*��k<���9Gqp�5�!��sG�/�Ҳ,ʭ�*�*�@"�x��q-<?������=gQ��G�C��^�[�J)�}�%\a��s塷N�,ȓ(��4� �x�1��h����j���ju���yD�i�--{γ톎�j3&(�(�}��r��;�my�N�w�vS�G�w�ͦ���v��Zͱ����*u��w�iMtvg� 8�B�A7�)�?�N�Ą���!�YpǪL9�F��F2�6�X��[~�j�PC�-��z���,���qm4�n�Q9���[�qDWx3��Z�"���"��Y�UQ���'����jf,9�''����rN�+T��v�>f7�a�Iw����ͦ#%39V27е�F�� �Z���u,9RǢ;�X���8ۏ�!�xa}�,ǫ��NkW��H�Bx5�����i�R����Kه��Y�`�j��R�v{����SG{��"�~ඎ��hChJ��2<z��q��6��.=�6s����I����}����1�yi�؝���-��!p̻љ~�hWl)���:�:H+�6���ب���i??�'�}����^��3S/;s�h�[���-��zUc��P�4+nX�������f��9�+Z���#"k�1�E��G�㾆��PA�gJ��y��7�5N���뙲��]�|/A��'�=��z���ݽ�4S'_��QM+���y!`S���'�쒞�����N��/�g���?%YW���E��Ze걠�Z}�|BV����_��������W4�!��.GL�®a1^d^�3�v���+�E P��,r}A�[P��=�l6f���T�=/�:z5� ,��`r�c�G��Fڶl���D�_ �ɣӶlď�\�" oD�r�j+qHf4��m��gGaۖ>R4ΙX���/�}��Kح��rw�oj\��/�p��>�ˈ$�� j�!�b�9t�C�\{�������`woT�X�.��u�\]���v�?�<�2?�&�Մ�8親��/��E�n\��恖�ˣ#��j*�2e�v�@�0ײ��h�ܟ$�fx9[��I�?r�o$9Ygӣ�HG?t~Q js/joomla-tab-es5.min.js 0000644 00000050576 15173236314 0011041 0 ustar 00 function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function t(e) { return (t = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (t) { return _typeof(t); } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : _typeof(t); })(e); } function e(t) { return function (t) { if (Array.isArray(t)) return i(t); }(t) || function (t) { if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t); }(t) || n(t) || function () { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); } function n(t, e) { if (t) { if ("string" == typeof t) return i(t, e); var n = Object.prototype.toString.call(t).slice(8, -1); return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? i(t, e) : void 0; } } function i(t, e) { (null == e || e > t.length) && (e = t.length); for (var n = 0, i = new Array(e); n < e; n++) { i[n] = t[n]; } return i; } function a(t, e) { for (var n = 0; n < e.length; n++) { var i = e[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i); } } function r(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function o(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), e && d(t, e); } function s(t) { var e = h(); return function () { var n, i = f(t); if (e) { var a = f(this).constructor; n = Reflect.construct(i, arguments, a); } else n = i.apply(this, arguments); return u(this, n); }; } function u(e, n) { return !n || "object" !== t(n) && "function" != typeof n ? c(e) : n; } function c(t) { if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function b(t) { var e = "function" == typeof Map ? new Map() : void 0; return (b = function b(t) { if (null === t || (n = t, -1 === Function.toString.call(n).indexOf("[native code]"))) return t; var n; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== e) { if (e.has(t)) return e.get(t); e.set(t, i); } function i() { return l(t, arguments, f(this).constructor); } return i.prototype = Object.create(t.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), d(i, t); })(t); } function l(t, e, n) { return (l = h() ? Reflect.construct : function (t, e, n) { var i = [null]; i.push.apply(i, e); var a = new (Function.bind.apply(t, i))(); return n && d(a, n.prototype), a; }).apply(null, arguments); } function h() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0; } catch (t) { return !1; } } function d(t, e) { return (d = Object.setPrototypeOf || function (t, e) { return t.__proto__ = e, t; })(t, e); } function f(t) { return (f = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) { return t.__proto__ || Object.getPrototypeOf(t); })(t); } var v = function (t) { o(n, b(HTMLElement)); var e = s(n); function n() { return r(this, n), e.apply(this, arguments); } return n; }(); customElements.define("joomla-tab-element", v); var m = function (t) { o(d, b(HTMLElement)); var i, u, l, h = s(d); function d() { var t; return r(this, d), (t = h.call(this)).tabs = [], t.tabsElements = [], t.previousActive = null, t.onMutation = t.onMutation.bind(c(t)), t.keyBehaviour = t.keyBehaviour.bind(c(t)), t.activateTab = t.activateTab.bind(c(t)), t.deactivateTabs = t.deactivateTabs.bind(c(t)), t.checkView = t.checkView.bind(c(t)), t.observer = new MutationObserver(t.onMutation), t.observer.observe(c(t), { attributes: !1, childList: !0, subtree: !0 }), t; } return i = d, l = [{ key: "observedAttributes", get: function get() { return ["recall", "orientation", "view", "breakpoint"]; } }], (u = [{ key: "recall", get: function get() { return this.getAttribute("recall"); }, set: function set(t) { this.setAttribute("recall", t); } }, { key: "view", get: function get() { return this.getAttribute("view"); }, set: function set(t) { this.setAttribute("view", t); } }, { key: "orientation", get: function get() { return this.getAttribute("orientation"); }, set: function set(t) { this.setAttribute("orientation", t); } }, { key: "breakpoint", get: function get() { return parseInt(this.getAttribute("breakpoint"), 10); }, set: function set(t) { this.setAttribute("breakpoint", t); } }, { key: "connectedCallback", value: function value() { var t = this; if ((!this.orientation || this.orientation && !["horizontal", "vertical"].includes(this.orientation)) && (this.orientation = "horizontal"), (!this.view || this.view && !["tabs", "accordion"].includes(this.view)) && (this.view = "tabs"), this.tabsElements = [].slice.call(this.children).filter(function (t) { return "joomla-tab-element" === t.tagName.toLowerCase(); }), this.tabsElements.length) { if (this.isNested = this.parentNode.closest("joomla-tab") instanceof HTMLElement, this.hydrate(), this.hasAttribute("recall") && !this.isNested && this.activateFromState(), window.location.hash) { var e = window.location.hash.substr(1), n = this.tabs.filter(function (t) { return t.tab.id === e; }); n.length && this.activateTab(n[0].tab, !1); } this.tabs.filter(function (t) { return t.tab.hasAttribute("active"); }).length || this.activateTab(this.tabs[0].tab, !1), this.addEventListener("keyup", this.keyBehaviour), this.breakpoint && (this.checkView(), window.addEventListener("resize", function () { t.checkView(); })); } } }, { key: "disconnectedCallback", value: function value() { var t = this; this.tabs.map(function (e) { return e.tabButton.removeEventListener("click", t.activateTab), e.accordionButton.removeEventListener("click", t.activateTab), e; }), this.removeEventListener("keyup", this.keyBehaviour); } }, { key: "attributeChangedCallback", value: function value(t, e, n) { switch (t) { case "view": (!n || n && !["tabs", "accordion"].includes(n)) && (this.view = "tabs"), "tabs" === n && n !== e ? (this.tabButtonContainer && this.tabButtonContainer.removeAttribute("hidden"), this.tabs.map(function (t) { return t.accordionButton.setAttribute("hidden", ""); })) : "accordion" === n && n !== e && (this.tabButtonContainer && this.tabButtonContainer.setAttribute("hidden", ""), this.tabs.map(function (t) { return t.accordionButton.removeAttribute("hidden"); })); } } }, { key: "hydrate", value: function value() { var t = this; this.tabButtonContainer = document.createElement("div"), this.tabButtonContainer.setAttribute("role", "tablist"), this.insertAdjacentElement("afterbegin", this.tabButtonContainer), "accordion" === this.view && this.tabButtonContainer.setAttribute("hidden", ""), this.tabsElements.map(function (e) { var n = document.createElement("button"); n.setAttribute("aria-expanded", !!e.hasAttribute("active")), n.setAttribute("aria-controls", e.id), n.setAttribute("type", "button"), n.innerHTML = '<span class="accordion-title">'.concat(e.getAttribute("name"), '<span class="accordion-icon"></span></span>'), e.insertAdjacentElement("beforebegin", n), "tabs" === t.view && n.setAttribute("hidden", ""), n.addEventListener("click", t.activateTab); var i = document.createElement("button"); return i.setAttribute("aria-expanded", !!e.hasAttribute("active")), i.setAttribute("aria-controls", e.id), i.setAttribute("role", "tab"), i.setAttribute("type", "button"), i.innerHTML = "".concat(e.getAttribute("name")), t.tabButtonContainer.appendChild(i), i.addEventListener("click", t.activateTab), "tabs" === t.view ? e.setAttribute("role", "tabpanel") : e.setAttribute("role", "region"), t.tabs.push({ tab: e, tabButton: i, accordionButton: n }), e; }); } }, { key: "onMutation", value: function value(t) { var e, i = this, a = function (t, e) { var i = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]; if (!i) { if (Array.isArray(t) || (i = n(t)) || e && t && "number" == typeof t.length) { i && (t = i); var a = 0, r = function r() {}; return { s: r, n: function n() { return a >= t.length ? { done: !0 } : { done: !1, value: t[a++] }; }, e: function e(t) { throw t; }, f: r }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, s = !0, u = !1; return { s: function s() { i = i.call(t); }, n: function n() { var t = i.next(); return s = t.done, t; }, e: function e(t) { u = !0, o = t; }, f: function f() { try { s || null == i["return"] || i["return"](); } finally { if (u) throw o; } } }; }(t); try { for (a.s(); !(e = a.n()).done;) { var r = e.value; "childList" === r.type && (r.addedNodes.length && [].slice.call(r.addedNodes).map(function (t) { return i.createNavs(t); }), r.removedNodes.length && [].slice.call(r.addedNodes).map(function (t) { return i.removeNavs(t); })); } } catch (t) { a.e(t); } finally { a.f(); } } }, { key: "keyBehaviour", value: function value(t) { if ([].concat(e(this.tabs.map(function (t) { return t.tabButton; })), e(this.tabs.map(function (t) { return t.accordionButton; }))).includes(document.activeElement) && !t.metaKey && !t.altKey) { var n, i; if ("tabs" === this.view) { var a = this.tabs.findIndex(function (t) { return t.tab.hasAttribute("active"); }); n = a - 1 >= 0 ? this.tabs[a - 1] : this.tabs[this.tabs.length - 1], i = a + 1 <= this.tabs.length - 1 ? this.tabs[a + 1] : this.tabs[0]; } else { var r = this.tabs.map(function (t) { return t.accordionButton; }).findIndex(function (t) { return t === document.activeElement; }); n = r - 1 >= 0 ? this.tabs[r - 1] : this.tabs[this.tabs.length - 1], i = r + 1 <= this.tabs.length - 1 ? this.tabs[r + 1] : this.tabs[0]; } switch (t.keyCode) { case 37: case 38: "tabs" === this.view ? (n.tabButton.click(), n.tabButton.focus()) : n.accordionButton.focus(), t.preventDefault(); break; case 39: case 40: "tabs" === this.view ? (i.tabButton.click(), i.tabButton.focus()) : i.accordionButton.focus(), t.preventDefault(); } } } }, { key: "deactivateTabs", value: function value() { var t = this; this.tabs.map(function (e) { return e.accordionButton.removeAttribute("aria-disabled"), e.tabButton.removeAttribute("aria-expanded"), e.accordionButton.setAttribute("aria-expanded", !1), e.tab.hasAttribute("active") && (t.dispatchCustomEvent("joomla.tab.hide", "tabs" === t.view ? e.tabButton : e.accordionButton, t.previousActive), e.tab.removeAttribute("active"), e.tab.setAttribute("tabindex", "-1"), t.dispatchCustomEvent("joomla.tab.hidden", "tabs" === t.view ? e.tabButton : e.accordionButton, t.previousActive), t.previousActive = "tabs" === t.view ? e.tabButton : e.accordionButton), e; }); } }, { key: "activateTab", value: function value(t) { var e, n = this, i = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; if (t.currentTarget ? e = this.tabs.find(function (e) { return ("tabs" === n.view ? e.tabButton : e.accordionButton) === t.currentTarget; }) : t instanceof HTMLElement ? e = this.tabs.find(function (e) { return e.tab === t; }) : Number.isInteger(t) && (e = this.tabs[t]), e) { if ("accordion" === this.view && this.tabs.find(function (t) { return "true" === t.accordionButton.getAttribute("aria-expanded"); }) === e) return e.tab.hasAttribute("active") ? void e.tab.removeAttribute("active") : void e.tab.setAttribute("active", ""); this.deactivateTabs(), e.tabButton.setAttribute("aria-expanded", !0), e.accordionButton.setAttribute("aria-expanded", !0), e.accordionButton.setAttribute("aria-disabled", !0), e.tab.setAttribute("active", ""), e.tabButton.removeAttribute("tabindex"), this.dispatchCustomEvent("joomla.tab.show", "tabs" === this.view ? e.tabButton : e.accordionButton, this.previousActive), i && ("tabs" === this.view ? e.tabButton.focus() : e.accordionButton.focus()), i && this.saveState(e.tab.id), this.dispatchCustomEvent("joomla.tab.shown", "tabs" === this.view ? e.tabButton : e.accordionButton, this.previousActive); } } }, { key: "createNavs", value: function value(t) { if (!(t instanceof Element && "joomla-tab-element" !== t.tagName.toLowerCase()) && [].some.call(this.children, function (e) { return e === t; }).length && t.getAttribute("name") && t.getAttribute("id")) { var e = [].slice.call(this.children).filter(function (t) { return "joomla-tab-element" === t.tagName.toLowerCase(); }), n = e.findIndex(function (e) { return e === t; }), i = document.createElement("button"); i.setAttribute("aria-expanded", !!t.hasAttribute("active")), i.setAttribute("aria-controls", t.id), i.setAttribute("type", "button"), i.innerHTML = '<span class="accordion-title">'.concat(t.getAttribute("name"), '<span class="accordion-icon"></span></span>'), t.insertAdjacentElement("beforebegin", i), "tabs" === this.view && i.setAttribute("hidden", ""), i.addEventListener("click", this.activateTab); var a = document.createElement("button"); a.setAttribute("aria-expanded", !!t.hasAttribute("active")), a.setAttribute("aria-controls", t.id), a.setAttribute("role", "tab"), a.setAttribute("type", "button"), a.innerHTML = "".concat(t.getAttribute("name")), e.length - 1 === n ? (this.tabButtonContainer.appendChild(a), this.tabs.push({ tab: t, tabButton: a, accordionButton: i })) : 0 === n ? (this.tabButtonContainer.insertAdjacentElement("afterbegin", a), this.tabs.slice(0, 0, { tab: t, tabButton: a, accordionButton: i })) : (this.tabs[n - 1].tabButton.insertAdjacentElement("afterend", a), this.tabs.slice(n - 1, 0, { tab: t, tabButton: a, accordionButton: i })), a.addEventListener("click", this.activateTab); } } }, { key: "removeNavs", value: function value(t) { if (!(t instanceof Element && "joomla-tab-element" !== t.tagName.toLowerCase()) && [].some.call(this.children, function (e) { return e === t; }).length && t.getAttribute("name") && t.getAttribute("id")) { var e = t.previousSilbingElement; e && "button" === e.tagName.toLowerCase() && (e.removeEventListener("click", this.keyBehaviour), e.parentNode.removeChild(e)); var n = this.tabButtonContainer.querySelector("[aria-controls=".concat(e.id, "]")); n && (n.removeEventListener("click", this.keyBehaviour), n.parentNode.removeChild(n)); var i = this.tabs.findIndex(function (e) { return e.tabs === t; }); i - 1 == 0 ? this.tabs.shift() : i - 1 === this.tabs.length ? this.tabs.pop() : this.tabs.splice(i - 1, 1); } } }, { key: "checkView", value: function value() { if (this.breakpoint) if (document.body.getBoundingClientRect().width > this.breakpoint) { if ("tabs" === this.view) return; this.tabButtonContainer.removeAttribute("hidden"), this.tabs.map(function (t) { return t.accordionButton.setAttribute("hidden", ""), t.accordionButton.setAttribute("role", "tabpanel"), "true" === t.accordionButton.getAttribute("aria-expanded") && t.tab.setAttribute("active", ""), t; }), this.setAttribute("view", "tabs"); } else { if ("accordion" === this.view) return; this.tabButtonContainer.setAttribute("hidden", ""), this.tabs.map(function (t) { return t.accordionButton.removeAttribute("hidden"), t.accordionButton.setAttribute("role", "region"), t; }), this.setAttribute("view", "accordion"); } } }, { key: "getStorageKey", value: function value() { return window.location.href.toString().split(window.location.host)[1].replace(/&return=[a-zA-Z0-9%]+/, "").split("#")[0]; } }, { key: "saveState", value: function value(t) { var e = this.getStorageKey(); sessionStorage.setItem(e, t); } }, { key: "activateFromState", value: function value() { var t = this; this.hasNested = this.querySelector("joomla-tab") instanceof HTMLElement; var e = sessionStorage.getItem(this.getStorageKey()); if (e) { var n = this.tabs.findIndex(function (t) { return t.tab.id === e; }); if (n >= 0) this.activateTab(n, !1);else if (this.hasNested && this.querySelector("joomla-tab")) { var i = [].slice.call(this.querySelectorAll("joomla-tab-element")).reverse().filter(function (t) { return t.id === e; }); if (i.length) { var a = i[0].closest("joomla-tab"); [].slice.call(a.querySelectorAll("joomla-tab-element")).forEach(function (t) { t.removeAttribute("active"), t.id === e && t.setAttribute("active", ""); }); for (var r = function r() { var t = a.closest("joomla-tab"), e = a.parentNode.closest("joomla-tab-element"); [].slice.call(t.querySelectorAll("joomla-tab-element")).forEach(function (t) { t.removeAttribute("active"), e === t && (t.setAttribute("active", ""), a = e); }); }; a.parentNode.closest("joomla-tab") !== this;) { r(); } [].slice.call(this.children).filter(function (t) { return "joomla-tab-element" === t.tagName.toLowerCase(); }).forEach(function (e) { e.removeAttribute("active"), e.querySelector("joomla-tab-element[active]") && t.activateTab(e, !1); }); } } } } }, { key: "dispatchCustomEvent", value: function value(t, e, n) { var i = new CustomEvent(t, { bubbles: !0, cancelable: !0 }); i.relatedTarget = n, e.dispatchEvent(i); } }]) && a(i.prototype, u), l && a(i, l), d; }(); customElements.define("joomla-tab", m); js/joomla-tab.js 0000644 00000042672 15173236314 0007563 0 ustar 00 class TabElement extends HTMLElement {} customElements.define('joomla-tab-element', TabElement); class TabsElement extends HTMLElement { /* Attributes to monitor */ static get observedAttributes() { return ['recall', 'orientation', 'view', 'breakpoint']; } get recall() { return this.getAttribute('recall'); } set recall(value) { this.setAttribute('recall', value); } get view() { return this.getAttribute('view'); } set view(value) { this.setAttribute('view', value); } get orientation() { return this.getAttribute('orientation'); } set orientation(value) { this.setAttribute('orientation', value); } get breakpoint() { return parseInt(this.getAttribute('breakpoint'), 10); } set breakpoint(value) { this.setAttribute('breakpoint', value); } /* Lifecycle, element created */ constructor() { super(); this.tabs = []; this.tabsElements = []; this.previousActive = null; this.onMutation = this.onMutation.bind(this); this.keyBehaviour = this.keyBehaviour.bind(this); this.activateTab = this.activateTab.bind(this); this.deactivateTabs = this.deactivateTabs.bind(this); this.checkView = this.checkView.bind(this); this.observer = new MutationObserver(this.onMutation); this.observer.observe(this, { attributes: false, childList: true, subtree: true }); } /* Lifecycle, element appended to the DOM */ connectedCallback() { if (!this.orientation || (this.orientation && !['horizontal', 'vertical'].includes(this.orientation))) { this.orientation = 'horizontal'; } if (!this.view || (this.view && !['tabs', 'accordion'].includes(this.view))) { this.view = 'tabs'; } // get tab elements this.tabsElements = [].slice.call(this.children).filter((el) => el.tagName.toLowerCase() === 'joomla-tab-element'); // Sanity checks if (!this.tabsElements.length) { return; } this.isNested = this.parentNode.closest('joomla-tab') instanceof HTMLElement; this.hydrate(); if (this.hasAttribute('recall') && !this.isNested) { this.activateFromState(); } // Activate tab from the URL hash if (window.location.hash) { const hash = window.location.hash.substr(1); const tabToactivate = this.tabs.filter((tab) => tab.tab.id === hash); if (tabToactivate.length) { this.activateTab(tabToactivate[0].tab, false); } } // If no active tab activate the first one if (!this.tabs.filter((tab) => tab.tab.hasAttribute('active')).length) { this.activateTab(this.tabs[0].tab, false); } this.addEventListener('keyup', this.keyBehaviour); if (this.breakpoint) { // Convert tabs to accordian this.checkView(); window.addEventListener('resize', () => { this.checkView(); }); } } /* Lifecycle, element removed from the DOM */ disconnectedCallback() { this.tabs.map((tab) => { tab.tabButton.removeEventListener('click', this.activateTab); tab.accordionButton.removeEventListener('click', this.activateTab); return tab; }); this.removeEventListener('keyup', this.keyBehaviour); } /* Respond to attribute changes */ attributeChangedCallback(attr, oldValue, newValue) { switch (attr) { case 'view': if (!newValue || (newValue && !['tabs', 'accordion'].includes(newValue))) { this.view = 'tabs'; } if (newValue === 'tabs' && newValue !== oldValue) { if (this.tabButtonContainer) this.tabButtonContainer.removeAttribute('hidden'); this.tabs.map((tab) => tab.accordionButton.setAttribute('hidden', '')); } else if (newValue === 'accordion' && newValue !== oldValue) { if (this.tabButtonContainer) this.tabButtonContainer.setAttribute('hidden', ''); this.tabs.map((tab) => tab.accordionButton.removeAttribute('hidden')); } break; } } hydrate() { // Ensure the tab links container exists this.tabButtonContainer = document.createElement('div'); this.tabButtonContainer.setAttribute('role', 'tablist'); this.insertAdjacentElement('afterbegin', this.tabButtonContainer); if (this.view === 'accordion') { this.tabButtonContainer.setAttribute('hidden', ''); } this.tabsElements.map((tab) => { // Create Accordion button const accordionButton = document.createElement('button'); accordionButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); accordionButton.setAttribute('aria-controls', tab.id); accordionButton.setAttribute('type', 'button'); accordionButton.innerHTML = `<span class="accordion-title">${tab.getAttribute('name')}<span class="accordion-icon"></span></span>`; tab.insertAdjacentElement('beforebegin', accordionButton); if (this.view === 'tabs') { accordionButton.setAttribute('hidden', ''); } accordionButton.addEventListener('click', this.activateTab); // Create tab button const tabButton = document.createElement('button'); tabButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); tabButton.setAttribute('aria-controls', tab.id); tabButton.setAttribute('role', 'tab'); tabButton.setAttribute('type', 'button'); tabButton.innerHTML = `${tab.getAttribute('name')}`; this.tabButtonContainer.appendChild(tabButton); tabButton.addEventListener('click', this.activateTab); if (this.view === 'tabs') { tab.setAttribute('role', 'tabpanel'); } else { tab.setAttribute('role', 'region'); } this.tabs.push({ tab, tabButton, accordionButton, }); return tab; }); } /* Update on mutation */ onMutation(mutationsList) { // eslint-disable-next-line no-restricted-syntax for (const mutation of mutationsList) { if (mutation.type === 'childList') { if (mutation.addedNodes.length) { [].slice.call(mutation.addedNodes).map((inserted) => this.createNavs(inserted)); // Add the tab buttons } if (mutation.removedNodes.length) { // Remove the tab buttons [].slice.call(mutation.addedNodes).map((inserted) => this.removeNavs(inserted)); } } } } keyBehaviour(e) { // Only the tabs/accordion buttons, no ⌘ or Alt modifier if (![...this.tabs.map((el) => el.tabButton), ...this.tabs.map((el) => el.accordionButton)] .includes(document.activeElement) || e.metaKey || e.altKey) { return; } let previousTabItem; let nextTabItem; if (this.view === 'tabs') { const currentTabIndex = this.tabs.findIndex((tab) => tab.tab.hasAttribute('active')); previousTabItem = currentTabIndex - 1 >= 0 ? this.tabs[currentTabIndex - 1] : this.tabs[this.tabs.length - 1]; nextTabItem = currentTabIndex + 1 <= this.tabs.length - 1 ? this.tabs[currentTabIndex + 1] : this.tabs[0]; } else { const currentTabIndex = this.tabs.map((el) => el.accordionButton) .findIndex((tab) => tab === document.activeElement); previousTabItem = currentTabIndex - 1 >= 0 ? this.tabs[currentTabIndex - 1] : this.tabs[this.tabs.length - 1]; nextTabItem = currentTabIndex + 1 <= this.tabs.length - 1 ? this.tabs[currentTabIndex + 1] : this.tabs[0]; } // catch left/right and up/down arrow key events switch (e.keyCode) { case 37: case 38: if (this.view === 'tabs') { previousTabItem.tabButton.click(); previousTabItem.tabButton.focus(); } else { previousTabItem.accordionButton.focus(); } e.preventDefault(); break; case 39: case 40: if (this.view === 'tabs') { nextTabItem.tabButton.click(); nextTabItem.tabButton.focus(); } else { nextTabItem.accordionButton.focus(); } e.preventDefault(); break; } } deactivateTabs() { this.tabs.map((tabObj) => { tabObj.accordionButton.removeAttribute('aria-disabled'); tabObj.tabButton.removeAttribute('aria-expanded'); tabObj.accordionButton.setAttribute('aria-expanded', false); if (tabObj.tab.hasAttribute('active')) { this.dispatchCustomEvent('joomla.tab.hide', this.view === 'tabs' ? tabObj.tabButton : tabObj.accordionButton, this.previousActive); tabObj.tab.removeAttribute('active'); tabObj.tab.setAttribute('tabindex', '-1'); // Emit hidden event this.dispatchCustomEvent('joomla.tab.hidden', this.view === 'tabs' ? tabObj.tabButton : tabObj.accordionButton, this.previousActive); this.previousActive = this.view === 'tabs' ? tabObj.tabButton : tabObj.accordionButton; } return tabObj; }); } activateTab(input, state = true) { let currentTrigger; if (input.currentTarget) { currentTrigger = this.tabs.find((tab) => ((this.view === 'tabs' ? tab.tabButton : tab.accordionButton) === input.currentTarget)); } else if (input instanceof HTMLElement) { currentTrigger = this.tabs.find((tab) => tab.tab === input); } else if (Number.isInteger(input)) { currentTrigger = this.tabs[input]; } if (currentTrigger) { // Accordion can close the active panel if (this.view === 'accordion' && this.tabs.find((tab) => tab.accordionButton.getAttribute('aria-expanded') === 'true') === currentTrigger) { if (currentTrigger.tab.hasAttribute('active')) { currentTrigger.tab.removeAttribute('active'); return; } currentTrigger.tab.setAttribute('active', ''); return; } // Remove current active this.deactivateTabs(); // Set new active currentTrigger.tabButton.setAttribute('aria-expanded', true); currentTrigger.accordionButton.setAttribute('aria-expanded', true); currentTrigger.accordionButton.setAttribute('aria-disabled', true); currentTrigger.tab.setAttribute('active', ''); currentTrigger.tabButton.removeAttribute('tabindex'); this.dispatchCustomEvent('joomla.tab.show', this.view === 'tabs' ? currentTrigger.tabButton : currentTrigger.accordionButton, this.previousActive); if (state) { if (this.view === 'tabs') { currentTrigger.tabButton.focus(); } else { currentTrigger.accordionButton.focus(); } } if (state) this.saveState(currentTrigger.tab.id); this.dispatchCustomEvent('joomla.tab.shown', this.view === 'tabs' ? currentTrigger.tabButton : currentTrigger.accordionButton, this.previousActive); } } // Create navigation elements for inserted tabs createNavs(tab) { if ((tab instanceof Element && tab.tagName.toLowerCase() !== 'joomla-tab-element') || ![].some.call(this.children, (el) => el === tab).length || !tab.getAttribute('name') || !tab.getAttribute('id')) return; const tabs = [].slice.call(this.children).filter((el) => el.tagName.toLowerCase() === 'joomla-tab-element'); const index = tabs.findIndex((tb) => tb === tab); // Create Accordion button const accordionButton = document.createElement('button'); accordionButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); accordionButton.setAttribute('aria-controls', tab.id); accordionButton.setAttribute('type', 'button'); accordionButton.innerHTML = `<span class="accordion-title">${tab.getAttribute('name')}<span class="accordion-icon"></span></span>`; tab.insertAdjacentElement('beforebegin', accordionButton); if (this.view === 'tabs') { accordionButton.setAttribute('hidden', ''); } accordionButton.addEventListener('click', this.activateTab); // Create tab button const tabButton = document.createElement('button'); tabButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); tabButton.setAttribute('aria-controls', tab.id); tabButton.setAttribute('role', 'tab'); tabButton.setAttribute('type', 'button'); tabButton.innerHTML = `${tab.getAttribute('name')}`; if (tabs.length - 1 === index) { // last this.tabButtonContainer.appendChild(tabButton); this.tabs.push({ tab, tabButton, accordionButton, }); } else if (index === 0) { // first this.tabButtonContainer.insertAdjacentElement('afterbegin', tabButton); this.tabs.slice(0, 0, { tab, tabButton, accordionButton, }); } else { // Middle this.tabs[index - 1].tabButton.insertAdjacentElement('afterend', tabButton); this.tabs.slice(index - 1, 0, { tab, tabButton, accordionButton, }); } tabButton.addEventListener('click', this.activateTab); } // Remove navigation elements for removed tabs removeNavs(tab) { if ((tab instanceof Element && tab.tagName.toLowerCase() !== 'joomla-tab-element') || ![].some.call(this.children, (el) => el === tab).length || !tab.getAttribute('name') || !tab.getAttribute('id')) return; const accordionButton = tab.previousSilbingElement; if (accordionButton && accordionButton.tagName.toLowerCase() === 'button') { accordionButton.removeEventListener('click', this.keyBehaviour); accordionButton.parentNode.removeChild(accordionButton); } const tabButton = this.tabButtonContainer.querySelector(`[aria-controls=${accordionButton.id}]`); if (tabButton) { tabButton.removeEventListener('click', this.keyBehaviour); tabButton.parentNode.removeChild(tabButton); } const index = this.tabs.findIndex((tb) => tb.tabs === tab); if (index - 1 === 0) { this.tabs.shift(); } else if (index - 1 === this.tabs.length) { this.tabs.pop(); } else { this.tabs.splice(index - 1, 1); } } /** Method to convert tabs to accordion and vice versa depending on screen size */ checkView() { if (!this.breakpoint) { return; } if (document.body.getBoundingClientRect().width > this.breakpoint) { if (this.view === 'tabs') { return; } this.tabButtonContainer.removeAttribute('hidden'); this.tabs.map((tab) => { tab.accordionButton.setAttribute('hidden', ''); tab.accordionButton.setAttribute('role', 'tabpanel'); if (tab.accordionButton.getAttribute('aria-expanded') === 'true') { tab.tab.setAttribute('active', ''); } return tab; }); this.setAttribute('view', 'tabs'); } else { if (this.view === 'accordion') { return; } this.tabButtonContainer.setAttribute('hidden', ''); this.tabs.map((tab) => { tab.accordionButton.removeAttribute('hidden'); tab.accordionButton.setAttribute('role', 'region'); return tab; }); this.setAttribute('view', 'accordion'); } } getStorageKey() { return window.location.href.toString().split(window.location.host)[1].replace(/&return=[a-zA-Z0-9%]+/, '').split('#')[0]; } saveState(value) { const storageKey = this.getStorageKey(); sessionStorage.setItem(storageKey, value); } activateFromState() { this.hasNested = this.querySelector('joomla-tab') instanceof HTMLElement; // Use the sessionStorage state! const href = sessionStorage.getItem(this.getStorageKey()); if (href) { const currentTabIndex = this.tabs.findIndex((tab) => tab.tab.id === href); if (currentTabIndex >= 0) { this.activateTab(currentTabIndex, false); } else if (this.hasNested) { const childTabs = this.querySelector('joomla-tab'); if (childTabs) { const activeTabs = [].slice.call(this.querySelectorAll('joomla-tab-element')) .reverse() .filter((activeTabEl) => activeTabEl.id === href); if (activeTabs.length) { // Activate the deepest tab let activeTab = activeTabs[0].closest('joomla-tab'); [].slice.call(activeTab.querySelectorAll('joomla-tab-element')) .forEach((tabEl) => { tabEl.removeAttribute('active'); if (tabEl.id === href) { tabEl.setAttribute('active', ''); } }); // Activate all parent tabs while (activeTab.parentNode.closest('joomla-tab') !== this) { const parentTabContainer = activeTab.closest('joomla-tab'); const parentTabEl = activeTab.parentNode.closest('joomla-tab-element'); [].slice.call(parentTabContainer.querySelectorAll('joomla-tab-element')) // eslint-disable-next-line no-loop-func .forEach((tabEl) => { tabEl.removeAttribute('active'); if (parentTabEl === tabEl) { tabEl.setAttribute('active', ''); activeTab = parentTabEl; } }); } [].slice.call(this.children) .filter((el) => el.tagName.toLowerCase() === 'joomla-tab-element') .forEach((tabEl) => { tabEl.removeAttribute('active'); const isActiveChild = tabEl.querySelector('joomla-tab-element[active]'); if (isActiveChild) { this.activateTab(tabEl, false); } }); } } } } } /* Method to dispatch events */ dispatchCustomEvent(eventName, element, related) { const OriginalCustomEvent = new CustomEvent(eventName, { bubbles: true, cancelable: true }); OriginalCustomEvent.relatedTarget = related; element.dispatchEvent(OriginalCustomEvent); } } customElements.define('joomla-tab', TabsElement); js/joomla-alert.min.js 0000644 00000007462 15173236314 0010704 0 ustar 00 class t extends HTMLElement{constructor(){super(),this.close=this.close.bind(this),this.destroyCloseButton=this.destroyCloseButton.bind(this),this.createCloseButton=this.createCloseButton.bind(this),this.onMutation=this.onMutation.bind(this),this.observer=new MutationObserver(this.onMutation),this.observer.observe(this,{attributes:!1,childList:!0,subtree:!0}),this.addEventListener("animationend",(t=>{"joomla-alert-fade-in"===t.animationName&&t.target===this&&(this.dispatchEvent(new CustomEvent("joomla.alert.shown")),this.style.removeProperty("animationName"))})),this.addEventListener("animationend",(t=>{"joomla-alert-fade-out"===t.animationName&&t.target===this&&(this.dispatchEvent(new CustomEvent("joomla.alert.closed")),this.remove())}))}static get observedAttributes(){return["type","role","dismiss","auto-dismiss","close-text"]}get type(){return this.getAttribute("type")}set type(t){this.setAttribute("type",t)}get role(){return this.getAttribute("role")}set role(t){this.setAttribute("role",t)}get closeText(){return this.getAttribute("close-text")}set closeText(t){this.setAttribute("close-text",t)}get dismiss(){return this.getAttribute("dismiss")}set dismiss(t){this.setAttribute("dismiss",t)}get autodismiss(){return this.getAttribute("auto-dismiss")}set autodismiss(t){this.setAttribute("auto-dismiss",t)}connectedCallback(){this.dispatchEvent(new CustomEvent("joomla.alert.show")),this.style.animationName="joomla-alert-fade-in",this.type&&["info","warning","danger","success"].includes(this.type)||this.setAttribute("type","info"),this.role&&["alert","alertdialog"].includes(this.role)||this.setAttribute("role","alert"),this.firstElementChild&&"BUTTON"===this.firstElementChild.tagName&&(this.button=this.firstElementChild,this.button.classList.contains("joomla-alert--close")&&this.button.classList.add("joomla-alert--close"),""===this.button.innerHTML&&(this.button.innerHTML='<span aria-hidden="true">×</span>'),this.button.hasAttribute("aria-label")||this.button.setAttribute("aria-label",this.closeText)),this.hasAttribute("dismiss")&&!this.button&&this.createCloseButton(),this.hasAttribute("auto-dismiss")&&this.autoDismiss()}disconnectedCallback(){this.button&&this.button.removeEventListener("click",this.close),this.observer.disconnect()}attributeChangedCallback(t,e,s){switch(t){case"type":(!s||s&&-1===["info","warning","danger","success"].indexOf(s))&&(this.type="info");break;case"role":(!s||s&&-1===["alert","alertdialog"].indexOf(s))&&(this.role="alert");break;case"dismiss":s&&""!==s||e&&""!==e?this.button&&"false"===s?this.destroyCloseButton():this.button||"false"===s||this.createCloseButton():this.button&&!this.hasAttribute("dismiss")?this.destroyCloseButton():!this.button&&this.hasAttribute("dismiss")&&this.createCloseButton();break;case"close-text":s&&s===e||this.button&&this.button.setAttribute("aria-label",s);break;case"auto-dismiss":this.autoDismiss()}}onMutation(t){for(const e of t)"childList"===e.type&&e.addedNodes.length&&this.button&&this.firstElementChild!==this.button&&this.prepend(this.button)}close(){this.dispatchEvent(new CustomEvent("joomla.alert.close")),this.style.animationName="joomla-alert-fade-out"}createCloseButton(){this.button=document.createElement("button"),this.button.setAttribute("type","button"),this.button.classList.add("joomla-alert--close"),this.button.innerHTML='<span aria-hidden="true">×</span>',this.button.setAttribute("aria-label",this.closeText),this.insertAdjacentElement("afterbegin",this.button),this.button.addEventListener("click",this.close)}destroyCloseButton(){this.button&&(this.button.removeEventListener("click",this.close),this.button.parentNode.removeChild(this.button),this.button=null)}autoDismiss(){const t=parseInt(this.getAttribute("auto-dismiss"),10);setTimeout(this.close,t>=10?t:3e3)}}customElements.get("joomla-alert")||customElements.define("joomla-alert",t); js/joomla-tab.min.js 0000644 00000024371 15173236314 0010341 0 ustar 00 class t extends HTMLElement{}customElements.define("joomla-tab-element",t);class e extends HTMLElement{static get observedAttributes(){return["recall","orientation","view","breakpoint"]}get recall(){return this.getAttribute("recall")}set recall(t){this.setAttribute("recall",t)}get view(){return this.getAttribute("view")}set view(t){this.setAttribute("view",t)}get orientation(){return this.getAttribute("orientation")}set orientation(t){this.setAttribute("orientation",t)}get breakpoint(){return parseInt(this.getAttribute("breakpoint"),10)}set breakpoint(t){this.setAttribute("breakpoint",t)}constructor(){super(),this.tabs=[],this.tabsElements=[],this.previousActive=null,this.onMutation=this.onMutation.bind(this),this.keyBehaviour=this.keyBehaviour.bind(this),this.activateTab=this.activateTab.bind(this),this.deactivateTabs=this.deactivateTabs.bind(this),this.checkView=this.checkView.bind(this),this.observer=new MutationObserver(this.onMutation),this.observer.observe(this,{attributes:!1,childList:!0,subtree:!0})}connectedCallback(){if((!this.orientation||this.orientation&&!["horizontal","vertical"].includes(this.orientation))&&(this.orientation="horizontal"),(!this.view||this.view&&!["tabs","accordion"].includes(this.view))&&(this.view="tabs"),this.tabsElements=[].slice.call(this.children).filter((t=>"joomla-tab-element"===t.tagName.toLowerCase())),this.tabsElements.length){if(this.isNested=this.parentNode.closest("joomla-tab")instanceof HTMLElement,this.hydrate(),this.hasAttribute("recall")&&!this.isNested&&this.activateFromState(),window.location.hash){const t=window.location.hash.substr(1),e=this.tabs.filter((e=>e.tab.id===t));e.length&&this.activateTab(e[0].tab,!1)}this.tabs.filter((t=>t.tab.hasAttribute("active"))).length||this.activateTab(this.tabs[0].tab,!1),this.addEventListener("keyup",this.keyBehaviour),this.breakpoint&&(this.checkView(),window.addEventListener("resize",(()=>{this.checkView()})))}}disconnectedCallback(){this.tabs.map((t=>(t.tabButton.removeEventListener("click",this.activateTab),t.accordionButton.removeEventListener("click",this.activateTab),t))),this.removeEventListener("keyup",this.keyBehaviour)}attributeChangedCallback(t,e,i){switch(t){case"view":(!i||i&&!["tabs","accordion"].includes(i))&&(this.view="tabs"),"tabs"===i&&i!==e?(this.tabButtonContainer&&this.tabButtonContainer.removeAttribute("hidden"),this.tabs.map((t=>t.accordionButton.setAttribute("hidden","")))):"accordion"===i&&i!==e&&(this.tabButtonContainer&&this.tabButtonContainer.setAttribute("hidden",""),this.tabs.map((t=>t.accordionButton.removeAttribute("hidden"))))}}hydrate(){this.tabButtonContainer=document.createElement("div"),this.tabButtonContainer.setAttribute("role","tablist"),this.insertAdjacentElement("afterbegin",this.tabButtonContainer),"accordion"===this.view&&this.tabButtonContainer.setAttribute("hidden",""),this.tabsElements.map((t=>{const e=document.createElement("button");e.setAttribute("aria-expanded",!!t.hasAttribute("active")),e.setAttribute("aria-controls",t.id),e.setAttribute("type","button"),e.innerHTML=`<span class="accordion-title">${t.getAttribute("name")}<span class="accordion-icon"></span></span>`,t.insertAdjacentElement("beforebegin",e),"tabs"===this.view&&e.setAttribute("hidden",""),e.addEventListener("click",this.activateTab);const i=document.createElement("button");return i.setAttribute("aria-expanded",!!t.hasAttribute("active")),i.setAttribute("aria-controls",t.id),i.setAttribute("role","tab"),i.setAttribute("type","button"),i.innerHTML=`${t.getAttribute("name")}`,this.tabButtonContainer.appendChild(i),i.addEventListener("click",this.activateTab),"tabs"===this.view?t.setAttribute("role","tabpanel"):t.setAttribute("role","region"),this.tabs.push({tab:t,tabButton:i,accordionButton:e}),t}))}onMutation(t){for(const e of t)"childList"===e.type&&(e.addedNodes.length&&[].slice.call(e.addedNodes).map((t=>this.createNavs(t))),e.removedNodes.length&&[].slice.call(e.addedNodes).map((t=>this.removeNavs(t))))}keyBehaviour(t){if(![...this.tabs.map((t=>t.tabButton)),...this.tabs.map((t=>t.accordionButton))].includes(document.activeElement)||t.metaKey||t.altKey)return;let e,i;if("tabs"===this.view){const t=this.tabs.findIndex((t=>t.tab.hasAttribute("active")));e=t-1>=0?this.tabs[t-1]:this.tabs[this.tabs.length-1],i=t+1<=this.tabs.length-1?this.tabs[t+1]:this.tabs[0]}else{const t=this.tabs.map((t=>t.accordionButton)).findIndex((t=>t===document.activeElement));e=t-1>=0?this.tabs[t-1]:this.tabs[this.tabs.length-1],i=t+1<=this.tabs.length-1?this.tabs[t+1]:this.tabs[0]}switch(t.keyCode){case 37:case 38:"tabs"===this.view?(e.tabButton.click(),e.tabButton.focus()):e.accordionButton.focus(),t.preventDefault();break;case 39:case 40:"tabs"===this.view?(i.tabButton.click(),i.tabButton.focus()):i.accordionButton.focus(),t.preventDefault()}}deactivateTabs(){this.tabs.map((t=>(t.accordionButton.removeAttribute("aria-disabled"),t.tabButton.removeAttribute("aria-expanded"),t.accordionButton.setAttribute("aria-expanded",!1),t.tab.hasAttribute("active")&&(this.dispatchCustomEvent("joomla.tab.hide","tabs"===this.view?t.tabButton:t.accordionButton,this.previousActive),t.tab.removeAttribute("active"),t.tab.setAttribute("tabindex","-1"),this.dispatchCustomEvent("joomla.tab.hidden","tabs"===this.view?t.tabButton:t.accordionButton,this.previousActive),this.previousActive="tabs"===this.view?t.tabButton:t.accordionButton),t)))}activateTab(t,e=!0){let i;if(t.currentTarget?i=this.tabs.find((e=>("tabs"===this.view?e.tabButton:e.accordionButton)===t.currentTarget)):t instanceof HTMLElement?i=this.tabs.find((e=>e.tab===t)):Number.isInteger(t)&&(i=this.tabs[t]),i){if("accordion"===this.view&&this.tabs.find((t=>"true"===t.accordionButton.getAttribute("aria-expanded")))===i)return i.tab.hasAttribute("active")?void i.tab.removeAttribute("active"):void i.tab.setAttribute("active","");this.deactivateTabs(),i.tabButton.setAttribute("aria-expanded",!0),i.accordionButton.setAttribute("aria-expanded",!0),i.accordionButton.setAttribute("aria-disabled",!0),i.tab.setAttribute("active",""),i.tabButton.removeAttribute("tabindex"),this.dispatchCustomEvent("joomla.tab.show","tabs"===this.view?i.tabButton:i.accordionButton,this.previousActive),e&&("tabs"===this.view?i.tabButton.focus():i.accordionButton.focus()),e&&this.saveState(i.tab.id),this.dispatchCustomEvent("joomla.tab.shown","tabs"===this.view?i.tabButton:i.accordionButton,this.previousActive)}}createNavs(t){if(t instanceof Element&&"joomla-tab-element"!==t.tagName.toLowerCase()||![].some.call(this.children,(e=>e===t)).length||!t.getAttribute("name")||!t.getAttribute("id"))return;const e=[].slice.call(this.children).filter((t=>"joomla-tab-element"===t.tagName.toLowerCase())),i=e.findIndex((e=>e===t)),a=document.createElement("button");a.setAttribute("aria-expanded",!!t.hasAttribute("active")),a.setAttribute("aria-controls",t.id),a.setAttribute("type","button"),a.innerHTML=`<span class="accordion-title">${t.getAttribute("name")}<span class="accordion-icon"></span></span>`,t.insertAdjacentElement("beforebegin",a),"tabs"===this.view&&a.setAttribute("hidden",""),a.addEventListener("click",this.activateTab);const s=document.createElement("button");s.setAttribute("aria-expanded",!!t.hasAttribute("active")),s.setAttribute("aria-controls",t.id),s.setAttribute("role","tab"),s.setAttribute("type","button"),s.innerHTML=`${t.getAttribute("name")}`,e.length-1===i?(this.tabButtonContainer.appendChild(s),this.tabs.push({tab:t,tabButton:s,accordionButton:a})):0===i?(this.tabButtonContainer.insertAdjacentElement("afterbegin",s),this.tabs.slice(0,0,{tab:t,tabButton:s,accordionButton:a})):(this.tabs[i-1].tabButton.insertAdjacentElement("afterend",s),this.tabs.slice(i-1,0,{tab:t,tabButton:s,accordionButton:a})),s.addEventListener("click",this.activateTab)}removeNavs(t){if(t instanceof Element&&"joomla-tab-element"!==t.tagName.toLowerCase()||![].some.call(this.children,(e=>e===t)).length||!t.getAttribute("name")||!t.getAttribute("id"))return;const e=t.previousSilbingElement;e&&"button"===e.tagName.toLowerCase()&&(e.removeEventListener("click",this.keyBehaviour),e.parentNode.removeChild(e));const i=this.tabButtonContainer.querySelector(`[aria-controls=${e.id}]`);i&&(i.removeEventListener("click",this.keyBehaviour),i.parentNode.removeChild(i));const a=this.tabs.findIndex((e=>e.tabs===t));a-1==0?this.tabs.shift():a-1===this.tabs.length?this.tabs.pop():this.tabs.splice(a-1,1)}checkView(){if(this.breakpoint)if(document.body.getBoundingClientRect().width>this.breakpoint){if("tabs"===this.view)return;this.tabButtonContainer.removeAttribute("hidden"),this.tabs.map((t=>(t.accordionButton.setAttribute("hidden",""),t.accordionButton.setAttribute("role","tabpanel"),"true"===t.accordionButton.getAttribute("aria-expanded")&&t.tab.setAttribute("active",""),t))),this.setAttribute("view","tabs")}else{if("accordion"===this.view)return;this.tabButtonContainer.setAttribute("hidden",""),this.tabs.map((t=>(t.accordionButton.removeAttribute("hidden"),t.accordionButton.setAttribute("role","region"),t))),this.setAttribute("view","accordion")}}getStorageKey(){return window.location.href.toString().split(window.location.host)[1].replace(/&return=[a-zA-Z0-9%]+/,"").split("#")[0]}saveState(t){const e=this.getStorageKey();sessionStorage.setItem(e,t)}activateFromState(){this.hasNested=this.querySelector("joomla-tab")instanceof HTMLElement;const t=sessionStorage.getItem(this.getStorageKey());if(t){const e=this.tabs.findIndex((e=>e.tab.id===t));if(e>=0)this.activateTab(e,!1);else if(this.hasNested){if(this.querySelector("joomla-tab")){const e=[].slice.call(this.querySelectorAll("joomla-tab-element")).reverse().filter((e=>e.id===t));if(e.length){let i=e[0].closest("joomla-tab");for([].slice.call(i.querySelectorAll("joomla-tab-element")).forEach((e=>{e.removeAttribute("active"),e.id===t&&e.setAttribute("active","")}));i.parentNode.closest("joomla-tab")!==this;){const t=i.closest("joomla-tab"),e=i.parentNode.closest("joomla-tab-element");[].slice.call(t.querySelectorAll("joomla-tab-element")).forEach((t=>{t.removeAttribute("active"),e===t&&(t.setAttribute("active",""),i=e)}))}[].slice.call(this.children).filter((t=>"joomla-tab-element"===t.tagName.toLowerCase())).forEach((t=>{t.removeAttribute("active");t.querySelector("joomla-tab-element[active]")&&this.activateTab(t,!1)}))}}}}}dispatchCustomEvent(t,e,i){const a=new CustomEvent(t,{bubbles:!0,cancelable:!0});a.relatedTarget=i,e.dispatchEvent(a)}}customElements.define("joomla-tab",e); js/joomla-tab.min.js.gz 0000644 00000004754 15173236314 0010763 0 ustar 00 � �k�۸�{��^ �u6Z�=;�E�M� �h�~��@hil�"S.9�f��/H�AI��\�~ڵ�yrf8�)�r����9�맟߿Ia�y���m��2L`�8��/Y�M��rf���c� ��$Rd�` 8Ȗ��W��-��'G����4�/�ʸx^�-�/��q���e�W��0�+�~���ޏ�wJ�� �ƭh�Ĭ�2x�^7V�z�Ӓ�$j[zC��tjh��W+�&��B�[�����`L'����MقR��K�3ᓣ��@�$�pH�2�_�?J۪>�X���bd��>M�B�����p�x��)�|��װ� ��:_:۩"E>�e��ٜ��*#ǷH����?<D͟���g���à��o�G�%u��Go��r��p��&���p��l8�Yq��;��K�ɑ�|h��&���2 �M&ط�#U>{ �,�����}�oC2u>F6ԕ�dտ���/�hg"Q��&�v�4ԯ� �х2e1�&*��ai"��p�R�ݸ"^E"]�[1{�=���|B���7Z�z�� c;*��,�0N3 �(��%RC����!�yLE(]lC�#��F��Ѩa��#,�'�C�f�� �r�N=�ȵ�R��$���R D7���,QJ#d�:Z\|�K�'�9NI�Ņ� j\M15�!��nl�2�B ���8*����~�u�IP���*����*@�o��O��c.'��y¤�'kMl�N���zx�G�x(`��E.NY����8`X����+w�*/���݆�% 0r�㍺eb*�\�3Ȟ��Y�g=^o�FQ�F#6�"��,���� k�.bZ��aI)չt�ۼ,�S�Jf�0��$�0�K�"&{E�VYŘc�(�⽊Ia,�"�v�88ͳ�R��Lb Ƹ���_h+�t� ��f��CO��v���?Pb�Ke�zu��D<����`t_w�'�x�p�}q-p��G���0dIw>�BK���s� �>��;�:i�j=��a ��Gl农n�#y�3�ݼ�Q��>+�ܧ��U&�8>���:#8q��}�jn·�?�"Cf�?&v�1�^�����3d�����^�����N�9>S�.W��n�W��zdֳC�ZW7Vt����?"]�0�8����f�� sB�:Vw�*~ኃl5@�Uy��B�����ʶd��4SA{�������|���{��\|��Gr��Tb��?����+-�li)��ά�p��� �- }��_��;x$�9�)� 6g+�ku�h�n<y��zA�6��ӛhr[gk8�.f�� �Q�x�X�/�/��E�d�C*��� յe���G��]IʼI�[wY&���3�O3��`%���}e��U�O�:�B���ׁ�aE�)�d�s㹡�������>s�g.�� �yެ�r���� �t�B��T'��!\��eZ��q�2L��Q�7w�/wз�� 4K��ۉ�u<���j���t%-X*�[wU- ���xZ���6��a��D���p�F�@4����~:�a�*�?Q��e����^G���<��XDw� ��]���j�О}�o� B&�r��j")[���qAT奢��\���"(�`Z mC_�0tB���TyV���2�;z�pfmj9�١rŹ�G4��s������R�*� 'i���I�{���dN���t#���TVuS��c��b��� �Ŋ��"��$S�7=ݷ�ݰp���������*3̶��c��n���3|�SVdieI��u8Yv6T3��u}~�E/)����o��]�u0�����G>�|�%�#O�����`�rgu��v��<_��N9JsBf��D.hb5hk��'�$������ӅzO��8)���rځ�� �F���W��/>�t���{�Qi�����V7!�ܛ���D��,����g~�ڃx�)���WF?!dI��L�L��ײ�Xck��(�UY��rV�d冭�'3��)����l瓙��vL��`Jrk�RM��!a���̒Ge ��=O_ߥjL�w��'�Kps�?�{!��|����T�l��i��M�G#<��֣"�bFc:1�%�9M^3��}\�ɺ�yZ�Z:���1t ��~�љ� X��}D���'ڮ����$���"�Ki��#�/���o�������ŏJ) �ѽ�*�FRM2ʧ!6�s R��ߔ�o�>�7�A�Gۃ�f �`�=/t-�낺�S��4}���J��7фtgҪA3WF:(�G%VON�V����p������P5���=�����3ݧ��0��`���Mf�Ŝ�2���N�J+F��/ �&��3so :���e�:��U��xJF~O�(-�V�v1�s��ҽټ�ѿ��B?�P�\?e��Š�L �C���q�_.S�li�*��A�+�i( ���E,��'`੪��=ZT�o� ̰*��( js/joomla-tab-es5.js 0000644 00000067270 15173236314 0010256 0 ustar 00 function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var TabElement = /*#__PURE__*/function (_HTMLElement) { _inherits(TabElement, _HTMLElement); var _super = _createSuper(TabElement); function TabElement() { _classCallCheck(this, TabElement); return _super.apply(this, arguments); } return TabElement; }( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); customElements.define('joomla-tab-element', TabElement); var TabsElement = /*#__PURE__*/function (_HTMLElement2) { _inherits(TabsElement, _HTMLElement2); var _super2 = _createSuper(TabsElement); /* Lifecycle, element created */ function TabsElement() { var _this; _classCallCheck(this, TabsElement); _this = _super2.call(this); _this.tabs = []; _this.tabsElements = []; _this.previousActive = null; _this.onMutation = _this.onMutation.bind(_assertThisInitialized(_this)); _this.keyBehaviour = _this.keyBehaviour.bind(_assertThisInitialized(_this)); _this.activateTab = _this.activateTab.bind(_assertThisInitialized(_this)); _this.deactivateTabs = _this.deactivateTabs.bind(_assertThisInitialized(_this)); _this.checkView = _this.checkView.bind(_assertThisInitialized(_this)); _this.observer = new MutationObserver(_this.onMutation); _this.observer.observe(_assertThisInitialized(_this), { attributes: false, childList: true, subtree: true }); return _this; } /* Lifecycle, element appended to the DOM */ _createClass(TabsElement, [{ key: "recall", get: function get() { return this.getAttribute('recall'); }, set: function set(value) { this.setAttribute('recall', value); } }, { key: "view", get: function get() { return this.getAttribute('view'); }, set: function set(value) { this.setAttribute('view', value); } }, { key: "orientation", get: function get() { return this.getAttribute('orientation'); }, set: function set(value) { this.setAttribute('orientation', value); } }, { key: "breakpoint", get: function get() { return parseInt(this.getAttribute('breakpoint'), 10); }, set: function set(value) { this.setAttribute('breakpoint', value); } }, { key: "connectedCallback", value: function connectedCallback() { var _this2 = this; if (!this.orientation || this.orientation && !['horizontal', 'vertical'].includes(this.orientation)) { this.orientation = 'horizontal'; } if (!this.view || this.view && !['tabs', 'accordion'].includes(this.view)) { this.view = 'tabs'; } // get tab elements this.tabsElements = [].slice.call(this.children).filter(function (el) { return el.tagName.toLowerCase() === 'joomla-tab-element'; }); // Sanity checks if (!this.tabsElements.length) { return; } this.isNested = this.parentNode.closest('joomla-tab') instanceof HTMLElement; this.hydrate(); if (this.hasAttribute('recall') && !this.isNested) { this.activateFromState(); } // Activate tab from the URL hash if (window.location.hash) { var hash = window.location.hash.substr(1); var tabToactivate = this.tabs.filter(function (tab) { return tab.tab.id === hash; }); if (tabToactivate.length) { this.activateTab(tabToactivate[0].tab, false); } } // If no active tab activate the first one if (!this.tabs.filter(function (tab) { return tab.tab.hasAttribute('active'); }).length) { this.activateTab(this.tabs[0].tab, false); } this.addEventListener('keyup', this.keyBehaviour); if (this.breakpoint) { // Convert tabs to accordian this.checkView(); window.addEventListener('resize', function () { _this2.checkView(); }); } } /* Lifecycle, element removed from the DOM */ }, { key: "disconnectedCallback", value: function disconnectedCallback() { var _this3 = this; this.tabs.map(function (tab) { tab.tabButton.removeEventListener('click', _this3.activateTab); tab.accordionButton.removeEventListener('click', _this3.activateTab); return tab; }); this.removeEventListener('keyup', this.keyBehaviour); } /* Respond to attribute changes */ }, { key: "attributeChangedCallback", value: function attributeChangedCallback(attr, oldValue, newValue) { switch (attr) { case 'view': if (!newValue || newValue && !['tabs', 'accordion'].includes(newValue)) { this.view = 'tabs'; } if (newValue === 'tabs' && newValue !== oldValue) { if (this.tabButtonContainer) this.tabButtonContainer.removeAttribute('hidden'); this.tabs.map(function (tab) { return tab.accordionButton.setAttribute('hidden', ''); }); } else if (newValue === 'accordion' && newValue !== oldValue) { if (this.tabButtonContainer) this.tabButtonContainer.setAttribute('hidden', ''); this.tabs.map(function (tab) { return tab.accordionButton.removeAttribute('hidden'); }); } break; } } }, { key: "hydrate", value: function hydrate() { var _this4 = this; // Ensure the tab links container exists this.tabButtonContainer = document.createElement('div'); this.tabButtonContainer.setAttribute('role', 'tablist'); this.insertAdjacentElement('afterbegin', this.tabButtonContainer); if (this.view === 'accordion') { this.tabButtonContainer.setAttribute('hidden', ''); } this.tabsElements.map(function (tab) { // Create Accordion button var accordionButton = document.createElement('button'); accordionButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); accordionButton.setAttribute('aria-controls', tab.id); accordionButton.setAttribute('type', 'button'); accordionButton.innerHTML = "<span class=\"accordion-title\">".concat(tab.getAttribute('name'), "<span class=\"accordion-icon\"></span></span>"); tab.insertAdjacentElement('beforebegin', accordionButton); if (_this4.view === 'tabs') { accordionButton.setAttribute('hidden', ''); } accordionButton.addEventListener('click', _this4.activateTab); // Create tab button var tabButton = document.createElement('button'); tabButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); tabButton.setAttribute('aria-controls', tab.id); tabButton.setAttribute('role', 'tab'); tabButton.setAttribute('type', 'button'); tabButton.innerHTML = "".concat(tab.getAttribute('name')); _this4.tabButtonContainer.appendChild(tabButton); tabButton.addEventListener('click', _this4.activateTab); if (_this4.view === 'tabs') { tab.setAttribute('role', 'tabpanel'); } else { tab.setAttribute('role', 'region'); } _this4.tabs.push({ tab: tab, tabButton: tabButton, accordionButton: accordionButton }); return tab; }); } /* Update on mutation */ }, { key: "onMutation", value: function onMutation(mutationsList) { var _this5 = this; // eslint-disable-next-line no-restricted-syntax var _iterator = _createForOfIteratorHelper(mutationsList), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var mutation = _step.value; if (mutation.type === 'childList') { if (mutation.addedNodes.length) { [].slice.call(mutation.addedNodes).map(function (inserted) { return _this5.createNavs(inserted); }); // Add the tab buttons } if (mutation.removedNodes.length) { // Remove the tab buttons [].slice.call(mutation.addedNodes).map(function (inserted) { return _this5.removeNavs(inserted); }); } } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } }, { key: "keyBehaviour", value: function keyBehaviour(e) { // Only the tabs/accordion buttons, no ⌘ or Alt modifier if (![].concat(_toConsumableArray(this.tabs.map(function (el) { return el.tabButton; })), _toConsumableArray(this.tabs.map(function (el) { return el.accordionButton; }))).includes(document.activeElement) || e.metaKey || e.altKey) { return; } var previousTabItem; var nextTabItem; if (this.view === 'tabs') { var currentTabIndex = this.tabs.findIndex(function (tab) { return tab.tab.hasAttribute('active'); }); previousTabItem = currentTabIndex - 1 >= 0 ? this.tabs[currentTabIndex - 1] : this.tabs[this.tabs.length - 1]; nextTabItem = currentTabIndex + 1 <= this.tabs.length - 1 ? this.tabs[currentTabIndex + 1] : this.tabs[0]; } else { var _currentTabIndex = this.tabs.map(function (el) { return el.accordionButton; }).findIndex(function (tab) { return tab === document.activeElement; }); previousTabItem = _currentTabIndex - 1 >= 0 ? this.tabs[_currentTabIndex - 1] : this.tabs[this.tabs.length - 1]; nextTabItem = _currentTabIndex + 1 <= this.tabs.length - 1 ? this.tabs[_currentTabIndex + 1] : this.tabs[0]; } // catch left/right and up/down arrow key events switch (e.keyCode) { case 37: case 38: if (this.view === 'tabs') { previousTabItem.tabButton.click(); previousTabItem.tabButton.focus(); } else { previousTabItem.accordionButton.focus(); } e.preventDefault(); break; case 39: case 40: if (this.view === 'tabs') { nextTabItem.tabButton.click(); nextTabItem.tabButton.focus(); } else { nextTabItem.accordionButton.focus(); } e.preventDefault(); break; } } }, { key: "deactivateTabs", value: function deactivateTabs() { var _this6 = this; this.tabs.map(function (tabObj) { tabObj.accordionButton.removeAttribute('aria-disabled'); tabObj.tabButton.removeAttribute('aria-expanded'); tabObj.accordionButton.setAttribute('aria-expanded', false); if (tabObj.tab.hasAttribute('active')) { _this6.dispatchCustomEvent('joomla.tab.hide', _this6.view === 'tabs' ? tabObj.tabButton : tabObj.accordionButton, _this6.previousActive); tabObj.tab.removeAttribute('active'); tabObj.tab.setAttribute('tabindex', '-1'); // Emit hidden event _this6.dispatchCustomEvent('joomla.tab.hidden', _this6.view === 'tabs' ? tabObj.tabButton : tabObj.accordionButton, _this6.previousActive); _this6.previousActive = _this6.view === 'tabs' ? tabObj.tabButton : tabObj.accordionButton; } return tabObj; }); } }, { key: "activateTab", value: function activateTab(input) { var _this7 = this; var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var currentTrigger; if (input.currentTarget) { currentTrigger = this.tabs.find(function (tab) { return (_this7.view === 'tabs' ? tab.tabButton : tab.accordionButton) === input.currentTarget; }); } else if (input instanceof HTMLElement) { currentTrigger = this.tabs.find(function (tab) { return tab.tab === input; }); } else if (Number.isInteger(input)) { currentTrigger = this.tabs[input]; } if (currentTrigger) { // Accordion can close the active panel if (this.view === 'accordion' && this.tabs.find(function (tab) { return tab.accordionButton.getAttribute('aria-expanded') === 'true'; }) === currentTrigger) { if (currentTrigger.tab.hasAttribute('active')) { currentTrigger.tab.removeAttribute('active'); return; } currentTrigger.tab.setAttribute('active', ''); return; } // Remove current active this.deactivateTabs(); // Set new active currentTrigger.tabButton.setAttribute('aria-expanded', true); currentTrigger.accordionButton.setAttribute('aria-expanded', true); currentTrigger.accordionButton.setAttribute('aria-disabled', true); currentTrigger.tab.setAttribute('active', ''); currentTrigger.tabButton.removeAttribute('tabindex'); this.dispatchCustomEvent('joomla.tab.show', this.view === 'tabs' ? currentTrigger.tabButton : currentTrigger.accordionButton, this.previousActive); if (state) { if (this.view === 'tabs') { currentTrigger.tabButton.focus(); } else { currentTrigger.accordionButton.focus(); } } if (state) this.saveState(currentTrigger.tab.id); this.dispatchCustomEvent('joomla.tab.shown', this.view === 'tabs' ? currentTrigger.tabButton : currentTrigger.accordionButton, this.previousActive); } } // Create navigation elements for inserted tabs }, { key: "createNavs", value: function createNavs(tab) { if (tab instanceof Element && tab.tagName.toLowerCase() !== 'joomla-tab-element' || ![].some.call(this.children, function (el) { return el === tab; }).length || !tab.getAttribute('name') || !tab.getAttribute('id')) return; var tabs = [].slice.call(this.children).filter(function (el) { return el.tagName.toLowerCase() === 'joomla-tab-element'; }); var index = tabs.findIndex(function (tb) { return tb === tab; }); // Create Accordion button var accordionButton = document.createElement('button'); accordionButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); accordionButton.setAttribute('aria-controls', tab.id); accordionButton.setAttribute('type', 'button'); accordionButton.innerHTML = "<span class=\"accordion-title\">".concat(tab.getAttribute('name'), "<span class=\"accordion-icon\"></span></span>"); tab.insertAdjacentElement('beforebegin', accordionButton); if (this.view === 'tabs') { accordionButton.setAttribute('hidden', ''); } accordionButton.addEventListener('click', this.activateTab); // Create tab button var tabButton = document.createElement('button'); tabButton.setAttribute('aria-expanded', !!tab.hasAttribute('active')); tabButton.setAttribute('aria-controls', tab.id); tabButton.setAttribute('role', 'tab'); tabButton.setAttribute('type', 'button'); tabButton.innerHTML = "".concat(tab.getAttribute('name')); if (tabs.length - 1 === index) { // last this.tabButtonContainer.appendChild(tabButton); this.tabs.push({ tab: tab, tabButton: tabButton, accordionButton: accordionButton }); } else if (index === 0) { // first this.tabButtonContainer.insertAdjacentElement('afterbegin', tabButton); this.tabs.slice(0, 0, { tab: tab, tabButton: tabButton, accordionButton: accordionButton }); } else { // Middle this.tabs[index - 1].tabButton.insertAdjacentElement('afterend', tabButton); this.tabs.slice(index - 1, 0, { tab: tab, tabButton: tabButton, accordionButton: accordionButton }); } tabButton.addEventListener('click', this.activateTab); } // Remove navigation elements for removed tabs }, { key: "removeNavs", value: function removeNavs(tab) { if (tab instanceof Element && tab.tagName.toLowerCase() !== 'joomla-tab-element' || ![].some.call(this.children, function (el) { return el === tab; }).length || !tab.getAttribute('name') || !tab.getAttribute('id')) return; var accordionButton = tab.previousSilbingElement; if (accordionButton && accordionButton.tagName.toLowerCase() === 'button') { accordionButton.removeEventListener('click', this.keyBehaviour); accordionButton.parentNode.removeChild(accordionButton); } var tabButton = this.tabButtonContainer.querySelector("[aria-controls=".concat(accordionButton.id, "]")); if (tabButton) { tabButton.removeEventListener('click', this.keyBehaviour); tabButton.parentNode.removeChild(tabButton); } var index = this.tabs.findIndex(function (tb) { return tb.tabs === tab; }); if (index - 1 === 0) { this.tabs.shift(); } else if (index - 1 === this.tabs.length) { this.tabs.pop(); } else { this.tabs.splice(index - 1, 1); } } /** Method to convert tabs to accordion and vice versa depending on screen size */ }, { key: "checkView", value: function checkView() { if (!this.breakpoint) { return; } if (document.body.getBoundingClientRect().width > this.breakpoint) { if (this.view === 'tabs') { return; } this.tabButtonContainer.removeAttribute('hidden'); this.tabs.map(function (tab) { tab.accordionButton.setAttribute('hidden', ''); tab.accordionButton.setAttribute('role', 'tabpanel'); if (tab.accordionButton.getAttribute('aria-expanded') === 'true') { tab.tab.setAttribute('active', ''); } return tab; }); this.setAttribute('view', 'tabs'); } else { if (this.view === 'accordion') { return; } this.tabButtonContainer.setAttribute('hidden', ''); this.tabs.map(function (tab) { tab.accordionButton.removeAttribute('hidden'); tab.accordionButton.setAttribute('role', 'region'); return tab; }); this.setAttribute('view', 'accordion'); } } }, { key: "getStorageKey", value: function getStorageKey() { return window.location.href.toString().split(window.location.host)[1].replace(/&return=[a-zA-Z0-9%]+/, '').split('#')[0]; } }, { key: "saveState", value: function saveState(value) { var storageKey = this.getStorageKey(); sessionStorage.setItem(storageKey, value); } }, { key: "activateFromState", value: function activateFromState() { var _this8 = this; this.hasNested = this.querySelector('joomla-tab') instanceof HTMLElement; // Use the sessionStorage state! var href = sessionStorage.getItem(this.getStorageKey()); if (href) { var currentTabIndex = this.tabs.findIndex(function (tab) { return tab.tab.id === href; }); if (currentTabIndex >= 0) { this.activateTab(currentTabIndex, false); } else if (this.hasNested) { var childTabs = this.querySelector('joomla-tab'); if (childTabs) { var activeTabs = [].slice.call(this.querySelectorAll('joomla-tab-element')).reverse().filter(function (activeTabEl) { return activeTabEl.id === href; }); if (activeTabs.length) { // Activate the deepest tab var activeTab = activeTabs[0].closest('joomla-tab'); [].slice.call(activeTab.querySelectorAll('joomla-tab-element')).forEach(function (tabEl) { tabEl.removeAttribute('active'); if (tabEl.id === href) { tabEl.setAttribute('active', ''); } }); // Activate all parent tabs var _loop = function _loop() { var parentTabContainer = activeTab.closest('joomla-tab'); var parentTabEl = activeTab.parentNode.closest('joomla-tab-element'); [].slice.call(parentTabContainer.querySelectorAll('joomla-tab-element')) // eslint-disable-next-line no-loop-func .forEach(function (tabEl) { tabEl.removeAttribute('active'); if (parentTabEl === tabEl) { tabEl.setAttribute('active', ''); activeTab = parentTabEl; } }); }; while (activeTab.parentNode.closest('joomla-tab') !== this) { _loop(); } [].slice.call(this.children).filter(function (el) { return el.tagName.toLowerCase() === 'joomla-tab-element'; }).forEach(function (tabEl) { tabEl.removeAttribute('active'); var isActiveChild = tabEl.querySelector('joomla-tab-element[active]'); if (isActiveChild) { _this8.activateTab(tabEl, false); } }); } } } } } /* Method to dispatch events */ }, { key: "dispatchCustomEvent", value: function dispatchCustomEvent(eventName, element, related) { var OriginalCustomEvent = new CustomEvent(eventName, { bubbles: true, cancelable: true }); OriginalCustomEvent.relatedTarget = related; element.dispatchEvent(OriginalCustomEvent); } }], [{ key: "observedAttributes", get: /* Attributes to monitor */ function get() { return ['recall', 'orientation', 'view', 'breakpoint']; } }]); return TabsElement; }( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); customElements.define('joomla-tab', TabsElement); js/joomla-alert-es5.min.js.gz 0000644 00000005523 15173236314 0012011 0 ustar 00 � �Z�o�6���X8�"+�8�ٸ���h��I?�|Wy�h�I9Yd�?�)J��í?�53��p^$�t��Lpx�7k ��>A��.�}��v�R����XĽ���j!Z���5^R��0�^2��j!������O sh��;Ƀ<����n;�V����=\p��]Y ��� ���pGʵZ�p���>V!6��d!k�9|�@�$������~�<J�;���,D�)`G� ��'h���4 }�p��6�g��JHt�P�T�0F�x� �Xgpv��&7�݂��~�1�d7���W����y{!%ݔLٿ�$�-��Z(0���m��fJK�oS�E:�NL���^�a�{k�Z��Rʊ�-�y�ZV!������;sl�] ��.��N��h��`��� c��� ��3O#��/Y�}!o�r� ��G.���˜kr9�a��_�����UKWk��K+��K�J��ώ�ܮ:�2~ɻ��e��V/�����q%r����������$�O���}��j �g�Iq�'t����y���Zp��ٓd��A���`�NA_�G�nR�Y|�� �>�ݏ^J��A�f r2��s�qL?����RH���e5P�q�֠��C�_��E���ҔWX���� d���.Ia�q�Y�� V�Ұ�����B�u���2�iCe:��Y\zjޞ�&�EV��I�i"D�7�u� ���J�5�!��lP��-���kE��뀥IX����d�;G�kM!q�9$�M��ku �mS!&�i�_E�I��&q��L�F�ϓ�5ъЇ��FH Ɛ�F�]�r.Ec>� g�= Z�k~c]���)b ��L^��2�5z� �Dޭ�gχ�ۭ \�9�7�Df3�0(?H�#E^���J��R�Q�A-��)ln3*�Z1b�g�_�q�ԅ/�6k��Q���)�K��G��L4np/X Ol��y���%�*d�d �T��4,90�4�-SX��n�&�&аv�z�!���c��+��K�]����%*- �8����9h� �Ц�ڱ{�Q��y�x�_7$��T�{�J�x��}���k=n�;��&����ǵD�v���%J�J-v!�F�P ��3�0�i�\Re���-��c��{�X���%�|g�i� ��q�<mK��B�&�cl�*�T#I��"ΗL+���"��1L��5�4�Vl�d�ė�Q@lf������&1U�Ӹ��MkU� z��'�k��1 �;�,�z�n��A���x�.�`���v�Cf�CKX�7r^ s�yV3}��#�)�sEڸ��镶ir� �\�6R�hJ�������R|���Ol0�%ҏ�$D�4Ѻ���qѽ�x��o�d�L#�煝ǔҊ�j���r��)�M S�~��� �uc�wx�RM��U��;S�|�a|�9I:s�i���^�����}ee�=,��c�8p3܆9�g��>�H��fE��´j����_�����H�{�������M��vܖ��+��&<,��"<�0wqS��c#���'��"<�Dݰi�b�:��cz� �Aq�uɝ�n��0e���� :m�J ��C���a~��(�B��(T-U �:�i;s�n�[���1Z^V�P���O6�Ӻ��s��Rl�̧�:�w[������1���K�W���2��n�Pޣ�*P���$e0�+�+��d�N�J�{�dm�+S: "�-��>zvV>��_�kC�%�(g+;?�:K]=Y��N�UK/h�R_4���ݹ�Q�ot������n{k{jQ�L�M�� ���U��X�w?Gi�(�R|�3�қK�+q�o���Y|��Rt�oU�zr�t��*��^�2�´I�{�L�.ȺK�":H��uR�Lǻ��^g&wgdR��o�Ԋ)ei��E�n_h����Y�?�)�,Ǡ��/�a��Tͨq�j �v��ɀ��E���xr(��@i<�7� ���o��5Y��N��=�����!�}�\���A�<�( O���+��m���{|���d4��&g��,\����q~�dx�L���u�x#LZ�@%7w&�P~��<���P��d�j����x�;�� /7��c�y�m��|C~L~H�NP��aRi�x^�jlO�~�����r����6�7�"6!�|���͔)r�gԔqE�v��q���t������gd��4]�q�e�=SkʁJF/�����3-;̞�k�B5{��<�.곤*�|�ޚܬ_ O9������2��Pv�M��Yj�`����4��n�v��dz|PԎ0{�Fb�U-3��}b�٣99��WK�_{t��>���c�B�5L���Nz�����+�;��y�{���1K�ZH���EY@dc������lB��,�y��Rv�̝|�x��̽��E��� ]L��y�d�SVs�>` �x DF�1��E�i�D C�y�&�̞����R�8�Nd$� id:��<�M�S����rxB�ӫX{dϪ^�ً%Q0pf�KD�I�۫���"6պ#��Yܹ:�b�3`�0a���Q�{���~�=�H���F^�e+Y�]�j�������(�/XW\����W����6�x[9��o(Ps�EeϦ|x��"�#�F����0�2nU�o�?� � �~Q�� ����F�\�m�{�N��q���2����M��ZS�\���lĒ����ѵ���σ�� �°�R�K��g�o<}#[�~�V(:�h�,@��y��4���} ��V'A��|��s7^�"/`3��L �T.�XlC�v����D�h����1� ) js/joomla-alert-es5.js 0000644 00000032740 15173236314 0010611 0 ustar 00 function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var AlertElement = /*#__PURE__*/function (_HTMLElement) { _inherits(AlertElement, _HTMLElement); var _super = _createSuper(AlertElement); function AlertElement() { var _this; _classCallCheck(this, AlertElement); _this = _super.call(this); // Bindings _this.close = _this.close.bind(_assertThisInitialized(_this)); _this.destroyCloseButton = _this.destroyCloseButton.bind(_assertThisInitialized(_this)); _this.createCloseButton = _this.createCloseButton.bind(_assertThisInitialized(_this)); _this.onMutation = _this.onMutation.bind(_assertThisInitialized(_this)); _this.observer = new MutationObserver(_this.onMutation); _this.observer.observe(_assertThisInitialized(_this), { attributes: false, childList: true, subtree: true }); // Handle the fade in animation _this.addEventListener('animationend', function (event) { if (event.animationName === 'joomla-alert-fade-in' && event.target === _assertThisInitialized(_this)) { _this.dispatchEvent(new CustomEvent('joomla.alert.shown')); _this.style.removeProperty('animationName'); } }); // Handle the fade out animation _this.addEventListener('animationend', function (event) { if (event.animationName === 'joomla-alert-fade-out' && event.target === _assertThisInitialized(_this)) { _this.dispatchEvent(new CustomEvent('joomla.alert.closed')); _this.remove(); } }); return _this; } /* Attributes to monitor */ _createClass(AlertElement, [{ key: "type", get: function get() { return this.getAttribute('type'); }, set: function set(value) { this.setAttribute('type', value); } }, { key: "role", get: function get() { return this.getAttribute('role'); }, set: function set(value) { this.setAttribute('role', value); } }, { key: "closeText", get: function get() { return this.getAttribute('close-text'); }, set: function set(value) { this.setAttribute('close-text', value); } }, { key: "dismiss", get: function get() { return this.getAttribute('dismiss'); }, set: function set(value) { this.setAttribute('dismiss', value); } }, { key: "autodismiss", get: function get() { return this.getAttribute('auto-dismiss'); }, set: function set(value) { this.setAttribute('auto-dismiss', value); } /* Lifecycle, element appended to the DOM */ }, { key: "connectedCallback", value: function connectedCallback() { this.dispatchEvent(new CustomEvent('joomla.alert.show')); this.style.animationName = 'joomla-alert-fade-in'; // Default to info if (!this.type || !['info', 'warning', 'danger', 'success'].includes(this.type)) { this.setAttribute('type', 'info'); } // Default to alert if (!this.role || !['alert', 'alertdialog'].includes(this.role)) { this.setAttribute('role', 'alert'); } // Hydrate the button if (this.firstElementChild && this.firstElementChild.tagName === 'BUTTON') { this.button = this.firstElementChild; if (this.button.classList.contains('joomla-alert--close')) { this.button.classList.add('joomla-alert--close'); } if (this.button.innerHTML === '') { this.button.innerHTML = '<span aria-hidden="true">×</span>'; } if (!this.button.hasAttribute('aria-label')) { this.button.setAttribute('aria-label', this.closeText); } } // Append button if (this.hasAttribute('dismiss') && !this.button) { this.createCloseButton(); } if (this.hasAttribute('auto-dismiss')) { this.autoDismiss(); } } /* Lifecycle, element removed from the DOM */ }, { key: "disconnectedCallback", value: function disconnectedCallback() { if (this.button) { this.button.removeEventListener('click', this.close); } this.observer.disconnect(); } /* Respond to attribute changes */ }, { key: "attributeChangedCallback", value: function attributeChangedCallback(attr, oldValue, newValue) { switch (attr) { case 'type': if (!newValue || newValue && ['info', 'warning', 'danger', 'success'].indexOf(newValue) === -1) { this.type = 'info'; } break; case 'role': if (!newValue || newValue && ['alert', 'alertdialog'].indexOf(newValue) === -1) { this.role = 'alert'; } break; case 'dismiss': if ((!newValue || newValue === '') && (!oldValue || oldValue === '')) { if (this.button && !this.hasAttribute('dismiss')) { this.destroyCloseButton(); } else if (!this.button && this.hasAttribute('dismiss')) { this.createCloseButton(); } } else if (this.button && newValue === 'false') { this.destroyCloseButton(); } else if (!this.button && newValue !== 'false') { this.createCloseButton(); } break; case 'close-text': if (!newValue || newValue !== oldValue) { if (this.button) { this.button.setAttribute('aria-label', newValue); } } break; case 'auto-dismiss': this.autoDismiss(); break; } } /* Observe added elements */ }, { key: "onMutation", value: function onMutation(mutationsList) { // eslint-disable-next-line no-restricted-syntax var _iterator = _createForOfIteratorHelper(mutationsList), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var mutation = _step.value; if (mutation.type === 'childList') { if (mutation.addedNodes.length) { // Make sure that the button is always the first element if (this.button && this.firstElementChild !== this.button) { this.prepend(this.button); } } } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } /* Method to close the alert */ }, { key: "close", value: function close() { this.dispatchEvent(new CustomEvent('joomla.alert.close')); this.style.animationName = 'joomla-alert-fade-out'; } /* Method to create the close button */ }, { key: "createCloseButton", value: function createCloseButton() { this.button = document.createElement('button'); this.button.setAttribute('type', 'button'); this.button.classList.add('joomla-alert--close'); this.button.innerHTML = '<span aria-hidden="true">×</span>'; this.button.setAttribute('aria-label', this.closeText); this.insertAdjacentElement('afterbegin', this.button); /* Add the required listener */ this.button.addEventListener('click', this.close); } /* Method to remove the close button */ }, { key: "destroyCloseButton", value: function destroyCloseButton() { if (this.button) { this.button.removeEventListener('click', this.close); this.button.parentNode.removeChild(this.button); this.button = null; } } /* Method to auto-dismiss */ }, { key: "autoDismiss", value: function autoDismiss() { var timer = parseInt(this.getAttribute('auto-dismiss'), 10); setTimeout(this.close, timer >= 10 ? timer : 3000); } }], [{ key: "observedAttributes", get: function get() { return ['type', 'role', 'dismiss', 'auto-dismiss', 'close-text']; } }]); return AlertElement; }( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); if (!customElements.get('joomla-alert')) { customElements.define('joomla-alert', AlertElement); }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings